mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-04 09:43:15 +00:00
cloudstack: cs_instance do not pass zoneid to listVirtualMachines
This change is related to 2 issues; - The API does not return destroyed VMs if zone ID is passed for CS version < 4.5.2. Also see CLOUDSTACK-8578. This only affects domain and root admins. - The instance name must be unique across all zones. If we pass the zone ID to find a VM, it will not be found if it is in a different zone but a deployment with the name would fail.
This commit is contained in:
@@ -439,8 +439,7 @@ class AnsibleCloudStackInstance(AnsibleCloudStack):
|
||||
args['account'] = self.get_account(key='name')
|
||||
args['domainid'] = self.get_domain(key='id')
|
||||
args['projectid'] = self.get_project(key='id')
|
||||
args['zoneid'] = self.get_zone(key='id')
|
||||
|
||||
# Do not pass zoneid, as the instance name must be unique across zones.
|
||||
instances = self.cs.listVirtualMachines(**args)
|
||||
if instances:
|
||||
for v in instances['virtualmachine']:
|
||||
|
||||
Reference in New Issue
Block a user