[Ovirt-devel] [PATCH server] Fix arguments to factory.

Ian Main imain at redhat.com
Mon Jun 1 16:38:52 UTC 2009


This patch fixes another set of calls to the libvirt factory that
I had missed before.

Signed-off-by: Ian Main <imain at redhat.com>
---
 src/task-omatic/task_storage.rb |    4 ++--
 src/task-omatic/taskomatic.rb   |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/task-omatic/task_storage.rb b/src/task-omatic/task_storage.rb
index bfffa36..77363ac 100644
--- a/src/task-omatic/task_storage.rb
+++ b/src/task-omatic/task_storage.rb
@@ -27,11 +27,11 @@ def String.random_alphanumeric(size=16)
   s
 end
 
-def get_libvirt_lvm_pool_from_volume(db_volume)
+def get_libvirt_lvm_pool_from_volume(db_volume, logger)
   phys_volume = StorageVolume.find(:first, :conditions =>
                                    ["lvm_pool_id = ?", db_volume.storage_pool_id])
 
-  return LibvirtPool.factory(phys_volume.storage_pool)
+  return LibvirtPool.factory(phys_volume.storage_pool, logger)
 end
 
 
diff --git a/src/task-omatic/taskomatic.rb b/src/task-omatic/taskomatic.rb
index 1b4d83b..6e21160 100755
--- a/src/task-omatic/taskomatic.rb
+++ b/src/task-omatic/taskomatic.rb
@@ -202,7 +202,7 @@ class TaskOmatic
       # we have to special case LVM pools.  In that case, we need to first
       # activate the underlying physical device, and then do the logical one
       if db_volume[:type] == "LvmStorageVolume"
-        phys_libvirt_pool = get_libvirt_lvm_pool_from_volume(db_volume)
+        phys_libvirt_pool = get_libvirt_lvm_pool_from_volume(db_volume, @logger)
         phys_libvirt_pool.connect(@session, node)
       end
 
@@ -719,7 +719,7 @@ class TaskOmatic
 
     begin
       if db_volume[:type] == "LvmStorageVolume"
-        phys_libvirt_pool = get_libvirt_lvm_pool_from_volume(db_volume)
+        phys_libvirt_pool = get_libvirt_lvm_pool_from_volume(db_volume, @logger)
         phys_libvirt_pool.connect(@session, node)
       end
 
@@ -783,7 +783,7 @@ class TaskOmatic
 
     begin
       if db_volume[:type] == "LvmStorageVolume"
-        phys_libvirt_pool = get_libvirt_lvm_pool_from_volume(db_volume)
+        phys_libvirt_pool = get_libvirt_lvm_pool_from_volume(db_volume, @logger)
         phys_libvirt_pool.connect(@session, node)
         @logger.info "connected to lvm pool.."
       end
-- 
1.6.0.6




More information about the ovirt-devel mailing list