Commit 9a372203 authored by Leigh B Stoller's avatar Leigh B Stoller

Post new aliases to the image server when enabled.

parent b7988b48
......@@ -46,7 +46,9 @@ sub fatal($);
# Configure variables
my $TB = "@prefix@";
my $TB = "@prefix@";
my $POSTIMAGEDATA = "$TB/sbin/protogeni/postimagedata";
# Testbed Support libraries
......@@ -55,6 +57,7 @@ use lib "@prefix@/lib";
use emdb;
use EmulabConstants;
use libtestbed;
use libEmulab;
use Project;
use Group;
use User;
......@@ -127,6 +130,16 @@ my $image = OSImageAlias->Create($imagename,
$project->GetProjectGroup(), @targets);
fatal("Could not create image alias")
if (!defined($image));
GetSiteVar("protogeni/use_imagetracker")) {
my $imageid = $image->imageid();
print "Posting image alias $imageid to the image server ...\n";
system("$POSTIMAGEDATA $imageid");
if ($?) {
print STDERR "Could not post alias to the image server\n";
sub fatal($)
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