Author: fapeeler
Date: Wed Sep 22 15:37:48 2010
New Revision: 1000044

URL: http://svn.apache.org/viewvc?rev=1000044&view=rev
Log:
VCL-386

added switch_vmhost_id routine call

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

Modified: 
incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/vmware.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/vmware.pm?rev=1000044&r1=1000043&r2=1000044&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/vmware.pm 
(original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/vmware.pm 
Wed Sep 22 15:37:48 2010
@@ -2075,12 +2075,21 @@ sub post_maintenance_action {
        # set vmhostid to null in computer table - handled in new.pm
 
        my $computer_name   = $self->data->get_computer_short_name;
+       my $computer_id = $self->data->get_computer_id();
        my $vmhost_hostname = $self->data->get_vmhost_hostname;
 
        if ($self->control_VM("remove")) {
                notify($ERRORS{'OK'}, 0, "removed node $computer_name from 
vmhost $vmhost_hostname");
        }
 
+       if (switch_vmhost_id($computer_id, 'NULL')) {
+                notify($ERRORS{'OK'}, 0, "set vmhostid to NULL for for VM 
$computer_short_name");
+        }
+        else {
+                notify($ERRORS{'WARNING'}, 0, "failed to set the vmhostid to 
NULL for VM $computer_short_name");
+                return;
+        }
+
        return 1;
 
 } ## end sub post_maintenance_action


Reply via email to