Commit 4cdd0b03 authored by Leigh B Stoller's avatar Leigh B Stoller

Add in missing routine

parent 9d1c26f3
#!/usr/bin/perl -wT
#
# GENIPUBLIC-COPYRIGHT
# Copyright (c) 2008-2009 University of Utah and the Flux Group.
# Copyright (c) 2008-2010 University of Utah and the Flux Group.
# All rights reserved.
#
package GeniSlice;
......@@ -558,6 +558,30 @@ sub SetShutdown($$)
return 0;
}
#
# Set the experiment pointer from a slice to the emulab experiment.
#
sub SetExperiment($$)
{
my ($self, $experiment) = @_;
my $uuid = $self->uuid();
my $token = "NULL";
if (defined($experiment)) {
$token = "'" . $experiment->idx() . "'";
}
my $query_result =
DBQueryWarn("update geni_slices set exptidx=$token " .
"where uuid='$uuid'");
return -1
if (!$query_result);
$self->{'SLICE'}->{'exptidx'} =
(defined($experiment) ? $experiment->idx() : undef);
return 0;
}
#
# Set the needsfirewall field.
#
......
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