Commit cbc640e8 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Merge branch 'master' of git-public.flux.utah.edu:/flux/git/emulab-devel

parents 65a0ddfa 45c6b202
......@@ -695,6 +695,20 @@ sub SetRole($$)
return $self->SetAttribute("role", $role);
}
sub GetRole($;$)
{
my ($self, $prole) = @_;
my $role;
return -1
if ($self->GetAttribute("role", \$role) != 0);
if (defined($prole)) {
$$prole = $role;
return 0;
}
return $role;
}
#
# Get the experiment object for a lan.
......@@ -2473,6 +2487,20 @@ sub SetRole($$)
return $self->GetLan()->SetRole($role);
}
sub GetRole($;$)
{
my ($self, $prole) = @_;
my $role;
return -1
if ($self->GetAttribute("role", \$role) != 0);
if (defined($prole)) {
$$prole = $role;
return 0;
}
return $role;
}
sub SetTag($$)
{
my ($self, $tag) = @_;
......
......@@ -994,7 +994,7 @@ sub Start($$$)
return -1;
}
}
system("$SNMPIT -q -t $pid $eid");
system("$SNMPIT -t $pid $eid");
if ($?) {
print STDERR "$SNMPIT failed\n";
return -1;
......@@ -1124,7 +1124,7 @@ sub Stop($$)
%vnodes = %tmp;
if ($version >= 2) {
system("$SNMPIT -q -r $pid $eid");
system("$SNMPIT -r $pid $eid");
if ($?) {
print STDERR "$SNMPIT failed\n";
return -1;
......
......@@ -5510,11 +5510,20 @@ sub InterpLinksAux($)
$self->impotent() ||
$self->alloconly(),
$protovlan);
$protolink->SetType((defined($protovlan) ?
"emulated" : "vlan"));
$protolink->SetRole("link/lan");
$protolink->SetAttribute("link/lan", $lan)
if (!defined($protovlan));
my $vlan_type;
my $vlan_role;
if (defined($protovlan)) {
$vlan_type = "emulated";
$vlan_role = "link/lan";
}
else {
$vlan_type = "vlan";
$vlan_role = "emulated";
$protolink->SetAttribute("link/lan", $lan);
}
$protolink->SetType($vlan_type);
$protolink->SetRole($vlan_role);
$protolink->AddInterface($nodeA, $vnodeA, $vportA,
$virtifaceA->viface(),
......@@ -6931,7 +6940,7 @@ sub UploadVlans($)
# Only care about encapsulated links.
next
if (! ($lan->type() eq "emulated" ||
$lan->type() eq "vlan"));
$lan->GetRole() eq "emulated"));
my $virtlan = $self->vlans()->{$lan->vname()};
if (!defined($virtlan)) {
......
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