Revert "Deprecate Entity, EntityCollection and use subspec in network modules (#33575)" (#33849)

This reverts commit 4349b56643.
This commit is contained in:
Ganesh Nalawade 2017-12-13 13:07:52 +05:30 committed by GitHub
parent b6528ea19f
commit ea18b9021a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 200 additions and 195 deletions

View file

@ -65,10 +65,6 @@ def sort_list(val):
class Entity(object):
"""Transforms a dict to with an argument spec
This class has been deprecated as of Ansible 2.5 and will be
removed from the code in future release.
Please use the suboptions in module argument spec instead.
This class will take a dict and apply an Ansible argument spec to the
values. The resulting dict will contain all of the keys in the param
with appropriate values set.
@ -187,12 +183,7 @@ class Entity(object):
class EntityCollection(Entity):
"""Extends ```Entity``` to handle a list of dicts
This class has been deprecated as of Ansible 2.5 and will be
removed from the code in future release.
Please use the suboptions in module argument spec instead.
"""
"""Extends ```Entity``` to handle a list of dicts """
def __call__(self, iterable, strict=True):
if iterable is None:
@ -207,21 +198,11 @@ class EntityCollection(Entity):
# these two are for backwards compatibility and can be removed once all of the
# modules that use them are updated
class ComplexDict(Entity):
"""
This class has been deprecated as of Ansible 2.5 and will be
removed from the code in future release.
Please use the suboptions in module argument spec instead.
"""
def __init__(self, attrs, module, *args, **kwargs):
super(ComplexDict, self).__init__(module, attrs, *args, **kwargs)
class ComplexList(EntityCollection):
"""
This class has been deprecated as of Ansible 2.5 and will be
removed from the code in future release.
Please use the suboptions in module argument spec instead.
"""
def __init__(self, attrs, module, *args, **kwargs):
super(ComplexList, self).__init__(module, attrs, *args, **kwargs)