Commit 74af9632 authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Merge branch 'patch-avs-sks-cleanup-config' into 'master'

SKS.SKS. Add violative config regex for 'SKS-16E1-IP-ES-L'.

See merge request noc/noc!6044
parents d1cd78a4 a14117bb
......@@ -130,10 +130,13 @@ class Profile(BaseProfile):
return cls.INTERFACE_TYPES.get(name[:2].lower())
rx_e1 = re.compile(r"e1 unit-1|!")
rx_snmp = re.compile(r"snmp-server community 7 (\w+) ")
def cleaned_config(self, cfg):
cfg = super().cleaned_config(cfg)
search = self.rx_e1.search(cfg)
if search:
cfg = cfg[search.span()[0] :]
# SKS-16E1-IP-ES-L
cfg = self.rx_snmp.sub("snmp-server community 7 XXXXX ", cfg)
return cfg
Markdown is supported
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