From 6ae04017d8b5cdfb44a019567a3ae901398e2c15 Mon Sep 17 00:00:00 2001 From: Alex Stephen Date: Mon, 18 Feb 2019 08:42:19 -0800 Subject: [PATCH] GCE deprecation warning (#52116) * GCE deprecation warning * porting guide typo * fixing ignores * moving error code back * underscore marking on gce * forgot to change status --- docs/docsite/rst/porting_guides/porting_guide_2.8.rst | 1 + lib/ansible/modules/cloud/google/{gce.py => _gce.py} | 6 +++++- test/sanity/code-smell/no-underscore-variable.py | 2 +- test/sanity/validate-modules/ignore.txt | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) rename lib/ansible/modules/cloud/google/{gce.py => _gce.py} (99%) 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 091014a3586..9a265b06938 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_2.8.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_2.8.rst @@ -137,6 +137,7 @@ The following modules will be removed in Ansible 2.12. Please update your playbo * ``katello`` use instead. * ``github_hooks`` use :ref:`github_webhook ` and :ref:`github_webhook_facts ` instead. * ``digital_ocean`` use :ref `digital_ocean_droplet ` instead. +* ``gce`` use :ref `gce_compute_instance ` instead. Noteworthy module changes diff --git a/lib/ansible/modules/cloud/google/gce.py b/lib/ansible/modules/cloud/google/_gce.py similarity index 99% rename from lib/ansible/modules/cloud/google/gce.py rename to lib/ansible/modules/cloud/google/_gce.py index d4db5a36865..d5bd6abf280 100644 --- a/lib/ansible/modules/cloud/google/gce.py +++ b/lib/ansible/modules/cloud/google/_gce.py @@ -7,7 +7,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 = ''' @@ -20,6 +20,10 @@ description: U(https://cloud.google.com/compute) for an overview. Full install/configuration instructions for the gce* modules can be found in the comments of ansible/test/gce_tests.py. +deprecated: + removed_in: "2.12" + why: Updated modules released with increased functionality + alternative: Use M(gcp_compute_instance) instead. options: image: description: diff --git a/test/sanity/code-smell/no-underscore-variable.py b/test/sanity/code-smell/no-underscore-variable.py index c5032797021..9640d976c95 100755 --- a/test/sanity/code-smell/no-underscore-variable.py +++ b/test/sanity/code-smell/no-underscore-variable.py @@ -33,7 +33,7 @@ def main(): 'lib/ansible/modules/cloud/amazon/route53_zone.py', 'lib/ansible/modules/cloud/amazon/s3_sync.py', 'lib/ansible/modules/cloud/azure/azure_rm_loadbalancer.py', - 'lib/ansible/modules/cloud/google/gce.py', + 'lib/ansible/modules/cloud/google/_gce.py', 'lib/ansible/modules/cloud/google/gce_eip.py', 'lib/ansible/modules/cloud/google/gce_img.py', 'lib/ansible/modules/cloud/google/gce_instance_template.py', diff --git a/test/sanity/validate-modules/ignore.txt b/test/sanity/validate-modules/ignore.txt index 364c9c47311..35e0f1b20c1 100644 --- a/test/sanity/validate-modules/ignore.txt +++ b/test/sanity/validate-modules/ignore.txt @@ -126,7 +126,7 @@ lib/ansible/modules/cloud/dimensiondata/dimensiondata_vlan.py E326 lib/ansible/modules/cloud/google/gc_storage.py E322 lib/ansible/modules/cloud/google/gc_storage.py E324 lib/ansible/modules/cloud/google/gc_storage.py E326 -lib/ansible/modules/cloud/google/gce.py E326 +lib/ansible/modules/cloud/google/_gce.py E326 lib/ansible/modules/cloud/google/gce_eip.py E322 lib/ansible/modules/cloud/google/gce_instance_template.py E322 lib/ansible/modules/cloud/google/gce_instance_template.py E324