vcl-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arku...@apache.org
Subject svn commit: r755367 - in /incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod: ./ Utils/ Version_5.pm Version_5/ Version_5/XP_mod.pm
Date Tue, 17 Mar 2009 19:49:39 GMT
Author: arkurth
Date: Tue Mar 17 19:49:38 2009
New Revision: 755367

URL: http://svn.apache.org/viewvc?rev=755367&view=rev
Log:
Added Windows_mod and Version_5 directories, Version_5.pm, and XP_mod.pm.  Version_5.pm is
the parent class for Windows 5.x OS modules including Windows XP and Windows Server 2003.
 XP_mod.pm will eventually be renamed and replace XP.pm.  These files provide support for
Windows XP in line with the OS modularization design.

Added:
    incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/
    incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Utils/
    incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Version_5/
    incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Version_5.pm   (with
props)
    incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Version_5/XP_mod.pm 
 (with props)

Added: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Version_5.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Version_5.pm?rev=755367&view=auto
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Version_5.pm (added)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Version_5.pm Tue Mar
17 19:49:38 2009
@@ -0,0 +1,154 @@
+#!/usr/bin/perl -w
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+##############################################################################
+# $Id$
+##############################################################################
+
+=head1 NAME
+
+VCL::Module::OS::Windows_mod::Version_5.pm - VCL module to support Windows 5.x operating
systems
+
+=head1 SYNOPSIS
+
+ Needs to be written
+
+=head1 DESCRIPTION
+
+ This module provides VCL support for Windows version 5.x operating systems.
+ Version 5.x Windows OS's include Windows XP and Windows Server 2003.
+
+=cut
+
+##############################################################################
+package VCL::Module::OS::Windows_mod::Version_5;
+
+# Specify the lib path using FindBin
+use FindBin;
+use lib "$FindBin::Bin/../../../..";
+
+# Configure inheritance
+use base qw(VCL::Module::OS::Windows_mod);
+
+# Specify the version of this module
+our $VERSION = '2.00';
+
+# Specify the version of Perl to use
+use 5.008000;
+
+use strict;
+use warnings;
+use diagnostics;
+
+use VCL::utils;
+use File::Basename;
+
+##############################################################################
+
+=head1 CLASS VARIABLES
+
+=cut
+
+=head2 $SOURCE_CONFIGURATION_DIRECTORY
+
+ Data type   : Scalar
+ Description : Location on management node of script/utilty/configuration
+               files needed to configure the OS. This is normally the directory
+					under the 'tools' directory specific to this OS.
+
+=cut
+
+our $SOURCE_CONFIGURATION_DIRECTORY = "$TOOLS/Windows_5";
+
+##############################################################################
+
+=head1 INTERFACE OBJECT METHODS
+
+=cut
+
+#/////////////////////////////////////////////////////////////////////////////
+
+=head2 pre_capture
+
+ Parameters  :
+ Returns     :
+ Description :
+
+=cut
+
+sub pre_capture {
+	my $self = shift;
+	my $args = shift;
+	if (ref($self) !~ /windows/i) {
+		notify($ERRORS{'CRITICAL'}, 0, "subroutine was called as a function, it must be called
as a class method");
+		return;
+	}
+	
+	notify($ERRORS{'OK'}, 0, "beginning Windows version 5 image capture preparation tasks, end
state: $self->{end_state}");
+	
+	# Call parent class's pre_capture() subroutine
+	notify($ERRORS{'OK'}, 0, "calling parent class pre_capture() subroutine");
+	if ($self->SUPER::pre_capture()) {
+		notify($ERRORS{'OK'}, 0, "successfully executed parent class pre_capture() subroutine");
+	}
+	else {
+		notify($ERRORS{'WARNING'}, 0, "failed to execute parent class pre_capture() subroutine");
+		return 0;
+	}
+	
+	# Defragment the hard drive
+	# Do this in Version_5.pm because defrag works well enough on XP and 2003
+	# Version 6 OS's (Vista) take a very long time to run defrag
+	if (!$self->defragment_hard_drive()) {
+		notify($ERRORS{'WARNING'}, 0, "unable to defragment the hard drive");
+	}
+	
+	notify($ERRORS{'OK'}, 0, "returning 1");
+	return 1;
+} ## end sub pre_capture
+
+#/////////////////////////////////////////////////////////////////////////////
+
+1;
+__END__
+
+=head1 BUGS and LIMITATIONS
+
+ There are no known bugs in this module.
+ Please report problems to the VCL team (vcl_help@ncsu.edu).
+
+=head1 AUTHOR
+
+ Aaron Peeler, aaron_peeler@ncsu.edu
+ Andy Kurth, andy_kurth@ncsu.edu
+
+=head1 SEE ALSO
+
+L<http://vcl.ncsu.edu>
+
+=head1 COPYRIGHT AND LICENSE
+
+ Copyright (C) 2004-2008 by NC State University. All Rights Reserved.
+
+ Virtual Computing Laboratory
+ North Carolina State University
+ Raleigh, NC, USA 27695
+
+ For use license and copyright information see LICENSE and COPYRIGHT files
+ included in the source files.
+
+=cut

Propchange: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Version_5.pm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Version_5.pm
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Added: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Version_5/XP_mod.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Version_5/XP_mod.pm?rev=755367&view=auto
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Version_5/XP_mod.pm (added)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Version_5/XP_mod.pm Tue
Mar 17 19:49:38 2009
@@ -0,0 +1,172 @@
+#!/usr/bin/perl -w
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+##############################################################################
+# $Id$
+##############################################################################
+
+=head1 NAME
+
+VCL::Module::OS::Windows_mod::Version_5::XP_mod.pm - VCL module to support Windows XP operating
system
+
+=head1 SYNOPSIS
+
+ Needs to be written
+
+=head1 DESCRIPTION
+
+ This module provides VCL support for Windows XP.
+
+=cut
+
+##############################################################################
+package VCL::Module::OS::Windows_mod::Version_5::XP_mod;
+
+# Specify the lib path using FindBin
+use FindBin;
+use lib "$FindBin::Bin/../../../../..";
+
+# Configure inheritance
+use base qw(VCL::Module::OS::Windows_mod::Version_5);
+
+# Specify the version of this module
+our $VERSION = '2.00';
+
+# Specify the version of Perl to use
+use 5.008000;
+
+use strict;
+use warnings;
+use diagnostics;
+
+use VCL::utils;
+use File::Basename;
+
+##############################################################################
+
+=head1 CLASS VARIABLES
+
+=cut
+
+=head2 $SOURCE_CONFIGURATION_DIRECTORY
+
+ Data type   : Scalar
+ Description : Location on management node of script/utilty/configuration
+               files needed to configure the OS. This is normally the
+					directory under the 'tools' directory specific to this OS.
+
+=cut
+
+our $SOURCE_CONFIGURATION_DIRECTORY = "$TOOLS/Windows_XP";
+
+##############################################################################
+
+=head1 OBJECT METHODS
+
+=cut
+
+#/////////////////////////////////////////////////////////////////////////////
+
+=head2 pre_capture
+
+ Parameters  :
+ Returns     :
+ Description :
+
+=cut
+
+sub pre_capture {
+	my $self = shift;
+	my $args = shift;
+	if (ref($self) !~ /windows/i) {
+		notify($ERRORS{'CRITICAL'}, 0, "subroutine was called as a function, it must be called
as a class method");
+		return;
+	}
+	
+	my $imagemeta_sysprep = $self->data->get_imagemeta_sysprep();
+	
+	# Check if end_state argument was passed
+	if (defined $args->{end_state}) {
+		$self->{end_state} = $args->{end_state};
+	}
+	else {
+		$self->{end_state} = 'off';
+	}
+	
+	notify($ERRORS{'OK'}, 0, "beginning Windows XP image capture preparation tasks, end state:
$self->{end_state}");
+	
+	# Call parent class's pre_capture() subroutine
+	notify($ERRORS{'OK'}, 0, "calling parent class pre_capture() subroutine");
+	if ($self->SUPER::pre_capture()) {
+		notify($ERRORS{'OK'}, 0, "successfully executed parent class pre_capture() subroutine");
+	}
+	else {
+		notify($ERRORS{'WARNING'}, 0, "failed to execute parent class pre_capture() subroutine");
+		return 0;
+	}
+	
+	# Copy the capture configuration files to the computer (scripts, utilities, drivers...)
+	if (!$self->copy_capture_configuration_files($SOURCE_CONFIGURATION_DIRECTORY)) {
+		notify($ERRORS{'WARNING'}, 0, "capture preparation failed, unable to copy XP-specific capture
configuration files");
+		return 0;
+	}
+	
+	# Check if Sysprep should be used
+	if ($imagemeta_sysprep) {
+		# Copy the Sysprep files to C:\Sysprep
+		# Call this *AFTER* calling copy_capture_configuration_files
+		if (!$self->run_sysprep()) {
+			notify($ERRORS{'WARNING'}, 0, "capture preparation failed, failed to run Sysprep");
+			return 0;
+		}
+	}
+	
+	notify($ERRORS{'OK'}, 0, "returning 1");
+	return 1;
+} ## end sub pre_capture
+
+#/////////////////////////////////////////////////////////////////////////////
+
+1;
+__END__
+
+=head1 BUGS and LIMITATIONS
+
+ There are no known bugs in this module.
+ Please report problems to the VCL team (vcl_help@ncsu.edu).
+
+=head1 AUTHOR
+
+ Aaron Peeler, aaron_peeler@ncsu.edu
+ Andy Kurth, andy_kurth@ncsu.edu
+
+=head1 SEE ALSO
+
+L<http://vcl.ncsu.edu>
+
+=head1 COPYRIGHT AND LICENSE
+
+ Copyright (C) 2004-2008 by NC State University. All Rights Reserved.
+
+ Virtual Computing Laboratory
+ North Carolina State University
+ Raleigh, NC, USA 27695
+
+ For use license and copyright information see LICENSE and COPYRIGHT files
+ included in the source files.
+
+=cut

Propchange: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Version_5/XP_mod.pm
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows_mod/Version_5/XP_mod.pm
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id



Mime
View raw message