Fix typo in cliconf get_config (#43553)

This commit is contained in:
Ganesh Nalawade 2018-08-02 09:44:30 +05:30 committed by GitHub
parent 572a2187ab
commit 733e512f35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 11 deletions

View file

@ -37,21 +37,21 @@ from ansible.plugins.cliconf import CliconfBase, enable_mode
class Cliconf(CliconfBase):
@enable_mode
def get_config(self, source='running', flag=None, format=None):
def get_config(self, source='running', flags=None, format=None):
if source not in ('running', 'startup'):
return self.invalid_params("fetching configuration from %s is not supported" % source)
if format:
raise ValueError("'format' value %s is not supported for get_config" % format)
if not flag:
flag = []
if not flags:
flags = []
if source == 'running':
cmd = 'show running-config '
else:
cmd = 'show startup-config '
cmd += ' '.join(to_list(flag))
cmd += ' '.join(to_list(flags))
cmd = cmd.strip()
return self.send_command(cmd)