From 18738c81dacbc9b274409091b29497b85cf1b442 Mon Sep 17 00:00:00 2001 From: Nathaniel Case Date: Thu, 7 Jul 2016 14:32:19 -0400 Subject: [PATCH] New ModuleStub solution --- lib/ansible/module_utils/network.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/ansible/module_utils/network.py b/lib/ansible/module_utils/network.py index 4d80de7b03..24f87a5acf 100644 --- a/lib/ansible/module_utils/network.py +++ b/lib/ansible/module_utils/network.py @@ -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,