Commit 0610143c authored by Leigh B Stoller's avatar Leigh B Stoller

Add HasPhysNodes predicate.

parent 363503c8
......@@ -4936,6 +4936,27 @@ sub HasVirtNodes($)
return $query_result->num_rows;
}
sub HasPhysNodes($)
{
my ($self) = @_;
# Must be a real reference.
return -1
if (!ref($self));
my $idx = $self->idx();
my $query_result =
DBQueryFatal("select n.node_id from reserved as r ".
"left join nodes as n on n.node_id=r.node_id ".
"left join node_types as t on t.type=n.type ".
"where r.exptidx=$idx and t.isvirtnode=0");
return -1
if (!$query_result);
return $query_result->num_rows;
}
sub HasVirtInterfaces($)
{
my ($self) = @_;
......
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