1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Add missing flags param to IOS get_config cliconf method (#34869)

This commit is contained in:
Ricardo Carrillo Cruz 2018-01-15 14:16:45 +01:00 committed by GitHub
parent 9e918c8003
commit 74eb0bfb13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,13 +53,18 @@ class Cliconf(CliconfBase):
return device_info
@enable_mode
def get_config(self, source='running'):
def get_config(self, source='running', flags=None):
if source not in ('running', 'startup'):
return self.invalid_params("fetching configuration from %s is not supported" % source)
if source == 'running':
cmd = b'show running-config all'
else:
cmd = b'show startup-config'
flags = [] if flags is None else flags
cmd += ' '.join(flags)
cmd = cmd.strip()
return self.send_command(cmd)
@enable_mode