Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e_zombie
noc
Commits
e3f444b1
Commit
e3f444b1
authored
Jun 17, 2022
by
bee26
Browse files
Merge branch 'nsn_timos' into 'master'
Fix NSN.TIMOS.get_lldp_neighbors script See merge request
!6386
parents
ab949063
9a4c8978
Changes
1
Hide whitespace changes
Inline
Side-by-side
sa/profiles/NSN/TIMOS/get_lldp_neighbors.py
View file @
e3f444b1
# ----------------------------------------------------------------------
# NSN.TIMOS.get_lldp_neighbors
# ----------------------------------------------------------------------
# Copyright (C) 2007-202
0
The NOC Project
# Copyright (C) 2007-202
2
The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
...
...
@@ -64,7 +64,13 @@ class Script(BaseScript):
# PortId Subtype : 5 (interfaceName)
# Port Id : 65:73:61:74:2D:32:2F:31:2F:32:31
# "esat-2/1/21"
remote_port_name1
,
remote_port__name2
=
port
.
split
(
"
\n
"
,
1
)
#
# PortId Subtype : 5 (interfaceName)
# Port Id : 58:47:69:67:61:62:69:74:45:74:68:65:72:6E:65:74:30:2F:
# 30:2F:34:38
# "XGigabitEthernet0/0/48"
remote_port_name1
,
remote_port__name2
=
port
.
rsplit
(
"
\n
"
,
1
)
remote_port_name1
=
re
.
sub
(
r
"\n|\s+"
,
""
,
remote_port_name1
)
return
smart_text
(
codecs
.
decode
(
remote_port_name1
.
strip
().
replace
(
":"
,
""
),
"hex"
))
elif
port_type
==
"7"
:
return
port
.
replace
(
"
\n
"
,
""
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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