Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B #3308: add extended info VM #3324

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/oca/ruby/opennebula/virtual_machine_pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ def initialize(client, user_id=0)
@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)
Expand Down
2 changes: 1 addition & 1 deletion src/sunstone/etc/sunstone-server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,4 @@
:routes:
- oneflow
- vcenter
- support
- support
8 changes: 6 additions & 2 deletions src/sunstone/models/SunstoneServer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ def get_pool(kind,user_flag, client=nil)
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]
Expand Down