vmware / pyvmomi-community-samples

A place for community contributed samples for the pyVmomi library.
Apache License 2.0
1.01k stars 922 forks source link

SoapStubAdapter with certificates #653

Open manikantanallagatla opened 4 years ago

manikantanallagatla commented 4 years ago

All the samples(https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/get_vm_storage_policy.py#L82, https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/list_vm_storage_policy.py#L36, https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/tools/pbmhelper.py#L44) that use SoapStubAdapter are using cookies for authentication. Can we have any sample of SoapStubAdapter that uses certificates instead? We can set certificates using this API: https://vdc-download.vmware.com/vmwb-repository/dcr-public/98d63b35-d822-47fe-a87a-ddefd469df06/2e3c7b58-f2bd-486e-8bb1-a75eb0640bee/doc/vim.ExtensionManager.html#setCertificate