From 65dd8b4f56f8e10c076b56fb65c77dc0e3697770 Mon Sep 17 00:00:00 2001 From: Ohad Levy Date: Wed, 27 Jun 2012 09:40:15 +0300 Subject: [PATCH 1/2] [Libvirt] fixed incorrect mock method signature --- lib/fog/libvirt/requests/compute/create_volume.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/libvirt/requests/compute/create_volume.rb b/lib/fog/libvirt/requests/compute/create_volume.rb index 269898406d..0623ec369d 100644 --- a/lib/fog/libvirt/requests/compute/create_volume.rb +++ b/lib/fog/libvirt/requests/compute/create_volume.rb @@ -8,7 +8,7 @@ def create_volume(pool_name, xml) end class Mock - def create_volume(xml) + def create_volume(pool_name, xml) end end From fe0f3dd3c98538291ad6f9b259cbc06b12f48741 Mon Sep 17 00:00:00 2001 From: Ohad Levy Date: Wed, 27 Jun 2012 09:40:38 +0300 Subject: [PATCH 2/2] [Libvirt] ensure Fog volumes do not raise on LVM based volumes --- lib/fog/libvirt/requests/compute/list_volumes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/libvirt/requests/compute/list_volumes.rb b/lib/fog/libvirt/requests/compute/list_volumes.rb index 822029fd8f..af8723e06f 100644 --- a/lib/fog/libvirt/requests/compute/list_volumes.rb +++ b/lib/fog/libvirt/requests/compute/list_volumes.rb @@ -20,7 +20,7 @@ def list_volumes(filter = { }) def volume_to_attributes(vol) - format_type = xml_element(vol.xml_desc, "/volume/target/format", "type") + format_type = xml_element(vol.xml_desc, "/volume/target/format", "type") rescue nil # not all volumes have types, e.g. LVM return nil if format_type == "dir" {