mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
New ModuleStub solution
This commit is contained in:
parent
72204ddd3e
commit
18738c81da
1 changed files with 7 additions and 0 deletions
|
@ -67,6 +67,13 @@ def disconnect(module):
|
|||
module.fail_json(msg=exc.message)
|
||||
|
||||
|
||||
class ModuleStub(object):
|
||||
def __init__(self, argument_spec, fail_json):
|
||||
self.params = dict()
|
||||
for key, value in argument_spec.items():
|
||||
self.params[key] = value.get('default')
|
||||
self.fail_json = fail_json
|
||||
|
||||
class Command(object):
|
||||
|
||||
def __init__(self, command, output=None, prompt=None, response=None,
|
||||
|
|
Loading…
Reference in a new issue