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($) {
if ($vlan->MemberList(\@members) != 0) {
die("*** $0:\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;
my $iface;
if ($member->GetAttribute("node_id", \$nodeid) != 0 ||
$member->GetAttribute("iface", \$iface) != 0) {
die("*** $0:\n".
" Missing attributes for $member in $vlan\n");
}
else {
foreach my $member (@members) {
my $nodeid;
my $iface;
if ($member->GetAttribute("node_id", \$nodeid) != 0 ||
$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;
......
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