mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
minor fix in eos shared module returning diff
The diff returned from eos when the transport was set to eapi was as a dict but is expected to be a str. This change extracts the diff string from the dict object and returns it. The behavior is now consistent between cli and eapi transports.
This commit is contained in:
parent
d67af04c45
commit
675e87f68d
1 changed files with 4 additions and 0 deletions
|
@ -91,6 +91,7 @@ class EosConfigMixin(object):
|
|||
self.abort_config(session)
|
||||
diff = None
|
||||
raise
|
||||
|
||||
return diff
|
||||
|
||||
def save_config(self):
|
||||
|
@ -103,9 +104,12 @@ class EosConfigMixin(object):
|
|||
|
||||
if isinstance(self, Eapi):
|
||||
response = self.execute(commands, output='text')
|
||||
response[-2] = response[-2].get('output').strip()
|
||||
else:
|
||||
response = self.execute(commands)
|
||||
|
||||
|
||||
|
||||
return response[-2]
|
||||
|
||||
def commit_config(self, session):
|
||||
|
|
Loading…
Reference in a new issue