Commit 3dbd90f1 authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Merge branch 'noc-1180' into 'master'

noc/noc#1180 SKS.SKS.get_interfaces. Fix tagged vlan none on command.

See merge request !3601
parents 6e098c99 ebd834bf
Pipeline #23027 passed with stages
in 53 minutes and 52 seconds
......@@ -218,11 +218,16 @@ class Script(BaseScript):
c = self.cli("show vlan interface %s" % ifname)
t = parse_table(c, allow_wrap=True, n_row_delim=",")
for i in t:
if i[1] == "Access":
if i[1] == "Access" and i[4]:
sub["untagged_vlan"] = int(i[4])
elif i[1] == "Trunk":
sub["untagged_vlan"] = int(i[2])
sub["tagged_vlans"] = self.expand_rangelist(i[3])
if i[3] != "none":
sub["tagged_vlans"] = self.expand_rangelist(i[3])
except ValueError:
self.logger.error("Bad tagged vlans format on port: %s", ifname)
sub["tagged_vlans"] = []
# Need more examples
raise self.NotSupportedError()
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