fix 57447 bug (#57938)

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
This commit is contained in:
Sumit Jaiswal 2019-06-18 10:09:43 +05:30 committed by GitHub
parent a82156a63f
commit d63ccb5bc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,6 +35,15 @@ from ansible.plugins.cliconf import CliconfBase
class Cliconf(CliconfBase): class Cliconf(CliconfBase):
def get_config(self, source='running', format='text', flags=None):
if source not in ('running'):
return self.invalid_params("fetching configuration from %s is not supported" % source)
cmd = 'show running-config'
return self.send_command(cmd)
def edit_config(self, command):
return
def get(self, command=None, prompt=None, answer=None, sendonly=False, output=None, newline=True, check_all=False): def get(self, command=None, prompt=None, answer=None, sendonly=False, output=None, newline=True, check_all=False):
if not command: if not command:
raise ValueError('must provide value of command to execute') raise ValueError('must provide value of command to execute')