Commit 3fff677c authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Merge branch 'fix-HPComware_get_config_2209P13' into 'master'

fix HP.Comware get_config and get_interfaces for Release 2209Pxx

See merge request !5260

(cherry picked from commit 4d67f198)

8447b574 fix HP.Comware get_config for Release 2209P13
9b40c916 fix HP.Comware get_interfaces for Release 2209Pxx
6c70d26a Merge branch 'master' of https://code.getnoc.com/noc/noc into fix-HPComware_get_config_2209P13
12ca7c29 Merge branch 'master' of https://code.getnoc.com/noc/noc into fix-HPComware_get_config_2209P13
parent e9507fcf
Pipeline #31421 passed with stages
in 24 minutes and 25 seconds
......@@ -15,6 +15,11 @@ class Script(BaseScript):
name = "HP.Comware.get_config"
interface = IGetConfig
def to_reuse_cli_session(self):
if self.is_bad_release:
return False
return self.reuse_cli_session
def execute_cli(self, policy="r"):
assert policy in ("r", "s")
self.cli("undo terminal monitor")
......
......@@ -108,6 +108,16 @@ class Script(BaseScript):
else:
yield b
def to_reuse_cli_session(self):
if self.is_bad_release:
return False
return self.reuse_cli_session
def to_keep_cli_session(self):
if self.is_bad_release:
return False
return self.keep_cli_session
def execute_cli(self, **kwargs):
isis = self.get_isis_interfaces()
......
......@@ -27,6 +27,10 @@ class Profile(BaseProfile):
spaces_rx = re.compile(r"^\s{42}|^\s{16}", re.DOTALL | re.MULTILINE)
matchers = {
"is_bad_release": {"version": {"$regex": r"2209P"}},
}
def clean_spaces(self, config):
config = self.spaces_rx.sub("", config)
return config
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment