Segment out the update method (#32103)

This patch changes the base parameters class to segment out the
update method. This is done often throughout the f5 modules, so
this just bakes it into the mod utils so that I can delete it
from each module
This commit is contained in:
Tim Rupp 2017-10-24 16:13:14 -07:00 committed by GitHub
parent 5663d11b94
commit d067166cfc

View file

@ -327,6 +327,11 @@ class AnsibleF5Client(object):
class AnsibleF5Parameters(object):
def __init__(self, params=None):
self._values = defaultdict(lambda: None)
self._values['__warnings'] = []
if params:
self.update(params=params)
def update(self, params=None):
if params:
for k, v in iteritems(params):
if self.api_map is not None and k in self.api_map: