You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python host_destroy.py
Traceback (most recent call last):
File "host_destroy.py", line 7, in <module>
host1.Destroy_Task()
File "/Volumes/data/src/ansible/venv4/lib/python2.7/site-packages/pyVmomi/VmomiSupport.py", line 580, in <lambda>
self.f(*(self.args + (obj,) + args), **kwargs)
File "/Volumes/data/src/ansible/venv4/lib/python2.7/site-packages/pyVmomi/VmomiSupport.py", line 386, in _InvokeMethod
return self._stub.InvokeMethod(self, info, args)
File "/Volumes/data/src/ansible/venv4/lib/python2.7/site-packages/pyVmomi/SoapAdapter.py", line 1357, in InvokeMethod
raise exc
pyVmomi.SoapAdapter.ParserError: 'xml document: <httplib.HTTPResponse instance at 0x1116be9e0> parse error at: line:2, col:503'
Python reproducer
frompyVim.connectimportSmartConnect, DisconnectimportsslimportatexitfrompyVmomiimportvimdefconnect():
context=ssl.SSLContext(ssl.PROTOCOL_SSLv23)
context.verify_mode=ssl.CERT_NONEsi=SmartConnect(host='0.0.0.0', user='user', pwd='pass', port=443, sslContext=context)
atexit.register(Disconnect, si)
content=si.RetrieveContent()
returncontentdefget_obj(content, vimtype, name):
""" Return an object by name, if name is None the first found object is returned """obj=Nonecontainer=content.viewManager.CreateContainerView(
content.rootFolder, vimtype, True)
forcincontainer.view:
ifname:
ifc.name==name:
obj=cbreakelse:
obj=cbreakcontainer.Destroy()
returnobjcontent=connect()
host1=get_obj(content, [vim.HostSystem], 'DC0_H0')
host1.Destroy_Task()
The text was updated successfully, but these errors were encountered:
Python traceback:
Python reproducer
The text was updated successfully, but these errors were encountered: