From 7502df4435afeab27b5f5b6fa6a168c706575d0a Mon Sep 17 00:00:00 2001 From: Alex Stephen Date: Thu, 31 Jan 2019 14:02:38 -0800 Subject: [PATCH] Bug fixes for GCP modules (#51577) --- .../cloud/google/gcp_compute_http_health_check_facts.py | 2 +- .../modules/cloud/google/gcp_compute_https_health_check.py | 2 +- .../cloud/google/gcp_compute_https_health_check_facts.py | 2 +- lib/ansible/modules/cloud/google/gcp_compute_image.py | 2 +- lib/ansible/modules/cloud/google/gcp_compute_image_facts.py | 2 +- lib/ansible/modules/cloud/google/gcp_compute_instance.py | 2 +- .../modules/cloud/google/gcp_compute_instance_facts.py | 2 +- .../modules/cloud/google/gcp_compute_instance_group.py | 2 +- .../modules/cloud/google/gcp_compute_instance_group_facts.py | 2 +- .../cloud/google/gcp_compute_instance_group_manager.py | 2 +- .../cloud/google/gcp_compute_instance_group_manager_facts.py | 2 +- .../modules/cloud/google/gcp_compute_instance_template.py | 2 +- .../cloud/google/gcp_compute_instance_template_facts.py | 2 +- .../cloud/google/gcp_compute_interconnect_attachment.py | 2 +- .../cloud/google/gcp_compute_interconnect_attachment_facts.py | 2 +- lib/ansible/modules/cloud/google/gcp_compute_network.py | 4 ++-- lib/ansible/modules/cloud/google/gcp_compute_network_facts.py | 2 +- lib/ansible/modules/cloud/google/gcp_compute_region_disk.py | 2 +- .../modules/cloud/google/gcp_compute_region_disk_facts.py | 2 +- lib/ansible/modules/cloud/google/gcp_compute_route.py | 2 +- lib/ansible/modules/cloud/google/gcp_compute_route_facts.py | 2 +- lib/ansible/modules/cloud/google/gcp_compute_router.py | 2 +- lib/ansible/modules/cloud/google/gcp_compute_router_facts.py | 2 +- 23 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_http_health_check_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_http_health_check_facts.py index 1bbea3f633..5594d91360 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_http_health_check_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_http_health_check_facts.py @@ -42,7 +42,7 @@ requirements: options: filters: description: - - A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) + - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.) - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . extends_documentation_fragment: gcp 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 72e9832b28..9d75310d6a 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 @@ -384,7 +384,7 @@ def wait_for_completion(status, op_result, module): while status != 'DONE': raise_if_errors(op_result, ['error', 'errors'], module) time.sleep(1.0) - op_result = fetch_resource(module, op_uri, 'compute#operation') + op_result = fetch_resource(module, op_uri, 'compute#operation', False) status = navigate_hash(op_result, ['status']) return op_result diff --git a/lib/ansible/modules/cloud/google/gcp_compute_https_health_check_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_https_health_check_facts.py index 47605bfe9c..4bd372b689 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_https_health_check_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_https_health_check_facts.py @@ -42,7 +42,7 @@ requirements: options: filters: description: - - A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) + - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.) - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . extends_documentation_fragment: gcp diff --git a/lib/ansible/modules/cloud/google/gcp_compute_image.py b/lib/ansible/modules/cloud/google/gcp_compute_image.py index 8083167342..5695b6663b 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_image.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_image.py @@ -652,7 +652,7 @@ def wait_for_completion(status, op_result, module): while status != 'DONE': raise_if_errors(op_result, ['error', 'errors'], module) time.sleep(1.0) - op_result = fetch_resource(module, op_uri, 'compute#operation') + op_result = fetch_resource(module, op_uri, 'compute#operation', False) status = navigate_hash(op_result, ['status']) return op_result diff --git a/lib/ansible/modules/cloud/google/gcp_compute_image_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_image_facts.py index a9b67bf847..d745044c94 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_image_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_image_facts.py @@ -42,7 +42,7 @@ requirements: options: filters: description: - - A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) + - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.) - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . extends_documentation_fragment: gcp diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance.py b/lib/ansible/modules/cloud/google/gcp_compute_instance.py index 23a0d80f29..2908a15126 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance.py @@ -1158,7 +1158,7 @@ def wait_for_completion(status, op_result, module): while status != 'DONE': raise_if_errors(op_result, ['error', 'errors'], module) time.sleep(1.0) - op_result = fetch_resource(module, op_uri, 'compute#operation') + op_result = fetch_resource(module, op_uri, 'compute#operation', False) status = navigate_hash(op_result, ['status']) return op_result diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_facts.py index 7840d6b441..44187d879a 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_facts.py @@ -42,7 +42,7 @@ requirements: options: filters: description: - - A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) + - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.) - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . zone: 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 e92f66ed8a..fbbe6370dd 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py @@ -414,7 +414,7 @@ def wait_for_completion(status, op_result, module): while status != 'DONE': raise_if_errors(op_result, ['error', 'errors'], module) time.sleep(1.0) - op_result = fetch_resource(module, op_uri, 'compute#operation') + op_result = fetch_resource(module, op_uri, 'compute#operation', False) status = navigate_hash(op_result, ['status']) return op_result diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_facts.py index 0486890a0e..e01d250438 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_facts.py @@ -42,7 +42,7 @@ requirements: options: filters: description: - - A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) + - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.) - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . zone: 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 4fbc5be5bd..7c8facab90 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 @@ -517,7 +517,7 @@ def wait_for_completion(status, op_result, module): while status != 'DONE': raise_if_errors(op_result, ['error', 'errors'], module) time.sleep(1.0) - op_result = fetch_resource(module, op_uri, 'compute#operation') + op_result = fetch_resource(module, op_uri, 'compute#operation', False) status = navigate_hash(op_result, ['status']) return op_result diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager_facts.py index 03f2caee85..17250efc24 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager_facts.py @@ -42,7 +42,7 @@ requirements: options: filters: description: - - A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) + - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.) - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . zone: 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 691493eca0..44ec013363 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py @@ -1093,7 +1093,7 @@ def wait_for_completion(status, op_result, module): while status != 'DONE': raise_if_errors(op_result, ['error', 'errors'], module) time.sleep(1.0) - op_result = fetch_resource(module, op_uri, 'compute#operation') + op_result = fetch_resource(module, op_uri, 'compute#operation', False) status = navigate_hash(op_result, ['status']) return op_result diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_template_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_template_facts.py index 190c4b3ee5..38e264c9b4 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_template_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_template_facts.py @@ -42,7 +42,7 @@ requirements: options: filters: description: - - A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) + - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.) - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . extends_documentation_fragment: gcp 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 ac70e94158..c9a483bd22 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py @@ -403,7 +403,7 @@ def wait_for_completion(status, op_result, module): while status != 'DONE': raise_if_errors(op_result, ['error', 'errors'], module) time.sleep(1.0) - op_result = fetch_resource(module, op_uri, 'compute#operation') + op_result = fetch_resource(module, op_uri, 'compute#operation', False) status = navigate_hash(op_result, ['status']) return op_result diff --git a/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment_facts.py index 482c7b0621..1605afc995 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment_facts.py @@ -42,7 +42,7 @@ requirements: options: filters: description: - - A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) + - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.) - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . region: diff --git a/lib/ansible/modules/cloud/google/gcp_compute_network.py b/lib/ansible/modules/cloud/google/gcp_compute_network.py index b5d1201880..072c71b990 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_network.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_network.py @@ -340,7 +340,7 @@ def is_different(module, response): def response_to_hash(module, response): return { u'description': module.params.get('description'), - u'gatewayIPv4': response.get(u'gateway_ipv4'), + 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'), @@ -375,7 +375,7 @@ def wait_for_completion(status, op_result, module): while status != 'DONE': raise_if_errors(op_result, ['error', 'errors'], module) time.sleep(1.0) - op_result = fetch_resource(module, op_uri, 'compute#operation') + op_result = fetch_resource(module, op_uri, 'compute#operation', False) status = navigate_hash(op_result, ['status']) return op_result diff --git a/lib/ansible/modules/cloud/google/gcp_compute_network_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_network_facts.py index 6a61d55571..6f2594ae96 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_network_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_network_facts.py @@ -42,7 +42,7 @@ requirements: options: filters: description: - - A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) + - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.) - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . extends_documentation_fragment: gcp 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 880fe8be91..9ea373238e 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py @@ -555,7 +555,7 @@ def wait_for_completion(status, op_result, module): while status != 'DONE': raise_if_errors(op_result, ['error', 'errors'], module) time.sleep(1.0) - op_result = fetch_resource(module, op_uri, 'compute#operation') + op_result = fetch_resource(module, op_uri, 'compute#operation', False) status = navigate_hash(op_result, ['status']) return op_result diff --git a/lib/ansible/modules/cloud/google/gcp_compute_region_disk_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_region_disk_facts.py index 9d7d15b2e3..8fd6202707 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_region_disk_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_region_disk_facts.py @@ -42,7 +42,7 @@ requirements: options: filters: description: - - A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) + - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.) - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . region: diff --git a/lib/ansible/modules/cloud/google/gcp_compute_route.py b/lib/ansible/modules/cloud/google/gcp_compute_route.py index 42f28538e4..0053d8cb26 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_route.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_route.py @@ -433,7 +433,7 @@ def wait_for_completion(status, op_result, module): while status != 'DONE': raise_if_errors(op_result, ['error', 'errors'], module) time.sleep(1.0) - op_result = fetch_resource(module, op_uri, 'compute#operation') + op_result = fetch_resource(module, op_uri, 'compute#operation', False) status = navigate_hash(op_result, ['status']) return op_result diff --git a/lib/ansible/modules/cloud/google/gcp_compute_route_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_route_facts.py index 65fc91b225..965189b252 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_route_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_route_facts.py @@ -42,7 +42,7 @@ requirements: options: filters: description: - - A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) + - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.) - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . extends_documentation_fragment: gcp diff --git a/lib/ansible/modules/cloud/google/gcp_compute_router.py b/lib/ansible/modules/cloud/google/gcp_compute_router.py index 86ff9be81a..9977375cb0 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_router.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_router.py @@ -424,7 +424,7 @@ def wait_for_completion(status, op_result, module): while status != 'DONE': raise_if_errors(op_result, ['error', 'errors'], module) time.sleep(1.0) - op_result = fetch_resource(module, op_uri, 'compute#operation') + op_result = fetch_resource(module, op_uri, 'compute#operation', False) status = navigate_hash(op_result, ['status']) return op_result diff --git a/lib/ansible/modules/cloud/google/gcp_compute_router_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_router_facts.py index 2d142c7346..1ef82f2e04 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_router_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_router_facts.py @@ -42,7 +42,7 @@ requirements: options: filters: description: - - A list of filter value pairs. Available filters are listed here U(U(https://cloud.google.com/sdk/gcloud/reference/topic/filters).) + - A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/sdk/gcloud/reference/topic/filters.) - Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . region: