From 4021194532dde444e34e8a33f254d91ef4e25be3 Mon Sep 17 00:00:00 2001 From: abirami-n Date: Mon, 5 Mar 2018 17:00:37 +0530 Subject: [PATCH] Fix_regex (#36569) --- lib/ansible/plugins/terminal/dellos6.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/ansible/plugins/terminal/dellos6.py b/lib/ansible/plugins/terminal/dellos6.py index 6da6f15a15..cef63cba8c 100644 --- a/lib/ansible/plugins/terminal/dellos6.py +++ b/lib/ansible/plugins/terminal/dellos6.py @@ -39,14 +39,12 @@ class TerminalModule(TerminalBase): terminal_stderr_re = [ re.compile(br"% ?Error: (?:(?!\bdoes not exist\b)(?!\balready exists\b)(?!\bHost not found\b)(?!\bnot active\b).)*$"), re.compile(br"% ?Bad secret"), - re.compile(br"invalid input", re.I), - re.compile(br"Cannot add a dynamic member to a LAG with static members", re.I), - re.compile(br"VLAN ID not found", re.I), - re.compile(br"The maximum number of users have already been created.", re.I), - re.compile(br"Invalid access level. Access level can be either 0, 1 or 15", re.I), - re.compile(br"An invalid interface has been used for this function.", re.I), - re.compile(br"Error:Community does not exist.", re.I), - re.compile(br"Value is out of range.", re.I), + re.compile(br"(\bInterface is part of a port-channel\b)|(\bAn invalid interface has been used for this function\b)"), + re.compile(br"(\bThe maximum number of users have already been created\b)|(\bVLAN ID is out of range\b)|(\bUse '-' for range\b)"), + re.compile(br"(\binvalid input\b)|(\bVLAN ID not found\b)"), + re.compile(br"(\bInvalid access level. Access level can be either 0, 1 or 15\b)|(\bValue is out of range\b)"), + re.compile(br"Cannot add(.+)\s(\S+)"), + re.compile(br"Error:(.+)\s(\S+)"), re.compile(br"(?:incomplete|ambiguous) command", re.I), re.compile(br"connection timed out", re.I), re.compile(br"'[^']' +returned error code: ?\d+"),