Commit 72cb3da5 authored by Leigh Stoller's avatar Leigh Stoller

Temp genimode hack, strip out nodes that are not prereserved or

shared. This cuts down on the rspec size for the demo; huge
otherwise.

Another temp hack; strip out interfaces that are not expt/ctrl to
prevent clutter and breakage in the interface list.
parent 320b1cb5
......@@ -186,8 +186,11 @@ print_header();
my %nodetointerface;
# Read interfaces
my $result = DBQueryFatal("SELECT node_id,card,port,iface,interface_type" .
" from interfaces;");
my $result =
DBQueryFatal("SELECT node_id,card,port,iface,interface_type" .
" from interfaces " .
($genimode ? "where role!='other' and role!='gw'" : ""));
while (($node,$card,$port,$iface,$type) = $result->fetchrow_array) {
push @{ $nodetointerface{"$node"} }, $iface;
$interfacemap{"$node:$card:$port"} = $iface;
......@@ -449,23 +452,23 @@ if (defined($exempt_eid)) {
"(b.pid='$pid' and b.eid='$exempt_eid'))";
}
# In shared mode, allow allocated nodes whose sharing_mode is set.
if ($useshared) {
$free_condition = "($free_condition or ".
"(b.node_id is not null && b.sharing_mode='shared_local' && ".
" np.eventstate='" . TBDB_NODESTATE_ISUP . "'))";
}
# In genimode exclude nodes with exclusion attribute.
if ($genimode) {
$free_condition = "(nat1.attrvalue is null or nat1.attrvalue=0)";
if (0 && $pid && $MAINSITE) {
if ($pid && $MAINSITE) {
$free_condition = "($free_condition and ".
"(np.reserved_pid is not null and np.reserved_pid='$pid'))";
}
}
# In shared mode, allow allocated nodes whose sharing_mode is set.
if ($useshared) {
$free_condition = "($free_condition or ".
"(b.node_id is not null && b.sharing_mode='shared_local' && ".
" np.eventstate='" . TBDB_NODESTATE_ISUP . "'))";
}
# If the user wants all nodes, we consider everything to be free (this
# overrides the other possible free conditions
if ($allnodes) {
......
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