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
f57436d2
Verified
Commit
f57436d2
authored
Jan 27, 2022
by
Andrey Vertiprahov
Browse files
Alstec.24xx.get_interfaces. Catch not supported 'show port description' command.
parent
a840e1ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
sa/profiles/Alstec/24xx/get_interfaces.py
View file @
f57436d2
...
...
@@ -69,7 +69,11 @@ class Script(BaseScript):
:return:
"""
for
ifname
in
list
(
sorted
(
interfaces
,
reverse
=
True
,
key
=
alnum_key
))[:
3
]:
v
=
self
.
cli
(
"show port description %s"
%
ifname
)
try
:
v
=
self
.
cli
(
"show port description %s"
%
ifname
)
except
self
.
CLISyntaxError
:
self
.
logger
.
error
(
"'show port description' is not supported"
)
break
if
not
v
:
continue
r
=
parse_kv
(
self
.
description_map
,
v
,
sep
=
"."
)
...
...
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