vsphere-automation-sdk-python
vsphere-automation-sdk-python copied to clipboard
Unable to get DatastoreCluster
- [x] I am using the latest SDK version
- [x] This API is compatible with my vCenter version (You can get the info from 'vcenter_version' in each sample)
- [x] I have searched existing issues and Troubleshooting wiki
Environment
- sdk package version:
- python version:
Python 3.8
-
vSphere version: v6.7
-
Operating System/Shell (used to run SDK-based apps): macOS
Steps or code snippet to reproduce
(Pdb) datastore_summaries = client.vcenter.Datastore.list(filter_spec)
/Volumes/data/venv3/lib/python3.7/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
(Pdb) datastore_summaries
[Summary(datastore='datastore-17', name='ds_171_1', type=Type(string='VMFS'), free_space=12486443008, capacity=13421772800), Summary(datastore='datastore-18', name='ds_171_2', type=Type(string='VMFS'), free_space=158336024576, capacity=214479929344), Summary(datastore='datastore-19', name='ds_200', type=Type(string='VMFS'), free_space=194861072384, capacity=214479929344)]
Actual behavior
No API for getting information about datastore cluster
Expected behavior
some API like get
, list
for getting information about datastore cluster.
This would be very useful
Hey
Is this something that could help?
https://vdc-repo.vmware.com/vmwb-repository/dcr-public/1cd28284-3b72-4885-9e31-d1c6d9e26686/71ef7304-a6c9-43b3-a3cd-868b2c236c81/doc/structures/com/vmware/vcenter/inventory/datastore/svc.info-structure.html
I think you should look for datastore clusters (StoragePod) in inventory/datastore
@Akasurde
Does the above link help?
@anusha94 Nope. I tried -
(Pdb) client.vcenter.inventory.Datastore.Info(type='StoragePod')
Info(type='StoragePod')
Even if I pass None
it does not do anything
(Pdb) client.vcenter.inventory.Datastore.Info(type='')
Info(type='')
(Pdb) client.vcenter.inventory.Datastore.Info(type=None)
Info(type=None)
Can someone confirm there is no capability to get DatastoreCluster? Or at the very least, determine if a datastore is part of a cluster?
Another nice feature would be the ability to pull the "Related Objects" for a VM via the REST API. 🙏
I believe you are looking this for Storage DRS Cluster (SDRS POD). If yes, this capability is not with this SDK. You may need to use pyVmomi libs for this capability.