mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-22 14:01:42 -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
|
@ -206,13 +206,14 @@ class AnsibleCloudStackVpnConnection(AnsibleCloudStack):
|
|||
args = {
|
||||
'account': self.get_account(key='name'),
|
||||
'domainid': self.get_domain(key='id'),
|
||||
'projectid': self.get_project(key='id')
|
||||
'projectid': self.get_project(key='id'),
|
||||
'fetch_list': True,
|
||||
}
|
||||
|
||||
vpn_customer_gateway = identifier or self.module.params.get('vpn_customer_gateway')
|
||||
vcgws = self.query_api('listVpnCustomerGateways', **args)
|
||||
if vcgws:
|
||||
for vcgw in vcgws['vpncustomergateway']:
|
||||
for vcgw in vcgws:
|
||||
if vpn_customer_gateway.lower() in [vcgw['id'], vcgw['name'].lower()]:
|
||||
self.vpn_customer_gateway = vcgw
|
||||
return self._get_by_key(key, self.vpn_customer_gateway)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue