Ios test fixes (#40503)

* Return messages generated from edit_config to module

* This does not seem to work that way

* Change test IP addresses to not conflict with device config
This commit is contained in:
Nathaniel Case 2018-05-21 17:51:21 -04:00 committed by GitHub
parent 8d39515914
commit eb818df1ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 12 deletions

View file

@ -72,6 +72,7 @@ class Cliconf(CliconfBase):
@enable_mode
def edit_config(self, command):
results = []
for cmd in chain(['configure terminal'], to_list(command), ['end']):
if isinstance(cmd, dict):
command = cmd['command']
@ -84,7 +85,8 @@ class Cliconf(CliconfBase):
answer = None
newline = True
self.send_command(command, prompt, answer, False, newline)
results.append(self.send_command(command, prompt, answer, False, newline))
return results[1:-1]
def get(self, command, prompt=None, answer=None, sendonly=False):
return self.send_command(command, prompt=prompt, answer=answer, sendonly=sendonly)