Clean up deprecations (#504)

* Adjust deprecation versions.

* Remove redirects that are already made in ansible/ansible's ansible_builtin_runtime.yml

* Remove modules that were moved to the google.cloud collection according to ansible/ansible's ansible_builtin_runtime.yml.

* The _info module is in google.cloud.

* The gcp doc_fragment is a copy of the one in google.cloud and is only used by one lookup. Mark as deprecated/internal.

* Remove entries of modules that no longer exist.

* Update ignore.txt.

* Try to fix test.

* Remove debug output.
This commit is contained in:
Felix Fontein 2020-06-16 13:15:19 +02:00 committed by GitHub
commit b54ddaa28c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
152 changed files with 647 additions and 2628 deletions

View file

@ -12,7 +12,7 @@ DOCUMENTATION = '''
module: foreman
short_description: Manage Foreman Resources
deprecated:
removed_in: "2.12"
removed_in: 2.0.0 # was Ansible 2.12
why: "Replaced by re-designed individual modules living at https://github.com/theforeman/foreman-ansible-modules"
alternative: https://github.com/theforeman/foreman-ansible-modules
description:

View file

@ -12,7 +12,7 @@ DOCUMENTATION = '''
module: katello
short_description: Manage Katello Resources
deprecated:
removed_in: "2.12"
removed_in: '2.0.0' # was Ansible 2.12
why: "Replaced by re-designed individual modules living at https://github.com/theforeman/foreman-ansible-modules"
alternative: https://github.com/theforeman/foreman-ansible-modules
description:

View file

@ -162,7 +162,8 @@ def main():
is_old_facts = module._name in ('hpilo_facts', 'community.general.hpilo_facts')
if is_old_facts:
module.deprecate("The 'hpilo_facts' module has been renamed to 'hpilo_info', "
"and the renamed one no longer returns ansible_facts", version='2.13')
"and the renamed one no longer returns ansible_facts",
version='3.0.0', collection_name='community.general') # was Ansible 2.13
if not HAS_HPILO:
module.fail_json(msg=missing_required_lib('python-hpilo'), exception=HPILO_IMP_ERR)

View file

@ -117,7 +117,8 @@ class DatacenterInfoModule(OneViewModuleBase):
self.is_old_facts = self.module._name in ('oneview_datacenter_facts', 'community.general.oneview_datacenter_facts')
if self.is_old_facts:
self.module.deprecate("The 'oneview_datacenter_facts' module has been renamed to 'oneview_datacenter_info', "
"and the renamed one no longer returns ansible_facts", version='2.13')
"and the renamed one no longer returns ansible_facts",
version='3.0.0', collection_name='community.general') # was Ansible 2.13
def execute_module(self):

View file

@ -160,7 +160,8 @@ class EnclosureInfoModule(OneViewModuleBase):
self.is_old_facts = self.module._name in ('oneview_enclosure_facts', 'community.general.oneview_enclosure_facts')
if self.is_old_facts:
self.module.deprecate("The 'oneview_enclosure_facts' module has been renamed to 'oneview_enclosure_info', "
"and the renamed one no longer returns ansible_facts", version='2.13')
"and the renamed one no longer returns ansible_facts",
version='3.0.0', collection_name='community.general') # was Ansible 2.13
def execute_module(self):

View file

@ -115,7 +115,8 @@ class EthernetNetworkInfoModule(OneViewModuleBase):
self.is_old_facts = self.module._name in ('oneview_ethernet_network_facts', 'community.general.oneview_ethernet_network_facts')
if self.is_old_facts:
self.module.deprecate("The 'oneview_ethernet_network_facts' module has been renamed to 'oneview_ethernet_network_info', "
"and the renamed one no longer returns ansible_facts", version='2.13')
"and the renamed one no longer returns ansible_facts",
version='3.0.0', collection_name='community.general') # was Ansible 2.13
self.resource_client = self.oneview_client.ethernet_networks

View file

@ -86,7 +86,8 @@ class FcNetworkInfoModule(OneViewModuleBase):
self.is_old_facts = self.module._name in ('oneview_fc_network_facts', 'community.general.oneview_fc_network_facts')
if self.is_old_facts:
self.module.deprecate("The 'oneview_fc_network_facts' module has been renamed to 'oneview_fc_network_info', "
"and the renamed one no longer returns ansible_facts", version='2.13')
"and the renamed one no longer returns ansible_facts",
version='3.0.0', collection_name='community.general') # was Ansible 2.13
def execute_module(self):

View file

@ -85,7 +85,8 @@ class FcoeNetworkInfoModule(OneViewModuleBase):
self.is_old_facts = self.module._name in ('oneview_fcoe_network_facts', 'community.general.oneview_fcoe_network_facts')
if self.is_old_facts:
self.module.deprecate("The 'oneview_fcoe_network_facts' module has been renamed to 'oneview_fcoe_network_info', "
"and the renamed one no longer returns ansible_facts", version='2.13')
"and the renamed one no longer returns ansible_facts",
version='3.0.0', collection_name='community.general') # was Ansible 2.13
def execute_module(self):

View file

@ -99,7 +99,8 @@ class LogicalInterconnectGroupInfoModule(OneViewModuleBase):
self.is_old_facts = self.module._name in ('oneview_logical_interconnect_group_facts', 'community.general.oneview_logical_interconnect_group_facts')
if self.is_old_facts:
self.module.deprecate("The 'oneview_logical_interconnect_group_facts' module has been renamed to 'oneview_logical_interconnect_group_info', "
"and the renamed one no longer returns ansible_facts", version='2.13')
"and the renamed one no longer returns ansible_facts",
version='3.0.0', collection_name='community.general') # was Ansible 2.13
def execute_module(self):
if self.module.params.get('name'):

View file

@ -136,7 +136,8 @@ class NetworkSetInfoModule(OneViewModuleBase):
self.is_old_facts = self.module._name in ('oneview_network_set_facts', 'community.general.oneview_network_set_facts')
if self.is_old_facts:
self.module.deprecate("The 'oneview_network_set_facts' module has been renamed to 'oneview_network_set_info', "
"and the renamed one no longer returns ansible_facts", version='2.13')
"and the renamed one no longer returns ansible_facts",
version='3.0.0', collection_name='community.general') # was Ansible 2.13
def execute_module(self):

View file

@ -93,7 +93,8 @@ class SanManagerInfoModule(OneViewModuleBase):
self.is_old_facts = self.module._name in ('oneview_san_manager_facts', 'community.general.oneview_san_manager_facts')
if self.is_old_facts:
self.module.deprecate("The 'oneview_san_manager_facts' module has been renamed to 'oneview_san_manager_info', "
"and the renamed one no longer returns ansible_facts", version='2.13')
"and the renamed one no longer returns ansible_facts",
version='3.0.0', collection_name='community.general') # was Ansible 2.13
def execute_module(self):
if self.module.params.get('provider_display_name'):

View file

@ -314,7 +314,7 @@ def main():
'`manager_attribute_value` are deprecated. '
'Use `manager_attributes` instead for passing in '
'the manager attribute name and value pairs',
version='2.13')
version='3.0.0', collection_name='community.general') # was Ansible 2.13
# Return data back or fail with proper message
if result['ret'] is True:

View file

@ -182,7 +182,8 @@ def main():
is_old_facts = module._name in ('idrac_redfish_facts', 'community.general.idrac_redfish_facts')
if is_old_facts:
module.deprecate("The 'idrac_redfish_facts' module has been renamed to 'idrac_redfish_info', "
"and the renamed one no longer returns ansible_facts", version='2.13')
"and the renamed one no longer returns ansible_facts",
version='3.0.0', collection_name='community.general') # was Ansible 2.13
category = module.params['category']
command_list = module.params['command']

View file

@ -267,7 +267,7 @@ def main():
'bios_attribute_value']
module.deprecate(msg='The bios_attribute_name/bios_attribute_value '
'options are deprecated. Use bios_attributes instead',
version='2.14')
version='3.0.0', collection_name='community.general') # was Ansible 2.14
# boot order
boot_order = module.params['boot_order']

View file

@ -308,7 +308,8 @@ def main():
is_old_facts = module._name in ('redfish_facts', 'community.general.redfish_facts')
if is_old_facts:
module.deprecate("The 'redfish_facts' module has been renamed to 'redfish_info', "
"and the renamed one no longer returns ansible_facts", version='2.13')
"and the renamed one no longer returns ansible_facts",
version='3.0.0', collection_name='community.general') # was Ansible 2.13
# admin credentials used for authentication
creds = {'user': module.params['username'],