Commit 1ef535ab authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Add emulab extension to set the multiplex factor. This is a top level

element in the rspec:

  <rspec>
    <emulab:collocate_factor count="50"/>
  </rspec>
parent bb33a9d0
......@@ -751,7 +751,13 @@ sub GetTicketAuxAux($$$$$$$$$$$)
}
# Turn off fixnode; we will control this on the commandline.
$virtexperiment->allowfixnode(0);
$virtexperiment->multiplex_factor(10);
#
# Allow user to control the multiplex factor. Note that ptopgen
# will not allow the mfactor to be more then what we set as the
# max for the node, but in general we set it low here.
#
$virtexperiment->multiplex_factor(GeniXML::MultiplexFactor($rspec) || 10);
#
# Add global vtypes.
......
......@@ -887,6 +887,19 @@ sub XenPtype($)
return undef;
}
sub MultiplexFactor($)
{
my ($rspec) = @_;
my $mfactor = FindNodesNS("n:collocate_factor", $rspec, $EMULAB_NS)->pop();
if (defined($mfactor)) {
my $count = GetText("count", $mfactor);
return $count
if (defined($count) && $count =~ /^\d+$/);
}
return undef;
}
sub OpenFlowController($)
{
my ($link) = @_;
......
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