vmware / vsphere-automation-sdk-python

Python samples, language bindings, and API reference documentation for vSphere, VMC, and NSX-T using the VMware REST API
MIT License
745 stars 313 forks source link

vcenter.iso.iso_path.get_datastore_path() missing #399

Open Yannik opened 11 months ago

Yannik commented 11 months ago

Describe the bug

Hi, according to the docs, there should be a vcenter.iso.iso_path.get_datastore_path() method to get the datastore path of a content library item: https://vdc-download.vmware.com/vmwb-repository/dcr-public/c2c7244e-817b-40d8-98f3-6c2ad5db56d6/af6d8ff7-1c38-4571-b72a-614ac319a62b/operations/com/vmware/vcenter/iso/iso_path.get_datastore_path-operation.html

However, when I try to use that method, I get an error that the iso_path attribute does not exist:

>>> client.vcenter.iso_path.get_datastore_path('52973462-d3fd-47c4-b532-c8b8a2dfc655')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/yannik/.local/lib/python3.11/site-packages/vmware/vapi/bindings/stub.py", line 413, in __getattribute__
    result = object.__getattribute__(self, name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'StubFactory' object has no attribute 'iso_path'

Reproduction steps

client = create_vsphere_client(...)
client.vcenter.iso_path.get_datastore_path('<valid-library-item-guid>')

Expected behavior

The datastore path of the library item should be returned.

Additional context

No response

Yannik commented 11 months ago

Looks like the method is not present in the newer docs: https://developer.vmware.com/apis/vsphere-automation/latest/vcenter/iso/

Therefore I'd like changing this to a feature request. We really need this method.

kunal-pmj commented 11 months ago

The API is internal hence not present in the public SDK. This is the latest API documentation : https://developer.vmware.com/apis/vsphere-automation/latest/vcenter/iso/

This documentation has deprecated : https://vdc-download.vmware.com/vmwb-repository/dcr-public/c2c7244e-817b-40d8-98f3-6c2ad5db56d6/af6d8ff7-1c38-4571-b72a-614ac319a62b/operations/com/vmware/vcenter/iso/iso_path.get_datastore_path-operation.html

We will get back to you on the request to make this API available.

Yannik commented 11 months ago

Thank you @kunal-pmj. It is very important for us to be able to access this API call to get the datastore path of a ISO stored in the content library.