From 07815ee1a8281f05cfaf0552eec2594e4840183d Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 18 Jun 2019 10:04:53 -0700 Subject: [PATCH] changing endpoints on container cluster/nodepool (#281) Signed-off-by: Modular Magician --- plugins/modules/gcp_container_cluster.py | 2 +- plugins/modules/gcp_container_node_pool.py | 6 +++--- plugins/modules/gcp_container_node_pool_facts.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/modules/gcp_container_cluster.py b/plugins/modules/gcp_container_cluster.py index 9d4b0b9..a8e34ee 100644 --- a/plugins/modules/gcp_container_cluster.py +++ b/plugins/modules/gcp_container_cluster.py @@ -1174,7 +1174,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://container.googleapis.com/v1/projects/{project}/zones/{zone}/operations/{op_id}" + url = "https://container.googleapis.com/v1/projects/{project}/locations/{location}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_container_node_pool.py b/plugins/modules/gcp_container_node_pool.py index ea0cd20..4dee965 100644 --- a/plugins/modules/gcp_container_node_pool.py +++ b/plugins/modules/gcp_container_node_pool.py @@ -705,12 +705,12 @@ def self_link(module): 'cluster': replace_resource_dict(module.params['cluster'], 'name'), 'name': module.params['name'], } - return "https://container.googleapis.com/v1/projects/{project}/zones/{location}/clusters/{cluster}/nodePools/{name}".format(**res) + return "https://container.googleapis.com/v1/projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{name}".format(**res) def collection(module): res = {'project': module.params['project'], 'location': module.params['location'], 'cluster': replace_resource_dict(module.params['cluster'], 'name')} - return "https://container.googleapis.com/v1/projects/{project}/zones/{location}/clusters/{cluster}/nodePools".format(**res) + return "https://container.googleapis.com/v1/projects/{project}/locations/{location}/clusters/{cluster}/nodePools".format(**res) def return_if_object(module, response, allow_not_found=False): @@ -773,7 +773,7 @@ def response_to_hash(module, response): def async_op_url(module, extra_data=None): if extra_data is None: extra_data = {} - url = "https://container.googleapis.com/v1/projects/{project}/zones/{zone}/operations/{op_id}" + url = "https://container.googleapis.com/v1/projects/{project}/locations/{location}/operations/{op_id}" combined = extra_data.copy() combined.update(module.params) return url.format(**combined) diff --git a/plugins/modules/gcp_container_node_pool_facts.py b/plugins/modules/gcp_container_node_pool_facts.py index c3ab387..c04aa3f 100644 --- a/plugins/modules/gcp_container_node_pool_facts.py +++ b/plugins/modules/gcp_container_node_pool_facts.py @@ -376,7 +376,7 @@ def main(): def collection(module): res = {'project': module.params['project'], 'location': module.params['location'], 'cluster': replace_resource_dict(module.params['cluster'], 'name')} - return "https://container.googleapis.com/v1/projects/{project}/zones/{location}/clusters/{cluster}/nodePools".format(**res) + return "https://container.googleapis.com/v1/projects/{project}/locations/{location}/clusters/{cluster}/nodePools".format(**res) def fetch_list(module, link):