Commit bd5cc243 authored by Robert Ricci's avatar Robert Ricci

Add information about bandwidth caps into the ptop file - this way,

users can specifically ask for nodes that don't (or do, if they're
crazy) have specific bandwidth caps.
parent 2e39a5be
......@@ -635,7 +635,7 @@ if ($widearea) {
#
$result =
DBQueryFatal("select n.node_id,nt.type,ns.status,r.pid,r.eid,wn.site,".
"i.card,i.port,i.iface ".
"i.card,i.port,i.iface,wn.bwlimit ".
"from nodes as n ".
"left join node_types as nt on nt.type=n.type ".
"left join reserved as r on r.node_id=n.node_id ".
......@@ -647,7 +647,8 @@ if ($widearea) {
"where (n.role='testnode' and nt.isremotenode=1 and ".
" nt.isvirtnode=0)");
while (($physnode,$ptype,$status,$mpid,$meid,$site,$card,$port,$iface)
while (($physnode,$ptype,$status,$mpid,$meid,$site,$card,$port,$iface,
$bwlimit)
= $result->fetchrow_array) {
my $class = $typemap{$ptype}->{'CLASS'};
my @types;
......@@ -706,6 +707,16 @@ if ($widearea) {
push @features, map "OS-$_:0", @{$node_type_osids{$ptype}};
}
#
# Put in a feature indicating whether or not this node has a bandwidth
# cap
#
if (!defined($bwlimit) || $bwlimit eq "-1") {
push @features, "nobwlimit:0";
} else {
push @features, "bwlimit:0";
}
my $text = "node $physnode " .
join(" ",@types) . " - " . join(" ",@features) .
" - " . join(" ",@flags);
......
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