Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

Use non-Admin API to query VMs wherever possible#774

Open
andrew-lee-1089 wants to merge 1 commit intovmware-archive:masterfrom
andrew-lee-1089:patch-3
Open

Use non-Admin API to query VMs wherever possible#774
andrew-lee-1089 wants to merge 1 commit intovmware-archive:masterfrom
andrew-lee-1089:patch-3

Conversation

@andrew-lee-1089
Copy link

@andrew-lee-1089 andrew-lee-1089 commented Aug 23, 2021

If possible do not use the Admin API:

In the query_vm_by_name method use the non-Admin API
I was tempted just to create a new method called query_vm_by_name_not_as_admin but decided that wasn't necessary: I think this fine, both the Admin and non-Admin query return an XML object with a 'href' which is what we care about:
As per https://www.vmware.com/support/vcd/doc/rest-api-doc-1.5-html/types/QueryResultVMRecordType.html and https://www.vmware.com/support/vcd/doc/rest-api-doc-1.5-html/types/QueryResultAdminVMRecordType.html both return something with a href

@shashim22 added this method last summer in https://github.com/vmware/pyvcloud/pull/367/files so should definitely review, :-)


This change is Reviewable

@vmwclabot
Copy link

@andrew-lee-metaswitch, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

@vmwclabot
Copy link

@andrew-lee-metaswitch, VMware has approved your signed contributor license agreement.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants