Author: arkurth
Date: Wed Dec 14 19:01:31 2011
New Revision: 1214401
URL: http://svn.apache.org/viewvc?rev=1214401&view=rev
Log:
VCL-545
Fixed typo in KVM.pm. get_disk_file_extension subroutine was named
get_disk_format due to copy/paste error. Updated calls in libvirt.pm
accordingly.
Modified:
incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/libvirt.pm
incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/libvirt/KVM.pm
Modified:
incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/libvirt.pm
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/libvirt.pm?rev=1214401&r1=1214400&r2=1214401&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/libvirt.pm
(original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/libvirt.pm
Wed Dec 14 19:01:31 2011
@@ -861,8 +861,8 @@ sub get_master_image_file_path {
}
# File was not found, construct it
- my $vmdisk_format = $self->data->get_vmhost_profile_vmdisk_format();
- return "$master_image_directory_path/$image_name.$vmdisk_format";
+ my $disk_file_extension = $self->driver->get_disk_file_extension();
+ return "$master_image_directory_path/$image_name.$disk_file_extension";
}
#/////////////////////////////////////////////////////////////////////////////
@@ -886,9 +886,9 @@ sub get_copy_on_write_file_path {
my $vmhost_vmpath = $self->data->get_vmhost_profile_vmpath();
my $domain_file_name = $self->get_domain_file_base_name();
- my $vmdisk_format =
$self->data->get_vmhost_profile_vmdisk_format();
+ my $disk_file_extension = $self->driver->get_disk_file_extension();
- return "$vmhost_vmpath/$domain_file_name.$vmdisk_format";
+ return "$vmhost_vmpath/$domain_file_name.$disk_file_extension";
}
#/////////////////////////////////////////////////////////////////////////////
@@ -1036,7 +1036,7 @@ sub generate_domain_xml {
my $domain_type = $self->driver->get_domain_type();
my $copy_on_write_file_path = $self->get_copy_on_write_file_path();
- my $disk_format = $self->data->get_vmhost_profile_vmdisk_format();
+ my $disk_format = $self->driver->get_disk_format();
my $disk_driver_name = $self->driver->get_disk_driver_name();
my $eth0_source_device =
$self->data->get_vmhost_profile_virtualswitch0();
Modified:
incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/libvirt/KVM.pm
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/libvirt/KVM.pm?rev=1214401&r1=1214400&r2=1214401&view=diff
==============================================================================
---
incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/libvirt/KVM.pm
(original)
+++
incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/libvirt/KVM.pm
Wed Dec 14 19:01:31 2011
@@ -175,7 +175,7 @@ sub get_disk_format {
=cut
-sub get_disk_format {
+sub get_disk_file_extension {
my $self = shift;
unless (ref($self) && $self->isa('VCL::Module')) {
notify($ERRORS{'CRITICAL'}, 0, "subroutine was called as a
function, it must be called as a class method");
@@ -517,7 +517,7 @@ sub copy_virtual_disk {
}
if (!$disk_format) {
- $disk_format = $self->data->get_vmhost_profile_vmdisk_format()
|| 'qcow2';
+ $disk_format = $self->get_disk_format();
}
my $node_name = $self->data->get_vmhost_short_name();
@@ -604,7 +604,7 @@ sub create_copy_on_write_image {
my $node_name = $self->data->get_vmhost_short_name();
if (!$disk_format) {
- $disk_format = $self->data->get_vmhost_profile_vmdisk_format()
|| 'qcow2';
+ $disk_format = $self->get_disk_format();
}
notify($ERRORS{'DEBUG'}, 0, "creating copy on write image on
$node_name\nmaster disk image: $master_image_file_path\ncopy on write image:
$copy_on_write_file_path\nformat: $disk_format");