Commit 6e1714e2 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Do not print out the component_id in the solution (for the CM) if

the pport is null; a trivial link. Need to revisit this later.

Also a shared node change; do not update remaining_bandwidth when
doing a swapmod of the shared_node experiment, if the node was already
in the experiment. Might have existing vnodes using those interfaces.
parent f28e0bae
......@@ -4207,13 +4207,20 @@ sub InterpLinks($)
"where node_id='$pnodename' and iface='$iface'")
or return -1 if (!$self->impotent());
# Must convert this to kbps like everything else is.
$speed = $speed * 1000;
#
# Do not do this for nodes already in the shared experiment.
# It would reset the in-use bandwidth. Bad.
#
if (!exists($self->current_p2v()->{$pnodename})) {
# Must convert this to kbps like everything else is.
$speed = $speed * 1000;
DBQueryWarn("update interface_state set " .
" remaining_bandwidth='$speed' " .
"where node_id='$pnodename' and iface='$iface'")
or return -1 if (!$self->impotent());
DBQueryWarn("update interface_state set " .
" remaining_bandwidth='$speed' " .
"where node_id='$pnodename' and ".
" iface='$iface'")
or return -1 if (!$self->impotent());
}
}
}
}
......@@ -6078,7 +6085,11 @@ sub PrintSolution($$)
my $newMember = addNode($doc, $newLink, "interface_ref");
$newMember->setAttribute("virtual_node_id", $vnode);
$newMember->setAttribute("virtual_port_id", $vport);
$newMember->setAttribute("component_id", $pport);
#
# XXX Ignore for now. Need to fix.
#
$newMember->setAttribute("component_id", $pport)
if (defined($pport));
}
}
print $output $doc->toString(1) . "\n";
......
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