Fix fetching ios default running config (#39475)

If default option is enable in that case only
add 'all' or 'full' flag
This commit is contained in:
Ganesh Nalawade 2018-05-02 19:27:56 +05:30 committed by GitHub
parent 9577cef3ba
commit eb5e15e7e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()