You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by fa...@apache.org on 2010/08/26 18:59:58 UTC

svn commit: r989823 - /incubator/vcl/trunk/managementnode/lib/VCL/blockrequest.pm

Author: fapeeler
Date: Thu Aug 26 16:59:58 2010
New Revision: 989823

URL: http://svn.apache.org/viewvc?rev=989823&view=rev
Log:
VCL-224
cleaned up message to end-user
fixed get_user_info
added get_image_info for image name to end user

Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/blockrequest.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/blockrequest.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/blockrequest.pm?rev=989823&r1=989822&r2=989823&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/blockrequest.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/blockrequest.pm Thu Aug 26 16:59:58 2010
@@ -138,6 +138,8 @@ sub process {
 
 	# Get user info	
 	my $user_info;
+	my %image_info;
+        my $image_prettyname;
 	my $owner_affiliation_helpaddress;
 	my $owner_email;
 
@@ -145,6 +147,12 @@ sub process {
 		$owner_email = $user_info->{email};
 		$owner_affiliation_helpaddress = $user_info->{affiliation}{helpaddress};
 	}
+
+	#Get image info
+        if(%image_info = get_image_info($blockrequest_image_id)){
+                $image_prettyname = $image_info{prettyname};
+
+        }
 	
 	#Set local timer
 	my $localtimer = convert_to_epoch_seconds();
@@ -158,7 +166,7 @@ sub process {
 	notify($ERRORS{'DEBUG'}, 0, "blocktime processed: $blocktime_processed");
 	notify($ERRORS{'DEBUG'}, 0, "blocktime start: $blocktime_start");
 	notify($ERRORS{'DEBUG'}, 0, "owner email: $owner_email");
-	notify($ERRORS{'DEBUG'}, 0, "help address: $owner_email");
+	notify($ERRORS{'DEBUG'}, 0, "help address: $owner_affiliation_helpaddress");
 
 	if ($blockrequest_mode eq "start") {
 
@@ -227,6 +235,7 @@ sub process {
 			$body .= "Block name		= $blockrequest_name\n";
 			$body .= "Block	start time	= $blocktime_start\n";
 			$body .= "Block end time	= $blocktime_end\n";
+			$body .= "Environment name      = $image_prettyname\n";
 			$body .= "Allocated		= $allocated\n";	
 			$body .= "Block requested 	= $blockrequest_number_machines\n"; 
 			$body .= "xmlrpc warn msg	= $warningmsg\n" if(defined($warningmsg));
@@ -249,6 +258,7 @@ Machines requested      = $blockrequest_
 Block Start time        = $blocktime_start
 Block End time          = $blocktime_end
 User Group              = $block_group_name
+Environment name        = $image_prettyname
 
 
 The VCL staff have been notified to attempt to correct the issue.
@@ -270,12 +280,13 @@ EOF
 			my $mailstring .= <<"EOF";
 The block allocation for $blockrequest_name was processed successfully with the following results:
 
-Block allocation name	= $blockrequest_name
-Machines allocated	= $allocated
-Machines requested	= $blockrequest_number_machines
-Block Start time	= $blocktime_start
-Block End time		= $blocktime_end
-User Group		= $block_group_name
+Block allocation name    = $blockrequest_name
+Machines allocated       = $allocated
+Machines requested       = $blockrequest_number_machines
+Block Start time         = $blocktime_start
+Block End time           = $blocktime_end
+User Group               = $block_group_name
+Environment name         = $image_prettyname
 
 The machines for this block allocation will be loaded up to an hour before the actual start time. 
 Once loaded the users listed in the user group $block_group_name will be able to login up to 15 minutes