I'm new to pyvmomi and python, so please forgive the 'newbie' question:
OBJECTIVE: use pyvmomi to create new folder on the local datastore
Using the following sample code (see url) and made a few modifications by
adding the following code (see below). However I get the following error.
ERROR: TypeError: _InvokeMethod() takes at least 2 arguments (1 given)
QUESTION: How can I fix this error? I'm passing 2 arguments in the code.
NOTE: I can use other sample scripts (e.g. powerOn) passing same info
and it works.
CMD LINE: ....\pyvmomi-community-samples-master> python samples\list_datastore_info.py -s myIP -u myUsername -p myPassword
https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/list_datastore_info.py
CODE:
....
....
atexit.register(connect.Disconnect, service_instance) content = service_instance.RetrieveContent()
#START MY CODE:
dc = content.rootFolder.childEntity[0]
newName = "[local__local] cache"
fm = vim.FileManager
fm.MakeDirectory(name=newName,datacenter=dc)
#END MY CODE:
....
....
Any thoughts are greatly appreciated!