mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
feature #1124: Improve EC2 describe_instances performance
This commit is contained in:
parent
e5302cab2e
commit
9cac009e8e
@ -54,8 +54,8 @@ class EC2QueryServer < CloudServer
|
||||
'save' => :pending,
|
||||
'epil' => :shutdown,
|
||||
'shut' => :shutdown,
|
||||
'clea' => :shutdown,
|
||||
'fail' => :terminated,
|
||||
'dele' => :terminated,
|
||||
'unkn' => :terminated
|
||||
}
|
||||
|
||||
@ -211,7 +211,8 @@ class EC2QueryServer < CloudServer
|
||||
# Helper functions
|
||||
###########################################################################
|
||||
def render_state(vm)
|
||||
ec2_state = EC2_STATES[ONE_STATES[vm.status]]
|
||||
one_state = ONE_STATES[vm.status]
|
||||
ec2_state = EC2_STATES[one_state||:pending]
|
||||
|
||||
return "<code>#{ec2_state[:code]}</code>
|
||||
<name>#{ec2_state[:name]}</name>"
|
||||
|
@ -12,7 +12,6 @@
|
||||
</groupSet>
|
||||
<instancesSet>
|
||||
<% vmpool.each do |vm| %>
|
||||
<% vm.info %>
|
||||
<item>
|
||||
<instanceId>i-<%= vm.id %></instanceId>
|
||||
<imageId><%= vm['TEMPLATE/IMAGE_ID'] %></imageId>
|
||||
|
Loading…
x
Reference in New Issue
Block a user