Commit aa8569f8 authored by Gary Wong's avatar Gary Wong

Reinstate code lost in previous commit.

parent 31b1ca4c
...@@ -1211,10 +1211,21 @@ sub MaxSliceExtension($$$;$$) { ...@@ -1211,10 +1211,21 @@ sub MaxSliceExtension($$$;$$) {
my $cur_expire = str2time( $slice->expires() ); my $cur_expire = str2time( $slice->expires() );
my $max_expire = $cur_expire + 60 * 60 * 24 * 180; my $max_expire = $cur_expire + 60 * 60 * 24 * 180;
my $exptidx = $slice->exptidx(); my $expt = $slice->GetExperiment();
my $expt = Experiment->Lookup( $exptidx ); if (!defined($expt)) {
if( ref( $error ) ) {
$$error = "No experiment for slice, cannot compute max.";
}
return -1;
}
if (! $expt->NodeList(1)) {
if( ref( $error ) ) {
$$error = "No physical nodes, no max to compute.";
}
return -1;
}
my $exptidx = $expt->idx();
my @types = ExptTypes( $exptidx ); my @types = ExptTypes( $exptidx );
foreach my $type ( @types ) { foreach my $type ( @types ) {
......
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