Commit 96016751 authored by Weibin Sun's avatar Weibin Sun
Browse files

getVlanIfaces returns actual ports for the vlan implemented by a layer 1 path

parent 196dc611
...@@ -215,17 +215,25 @@ sub getVlanIfaces($) { ...@@ -215,17 +215,25 @@ sub getVlanIfaces($) {
if ($vlan->MemberList(\@members) != 0) { if ($vlan->MemberList(\@members) != 0) {
die("*** $0:\n". die("*** $0:\n".
" Unable to load members for $vlan\n"); " Unable to load members for $vlan\n");
}
my %pathifaces = ();
if (!getPathVlanIfaces($vlanid, \%pathifaces)) {
foreach my $k (keys %pathifaces) {
push(@ports, $pathifaces{$k});
} }
foreach my $member (@members) { }
my $nodeid; else {
my $iface; foreach my $member (@members) {
my $nodeid;
if ($member->GetAttribute("node_id", \$nodeid) != 0 || my $iface;
$member->GetAttribute("iface", \$iface) != 0) {
die("*** $0:\n". if ($member->GetAttribute("node_id", \$nodeid) != 0 ||
" Missing attributes for $member in $vlan\n"); $member->GetAttribute("iface", \$iface) != 0) {
die("*** $0:\n".
" Missing attributes for $member in $vlan\n");
}
push(@ports, "$nodeid:$iface");
} }
push(@ports, "$nodeid:$iface");
} }
return @ports; return @ports;
......
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