diff --git a/changelogs/CHANGELOG.rst b/changelogs/CHANGELOG.rst index f2e7a2b..28f5761 100644 --- a/changelogs/CHANGELOG.rst +++ b/changelogs/CHANGELOG.rst @@ -4,6 +4,16 @@ Ansible Network Collection for Dell EMC OS6 Release Notes .. contents:: Topics +v1.0.5 +====== + +Bugfixes +--------------- + +- config module fix to handle issues faced while parsing running config and fixing idempotency issue for banner config +- command module change to keep similar changes across all dell networking OSs +- terminal plugin fix to send "terminal length 0" command + v1.0.4 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index eacac42..35f60ea 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -84,4 +84,12 @@ releases: fragments: - 1.0.4.yaml release_date: "2020-11-17" - + 1.0.5: + changes: + bugfixes: + - config module fix to handle issues faced while parsing running config and fixing idempotency issue for banner config + - command module change to keep similar changes across all dell networking OSs + - terminal plugin fix to send "terminal length 0" command + fragments: + - 1.0.5.yaml + release_date: "2020-12-09" diff --git a/galaxy.yml b/galaxy.yml index eeeb0b4..6242ae4 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,6 +1,6 @@ namespace: dellemc name: os6 -version: 1.0.4 +version: 1.0.5 readme: README.md authors: - Komal Patil diff --git a/plugins/doc_fragments/os6.py b/plugins/doc_fragments/os6.py index 2753e05..32daca5 100644 --- a/plugins/doc_fragments/os6.py +++ b/plugins/doc_fragments/os6.py @@ -61,7 +61,6 @@ class ModuleDocFragment(object): task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be used instead. type: bool - default: false auth_pass: description: - Specifies the password to use if required to enter privileged mode on the diff --git a/plugins/module_utils/network/os6.py b/plugins/module_utils/network/os6.py index c2b7a87..2449bbd 100644 --- a/plugins/module_utils/network/os6.py +++ b/plugins/module_utils/network/os6.py @@ -138,7 +138,7 @@ def get_sublevel_config(running_config, module): def os6_parse(lines, indent=None, comment_tokens=None): sublevel_cmds = [ - re.compile(r'^vlan !(priority).*$'), + re.compile(r'^vlan\s[\d,-]+.*$'), re.compile(r'^stack.*$'), re.compile(r'^interface.*$'), re.compile(r'datacenter-bridging.*$'), @@ -150,23 +150,23 @@ def os6_parse(lines, indent=None, comment_tokens=None): re.compile(r'ipv6 (dhcp pool|router).*$'), re.compile(r'mail-server.*$'), re.compile(r'vpc domain.*$'), - re.compile(r'router.*$'), + re.compile(r'router\s.*$'), re.compile(r'route-map.*$'), re.compile(r'policy-map.*$'), re.compile(r'class-map match-all.*$'), re.compile(r'captive-portal.*$'), re.compile(r'admin-profile.*$'), re.compile(r'link-dependency group.*$'), - re.compile(r'banner motd.*$'), re.compile(r'openflow.*$'), re.compile(r'support-assist.*$'), re.compile(r'template.*$'), re.compile(r'address-family.*$'), re.compile(r'spanning-tree mst configuration.*$'), re.compile(r'logging (?!.*(cli-command|buffered|console|email|facility|file|monitor|protocol|snmp|source-interface|traps|web-session)).*$'), - re.compile(r'(radius-server|tacacs-server) host.*$')] + re.compile(r'radius server (?!.*(attribute|dead-criteria|deadtime|timeout|key|load-balance|retransmit|source-interface|source-ip|vsa)).*$'), + re.compile(r'(tacacs-server) host.*$')] - childline = re.compile(r'^exit$') + childline = re.compile(r'^exit\s*$') config = list() parent = list() children = [] diff --git a/plugins/modules/os6_command.py b/plugins/modules/os6_command.py index 31ebc52..99df001 100644 --- a/plugins/modules/os6_command.py +++ b/plugins/modules/os6_command.py @@ -35,7 +35,6 @@ module is not returned until the condition is satisfied or the number of retries has expired. type: list - elements: str required: true wait_for: description: @@ -165,7 +164,7 @@ def main(): """ argument_spec = dict( # { command: , prompt: , response: } - commands=dict(type='list', elements='str', required=True), + commands=dict(type='list', required=True), wait_for=dict(type='list', elements='str'), match=dict(default='all', choices=['all', 'any']), diff --git a/plugins/terminal/os6.py b/plugins/terminal/os6.py index f31d49b..8f66a40 100644 --- a/plugins/terminal/os6.py +++ b/plugins/terminal/os6.py @@ -55,6 +55,13 @@ class TerminalModule(TerminalBase): terminal_inital_prompt_newline = False + def on_open_shell(self): + try: + if self._get_prompt().endswith(b'#'): + self._exec_cli_command(b'terminal length 0') + except AnsibleConnectionFailure: + raise AnsibleConnectionFailure('unable to set terminal parameters') + def on_become(self, passwd=None): if self._get_prompt().endswith(b'#'): return diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt index b5fe4db..6945f1c 100644 --- a/tests/sanity/ignore-2.10.txt +++ b/tests/sanity/ignore-2.10.txt @@ -1,3 +1,4 @@ plugins/action/os6.py action-plugin-docs plugins/modules/os6_config.py validate-modules:parameter-list-no-elements plugins/modules/os6_facts.py validate-modules:parameter-list-no-elements +plugins/modules/os6_command.py validate-modules:parameter-list-no-elements diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index b21e19c..91049ed 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -1,3 +1,4 @@ plugins/action/os6.py action-plugin-docs plugins/modules/os6_config.py validate-modules:parameter-list-no-elements -plugins/modules/os6_facts.py validate-modules:parameter-list-no-elements \ No newline at end of file +plugins/modules/os6_facts.py validate-modules:parameter-list-no-elements +plugins/modules/os6_command.py validate-modules:parameter-list-no-elements \ No newline at end of file