Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alexey Shapovalov
noc
Commits
a14117bb
Verified
Commit
a14117bb
authored
Jan 27, 2022
by
Andrey Vertiprahov
Browse files
SKS.SKS. Add violative config regex for 'SKS-16E1-IP-ES-L'.
parent
a840e1ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
sa/profiles/SKS/SKS/profile.py
View file @
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment