How to exactly use the pyvmomi
library to get the above mapping
, I mean what data structures to use particularly. I suppose it should be done via data store.
def getdatastore(datastore):
try:
summary = datastore.summary
return summary.name
except Exception as error:
print "Unable to access summary for datastore: ", datastore.name
print error
pass
tried with the above function but in vain
You said you want to map "from VM to Storage"
Do you mean
vm.datastore
?If not, can you explain your self better ? (I'm sorry I can't comment, dont have 50 rep)