From 04445f184b0772811cc44b776286cac7d92b15ea Mon Sep 17 00:00:00 2001 From: The Magician Date: Mon, 22 Jul 2019 22:07:48 -0700 Subject: [PATCH] Bug fixes for GCP (as of 2019-07-09T06:06:53Z) (#59322) --- .../gcp_compute_global_forwarding_rule.py | 1 + .../cloud/google/gcp_compute_health_check.py | 121 ++++++++++++++++++ .../google/gcp_compute_health_check_facts.py | 56 ++++++++ .../google/gcp_compute_http_health_check.py | 1 + .../google/gcp_compute_https_health_check.py | 1 + .../modules/cloud/google/gcp_compute_image.py | 1 + .../cloud/google/gcp_compute_instance.py | 1 + .../google/gcp_compute_instance_group.py | 1 + .../gcp_compute_instance_group_manager.py | 1 + .../google/gcp_compute_instance_template.py | 1 + .../gcp_compute_interconnect_attachment.py | 1 + .../cloud/google/gcp_compute_network.py | 1 + .../cloud/google/gcp_compute_region_disk.py | 1 + test/sanity/validate-modules/ignore.txt | 12 -- 14 files changed, 188 insertions(+), 12 deletions(-) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py b/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py index 0fef9105dae..b3fda8c87cb 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py @@ -51,6 +51,7 @@ options: - present - absent default: present + type: str description: description: - An optional description of this resource. Provide this property when you create diff --git a/lib/ansible/modules/cloud/google/gcp_compute_health_check.py b/lib/ansible/modules/cloud/google/gcp_compute_health_check.py index aa5d3493778..438f4f144fc 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_health_check.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_health_check.py @@ -55,6 +55,7 @@ options: - present - absent default: present + type: str check_interval_sec: description: - How often (in seconds) to send a health check. The default value is 5 seconds. @@ -156,6 +157,21 @@ options: required: false default: NONE type: str + port_specification: + description: + - 'Specifies how port is selected for health checking, can be one of the following + values: * `USE_FIXED_PORT`: The port number in `port` is used for health + checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for + each network endpoint is used for health checking. For other backends, the + port or named port specified in the Backend Service is used for health checking." + - If not specified, HTTP health check follows behavior specified in `port` + and `portName` fields. + - 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"' + required: false + type: str + version_added: 2.9 https_health_check: description: - A nested object resource. @@ -203,6 +219,21 @@ options: required: false default: NONE type: str + port_specification: + description: + - 'Specifies how port is selected for health checking, can be one of the following + values: * `USE_FIXED_PORT`: The port number in `port` is used for health + checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for + each network endpoint is used for health checking. For other backends, the + port or named port specified in the Backend Service is used for health checking." + - If not specified, HTTPS health check follows behavior specified in `port` + and `portName` fields. + - 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"' + required: false + type: str + version_added: 2.9 tcp_health_check: description: - A nested object resource. @@ -243,6 +274,21 @@ options: required: false default: NONE type: str + port_specification: + description: + - 'Specifies how port is selected for health checking, can be one of the following + values: * `USE_FIXED_PORT`: The port number in `port` is used for health + checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for + each network endpoint is used for health checking. For other backends, the + port or named port specified in the Backend Service is used for health checking." + - If not specified, TCP health check follows behavior specified in `port` + and `portName` fields. + - 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"' + required: false + type: str + version_added: 2.9 ssl_health_check: description: - A nested object resource. @@ -283,6 +329,21 @@ options: required: false default: NONE type: str + port_specification: + description: + - 'Specifies how port is selected for health checking, can be one of the following + values: * `USE_FIXED_PORT`: The port number in `port` is used for health + checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for + each network endpoint is used for health checking. For other backends, the + port or named port specified in the Backend Service is used for health checking." + - If not specified, SSL health check follows behavior specified in `port` + and `portName` fields. + - 'Some valid choices include: "USE_FIXED_PORT", "USE_NAMED_PORT", "USE_SERVING_PORT"' + required: false + type: str + version_added: 2.9 extends_documentation_fragment: gcp notes: - 'API Reference: U(https://cloud.google.com/compute/docs/reference/rest/v1/healthChecks)' @@ -409,6 +470,18 @@ httpHealthCheck: either NONE or PROXY_V1. The default is NONE. returned: success type: str + portSpecification: + description: + - 'Specifies how port is selected for health checking, can be one of the following + values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each + network endpoint is used for health checking. For other backends, the port + or named port specified in the Backend Service is used for health checking." + - If not specified, HTTP health check follows behavior specified in `port` and + `portName` fields. + returned: success + type: str httpsHealthCheck: description: - A nested object resource. @@ -453,6 +526,18 @@ httpsHealthCheck: either NONE or PROXY_V1. The default is NONE. returned: success type: str + portSpecification: + description: + - 'Specifies how port is selected for health checking, can be one of the following + values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each + network endpoint is used for health checking. For other backends, the port + or named port specified in the Backend Service is used for health checking." + - If not specified, HTTPS health check follows behavior specified in `port` + and `portName` fields. + returned: success + type: str tcpHealthCheck: description: - A nested object resource. @@ -491,6 +576,18 @@ tcpHealthCheck: either NONE or PROXY_V1. The default is NONE. returned: success type: str + portSpecification: + description: + - 'Specifies how port is selected for health checking, can be one of the following + values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each + network endpoint is used for health checking. For other backends, the port + or named port specified in the Backend Service is used for health checking." + - If not specified, TCP health check follows behavior specified in `port` and + `portName` fields. + returned: success + type: str sslHealthCheck: description: - A nested object resource. @@ -529,6 +626,18 @@ sslHealthCheck: either NONE or PROXY_V1. The default is NONE. returned: success type: str + portSpecification: + description: + - 'Specifies how port is selected for health checking, can be one of the following + values: * `USE_FIXED_PORT`: The port number in `port` is used for health checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for each + network endpoint is used for health checking. For other backends, the port + or named port specified in the Backend Service is used for health checking." + - If not specified, SSL health check follows behavior specified in `port` and + `portName` fields. + returned: success + type: str ''' ################################################################################ @@ -566,6 +675,7 @@ def main(): port=dict(type='int'), port_name=dict(type='str'), proxy_header=dict(default='NONE', type='str'), + port_specification=dict(type='str'), ), ), https_health_check=dict( @@ -577,6 +687,7 @@ def main(): port=dict(type='int'), port_name=dict(type='str'), proxy_header=dict(default='NONE', type='str'), + port_specification=dict(type='str'), ), ), tcp_health_check=dict( @@ -587,6 +698,7 @@ def main(): port=dict(type='int'), port_name=dict(type='str'), proxy_header=dict(default='NONE', type='str'), + port_specification=dict(type='str'), ), ), ssl_health_check=dict( @@ -597,6 +709,7 @@ def main(): port=dict(type='int'), port_name=dict(type='str'), proxy_header=dict(default='NONE', type='str'), + port_specification=dict(type='str'), ), ), ), @@ -796,6 +909,7 @@ class HealthCheckHttphealthcheck(object): u'port': self.request.get('port'), u'portName': self.request.get('port_name'), u'proxyHeader': self.request.get('proxy_header'), + u'portSpecification': self.request.get('port_specification'), } ) @@ -808,6 +922,7 @@ class HealthCheckHttphealthcheck(object): u'port': self.request.get(u'port'), u'portName': self.request.get(u'portName'), u'proxyHeader': self.request.get(u'proxyHeader'), + u'portSpecification': self.request.get(u'portSpecification'), } ) @@ -829,6 +944,7 @@ class HealthCheckHttpshealthcheck(object): u'port': self.request.get('port'), u'portName': self.request.get('port_name'), u'proxyHeader': self.request.get('proxy_header'), + u'portSpecification': self.request.get('port_specification'), } ) @@ -841,6 +957,7 @@ class HealthCheckHttpshealthcheck(object): u'port': self.request.get(u'port'), u'portName': self.request.get(u'portName'), u'proxyHeader': self.request.get(u'proxyHeader'), + u'portSpecification': self.request.get(u'portSpecification'), } ) @@ -861,6 +978,7 @@ class HealthCheckTcphealthcheck(object): u'port': self.request.get('port'), u'portName': self.request.get('port_name'), u'proxyHeader': self.request.get('proxy_header'), + u'portSpecification': self.request.get('port_specification'), } ) @@ -872,6 +990,7 @@ class HealthCheckTcphealthcheck(object): u'port': self.request.get(u'port'), u'portName': self.request.get(u'portName'), u'proxyHeader': self.request.get(u'proxyHeader'), + u'portSpecification': self.request.get(u'portSpecification'), } ) @@ -892,6 +1011,7 @@ class HealthCheckSslhealthcheck(object): u'port': self.request.get('port'), u'portName': self.request.get('port_name'), u'proxyHeader': self.request.get('proxy_header'), + u'portSpecification': self.request.get('port_specification'), } ) @@ -903,6 +1023,7 @@ class HealthCheckSslhealthcheck(object): u'port': self.request.get(u'port'), u'portName': self.request.get(u'portName'), u'proxyHeader': self.request.get(u'proxyHeader'), + u'portSpecification': self.request.get(u'portSpecification'), } ) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_health_check_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_health_check_facts.py index 03e54747a06..5bacb8cdb5a 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_health_check_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_health_check_facts.py @@ -167,6 +167,20 @@ resources: backend, either NONE or PROXY_V1. The default is NONE. returned: success type: str + portSpecification: + description: + - 'Specifies how port is selected for health checking, can be one of the + following values: * `USE_FIXED_PORT`: The port number in `port` is used + for health checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for + each network endpoint is used for health checking. For other backends, + the port or named port specified in the Backend Service is used for health + checking." + - If not specified, HTTP health check follows behavior specified in `port` + and `portName` fields. + returned: success + type: str httpsHealthCheck: description: - A nested object resource. @@ -211,6 +225,20 @@ resources: backend, either NONE or PROXY_V1. The default is NONE. returned: success type: str + portSpecification: + description: + - 'Specifies how port is selected for health checking, can be one of the + following values: * `USE_FIXED_PORT`: The port number in `port` is used + for health checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for + each network endpoint is used for health checking. For other backends, + the port or named port specified in the Backend Service is used for health + checking." + - If not specified, HTTPS health check follows behavior specified in `port` + and `portName` fields. + returned: success + type: str tcpHealthCheck: description: - A nested object resource. @@ -250,6 +278,20 @@ resources: backend, either NONE or PROXY_V1. The default is NONE. returned: success type: str + portSpecification: + description: + - 'Specifies how port is selected for health checking, can be one of the + following values: * `USE_FIXED_PORT`: The port number in `port` is used + for health checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for + each network endpoint is used for health checking. For other backends, + the port or named port specified in the Backend Service is used for health + checking." + - If not specified, TCP health check follows behavior specified in `port` + and `portName` fields. + returned: success + type: str sslHealthCheck: description: - A nested object resource. @@ -289,6 +331,20 @@ resources: backend, either NONE or PROXY_V1. The default is NONE. returned: success type: str + portSpecification: + description: + - 'Specifies how port is selected for health checking, can be one of the + following values: * `USE_FIXED_PORT`: The port number in `port` is used + for health checking.' + - "* `USE_NAMED_PORT`: The `portName` is used for health checking." + - "* `USE_SERVING_PORT`: For NetworkEndpointGroup, the port specified for + each network endpoint is used for health checking. For other backends, + the port or named port specified in the Backend Service is used for health + checking." + - If not specified, SSL health check follows behavior specified in `port` + and `portName` fields. + returned: success + type: str ''' ################################################################################ diff --git a/lib/ansible/modules/cloud/google/gcp_compute_http_health_check.py b/lib/ansible/modules/cloud/google/gcp_compute_http_health_check.py index daf3a5a4486..c949291c7d9 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_http_health_check.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_http_health_check.py @@ -48,6 +48,7 @@ options: - present - absent default: present + type: str check_interval_sec: description: - How often (in seconds) to send a health check. The default value is 5 seconds. diff --git a/lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py b/lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py index 317c7c2a575..73b7c4b68cb 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py @@ -48,6 +48,7 @@ options: - present - absent default: present + type: str check_interval_sec: description: - How often (in seconds) to send a health check. The default value is 5 seconds. diff --git a/lib/ansible/modules/cloud/google/gcp_compute_image.py b/lib/ansible/modules/cloud/google/gcp_compute_image.py index 60c3c2c2d71..0f06d9dc7a4 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_image.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_image.py @@ -57,6 +57,7 @@ options: - present - absent default: present + type: str description: description: - An optional description of this resource. Provide this property when you create diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance.py b/lib/ansible/modules/cloud/google/gcp_compute_instance.py index 6766287d2ae..8ab0b3c6616 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance.py @@ -47,6 +47,7 @@ options: - present - absent default: present + type: str can_ip_forward: description: - Allows this instance to send and receive packets with non-matching destination diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py index 43c63670684..4d4e304efb8 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py @@ -50,6 +50,7 @@ options: - present - absent default: present + type: str description: description: - An optional description of this resource. Provide this property when you create diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py index b8e4196d7aa..9ece0b7b7f9 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py @@ -52,6 +52,7 @@ options: - present - absent default: present + type: str base_instance_name: description: - The base instance name to use for instances in this group. The value must be diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py index 6ec76797db2..365fd510a5c 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py @@ -53,6 +53,7 @@ options: - present - absent default: present + type: str description: description: - An optional description of this resource. Provide this property when you create diff --git a/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py b/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py index c13459a46ee..06fdd072984 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py @@ -48,6 +48,7 @@ options: - present - absent default: present + type: str interconnect: description: - URL of the underlying Interconnect object that this attachment's traffic will diff --git a/lib/ansible/modules/cloud/google/gcp_compute_network.py b/lib/ansible/modules/cloud/google/gcp_compute_network.py index 71e88d805a2..1644cc31121 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_network.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_network.py @@ -47,6 +47,7 @@ options: - present - absent default: present + type: str description: description: - An optional description of this resource. The resource must be recreated to diff --git a/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py b/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py index e185258a3fe..30bde25bf2c 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py @@ -57,6 +57,7 @@ options: - present - absent default: present + type: str description: description: - An optional description of this resource. Provide this property when you create diff --git a/test/sanity/validate-modules/ignore.txt b/test/sanity/validate-modules/ignore.txt index 3be96db940b..662d6d44b1f 100644 --- a/test/sanity/validate-modules/ignore.txt +++ b/test/sanity/validate-modules/ignore.txt @@ -655,29 +655,17 @@ lib/ansible/modules/cloud/google/gcp_compute_firewall_facts.py E337 lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule_facts.py E337 lib/ansible/modules/cloud/google/gcp_compute_global_address_facts.py E337 lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule_facts.py E337 -lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py E337 lib/ansible/modules/cloud/google/gcp_compute_health_check_facts.py E337 -lib/ansible/modules/cloud/google/gcp_compute_health_check.py E337 lib/ansible/modules/cloud/google/gcp_compute_http_health_check_facts.py E337 -lib/ansible/modules/cloud/google/gcp_compute_http_health_check.py E337 lib/ansible/modules/cloud/google/gcp_compute_https_health_check_facts.py E337 -lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py E337 lib/ansible/modules/cloud/google/gcp_compute_image_facts.py E337 -lib/ansible/modules/cloud/google/gcp_compute_image.py E337 lib/ansible/modules/cloud/google/gcp_compute_instance_facts.py E337 lib/ansible/modules/cloud/google/gcp_compute_instance_group_facts.py E337 lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager_facts.py E337 -lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py E337 -lib/ansible/modules/cloud/google/gcp_compute_instance_group.py E337 -lib/ansible/modules/cloud/google/gcp_compute_instance.py E337 lib/ansible/modules/cloud/google/gcp_compute_instance_template_facts.py E337 -lib/ansible/modules/cloud/google/gcp_compute_instance_template.py E337 lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment_facts.py E337 -lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py E337 lib/ansible/modules/cloud/google/gcp_compute_network_facts.py E337 -lib/ansible/modules/cloud/google/gcp_compute_network.py E337 lib/ansible/modules/cloud/google/gcp_compute_region_disk_facts.py E337 -lib/ansible/modules/cloud/google/gcp_compute_region_disk.py E337 lib/ansible/modules/cloud/google/gcp_compute_route_facts.py E337 lib/ansible/modules/cloud/google/gcp_compute_router_facts.py E337 lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate_facts.py E337