mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-28 03:49:09 -07:00
cloudstack: added fetch_list=True where appropriate (#40233)
This commit is contained in:
parent
44eaa2c007
commit
912e07a036
17 changed files with 50 additions and 29 deletions
|
@ -222,11 +222,12 @@ class AnsibleCloudStackVpc(AnsibleCloudStack):
|
|||
'domainid': self.get_domain(key='id'),
|
||||
'projectid': self.get_project(key='id'),
|
||||
'zoneid': self.get_zone(key='id'),
|
||||
'fetch_list': True,
|
||||
}
|
||||
vpcs = self.query_api('listVPCs', **args)
|
||||
if vpcs:
|
||||
vpc_name = self.module.params.get('name')
|
||||
for v in vpcs['vpc']:
|
||||
for v in vpcs:
|
||||
if vpc_name in [v['name'], v['displaytext'], v['id']]:
|
||||
# Fail if the identifyer matches more than one VPC
|
||||
if self.vpc:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue