Fix fetching ios default running config (#39475)

If default option is enable in that case only
add 'all' or 'full' flag
pull/39658/head
Ganesh Nalawade 7 years ago committed by GitHub
parent 9577cef3ba
commit eb5e15e7e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -56,12 +56,14 @@ class Cliconf(CliconfBase):
def get_config(self, source='running', format='text', flags=None):
if source not in ('running', 'startup'):
return self.invalid_params("fetching configuration from %s is not supported" % source)
if not flags:
flags = []
if source == 'running':
cmd = 'show running-config '
if not flags:
flags = ['all']
else:
cmd = 'show startup-config'
cmd = 'show startup-config '
cmd += ' '.join(to_list(flags))
cmd = cmd.strip()

Loading…
Cancel
Save