Author: fapeeler
Date: Tue Aug  3 15:31:15 2010
New Revision: 981931

URL: http://svn.apache.org/viewvc?rev=981931&view=rev
Log:

reordered get_image_size 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=981931&r1=981930&r2=981931&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/vmware.pm 
(original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/vmware.pm 
Tue Aug  3 15:31:15 2010
@@ -1067,14 +1067,6 @@ sub capture {
                                my @list = <LISTFILES>;
                                close(LISTFILES);
                                my $numfiles  = @list;
-                               my $imagesize = $self->get_image_size();
-                               if ($imagesize) {
-                                       notify($ERRORS{'OK'}, 0, "copied 
$numfiles vmdk files imagesize= $imagesize");
-                               }
-                               else {
-                                       notify($ERRORS{'OK'}, 0, "vmdk files 
are not copied");
-                                       return 0;
-                               }
                                #renaming local vmdk files
                                notify($ERRORS{'OK'}, 0, "begin rename local 
disk image files to newname");
                                my $oldname;
@@ -1154,6 +1146,15 @@ sub capture {
                                        notify($ERRORS{'DEBUG'}, 0, 
"$notify_prefix recursive update file permssions 644 on 
$image_repository_path/$image_name");
                                }
 
+                               my $imagesize = $self->get_image_size();
+                               if ($imagesize) {
+                                       notify($ERRORS{'OK'}, 0, "copied 
$numfiles vmdk files imagesize= $imagesize");
+                               }
+                               else {
+                                       notify($ERRORS{'OK'}, 0, "vmdk files 
are not copied");
+                                       return 0;
+                               }
+
                                return 1;
                        } ## end if (open(LISTFILES, "ls -s1 
$image_repository_path/$image_name |"...
                } ## end if 
(run_scp_command("$hostnodename:\"$vmhost_vmpath/$vmx_directory/*.vmdk\""...


Reply via email to