[Ovirt-devel] [PATCH client 03/11] Add StoragePool.find_by_path
David Lutterkort
lutter at redhat.com
Mon Jan 26 21:20:33 UTC 2009
---
lib/ovirt.rb | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/lib/ovirt.rb b/lib/ovirt.rb
index 927efe3..ea55feb 100644
--- a/lib/ovirt.rb
+++ b/lib/ovirt.rb
@@ -72,6 +72,12 @@ module OVirt
raise "Unknown type #{attributes["type"]}"
end
end
+
+ def self.find_by_path(path)
+ hw = HardwarePool.find_by_path(path)
+ hw.nil? ? nil : hw.storage_pools
+ end
+
end
class IscsiStoragePool < StoragePool
--
1.6.0.6
More information about the ovirt-devel
mailing list