Bug fixes for GCP modules (#65597)

pull/65309/merge
The Magician 5 years ago committed by ansibot
parent 528163ded2
commit 5bc11caa92

@ -257,12 +257,6 @@ network:
- Only networks that are in the distributed mode can have subnetworks.
returned: success
type: dict
fingerprint:
description:
- Fingerprint of this resource. This field is used internally during updates of
this resource.
returned: success
type: str
secondaryIpRanges:
description:
- An array of configurations for secondary IP ranges for VM instances contained
@ -375,7 +369,7 @@ def update_fields(module, request, response):
if response.get('ipCidrRange') != request.get('ipCidrRange'):
ip_cidr_range_update(module, request, response)
if response.get('secondaryIpRanges') != request.get('secondaryIpRanges'):
fingerprint_update(module, request, response)
secondary_ip_ranges_update(module, request, response)
if response.get('privateIpGoogleAccess') != request.get('privateIpGoogleAccess'):
private_ip_google_access_update(module, request, response)
@ -388,14 +382,11 @@ def ip_cidr_range_update(module, request, response):
)
def fingerprint_update(module, request, response):
def secondary_ip_ranges_update(module, request, response):
auth = GcpSession(module, 'compute')
auth.patch(
''.join(["https://www.googleapis.com/compute/v1/", "projects/{project}/regions/{region}/subnetworks/{name}"]).format(**module.params),
{
u'fingerprint': response.get('fingerprint'),
u'secondaryIpRanges': SubnetworkSecondaryiprangesArray(module.params.get('secondary_ip_ranges', []), module).to_request(),
},
{u'secondaryIpRanges': SubnetworkSecondaryiprangesArray(module.params.get('secondary_ip_ranges', []), module).to_request()},
)
@ -496,7 +487,6 @@ def response_to_hash(module, response):
u'ipCidrRange': response.get(u'ipCidrRange'),
u'name': response.get(u'name'),
u'network': replace_resource_dict(module.params.get(u'network', {}), 'selfLink'),
u'fingerprint': response.get(u'fingerprint'),
u'secondaryIpRanges': SubnetworkSecondaryiprangesArray(response.get(u'secondaryIpRanges', []), module).from_response(),
u'privateIpGoogleAccess': response.get(u'privateIpGoogleAccess'),
u'region': module.params.get('region'),

@ -164,12 +164,6 @@ resources:
- Only networks that are in the distributed mode can have subnetworks.
returned: success
type: dict
fingerprint:
description:
- Fingerprint of this resource. This field is used internally during updates
of this resource.
returned: success
type: str
secondaryIpRanges:
description:
- An array of configurations for secondary IP ranges for VM instances contained

@ -78,8 +78,7 @@ options:
ssl_certificates:
description:
- A list of SslCertificate resources that are used to authenticate connections
between users and the load balancer. Currently, exactly one SSL certificate
must be specified.
between users and the load balancer. At least one SSL certificate must be specified.
required: true
type: list
ssl_policy:
@ -290,7 +289,7 @@ quicOverride:
sslCertificates:
description:
- A list of SslCertificate resources that are used to authenticate connections between
users and the load balancer. Currently, exactly one SSL certificate must be specified.
users and the load balancer. At least one SSL certificate must be specified.
returned: success
type: list
sslPolicy:

@ -149,8 +149,8 @@ resources:
sslCertificates:
description:
- A list of SslCertificate resources that are used to authenticate connections
between users and the load balancer. Currently, exactly one SSL certificate
must be specified.
between users and the load balancer. At least one SSL certificate must be
specified.
returned: success
type: list
sslPolicy:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save