1
0
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:
Daniel Molina 2012-02-09 18:50:30 +01:00
parent e5302cab2e
commit 9cac009e8e
2 changed files with 3 additions and 3 deletions

View File

@ -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>"

View File

@ -12,7 +12,6 @@
</groupSet>
<instancesSet>
<% vmpool.each do |vm| %>
<% vm.info %>
<item>
<instanceId>i-<%= vm.id %></instanceId>
<imageId><%= vm['TEMPLATE/IMAGE_ID'] %></imageId>