Commit 4d67f198 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 noc/noc!5260
parents d1e9dbe5 36e3bd0f
......@@ -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