mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 12:22:38 +09:00
feature #1124: Improve EC2 describe_instances performance
This commit is contained in:
1 parent
e5302cab2e
commit
9cac009e8e
2 files changed
+3
-3
No files matched your search
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user