Add missing flags param to IOS get_config cliconf method (#34869)
This commit is contained in:
parent
9e918c8003
commit
74eb0bfb13
1 changed files with 6 additions and 1 deletions
|
@ -53,13 +53,18 @@ class Cliconf(CliconfBase):
|
||||||
return device_info
|
return device_info
|
||||||
|
|
||||||
@enable_mode
|
@enable_mode
|
||||||
def get_config(self, source='running'):
|
def get_config(self, source='running', flags=None):
|
||||||
if source not in ('running', 'startup'):
|
if source not in ('running', 'startup'):
|
||||||
return self.invalid_params("fetching configuration from %s is not supported" % source)
|
return self.invalid_params("fetching configuration from %s is not supported" % source)
|
||||||
if source == 'running':
|
if source == 'running':
|
||||||
cmd = b'show running-config all'
|
cmd = b'show running-config all'
|
||||||
else:
|
else:
|
||||||
cmd = b'show startup-config'
|
cmd = b'show startup-config'
|
||||||
|
|
||||||
|
flags = [] if flags is None else flags
|
||||||
|
cmd += ' '.join(flags)
|
||||||
|
cmd = cmd.strip()
|
||||||
|
|
||||||
return self.send_command(cmd)
|
return self.send_command(cmd)
|
||||||
|
|
||||||
@enable_mode
|
@enable_mode
|
||||||
|
|
Loading…
Reference in a new issue