1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fixes two bugs in the eos shared module

* fixes issue with correctly returning the running-config over eapi when a
  call was made to get_config()
* fixes issue the MRO in Cli transport
This commit is contained in:
Peter Sprygada 2016-08-28 22:58:52 -04:00
parent 4b679ffd84
commit 5ce032bf6d

View file

@ -231,12 +231,12 @@ class Eapi(EosConfigMixin):
return response['result'] return response['result']
def get_config(self, **kwargs): def get_config(self, **kwargs):
return self.run_commands(['show running-config'], format='text')[0] return self.execute(['show running-config'], format='text')[0]['output']
Eapi = register_transport('eapi')(Eapi) Eapi = register_transport('eapi')(Eapi)
class Cli(CliBase, EosConfigMixin): class Cli(EosConfigMixin, CliBase):
CLI_PROMPTS_RE = [ CLI_PROMPTS_RE = [
re.compile(r"[\r\n]?[\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$"), re.compile(r"[\r\n]?[\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$"),