Commit c2e5c83b authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

New phystable elabinelab_vlans gets cleared out when removing physical

resource tables.

New routine to return whether experiment is an ElabInElab experiment.
parent cb8a711a
......@@ -163,7 +163,7 @@ use vars qw(@ISA @EXPORT);
TBSaveExpLogFiles TBExptWorkDir TBExptUserDir TBExptLogDir
TBExptDestroy TBIPtoNodeID TBNodeBootReset TBNodeStateWait
TBLeaderMailList ExpGroup TBExptSetSwapUID TBExptSetThumbNail
TBNodeAllocCheck TBPlabNodeUsername MarkPhysNodeDown
TBNodeAllocCheck TBPlabNodeUsername MarkPhysNodeDown TBExptIsElabInElab
TBNodeType TBNodeTypeProcInfo
......@@ -2942,6 +2942,7 @@ sub TBGetSiteVar($;$)
@physicalTables = ("delays",
"vlans",
"elabinelab_vlans",
"tunnels",
"ipport_ranges",
"v2pmap",
......@@ -3188,6 +3189,29 @@ sub TBExptPortRange($$$$)
return 1;
}
#
# Get elabinelab flag for an experiment.
#
# usage TBControlNetIP(char *pid, char *eid, int \*elabinelab)
# Return 1 if success.
# Return 0 if error.
#
sub TBExptIsElabInElab($$$)
{
my ($pid, $eid, $elabinelab) = @_;
my $query_result =
DBQueryFatal("select elab_in_elab from experiments ".
"where pid='$pid' and eid='$eid'");
if ($query_result->numrows == 0) {
return 0;
}
my @row = $query_result->fetchrow_array();
$$elabinelab = $row[0];
return 1;
}
#
# Get the control network IP for a node (underlying physical node!).
#
......
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