mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-30 04:49:09 -07:00
IOS XR cli tests move to network_cli (#34007)
* Update task definitions for network_cli * Add connection to debug messages * Specify connection for prepare task * pc won't be around for connection=network_cli * Assorted Python 3 fixes * Give default port if ansible_ssh_port missing * delegate -> connection * Extend error regex
This commit is contained in:
parent
5db9ac23ee
commit
2e76c89910
48 changed files with 154 additions and 107 deletions
|
@ -61,9 +61,9 @@ class Cliconf(CliconfBase):
|
|||
if source not in lookup:
|
||||
return self.invalid_params("fetching configuration from %s is not supported" % source)
|
||||
if filter:
|
||||
cmd = to_bytes(b'show {0} {1}'.format(lookup[source], filter), errors='surrogate_or_strict')
|
||||
cmd = to_bytes('show {0} {1}'.format(lookup[source], filter), errors='surrogate_or_strict')
|
||||
else:
|
||||
cmd = to_bytes(b'show {0}'.format(lookup[source]), errors='surrogate_or_strict')
|
||||
cmd = to_bytes('show {0}'.format(lookup[source]), errors='surrogate_or_strict')
|
||||
|
||||
return self.send_command(cmd)
|
||||
|
||||
|
@ -76,10 +76,10 @@ class Cliconf(CliconfBase):
|
|||
|
||||
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):
|
||||
self.send_command(b'abort')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue