You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by ar...@apache.org on 2010/09/21 21:15:39 UTC

svn commit: r999552 - /incubator/vcl/trunk/web/.ht-inc/vm.php

Author: arkurth
Date: Tue Sep 21 19:15:39 2010
New Revision: 999552

URL: http://svn.apache.org/viewvc?rev=999552&view=rev
Log:
VCL-303
Updated AJvmFromHost and AJvmFromHostDelayed in vm.php where tomaintenance reservation to look up the imageid and imagerevisionid for the noimage image.

Modified:
    incubator/vcl/trunk/web/.ht-inc/vm.php

Modified: incubator/vcl/trunk/web/.ht-inc/vm.php
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/vm.php?rev=999552&r1=999551&r2=999552&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/vm.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/vm.php Tue Sep 21 19:15:39 2010
@@ -564,6 +564,8 @@ function AJvmFromHost() {
 	$rems = array();
 	$checks = array();
 	$vclreloadid = getUserlistID('vclreload@Local');
+	$imageid = getImageId('noimage');
+	$imagerevisionid = getProductionRevisionid($imageid);
 	$start = getReloadStartTime();
 	$end = $start + SECINMONTH;
 	$start = unixToDatetime($start);
@@ -583,7 +585,7 @@ function AJvmFromHost() {
 			moveReservationsOffComputer($compid)) {
 			// if no reservations on computer, submit reload 
 			#    reservation so vm gets stopped on host
-			$reqid = simpleAddRequest($compid, 4, 3, $start, $end, 18, $vclreloadid);
+			$reqid = simpleAddRequest($compid, $imageid, $imagerevisionid, $start, $end, 18, $vclreloadid);
 			if($reqid == 0) {
 				$fails[] = array('id' => $compid,
 				                 'name' => $compdata[$compid]['hostname'],
@@ -642,11 +644,13 @@ function AJvmFromHost() {
 function AJvmFromHostDelayed() {
 	$data = getContinuationVar();
 	$vclreloadid = getUserlistID('vclreload@Local');
+	$imageid = getImageId('noimage');
+	$imagerevisionid = getProductionRevisionid($imageid);
 	$fails = array();
 	foreach($data as $comp) {
 		$end = datetimeToUnix($comp['end2']) + SECINMONTH;
 		$end = unixToDatetime($end);
-		if(! simpleAddRequest($comp['id'], 4, 3, $comp['end2'], $end, 18, $vclreloadid))
+		if(! simpleAddRequest($comp['id'], $imageid, $imagerevisionid, $comp['end2'], $end, 18, $vclreloadid))
 			$fails[] = array('name' => $comp['hostname'],
 			                 'reason' => 'nomgtnode');
 	}