mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 05:04:56 +09:00
New Sunstone attribute to pull extended pool info from oned
Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
(cherry picked from commit 20fc6d29b0)
This commit is contained in:
1 parent
a0c46ae584
commit
11b23c432b
2 files changed
+13
-2
No files matched your search
@@ -50,6 +50,13 @@ module OpenNebula
|
||||
@user_id = user_id
|
||||
end
|
||||
|
||||
# Get info extended VM
|
||||
def get_hash_extended
|
||||
rc = info_search(:extended => true)
|
||||
return rc if OpenNebula.is_error?(rc)
|
||||
to_hash
|
||||
end
|
||||
|
||||
# Default Factory Method for the Pools
|
||||
def factory(element_xml)
|
||||
OpenNebula::VirtualMachine.new(element_xml,@client)
|
||||
|
||||
@@ -65,8 +65,12 @@ class SunstoneServer < CloudServer
|
||||
error = Error.new("Error: #{kind} resource not supported")
|
||||
return [404, error.to_json]
|
||||
end
|
||||
|
||||
rc = pool.get_hash
|
||||
|
||||
if kind == "vm" && $conf[:get_extended_vm_info]
|
||||
rc = pool.get_hash_extended
|
||||
else
|
||||
rc = pool.get_hash
|
||||
end
|
||||
|
||||
if OpenNebula.is_error?(rc)
|
||||
return [500, rc.to_json]
|
||||
|
||||
Reference in new issue
Block a user