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 2009/04/27 17:54:26 UTC

svn commit: r769034 - /incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm

Author: arkurth
Date: Mon Apr 27 15:54:25 2009
New Revision: 769034

URL: http://svn.apache.org/viewvc?rev=769034&view=rev
Log:
VCL-1
Added support for "fedora" as an image OS name in State.pm::check_image_os(). This image OS name is used by xCAT 2.x.  The check_image_os() sub detects if an image is being creating from a Kickstart base OS, and corrects the image.OSid column in the database.

Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm?rev=769034&r1=769033&r2=769034&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm Mon Apr 27 15:54:25 2009
@@ -812,7 +812,7 @@
 	}
 
 	my $image_os_name_new;
-	if ($image_os_name =~ /^(rh)el([0-9])/ || $image_os_name =~ /^rh(fc)([0-9])/) {
+	if ($image_os_name =~ /^(rh)el[s]?([0-9])/ || $image_os_name =~ /^rh(fc)([0-9])/) {
 		# Change rhelX --> rhXimage, rhfcX --> fcXimage
 		$image_os_name_new = "$1$2image";
 	}
@@ -820,6 +820,11 @@
 		# Change rhelX --> rhXimage, rhfcX --> fcXimage
 		$image_os_name_new = "$1$2image";
 	}
+	elsif ($image_os_name =~ /^(fedora)([0-9])/) {
+		# Change fedoraX --> fcXimage
+		$image_os_name_new = "fc$1image"
+   }
+
 	else {
 		notify($ERRORS{'DEBUG'}, 0, "no corrections need to be made to image OS: $image_os_name");
 		return 1;
@@ -849,7 +854,7 @@
 
 	# Update the image and imagerevision tables
 	if (database_execute($sql_statement)) {
-		notify($ERRORS{'OK'}, 0, "image and imagerevision tables updated: $image_name -> $image_name_new");
+		notify($ERRORS{'OK'}, 0, "image($image_id) and imagerevision($imagerevision_id) tables updated: $image_name -> $image_name_new");
 	}
 	else {
 		notify($ERRORS{'WARNING'}, 0, "failed to update image and imagerevision tables: $image_name -> $image_name_new, returning 0");