diff --git a/lib/ansible/module_utils/openswitch.py b/lib/ansible/module_utils/openswitch.py index 5e3bf011dbc..60a6a33e02b 100644 --- a/lib/ansible/module_utils/openswitch.py +++ b/lib/ansible/module_utils/openswitch.py @@ -73,6 +73,7 @@ class Response(object): except ValueError: return None + class Rest(object): DEFAULT_HEADERS = { @@ -221,7 +222,7 @@ class Cli(CliBase): responses = self.execute(cmds) return responses[1:] - def get_config(self): + def get_config(self, **kwargs): return self.execute('show running-config')[0] def load_config(self, commands, **kwargs): @@ -232,6 +233,7 @@ class Cli(CliBase): Cli = register_transport('cli')(Cli) + class Ssh(object): def __init__(self): @@ -239,6 +241,7 @@ class Ssh(object): msg = 'ops.dc lib is required but does not appear to be available' raise NetworkError(msg) self._opsidl = None + self._extschema = None def configure(self, config): if not self._opsidl: diff --git a/lib/ansible/module_utils/shell.py b/lib/ansible/module_utils/shell.py index 87f9491f23b..fa78cb3a376 100644 --- a/lib/ansible/module_utils/shell.py +++ b/lib/ansible/module_utils/shell.py @@ -259,7 +259,7 @@ class CliBase(object): def configure(self, commands): raise NotImplementedError - def get_config(self, commands): + def get_config(self, **kwargs): raise NotImplementedError def load_config(self, commands, **kwargs): diff --git a/lib/ansible/module_utils/vyos.py b/lib/ansible/module_utils/vyos.py index a47bd89eb24..a0edaa6b87a 100644 --- a/lib/ansible/module_utils/vyos.py +++ b/lib/ansible/module_utils/vyos.py @@ -29,7 +29,7 @@ import re from ansible.module_utils.network import NetworkModule, NetworkError -from ansible.module_utils.network import register_transport, to_list, get_exception +from ansible.module_utils.network import register_transport, to_list from ansible.module_utils.shell import CliBase @@ -96,7 +96,7 @@ class Cli(CliBase): return diff - def get_config(self, output='text'): + def get_config(self, output='text', **kwargs): if output not in ['text', 'set']: raise ValueError('invalid output format specified') if output == 'set': @@ -104,5 +104,4 @@ class Cli(CliBase): else: return self.execute(['show configuration'])[0] - Cli = register_transport('cli', default=True)(Cli)