Commit 121b735a authored by Leigh Stoller's avatar Leigh Stoller

Add support for explicit type request feature/desire. When there is

an explicit_request attribute in the node_type_attributes table for a
type, and the topology explicitly requests that type, add a desire
to the vtop file call $type-explicit:1.0. An equivalent feature added
by ptopgen will result in those nodes not being allocated unless
explicitly requested.
parent fb3416f8
......@@ -1115,6 +1115,13 @@ sub LoadVirtNodes($)
$vnode->_fixedvm(undef);
$vnode->_isbridge(($vnode->role() eq "bridge" ? 1 : 0));
#
# Explicit type request desire to match feature.
#
my $explict_type_request;
$nodetype->GetAttribute("explicit_request", \$explict_type_request);
$vnode->_explicit_type_request($explict_type_request);
# For a list of interfaces on this node, as for rspec generation
$vnode->_virtifaces([]);
......@@ -2044,6 +2051,9 @@ sub GenVirtNodes($)
elsif ($vnode->_isbridge()) {
$type = ($type eq "pc" ? "delay" : "delay-" . $type);
}
if ($vnode->_explicit_type_request()) {
$desires->{"$type" . "-explicit"} = ['', 1.0];
}
$self->createNode($vname, $vnode->_cmurn(),
$type, $nodeweight, $desires, $others, \@interfaces);
......
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