From e298de0986339090e09d229fd5f120073dc23dc1 Mon Sep 17 00:00:00 2001 From: Alex Stephen Date: Thu, 18 Apr 2019 07:30:27 -0700 Subject: [PATCH] GCP deprecations (#53355) * gcdns_record deprecation * gcdns_zone deprecation * gcp_forwarding_rule deprecation * gcp_url_map deprecation * gcspanner deprecation * gcp_healthcheck deprecation * porting guide * test failures * forgot to rename * deprecating * porting guide changes * unit test fixes * changing ignores --- .../rst/porting_guides/porting_guide_2.8.rst | 12 ++++++-- .../{gcdns_record.py => _gcdns_record.py} | 6 +++- .../google/{gcdns_zone.py => _gcdns_zone.py} | 6 +++- ...end_service.py => _gcp_backend_service.py} | 6 +++- ...arding_rule.py => _gcp_forwarding_rule.py} | 6 +++- ...gcp_healthcheck.py => _gcp_healthcheck.py} | 8 +++++- ...p_target_proxy.py => _gcp_target_proxy.py} | 6 +++- .../{gcp_url_map.py => _gcp_url_map.py} | 6 +++- .../google/{gcspanner.py => _gcspanner.py} | 6 +++- test/sanity/pylint/ignore.txt | 4 +-- test/sanity/validate-modules/ignore.txt | 28 +++++++++---------- .../cloud/google/test_gcp_forwarding_rule.py | 2 +- .../modules/cloud/google/test_gcp_url_map.py | 2 +- 13 files changed, 70 insertions(+), 28 deletions(-) rename lib/ansible/modules/cloud/google/{gcdns_record.py => _gcdns_record.py} (99%) rename lib/ansible/modules/cloud/google/{gcdns_zone.py => _gcdns_zone.py} (98%) rename lib/ansible/modules/cloud/google/{gcp_backend_service.py => _gcp_backend_service.py} (98%) rename lib/ansible/modules/cloud/google/{gcp_forwarding_rule.py => _gcp_forwarding_rule.py} (98%) rename lib/ansible/modules/cloud/google/{gcp_healthcheck.py => _gcp_healthcheck.py} (98%) rename lib/ansible/modules/cloud/google/{gcp_target_proxy.py => _gcp_target_proxy.py} (98%) rename lib/ansible/modules/cloud/google/{gcp_url_map.py => _gcp_url_map.py} (98%) rename lib/ansible/modules/cloud/google/{gcspanner.py => _gcspanner.py} (97%) diff --git a/docs/docsite/rst/porting_guides/porting_guide_2.8.rst b/docs/docsite/rst/porting_guides/porting_guide_2.8.rst index a5c4bec8e46..53e17a028ed 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_2.8.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_2.8.rst @@ -236,8 +236,16 @@ The following modules will be removed in Ansible 2.12. Please update your playbo * ``foreman`` use `foreman-ansible-modules `_ instead. * ``katello`` use `foreman-ansible-modules `_ instead. * ``github_hooks`` use :ref:`github_webhook ` and :ref:`github_webhook_facts ` instead. -* ``digital_ocean`` use :ref:`digital_ocean_droplet ` instead. -* ``gce`` use :ref:`gcp_compute_instance ` instead. +* ``digital_ocean`` use :ref `digital_ocean_droplet ` instead. +* ``gce`` use :ref `gcp_compute_instance ` instead. +* ``gcspanner`` use :ref `gcp_spanner_instance ` and :ref `gcp_spanner_database ` instead. +* ``gcdns_record`` use :ref `gcp_dns_resource_record_set ` instead. +* ``gcdns_zone`` use :ref `gcp_dns_managed_zone ` instead. +* ``gcp_forwarding_rule`` use :ref `gcp_compute_global_forwarding_rule ` or :ref `gcp_compute_forwarding_rule ` instead. +* ``gcp_healthcheck`` use :ref `gcp_compute_health_check `, :ref `gcp_compute_http_health_check `, or :ref `gcp_compute_https_health_check ` instead. +* ``gcp_backend_service`` use :ref `gcp_compute_backend_service ` instead. +* ``gcp_target_proxy`` use :ref `gcp_compute_target_proxy ` instead. +* ``gcp_url_map`` use :ref `gcp_compute_url_map ` instead. * ``panos`` use the `Palo Alto Networks Ansible Galaxy role `_ instead. diff --git a/lib/ansible/modules/cloud/google/gcdns_record.py b/lib/ansible/modules/cloud/google/_gcdns_record.py similarity index 99% rename from lib/ansible/modules/cloud/google/gcdns_record.py rename to lib/ansible/modules/cloud/google/_gcdns_record.py index d45700dbb16..2856d1e3132 100644 --- a/lib/ansible/modules/cloud/google/gcdns_record.py +++ b/lib/ansible/modules/cloud/google/_gcdns_record.py @@ -13,7 +13,7 @@ __metaclass__ = type ################################################################################ ANSIBLE_METADATA = {'metadata_version': '1.1', - 'status': ['preview'], + 'status': ['deprecated'], 'supported_by': 'community'} @@ -28,6 +28,10 @@ author: "William Albert (@walbert947)" requirements: - "python >= 2.6" - "apache-libcloud >= 0.19.0" +deprecated: + removed_in: "2.12" + why: Updated modules released with increased functionality + alternative: Use M(gcp_dns_resource_record_set) instead. options: state: description: diff --git a/lib/ansible/modules/cloud/google/gcdns_zone.py b/lib/ansible/modules/cloud/google/_gcdns_zone.py similarity index 98% rename from lib/ansible/modules/cloud/google/gcdns_zone.py rename to lib/ansible/modules/cloud/google/_gcdns_zone.py index 5371e964d51..57eaf944ef8 100644 --- a/lib/ansible/modules/cloud/google/gcdns_zone.py +++ b/lib/ansible/modules/cloud/google/_gcdns_zone.py @@ -13,7 +13,7 @@ __metaclass__ = type ################################################################################ ANSIBLE_METADATA = {'metadata_version': '1.1', - 'status': ['preview'], + 'status': ['deprecated'], 'supported_by': 'community'} @@ -27,6 +27,10 @@ version_added: "2.2" author: "William Albert (@walbert947)" requirements: - "apache-libcloud >= 0.19.0" +deprecated: + removed_in: "2.12" + why: Updated modules released with increased functionality + alternative: Use M(gcp_dns_managed_zone) instead. options: state: description: diff --git a/lib/ansible/modules/cloud/google/gcp_backend_service.py b/lib/ansible/modules/cloud/google/_gcp_backend_service.py similarity index 98% rename from lib/ansible/modules/cloud/google/gcp_backend_service.py rename to lib/ansible/modules/cloud/google/_gcp_backend_service.py index d93d16c4431..809395a1049 100644 --- a/lib/ansible/modules/cloud/google/gcp_backend_service.py +++ b/lib/ansible/modules/cloud/google/_gcp_backend_service.py @@ -7,7 +7,7 @@ __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', - 'status': ['preview'], + 'status': ['deprecated'], 'supported_by': 'community'} DOCUMENTATION = ''' module: gcp_backend_service @@ -25,6 +25,10 @@ notes: - Update is not currently supported. - Only global backend services are currently supported. Regional backends not currently supported. - Internal load balancing not currently supported. +deprecated: + removed_in: "2.12" + why: Updated modules released with increased functionality + alternative: Use M(gcp_compute_backend_service) instead. author: - "Tom Melendez (@supertom) " options: diff --git a/lib/ansible/modules/cloud/google/gcp_forwarding_rule.py b/lib/ansible/modules/cloud/google/_gcp_forwarding_rule.py similarity index 98% rename from lib/ansible/modules/cloud/google/gcp_forwarding_rule.py rename to lib/ansible/modules/cloud/google/_gcp_forwarding_rule.py index 63e1472c525..a9c835578aa 100644 --- a/lib/ansible/modules/cloud/google/gcp_forwarding_rule.py +++ b/lib/ansible/modules/cloud/google/_gcp_forwarding_rule.py @@ -7,7 +7,7 @@ __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', - 'status': ['preview'], + 'status': ['deprecated'], 'supported_by': 'community'} @@ -28,6 +28,10 @@ requirements: - "google-api-python-client >= 1.6.2" - "google-auth >= 0.9.0" - "google-auth-httplib2 >= 0.0.2" +deprecated: + removed_in: "2.12" + why: Updated modules released with increased functionality + alternative: Use M(gcp_compute_forwarding_rule) or M(gcp_compute_global_forwarding_rule) instead. notes: - Currently only supports global forwarding rules. As such, Load Balancing Scheme is always EXTERNAL. diff --git a/lib/ansible/modules/cloud/google/gcp_healthcheck.py b/lib/ansible/modules/cloud/google/_gcp_healthcheck.py similarity index 98% rename from lib/ansible/modules/cloud/google/gcp_healthcheck.py rename to lib/ansible/modules/cloud/google/_gcp_healthcheck.py index a572c5e8be4..70fa102fe37 100644 --- a/lib/ansible/modules/cloud/google/gcp_healthcheck.py +++ b/lib/ansible/modules/cloud/google/_gcp_healthcheck.py @@ -7,7 +7,7 @@ __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', - 'status': ['preview'], + 'status': ['deprecated'], 'supported_by': 'community'} @@ -37,6 +37,12 @@ requirements: - "google-auth-httplib2 >= 0.0.2" notes: - Only supports HTTP and HTTPS Healthchecks currently. +deprecated: + removed_in: "2.12" + why: Updated modules released with increased functionality + alternative: > + Use M(gcp_compute_healthcheck), M(gcp_compute_http_healthcheck) or + M(gcp_compute_https_healthcheck) instead. author: - "Tom Melendez (@supertom) " options: diff --git a/lib/ansible/modules/cloud/google/gcp_target_proxy.py b/lib/ansible/modules/cloud/google/_gcp_target_proxy.py similarity index 98% rename from lib/ansible/modules/cloud/google/gcp_target_proxy.py rename to lib/ansible/modules/cloud/google/_gcp_target_proxy.py index f8555ecb4bf..ecc3f93c274 100644 --- a/lib/ansible/modules/cloud/google/gcp_target_proxy.py +++ b/lib/ansible/modules/cloud/google/_gcp_target_proxy.py @@ -7,7 +7,7 @@ __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', - 'status': ['preview'], + 'status': ['deprecated'], 'supported_by': 'community'} @@ -26,6 +26,10 @@ requirements: - "google-api-python-client >= 1.6.2" - "google-auth >= 0.9.0" - "google-auth-httplib2 >= 0.0.2" +deprecated: + removed_in: "2.12" + why: Updated modules released with increased functionality + alternative: Use M(gcp_compute_target_proxy) instead. notes: - Currently only supports global HTTP proxy. author: diff --git a/lib/ansible/modules/cloud/google/gcp_url_map.py b/lib/ansible/modules/cloud/google/_gcp_url_map.py similarity index 98% rename from lib/ansible/modules/cloud/google/gcp_url_map.py rename to lib/ansible/modules/cloud/google/_gcp_url_map.py index 51706ad47bc..7e90cae66a9 100644 --- a/lib/ansible/modules/cloud/google/gcp_url_map.py +++ b/lib/ansible/modules/cloud/google/_gcp_url_map.py @@ -7,7 +7,7 @@ __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', - 'status': ['preview'], + 'status': ['deprecated'], 'supported_by': 'community'} @@ -31,6 +31,10 @@ notes: - Url_Map tests are not currently supported. author: - "Tom Melendez (@supertom) " +deprecated: + removed_in: "2.12" + why: Updated modules released with increased functionality + alternative: Use M(gcp_compute_url_map) instead. options: url_map_name: description: diff --git a/lib/ansible/modules/cloud/google/gcspanner.py b/lib/ansible/modules/cloud/google/_gcspanner.py similarity index 97% rename from lib/ansible/modules/cloud/google/gcspanner.py rename to lib/ansible/modules/cloud/google/_gcspanner.py index 763fbc5148a..fdf81cafca8 100644 --- a/lib/ansible/modules/cloud/google/gcspanner.py +++ b/lib/ansible/modules/cloud/google/_gcspanner.py @@ -8,7 +8,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', - 'status': ['preview'], + 'status': ['deprecated'], 'supported_by': 'community'} DOCUMENTATION = ''' @@ -25,6 +25,10 @@ requirements: - google-cloud-spanner >= 0.23.0 notes: - Changing the configuration on an existing instance is not supported. +deprecated: + removed_in: "2.12" + why: Updated modules released with increased functionality + alternative: Use M(gcp_spanner_database) and/or M(gcp_spanner_instance) instead. author: - Tom Melendez (@supertom) options: diff --git a/test/sanity/pylint/ignore.txt b/test/sanity/pylint/ignore.txt index 44ed6716f19..e9812264093 100644 --- a/test/sanity/pylint/ignore.txt +++ b/test/sanity/pylint/ignore.txt @@ -24,8 +24,8 @@ lib/ansible/modules/cloud/google/gce_net.py blacklisted-name lib/ansible/modules/cloud/google/gce_pd.py blacklisted-name lib/ansible/modules/cloud/google/gce_snapshot.py blacklisted-name lib/ansible/modules/cloud/google/gce_tag.py blacklisted-name -lib/ansible/modules/cloud/google/gcp_backend_service.py blacklisted-name -lib/ansible/modules/cloud/google/gcp_healthcheck.py blacklisted-name +lib/ansible/modules/cloud/google/_gcp_backend_service.py blacklisted-name +lib/ansible/modules/cloud/google/_gcp_healthcheck.py blacklisted-name lib/ansible/modules/cloud/lxc/lxc_container.py blacklisted-name lib/ansible/modules/files/copy.py blacklisted-name lib/ansible/modules/files/patch.py blacklisted-name diff --git a/test/sanity/validate-modules/ignore.txt b/test/sanity/validate-modules/ignore.txt index c5866f10fe1..b6a9b879d59 100644 --- a/test/sanity/validate-modules/ignore.txt +++ b/test/sanity/validate-modules/ignore.txt @@ -118,25 +118,25 @@ lib/ansible/modules/cloud/google/gce_net.py E326 lib/ansible/modules/cloud/google/gce_pd.py E322 lib/ansible/modules/cloud/google/gce_pd.py E326 lib/ansible/modules/cloud/google/gce_snapshot.py E324 -lib/ansible/modules/cloud/google/gcp_backend_service.py E322 -lib/ansible/modules/cloud/google/gcp_backend_service.py E324 -lib/ansible/modules/cloud/google/gcp_backend_service.py E326 -lib/ansible/modules/cloud/google/gcp_forwarding_rule.py E322 -lib/ansible/modules/cloud/google/gcp_forwarding_rule.py E324 -lib/ansible/modules/cloud/google/gcp_forwarding_rule.py E326 -lib/ansible/modules/cloud/google/gcp_healthcheck.py E324 -lib/ansible/modules/cloud/google/gcp_healthcheck.py E326 -lib/ansible/modules/cloud/google/gcp_target_proxy.py E322 -lib/ansible/modules/cloud/google/gcp_target_proxy.py E326 -lib/ansible/modules/cloud/google/gcp_url_map.py E322 -lib/ansible/modules/cloud/google/gcp_url_map.py E324 -lib/ansible/modules/cloud/google/gcp_url_map.py E326 +lib/ansible/modules/cloud/google/_gcp_backend_service.py E322 +lib/ansible/modules/cloud/google/_gcp_backend_service.py E324 +lib/ansible/modules/cloud/google/_gcp_backend_service.py E326 +lib/ansible/modules/cloud/google/_gcp_forwarding_rule.py E322 +lib/ansible/modules/cloud/google/_gcp_forwarding_rule.py E324 +lib/ansible/modules/cloud/google/_gcp_forwarding_rule.py E326 +lib/ansible/modules/cloud/google/_gcp_healthcheck.py E324 +lib/ansible/modules/cloud/google/_gcp_healthcheck.py E326 +lib/ansible/modules/cloud/google/_gcp_target_proxy.py E322 +lib/ansible/modules/cloud/google/_gcp_target_proxy.py E326 +lib/ansible/modules/cloud/google/_gcp_url_map.py E322 +lib/ansible/modules/cloud/google/_gcp_url_map.py E324 +lib/ansible/modules/cloud/google/_gcp_url_map.py E326 lib/ansible/modules/cloud/google/gcpubsub.py E322 lib/ansible/modules/cloud/google/gcpubsub.py E323 lib/ansible/modules/cloud/google/gcpubsub_facts.py E322 lib/ansible/modules/cloud/google/gcpubsub_facts.py E324 lib/ansible/modules/cloud/google/gcpubsub_facts.py E326 -lib/ansible/modules/cloud/google/gcspanner.py E322 +lib/ansible/modules/cloud/google/_gcspanner.py E322 lib/ansible/modules/cloud/linode/linode.py E322 lib/ansible/modules/cloud/linode/linode.py E324 lib/ansible/modules/cloud/lxc/lxc_container.py E210 diff --git a/test/units/modules/cloud/google/test_gcp_forwarding_rule.py b/test/units/modules/cloud/google/test_gcp_forwarding_rule.py index 6fa906c5fac..9d7408b83d6 100644 --- a/test/units/modules/cloud/google/test_gcp_forwarding_rule.py +++ b/test/units/modules/cloud/google/test_gcp_forwarding_rule.py @@ -1,6 +1,6 @@ import unittest -from ansible.modules.cloud.google.gcp_forwarding_rule import _build_global_forwarding_rule_dict +from ansible.modules.cloud.google._gcp_forwarding_rule import _build_global_forwarding_rule_dict class TestGCPFowardingRule(unittest.TestCase): diff --git a/test/units/modules/cloud/google/test_gcp_url_map.py b/test/units/modules/cloud/google/test_gcp_url_map.py index 6178c4cecbb..3d0774e3f6c 100644 --- a/test/units/modules/cloud/google/test_gcp_url_map.py +++ b/test/units/modules/cloud/google/test_gcp_url_map.py @@ -1,6 +1,6 @@ import unittest -from ansible.modules.cloud.google.gcp_url_map import _build_path_matchers, _build_url_map_dict +from ansible.modules.cloud.google._gcp_url_map import _build_path_matchers, _build_url_map_dict class TestGCPUrlMap(unittest.TestCase):