1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Adds selective assignment of kwargs (#34813)

For the f5 module utils, the parameters base class needs to selectively
get args from kwargs
This commit is contained in:
Tim Rupp 2018-01-12 09:50:53 -08:00 committed by GitHub
parent 82a0253059
commit 9314607c38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,9 +136,11 @@ class F5BaseClient(object):
class AnsibleF5Parameters(object): class AnsibleF5Parameters(object):
def __init__(self, params=None): def __init__(self, *args, **kwargs):
self._values = defaultdict(lambda: None) self._values = defaultdict(lambda: None)
self._values['__warnings'] = [] self._values['__warnings'] = []
self.client = kwargs.pop('client', None)
params = kwargs.pop('params', None)
if params: if params:
self.update(params=params) self.update(params=params)