From 815a683e9c315c2c8ff54f6e74508d6da6a2e62f Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Sun, 11 Sep 2016 23:37:19 -0400 Subject: [PATCH] minor clean of openswitch shared module * updates regexp entries * removes legacy 2.1 code for get_module() --- lib/ansible/module_utils/openswitch.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/ansible/module_utils/openswitch.py b/lib/ansible/module_utils/openswitch.py index e156daa5e7d..5e3bf011dbc 100644 --- a/lib/ansible/module_utils/openswitch.py +++ b/lib/ansible/module_utils/openswitch.py @@ -34,9 +34,6 @@ from ansible.module_utils.network import add_argument, register_transport, to_li from ansible.module_utils.shell import CliBase from ansible.module_utils.urls import fetch_url, url_argument_spec -# temporary fix until modules are update. to be removed before 2.2 final -from ansible.module_utils.network import get_module - add_argument('use_ssl', dict(default=True, type='bool')) add_argument('validate_certs', dict(default=True, type='bool')) @@ -209,13 +206,7 @@ class Cli(CliBase): ] CLI_ERRORS_RE = [ - re.compile(r"% ?Error"), - re.compile(r"% ?Bad secret"), - re.compile(r"invalid input", re.I), - re.compile(r"(?:incomplete|ambiguous) command", re.I), - re.compile(r"connection timed out", re.I), - re.compile(r"[^\r\n]+ not found", re.I), - re.compile(r"'[^']' +returned error code: ?\d+"), + re.compile(r"(?:unknown|incomplete|ambiguous) command", re.I), ] NET_PASSWD_RE = re.compile(r"[\r\n]?password: $", re.I)