vsphere-automation-sdk-python icon indicating copy to clipboard operation
vsphere-automation-sdk-python copied to clipboard

Unable to get DatastoreCluster

Open Akasurde opened this issue 3 years ago • 6 comments

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.

Akasurde avatar Nov 03 '20 12:11 Akasurde

This would be very useful

jdotsmith avatar Nov 03 '20 17:11 jdotsmith

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

MalfuncEddie avatar Nov 25 '20 14:11 MalfuncEddie

@Akasurde

Does the above link help?

anusha94 avatar Mar 15 '21 04:03 anusha94

@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)

Akasurde avatar Mar 15 '21 05:03 Akasurde

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. 🙏

fetsko avatar Jun 10 '22 00:06 fetsko

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.

jobingeo avatar Jun 10 '22 09:06 jobingeo