From 37e92601a43e96ff502346f012aa227b2f31973a Mon Sep 17 00:00:00 2001 From: Leigh B Stoller Date: Mon, 6 Mar 2017 16:15:27 -0700 Subject: [PATCH] Hack for Kobus' class; set the termination date of all experiments to May 1st. --- apt/create_instance.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apt/create_instance.in b/apt/create_instance.in index 7a03bfc24..7f49834b2 100755 --- a/apt/create_instance.in +++ b/apt/create_instance.in @@ -32,6 +32,7 @@ use English; use Getopt::Long; use XML::Simple; use File::Temp qw(tempfile :mktemp tmpnam :POSIX); +use Date::Parse; use Data::Dumper; use Cwd qw(realpath); @@ -637,6 +638,13 @@ if ($localuser) { if (GetSiteVar("protogeni/use_imagetracker") && EmulabFeatures->FeatureEnabled("APT_UseImageTracker", $emulab_user, $project)); + + # Hack for Kobus' class, generalize someday. + if ($pid eq "CS4480-2017") { + my $termination = str2time("2017-05-02"); + # convert to hours till then + $duration = int(($termination - time()) / 3600); + } } elsif (!$localuser) { if (defined($sshkey)) { # -- GitLab