New ModuleStub solution

This commit is contained in:
Nathaniel Case 2016-07-07 14:32:19 -04:00
parent 72204ddd3e
commit 18738c81da

View file

@ -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,