From 78fe931327c1c25e8278013a34175b5710e28dda Mon Sep 17 00:00:00 2001 From: The Magician Date: Fri, 5 Apr 2019 10:00:35 -0700 Subject: [PATCH] Bug fixes for GCP modules (#54888) --- .../cloud/google/gcp_compute_backend_service.py | 7 ++++--- .../cloud/google/gcp_compute_backend_service_facts.py | 2 +- .../modules/cloud/google/gcp_compute_global_address.py | 10 ++++------ .../cloud/google/gcp_compute_global_address_facts.py | 5 ++--- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py b/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py index efb31664a56..869b4aedff0 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py @@ -249,8 +249,9 @@ options: description: - Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot - be used with the other. + be used with the other. One of `INTERNAL` or `EXTERNAL`. Defaults to `EXTERNAL`. required: false + default: EXTERNAL version_added: 2.7 choices: - INTERNAL @@ -578,7 +579,7 @@ loadBalancingScheme: description: - Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be - used with the other. + used with the other. One of `INTERNAL` or `EXTERNAL`. Defaults to `EXTERNAL`. returned: success type: str name: @@ -687,7 +688,7 @@ def main(): type='dict', options=dict(enabled=dict(type='bool'), oauth2_client_id=dict(required=True, type='str'), oauth2_client_secret=dict(required=True, type='str')), ), - load_balancing_scheme=dict(type='str', choices=['INTERNAL', 'EXTERNAL']), + load_balancing_scheme=dict(default='EXTERNAL', type='str', choices=['INTERNAL', 'EXTERNAL']), name=dict(required=True, type='str'), port_name=dict(type='str'), protocol=dict(type='str', choices=['HTTP', 'HTTPS', 'TCP', 'SSL']), diff --git a/lib/ansible/modules/cloud/google/gcp_compute_backend_service_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_backend_service_facts.py index aa8713d91f8..3851ed00a09 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_backend_service_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_backend_service_facts.py @@ -295,7 +295,7 @@ items: description: - Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot - be used with the other. + be used with the other. One of `INTERNAL` or `EXTERNAL`. Defaults to `EXTERNAL`. returned: success type: str name: diff --git a/lib/ansible/modules/cloud/google/gcp_compute_global_address.py b/lib/ansible/modules/cloud/google/gcp_compute_global_address.py index 8692981bd59..00bc1af3851 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_global_address.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_global_address.py @@ -56,7 +56,6 @@ options: description: description: - An optional description of this resource. - - Provide this property when you create the resource. required: false name: description: @@ -69,8 +68,8 @@ options: required: true ip_version: description: - - The IP Version that will be used by this address. Valid options are IPV4 or - IPV6. The default value is IPV4. + - The IP Version that will be used by this address. Valid options are `IPV4` or + `IPV6`. The default value is `IPV4`. required: false choices: - IPV4 @@ -116,7 +115,6 @@ creationTimestamp: description: description: - An optional description of this resource. - - Provide this property when you create the resource. returned: success type: str id: @@ -136,8 +134,8 @@ name: type: str ipVersion: description: - - The IP Version that will be used by this address. Valid options are IPV4 or IPV6. - The default value is IPV4. + - The IP Version that will be used by this address. Valid options are `IPV4` or + `IPV6`. The default value is `IPV4`. returned: success type: str region: diff --git a/lib/ansible/modules/cloud/google/gcp_compute_global_address_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_global_address_facts.py index 11682fee960..9344e8b7f7c 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_global_address_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_global_address_facts.py @@ -78,7 +78,6 @@ items: description: description: - An optional description of this resource. - - Provide this property when you create the resource. returned: success type: str id: @@ -99,8 +98,8 @@ items: type: str ipVersion: description: - - The IP Version that will be used by this address. Valid options are IPV4 or - IPV6. The default value is IPV4. + - The IP Version that will be used by this address. Valid options are `IPV4` + or `IPV6`. The default value is `IPV4`. returned: success type: str region: