Bug fixes for GCP modules (#64824)

This commit is contained in:
The Magician 2019-11-25 16:19:56 -08:00 committed by ansibot
parent 152a94bfaf
commit 4fdc022853
4 changed files with 4 additions and 41 deletions

View file

@ -54,17 +54,6 @@ options:
modify this field.
required: false
type: str
ipv4_range:
description:
- If this field is specified, a deprecated legacy network is created.
- You will no longer be able to create a legacy network on Feb 1, 2020.
- See the [legacy network docs](U(https://cloud.google.com/vpc/docs/legacy)) for
more details.
- The range of internal addresses that are legal on this legacy network.
- 'This range is a CIDR specification, for example: `192.168.0.0/16`.'
- The resource must be recreated to modify this field.
required: false
type: str
name:
description:
- Name of the resource. Provided by the client when the resource is created. The
@ -183,17 +172,6 @@ id:
- The unique identifier for the resource.
returned: success
type: int
ipv4_range:
description:
- If this field is specified, a deprecated legacy network is created.
- You will no longer be able to create a legacy network on Feb 1, 2020.
- See the [legacy network docs](U(https://cloud.google.com/vpc/docs/legacy)) for
more details.
- The range of internal addresses that are legal on this legacy network.
- 'This range is a CIDR specification, for example: `192.168.0.0/16`.'
- The resource must be recreated to modify this field.
returned: success
type: str
name:
description:
- Name of the resource. Provided by the client when the resource is created. The
@ -260,12 +238,10 @@ def main():
argument_spec=dict(
state=dict(default='present', choices=['present', 'absent'], type='str'),
description=dict(type='str'),
ipv4_range=dict(type='str'),
name=dict(required=True, type='str'),
auto_create_subnetworks=dict(type='bool'),
routing_config=dict(type='dict', options=dict(routing_mode=dict(required=True, type='str'))),
),
mutually_exclusive=[['auto_create_subnetworks', 'ipv4_range']],
)
)
if not module.params['scopes']:
@ -331,7 +307,6 @@ def resource_to_request(module):
request = {
u'kind': 'compute#network',
u'description': module.params.get('description'),
u'IPv4Range': module.params.get('ipv4_range'),
u'name': module.params.get('name'),
u'autoCreateSubnetworks': module.params.get('auto_create_subnetworks'),
u'routingConfig': NetworkRoutingconfig(module.params.get('routing_config', {}), module).to_request(),
@ -403,7 +378,6 @@ def response_to_hash(module, response):
u'description': module.params.get('description'),
u'gatewayIPv4': response.get(u'gatewayIPv4'),
u'id': response.get(u'id'),
u'IPv4Range': module.params.get('ipv4_range'),
u'name': module.params.get('name'),
u'subnetworks': response.get(u'subnetworks'),
u'autoCreateSubnetworks': module.params.get('auto_create_subnetworks'),

View file

@ -129,17 +129,6 @@ resources:
- The unique identifier for the resource.
returned: success
type: int
ipv4_range:
description:
- If this field is specified, a deprecated legacy network is created.
- You will no longer be able to create a legacy network on Feb 1, 2020.
- See the [legacy network docs](U(https://cloud.google.com/vpc/docs/legacy))
for more details.
- The range of internal addresses that are legal on this legacy network.
- 'This range is a CIDR specification, for example: `192.168.0.0/16`.'
- The resource must be recreated to modify this field.
returned: success
type: str
name:
description:
- Name of the resource. Provided by the client when the resource is created.

View file

@ -46,7 +46,7 @@ description:
gateway. Packets that do not match any route in the sending virtual machine's routing
table will be dropped.
- A Route resource must have exactly one specification of either nextHopGateway, nextHopInstance,
nextHopIp, or nextHopVpnTunnel.
nextHopIp, nextHopVpnTunnel, or nextHopIlb.
short_description: Creates a GCP Route
version_added: '2.6'
author: Google Inc. (@googlecloudplatform)

View file

@ -116,7 +116,7 @@ options:
range:
description:
- The IP range to advertise. The value must be a CIDR-formatted string.
required: false
required: true
type: str
description:
description:
@ -322,7 +322,7 @@ def main():
asn=dict(required=True, type='int'),
advertise_mode=dict(default='DEFAULT', type='str'),
advertised_groups=dict(type='list', elements='str'),
advertised_ip_ranges=dict(type='list', elements='dict', options=dict(range=dict(type='str'), description=dict(type='str'))),
advertised_ip_ranges=dict(type='list', elements='dict', options=dict(range=dict(required=True, type='str'), description=dict(type='str'))),
),
),
region=dict(required=True, type='str'),