mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
cloudstack: added fetch_list=True where appropriate (#40233)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user