From 2cb2ba1fe6bfd0a962b5e2807953e71c6a6486ee Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Sun, 28 Aug 2016 23:02:36 -0400 Subject: [PATCH] changes nxos method for passing kwargs to get_config() This change makes both the Cli and Nxapi objects handle the get_config() method consistently the same --- lib/ansible/module_utils/nxos.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/ansible/module_utils/nxos.py b/lib/ansible/module_utils/nxos.py index 0378b14954..dde97cad3a 100644 --- a/lib/ansible/module_utils/nxos.py +++ b/lib/ansible/module_utils/nxos.py @@ -173,17 +173,15 @@ class Nxapi(object): return responses - ### end of netcli.Cli ### - ### implemention of netcfg.Config ### def configure(self, commands): commands = to_list(commands) return self.execute(commands, output='config') - def get_config(self, **kwargs): + def get_config(self, include_defaults=False): cmd = 'show running-config' - if kwargs.get('include_defaults'): + if include_defaults: cmd += ' all' return self.execute([cmd], output='text')[0] @@ -263,9 +261,9 @@ class Cli(CliBase): responses.pop(0) return responses - def get_config(self, include_defaults=False, **kwargs): + def get_config(self, include_defaults=False): cmd = 'show running-config' - if kwargs.get('include_defaults'): + if include_defaults: cmd += ' all' return self.execute([cmd])[0]