mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
Fix typo in cliconf get_config (#43553)
This commit is contained in:
parent
572a2187ab
commit
733e512f35
5 changed files with 11 additions and 11 deletions
|
@ -37,21 +37,21 @@ from ansible.plugins.cliconf import CliconfBase, enable_mode
|
|||
class Cliconf(CliconfBase):
|
||||
|
||||
@enable_mode
|
||||
def get_config(self, source='running', flag=None, format=None):
|
||||
def get_config(self, source='running', flags=None, format=None):
|
||||
if source not in ('running', 'startup'):
|
||||
return self.invalid_params("fetching configuration from %s is not supported" % source)
|
||||
|
||||
if format:
|
||||
raise ValueError("'format' value %s is not supported for get_config" % format)
|
||||
|
||||
if not flag:
|
||||
flag = []
|
||||
if not flags:
|
||||
flags = []
|
||||
if source == 'running':
|
||||
cmd = 'show running-config '
|
||||
else:
|
||||
cmd = 'show startup-config '
|
||||
|
||||
cmd += ' '.join(to_list(flag))
|
||||
cmd += ' '.join(to_list(flags))
|
||||
cmd = cmd.strip()
|
||||
|
||||
return self.send_command(cmd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue