mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
New Sunstone attribute to pull extended pool info from oned Signed-off-by: Jorge Lobo <jlobo@opennebula.systems> (cherry picked from commit 20fc6d29b0b518f608fd7dc42f36de0d3ef92586)
This commit is contained in:
parent
a0c46ae584
commit
11b23c432b
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user