vmware/pyvmomi-community-samples
View on GitHubIntermittent issue when applying a license
Open
#474 opened on Mar 28, 2018
help wanted
Description
Hello,
Have you guys seen this error when applying a license?
File "/usr/lib/python2.7/site-packages/pyVmomi/VmomiSupport.py", line 580, in
self.f(*(self.args + (obj,) + args), **kwargs)
File "/usr/lib/python2.7/site-packages/pyVmomi/VmomiSupport.py", line 386, in _InvokeMethod
return self._stub.InvokeMethod(self, info, args)
File "/usr/lib/python2.7/site-packages/pyVmomi/SoapAdapter.py", line 1366, in InvokeMethod
raise obj # pylint: disable-msg=E0702
vmodl.fault.InvalidArgument: (vmodl.fault.InvalidArgument) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = 'A specified parameter was not correct: entityId',
faultCause = ,
faultMessage = (vmodl.LocalizableMessage) [],
invalidProperty = u'entityId'
}
This is the code that calls the application of the license:
ic_mgr = content.licenseManager
lic_mgr.AddLicense(lic_key)
if description:
lic_mgr.licenseAssignmentManager.UpdateAssignedLicense(
entity_id, lic_key, description)
else:
lic_mgr.licenseAssignmentManager.UpdateAssignedLicense(entity_id, lic_key)
We are getting an error with the entity_id variable even though we assign that variable with a hard-coded value when applying a NSX license. Retrying solves this issue, however, I want to know if you guys are aware of this or know a little bit more about this issue? Any ideas on how to stop getting this issue?