Open
Description
Describe the bug
Calling the synchronous vcenter api leads to different behaviors depending on if you assign the return value of create_vsphere_client
before usage.
Calling it directly from the return value raises this excpetion:
LocalizableMessage(id='com.vmware.vapi.endpoint.method.authentication.required', default_message='Authentication required.', args=[], params=None, localized=None)], data : None, error_type : UNAUTHENTICATED}
Reproduction steps
Failure
x = create_vsphere_client(
server="",
username="",
password="",
session="",
).vcenter.vm.list()
Works
x = create_vsphere_client(
server="",
username="",
password="",
session="",
)
x.vcenter.vm.list()
Expected behavior
Both version work without errors.
Additional context
No response