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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants