From 530a1ebc85514913adaaddcc7a2dda4c3b176a72 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 23 Aug 2021 15:55:59 +0100 Subject: [PATCH] Use non-Admin API to query VMs wherever possible --- pyvcloud/vcd/vdc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyvcloud/vcd/vdc.py b/pyvcloud/vcd/vdc.py index 3c01f9ddc..1f69d39c3 100644 --- a/pyvcloud/vcd/vdc.py +++ b/pyvcloud/vcd/vdc.py @@ -160,7 +160,7 @@ def query_vm_by_name(self, name): vdc_filter = ('vdc==%s' % urllib.parse.quote(self.href)) name_filter = ('name', name) query_obj = self.client.get_typed_query( - ResourceType.ADMIN_VM.value, + ResourceType.VM.value, qfilter=vdc_filter, equality_filter=name_filter) vm_href = query_obj.find_unique().get('href')