Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

add vpntunnel resourcerefs #152

Merged
merged 1 commit into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions lib/ansible/modules/cloud/google/gcp_compute_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@
next_hop_vpn_tunnel:
description:
- URL to a VpnTunnel that should handle matching packets.
- 'This field represents a link to a VpnTunnel resource in GCP. It can be specified
in two ways. First, you can place in the selfLink of the resource here as a
string Alternatively, you can add `register: name-of-resource` to a gcp_compute_vpn_tunnel
task and then set this next_hop_vpn_tunnel field to "{{ name-of-resource }}"'
required: false
extends_documentation_fragment: gcp
notes:
Expand Down Expand Up @@ -261,7 +265,7 @@ def main():
next_hop_gateway=dict(type='str'),
next_hop_instance=dict(type='str'),
next_hop_ip=dict(type='str'),
next_hop_vpn_tunnel=dict(type='str')
next_hop_vpn_tunnel=dict()
)
)

Expand Down Expand Up @@ -322,7 +326,7 @@ def resource_to_request(module):
u'nextHopGateway': module.params.get('next_hop_gateway'),
u'nextHopInstance': module.params.get('next_hop_instance'),
u'nextHopIp': module.params.get('next_hop_ip'),
u'nextHopVpnTunnel': module.params.get('next_hop_vpn_tunnel')
u'nextHopVpnTunnel': replace_resource_dict(module.params.get(u'next_hop_vpn_tunnel', {}), 'selfLink')
}
return_vals = {}
for k, v in request.items():
Expand Down Expand Up @@ -397,7 +401,7 @@ def response_to_hash(module, response):
u'nextHopGateway': module.params.get('next_hop_gateway'),
u'nextHopInstance': module.params.get('next_hop_instance'),
u'nextHopIp': module.params.get('next_hop_ip'),
u'nextHopVpnTunnel': module.params.get('next_hop_vpn_tunnel'),
u'nextHopVpnTunnel': replace_resource_dict(module.params.get(u'next_hop_vpn_tunnel', {}), 'selfLink'),
u'nextHopNetwork': response.get(u'nextHopNetwork')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,13 @@
type: str
tunnels:
description:
- A list of references to VpnTunnel resources associated to this VPN gateway.
- A list of references to VpnTunnel resources associated with this VPN gateway.
returned: success
type: list
forwardingRules:
description:
- A list of references to the ForwardingRule resources associated to this VPN gateway.
- A list of references to the ForwardingRule resources associated with this VPN
gateway.
returned: success
type: list
region:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@
type: str
tunnels:
description:
- A list of references to VpnTunnel resources associated to this VPN gateway.
- A list of references to VpnTunnel resources associated with this VPN gateway.
returned: success
type: list
forwardingRules:
description:
- A list of references to the ForwardingRule resources associated to this VPN
gateway.
- A list of references to the ForwardingRule resources associated with this
VPN gateway.
returned: success
type: list
region:
Expand Down