Fix module._name comparisons to also consider FQCNs. (#230)

This commit is contained in:
Felix Fontein 2020-04-24 19:55:31 +02:00 committed by GitHub
parent d31b9dfa99
commit 61cf2b74c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
63 changed files with 63 additions and 63 deletions

View file

@ -118,7 +118,7 @@ class DatacenterInfoModule(OneViewModuleBase):
def __init__(self):
super(DatacenterInfoModule, self).__init__(additional_arg_spec=self.argument_spec)
self.is_old_facts = self.module._name == 'oneview_datacenter_facts'
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')