mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 22:51:23 -07:00
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:
parent
9577cef3ba
commit
eb5e15e7e0
1 changed files with 5 additions and 3 deletions
|
@ -56,10 +56,12 @@ class Cliconf(CliconfBase):
|
||||||
def get_config(self, source='running', format='text', flags=None):
|
def get_config(self, source='running', format='text', 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 not flags:
|
||||||
|
flags = []
|
||||||
|
|
||||||
if source == 'running':
|
if source == 'running':
|
||||||
cmd = 'show running-config '
|
cmd = 'show running-config '
|
||||||
if not flags:
|
|
||||||
flags = ['all']
|
|
||||||
else:
|
else:
|
||||||
cmd = 'show startup-config '
|
cmd = 'show startup-config '
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue