mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Additional feature enhancements to nxos_logging (#45844)
* Various changes to nxos_logging. Plus added purge capibility. * Made a few new nxapi_logging test cases conditional based on version and/or platform. * Addressed PR comments and ansibot shippable. Fixed up nxos_logging documentation format. * Addressed ansibot shippable issues with whitespaces and documentation. * Resolved ansibot codestyle trailing whitespace
This commit is contained in:
@@ -36,8 +36,20 @@ from ansible.plugins.connection.httpapi import Connection as HttpApi
|
||||
class Cliconf(CliconfBase):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self._module_context = {}
|
||||
super(Cliconf, self).__init__(*args, **kwargs)
|
||||
|
||||
def read_module_context(self, module_key):
|
||||
if self._module_context.get(module_key):
|
||||
return self._module_context[module_key]
|
||||
|
||||
return None
|
||||
|
||||
def save_module_context(self, module_key, module_context):
|
||||
self._module_context[module_key] = module_context
|
||||
|
||||
return None
|
||||
|
||||
def send_command(self, command, **kwargs):
|
||||
"""Executes a cli command and returns the results
|
||||
This method will execute the CLI command on the connection and return
|
||||
|
||||
@@ -48,7 +48,7 @@ class TerminalModule(TerminalBase):
|
||||
re.compile(br"unknown command"),
|
||||
re.compile(br"user not present"),
|
||||
re.compile(br"invalid (.+?)at '\^' marker", re.I),
|
||||
re.compile(br"baud rate of console should be (\d*) to increase severity level", re.I),
|
||||
re.compile(br"[B|b]aud rate of console should be.* (\d*) to increase [a-z]* level", re.I),
|
||||
]
|
||||
|
||||
def on_become(self, passwd=None):
|
||||
|
||||
Reference in New Issue
Block a user