cloudstack: vpn: compatiblity fix for 4.5 API (#40700)

This commit is contained in:
René Moser 2018-05-25 10:24:39 +02:00 committed by GitHub
parent 8dcb6c288c
commit 6443a56069
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -297,7 +297,7 @@ class AnsibleCloudStackVpnConnection(AnsibleCloudStack):
if 'cidrlist' in vpn_conn: if 'cidrlist' in vpn_conn:
self.result['cidrs'] = vpn_conn['cidrlist'].split(',') or [vpn_conn['cidrlist']] self.result['cidrs'] = vpn_conn['cidrlist'].split(',') or [vpn_conn['cidrlist']]
# Ensure we return a bool # Ensure we return a bool
self.result['force_encap'] = True if vpn_conn['forceencap'] else False self.result['force_encap'] = True if vpn_conn.get('forceencap') else False
args = { args = {
'key': 'name', 'key': 'name',
'identifier': vpn_conn['s2scustomergatewayid'], 'identifier': vpn_conn['s2scustomergatewayid'],

View file

@ -289,7 +289,7 @@ class AnsibleCloudStackVpnCustomerGateway(AnsibleCloudStack):
if 'cidrlist' in vpn_customer_gateway: if 'cidrlist' in vpn_customer_gateway:
self.result['cidrs'] = vpn_customer_gateway['cidrlist'].split(',') or [vpn_customer_gateway['cidrlist']] self.result['cidrs'] = vpn_customer_gateway['cidrlist'].split(',') or [vpn_customer_gateway['cidrlist']]
# Ensure we return a bool # Ensure we return a bool
self.result['force_encap'] = True if vpn_customer_gateway['forceencap'] else False self.result['force_encap'] = True if vpn_customer_gateway.get('forceencap') else False
return self.result return self.result