You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating System/Shell (used to run SDK-based apps):
macOS
Steps or code snippet to reproduce
fromvmware.vapi.vsphere.clientimportcreate_vsphere_clientimportrequestsfromcom.vmware.vapi.std_clientimportDynamicIDimporturllib3urllib3.disable_warnings()
session=requests.Session()
session.verify=Falsehostname="10.65.201.153"username="[email protected]"password="Esxi@123$%"client=create_vsphere_client(server=hostname,
username=username,
password=password,
session=session)
tag_svc=client.tagging.Tagtag_ass_svc=client.tagging.TagAssociationtags= []
cluster_id='domain-c9'cls_dynamic_id=DynamicID(type='ComputeClusterResource', id=cluster_id) # This is wrong type, it should be ClusterComputeResourcetag_ids=tag_ass_svc.list_attached_tags(cls_dynamic_id)
fortag_idintag_ids:
tags.append(tag_svc.get(tag_id))
print(tags)
Environment
Python 3.7.4
vSphere version:
7
Operating System/Shell (used to run SDK-based apps):
macOS
Steps or code snippet to reproduce
Actual behavior
[]
Expected behavior
[TagModel(id='urn:vmomi:InventoryServiceTag:0deaa3f7-a91e-4c20-bf19-f15201c49ec2:GLOBAL', category_id='urn:vmomi:InventoryServiceCategory:ca46a635-5e0c-47e9-a4c1-9682ac281928:GLOBAL', name='tag_0001', description='', used_by=set())]
The text was updated successfully, but these errors were encountered: