Error in API Reference - Python on ntnx_vmm_py_client.AssociateVmCategoriesParams() | Nutanix Community
Skip to main content

Error in API Reference - Python on ntnx_vmm_py_client.AssociateVmCategoriesParams()

  • April 11, 2025
  • 1 reply
  • 12 views

Forum|alt.badge.img+1

Hi

i don’t know where to report this(no feedback menu on Redocly), but since people may encounter this issue too, i guess they may land here while searching for a solution.

As of 11 April 2025, there is an error in the documentation of APIv4 (python version) with regard to associating categories to a VM.
The page is here: https://developers.nutanix.com/api-reference?namespace=vmm&version=v4.0

The example code says at one line:
 

associateVmCategoriesParams = ntnx_vmm_py_client.AssociateVmCategoriesParams()

well, upon investigating the ntnx_vmm_py_client libraries, i’ve noticed that the class AssociateVmCategoriesParams is imported using AS, therefore with different names depending on technology, as follows:
 

from ntnx_vmm_py_client.models.vmm.v4.ahv.config.AssociateVmCategoriesParams import AssociateVmCategoriesParams as AhvConfigAssociateVmCategoriesParams
from ntnx_vmm_py_client.models.vmm.v4.ahv.config.DisassociateVmCategoriesParams import DisassociateVmCategoriesParams as AhvConfigDisassociateVmCategoriesParams
from ntnx_vmm_py_client.models.vmm.v4.esxi.config.AssociateVmCategoriesParams import AssociateVmCategoriesParams as EsxiConfigAssociateVmCategoriesParams
from ntnx_vmm_py_client.models.vmm.v4.esxi.config.DisassociateVmCategoriesParams import DisassociateVmCategoriesParams as EsxiConfigDisassociateVmCategoriesParams

Considering this, the example for AHV should be:

associateVmCategoriesParams = ntnx_vmm_py_client.AhvConfigAssociateVmCategoriesParams()

and so on for ESX respectively the same for disassociation of categories.

1 reply

Forum|alt.badge.img+1
  • Author
  • Adventurer
  • 8 replies
  • April 15, 2025

//additional relevant info; the issue is observed in ntnx-vmm-py-client version 4.0.1


Reply