Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
bf1dc07c
Commit
bf1dc07c
authored
May 20, 2011
by
David Johnson
Browse files
Bugfix from Weibin: remove unnecessary code on L1 path for creating L2 VLANs.
parent
b8c97997
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/snmpit_test/snmpit_lib.pm
View file @
bf1dc07c
...
...
@@ -312,7 +312,7 @@ sub getVlanPorts (@) {
my
@ports
=
();
foreach
my
$vlanid
(
@vlans
)
{
my
$vlan
=
VLan
->
Lookup
(
$vlanid
);
if
(
!
defined
(
$vlan
))
{
die
("
*** $0:
\n
"
.
...
...
@@ -323,30 +323,22 @@ sub getVlanPorts (@) {
die
("
*** $0:
\n
"
.
"
Unable to load members for
$vlan
\n
");
}
my
%pathifaces
=
();
my
$error
=
getPathVlanIfaces
(
$vlanid
,
\
%pathifaces
);
if
(
$error
<
0
)
{
die
("
*** $0:
\n
"
.
"
Error getting path interfaces for
$vlan
\n
");
}
if
(
$error
==
0
)
{
foreach
my
$k
(
keys
%pathifaces
)
{
push
(
@ports
,
Port
->
LookupByIface
(
$pathifaces
{
$k
}));
}
}
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
,
Port
->
LookupByIface
(
$nodeid
,
$iface
));
#
# getPathVlanIfaces call removed because we've made
# virtual ports and wires.
#
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
,
Port
->
LookupByIface
(
$nodeid
,
$iface
));
}
}
return
@ports
;
}
...
...
Write
Preview
Supports
Markdown
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