mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Actually move vyos tests to network_cli (#33710)
* Fix vyos on network_cli on python3 bytes do not have format() in Python3 * Push connection to tasks, with bonus connection=local test * Run tests without explicit connection set * Add/update START messages where appropriate
This commit is contained in:
parent
cfb15b0272
commit
2425374fdd
37 changed files with 169 additions and 51 deletions
|
@ -55,18 +55,18 @@ class Cliconf(CliconfBase):
|
|||
return self.send_command(b'show configuration commands')
|
||||
|
||||
def edit_config(self, command):
|
||||
for cmd in chain([b'configure'], to_list(command)):
|
||||
self.send_command(cmd)
|
||||
for cmd in chain(['configure'], to_list(command)):
|
||||
self.send_command(to_bytes(cmd))
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False):
|
||||
return self.send_command(to_bytes(command), prompt=to_bytes(prompt), answer=to_bytes(answer), sendonly=sendonly)
|
||||
|
||||
def commit(self, comment=None):
|
||||
if comment:
|
||||
command = b'commit comment "{0}"'.format(comment)
|
||||
command = 'commit comment "{0}"'.format(comment)
|
||||
else:
|
||||
command = b'commit'
|
||||
self.send_command(command)
|
||||
command = 'commit'
|
||||
self.send_command(to_bytes(command))
|
||||
|
||||
def discard_changes(self, *args, **kwargs):
|
||||
self.send_command(b'discard')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue