From db13610701c809a5a5d18cff5018e0ad9a33212b Mon Sep 17 00:00:00 2001 From: Sumit Jaiswal Date: Tue, 18 Jun 2019 10:09:43 +0530 Subject: [PATCH] fix 57447 bug (#57938) Signed-off-by: Sumit Jaiswal (cherry picked from commit d63ccb5bc83ae10aa92d8dea258cb46b7e2d164f) --- ...-netvisor-failing-with-network_cli-connection.yaml | 2 ++ lib/ansible/plugins/cliconf/netvisor.py | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/57447-netvisor-failing-with-network_cli-connection.yaml diff --git a/changelogs/fragments/57447-netvisor-failing-with-network_cli-connection.yaml b/changelogs/fragments/57447-netvisor-failing-with-network_cli-connection.yaml new file mode 100644 index 00000000000..881f1eb377b --- /dev/null +++ b/changelogs/fragments/57447-netvisor-failing-with-network_cli-connection.yaml @@ -0,0 +1,2 @@ +bugfixes: +- To fix the netvisor failure with network_cli connection - https://github.com/ansible/ansible/pull/57938 \ No newline at end of file diff --git a/lib/ansible/plugins/cliconf/netvisor.py b/lib/ansible/plugins/cliconf/netvisor.py index 1b37b6950e7..ac5f45d5baa 100644 --- a/lib/ansible/plugins/cliconf/netvisor.py +++ b/lib/ansible/plugins/cliconf/netvisor.py @@ -35,7 +35,16 @@ from ansible.plugins.cliconf import CliconfBase class Cliconf(CliconfBase): - def get(self, command=None, prompt=None, answer=None, sendonly=False, output=None, check_all=False): + def get_config(self, source='running', format='text', flags=None): + if source not in ('running'): + return self.invalid_params("fetching configuration from %s is not supported" % source) + cmd = 'show running-config' + return self.send_command(cmd) + + def edit_config(self, command): + return + + def get(self, command=None, prompt=None, answer=None, sendonly=False, output=None, newline=True, check_all=False): if not command: raise ValueError('must provide value of command to execute') if output: