mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
EC2 Query API responses
git-svn-id: http://svn.opennebula.org/one/trunk@843 3034c82b-c49b-4eb3-8279-a7acafdc01c0
This commit is contained in:
1 parent
45406dc1c7
commit
78330c4ca7
5 files changed
+98
No files matched your search
@@ -0,0 +1,15 @@
|
||||
<DescribeImagesResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">
|
||||
<imagesSet>
|
||||
<% for image in @erb_images %>
|
||||
<item>
|
||||
<imageId><%= image.uuid %></imageId>
|
||||
<imageLocation><%= image.path %></imageLocation>
|
||||
<imageState>available</imageState>
|
||||
<imageOwnerId><%= @erb_user[:name] %></imageOwnerId>
|
||||
<isPublic>false</isPublic>
|
||||
<architecture>i386</architecture>
|
||||
<imageType>machine</imageType>
|
||||
</item>
|
||||
<% end %>
|
||||
</imagesSet>
|
||||
</DescribeImagesResponse>
|
||||
@@ -0,0 +1,34 @@
|
||||
<DescribeInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">
|
||||
<reservationSet>
|
||||
<item>
|
||||
<reservationId>default</reservationId>
|
||||
<ownerId><%= @erb_user_name %></ownerId>
|
||||
<groupSet>
|
||||
<item>
|
||||
<groupId>default</groupId>
|
||||
</item>
|
||||
</groupSet>
|
||||
<instancesSet>
|
||||
<% @erb_vmpool.each do |vm| %>
|
||||
<% vm.info %>
|
||||
<item>
|
||||
<instanceId><%= vm.id %></instanceId>
|
||||
<imageId><%= vm['TEMPLATE/IMAGE_ID'] %></imageId>
|
||||
<instanceState>
|
||||
<%= render_state(vm) %>
|
||||
</instanceState>
|
||||
<privateDnsName><%= vm["TEMPLATE/NIC/IP"] %></privateDnsName>
|
||||
<dnsName><%= vm["TEMPLATE/NIC/IP"] %></dnsName>
|
||||
<keyName>default</keyName>
|
||||
<amiLaunchIndex>0</amiLaunchIndex>
|
||||
<instanceType><%= vm['TEMPLATE/INSTANCE_TYPE'] %></instanceType>
|
||||
<%= render_launch_time(vm) %>
|
||||
<placement>
|
||||
<availabilityZone>default</availabilityZone>
|
||||
</placement>
|
||||
</item>
|
||||
<% end %>
|
||||
</instancesSet>
|
||||
</item>
|
||||
</reservationSet>
|
||||
</DescribeInstancesResponse>
|
||||
@@ -0,0 +1,3 @@
|
||||
<RegisterImageResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">
|
||||
<imageId><%= @erb_img_id %></imageId>
|
||||
</RegisterImageResponse>
|
||||
@@ -0,0 +1,32 @@
|
||||
<RunInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">
|
||||
<reservationId>r-47a5402e</reservationId>
|
||||
<ownerId><%= @erb_user_name %></ownerId>
|
||||
<groupSet>
|
||||
<item>
|
||||
<groupId>default</groupId>
|
||||
</item>
|
||||
</groupSet>
|
||||
<instancesSet>
|
||||
<item>
|
||||
<instanceId><%= @erb_vm_info[:vm_id] %></instanceId>
|
||||
<imageId><%= @erb_vm_info[:img_id] %></imageId>
|
||||
<instanceState>
|
||||
<code>0</code>
|
||||
<name>pending</name>
|
||||
</instanceState>
|
||||
<privateDnsName><%= @erb_vm_info[:vm]["TEMPLATE/NIC/IP"]%></privateDnsName>
|
||||
<dnsName><%= @erb_vm_info[:vm]["TEMPLATE/NIC/IP"]%></dnsName>
|
||||
<keyName>default</keyName>
|
||||
<amiLaunchIndex>0</amiLaunchIndex>
|
||||
<instanceType><%= @erb_vm_info[:instance_type] %></instanceType>
|
||||
<%= render_launch_time(@erb_vm_info[:vm]) %>
|
||||
<placement>
|
||||
<availabilityZone>default</availabilityZone>
|
||||
</placement>
|
||||
<monitoring>
|
||||
<enabled>true</enabled>
|
||||
</monitoring>
|
||||
</item>
|
||||
</instancesSet>
|
||||
</RunInstancesResponse>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<TerminateInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2009-04-04/">
|
||||
<instancesSet>
|
||||
<item>
|
||||
<instanceId><%= @erb_vm.id %></instanceId>
|
||||
<shutdownState>
|
||||
<code>32</code>
|
||||
<name>shutting-down</name>
|
||||
</shutdownState>
|
||||
<previousState>
|
||||
<%= render_state(@erb_vm) %>
|
||||
</previousState>
|
||||
</item>
|
||||
</instancesSet>
|
||||
</TerminateInstancesResponse>
|
||||
Reference in new issue
Block a user