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

vcenter.iso.iso_path.get_datastore_path() missing

Open Yannik opened this issue 1 year ago • 3 comments

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 avatar Nov 08 '23 11:11 Yannik

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.

Yannik avatar Nov 08 '23 11:11 Yannik

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.

kunal-pmj avatar Nov 10 '23 08:11 kunal-pmj

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.

Yannik avatar Nov 10 '23 11:11 Yannik