fix cliconf get_config method to match base signature (#36682)

This commit fixes up the get_config method to match the minimum method
signature as defined by the base class.  Without this patch, the
get_config method calls will fail in some cirumstances.
This commit is contained in:
Peter Sprygada 2018-02-26 10:56:22 -05:00 committed by GitHub
commit fb6a8c0133
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 16 additions and 15 deletions

View file

@ -50,11 +50,12 @@ class Cliconf(CliconfBase):
return device_info
def get_config(self, source='running', flags=None):
def get_config(self, source='running', format='text', flags=None):
lookup = {'running': 'running-config', 'startup': 'startup-config'}
cmd = 'show {} '.format(lookup[source])
cmd += ' '.join(flags)
if flags:
cmd += ' '.join(flags)
cmd = cmd.strip()
return self.send_command(cmd)