Revision 9f5a24e9 src/cloud/ec2/lib/views/describe_images.erb

View differences:

src/cloud/ec2/lib/views/describe_images.erb
1 1
<?xml version="1.0"?>
2
<DescribeImagesResponse xmlns="http://ec2.amazonaws.com/doc/<%= erb_version %>/"> 
3
  <imagesSet> 
4
  <% for image in erb_images %>
5
    <item> 
6
      <imageId>ami-<%= sprintf('%08i', image.id) %></imageId> 
7
      <imageLocation><%= image.path.gsub(/^\//,'') %></imageLocation> 
8
      <imageState>available</imageState> 
9
      <imageOwnerId><%= erb_user[:name] %></imageOwnerId> 
10
      <isPublic>false</isPublic> 
11
      <architecture>i386</architecture> 
12
      <imageType>machine</imageType> 
13
    </item> 
14
  <% end %>
15
  </imagesSet> 
2
<DescribeImagesResponse xmlns="http://ec2.amazonaws.com/doc/<%=erb_version%>/"> 
3
	<imagesSet> 
4
	   	<% erb_impool.each do |im| %>
5
	   	<% im.info %>
6
	 	<item> 
7
		   	<imageId>ami-<%= sprintf('%08i', im.id) %></imageId> 
8
		   	<imageLocation><%= im['SOURCE'].split('/').last %></imageLocation> 
9
			<% if im['STATE'] == '4' %>
10
			<imageState>deregistered</imageState> 
11
			<% elsif im['STATE'] == '3' %>
12
			<imageState>available</imageState> 
13
			<% end %>
14
			<imageOwnerId><%= erb_user_name %></imageOwnerId> 
15
			<% if im['PUBLIC'] == '0' %>
16
			<isPublic>false</isPublic> 
17
			<% elsif im['PUBLIC'] == '1' %>
18
			<isPublic>true</isPublic> 
19
			<% end %>
20
			<architecture>i386</architecture> 
21
			<imageType>machine</imageType> 
22
		</item> 
23
		<% end %>
24
	</imagesSet> 
16 25
</DescribeImagesResponse> 

Also available in: Unified diff