I try to get the sms.StorageManager instance in pyvmomi, and register storage provider later. But I cannot find the way to get sms.StorageManager. The objects I get from RetrieveContent() method is all like "sessionManager", "scheduledTaskManager", no sms.StorageManager. Is there any way to get sms.StorageManager?
Asked
Active
Viewed 218 times
1 Answers
0
Right now the SMS API isnt supported by pyVmomi, but there is a wrapper created by a 3rd party that supports it. Here is a link to the pyVmomi wrapper that supports it. This is an example they provide using their wrapper:
from infi.pyvmomi_wrapper import Client
from infi.pyvmomi_wrapper.sms import SmsClient
# first open a "regular" client
client = Client("vcenter-server", username="myuser", password="pass")
sms_client = SmsClient(client)
storage_manager = sms_client.service_instance.QueryStorageManager()
storage_providers = storage_manager.QueryProvider()

Michael Rice
- 7,974
- 1
- 15
- 18