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_reboot.py
Traceback (most recent call last):
File "host_reboot.py", line 7, in <module>
host1.RebootHost_Task(False)
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 0x1110529e0> parse error at: line:2, col:506'
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.RebootHost_Task(False)
The text was updated successfully, but these errors were encountered:
Copy and replace "ExitMaintenanceMode" with "Reboot". Instead of setting InMaintenanceMode, you'd probably want check the value of InMaintenanceMode. If true or the request.Force flag is true, return nil. Otherwise, if InMaintenanceMode is false, return the same fault a real VC would. types.ResourceInUse for example.
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Mark as fresh by adding the comment /remove-lifecycle stale.
Python traceback:
Python reproducer
The text was updated successfully, but these errors were encountered: