mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 11:52:37 +09:00
F #4913: Add method to find persistent image in pool using SOURCE as reference
This commit is contained in:
1 parent
7d211b2d98
commit
601d4bea26
1 file changed
+9
@@ -57,6 +57,15 @@ class VIHelper
|
||||
return element
|
||||
end
|
||||
|
||||
def self.find_persistent_image_by_source(source, pool)
|
||||
element = pool.select{|e|
|
||||
e["SOURCE"] == source &&
|
||||
e["PERSISTENT"] == "1"
|
||||
}.first rescue nil
|
||||
|
||||
return element
|
||||
end
|
||||
|
||||
def self.find_vcenter_vm_by_name(one_vm, host, vi_client)
|
||||
# Let's try to find the VM object only by its name
|
||||
# Let's build the VM name
|
||||
|
||||
Reference in new issue
Block a user