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 2012/02/21 21:56:33 UTC
svn commit: r1292015 -
/incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm
Author: fapeeler
Date: Tue Feb 21 20:56:33 2012
New Revision: 1292015
URL: http://svn.apache.org/viewvc?rev=1292015&view=rev
Log:
VCL-557
On DESTROY, only during new,reload, and image states, set the node to boot
Modified:
incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm
Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm?rev=1292015&r1=1292014&r2=1292015&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/xCAT2.pm Tue Feb 21 20:56:33 2012
@@ -131,6 +131,34 @@ sub initialize {
return 1;
} ## end sub initialize
+
+#/////////////////////////////////////////////////////////////////////////////
+
+=head2 DESTROY
+
+ Parameters : none
+ Returns : nothing
+ Description : Destroys the xCAT2.pm module and resets node to boot state
+
+=cut
+
+sub DESTROY {
+ my $self = shift;
+ my $address = sprintf('%x', $self);
+ my $node = $self->data->get_computer_node_name();
+ my $request_state_name = $self->data->get_request_state_name();
+
+ if($request_state_name =~ /^(new|reload|image)$/) {
+ if(_nodeset_option($node, "boot")){
+ notify($ERRORS{'DEBUG'}, 0, "set $node to boot state during $request_state_name state");
+ }
+ }
+
+ # Check for an overridden destructor
+ $self->SUPER::DESTROY if $self->can("SUPER::DESTROY");
+
+} ## end sub DESTROY
+
#/////////////////////////////////////////////////////////////////////////////
=head2 load