1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-27 10:50:10 +03:00

feature #378: Use EBS_VOLUME instead of EBS when filtering images

This commit is contained in:
Daniel Molina 2012-08-30 20:10:19 +02:00
parent b9c486238b
commit e49d79b9c2
3 changed files with 5 additions and 5 deletions

View File

@ -116,9 +116,9 @@ module EBS
return rc if OpenNebula::is_error?(rc)
if image['TEMPLATE/EBS/INSTANCE_ID']
return OpenNebula::Error.new("Volume #{params['VolumeId']} \
already attached to another instance \
(#{image['TEMPLATE/EBS/INSTANCE_ID']})")
return OpenNebula::Error.new("Volume #{params['VolumeId']} " <<
"already attached to another instance " <<
"(#{image['TEMPLATE/EBS/INSTANCE_ID']})")
end
# Attach

View File

@ -2,7 +2,7 @@
<DescribeImagesResponse xmlns="http://ec2.amazonaws.com/doc/<%=erb_version%>/">
<imagesSet>
<% impool.each do |im| %>
<% if (state_image = im.render_state) && (im['TEMPLATE/EBS'] != 'YES') %>
<% if (state_image = im.render_state) && (im['TEMPLATE/EBS_VOLUME'] != 'YES') %>
<item>
<imageId>ami-<%= sprintf('%08i', im.id) %></imageId>
<imageLocation><%= im['SOURCE'].split('/').last %></imageLocation>

View File

@ -3,7 +3,7 @@
<requestId/>
<volumeSet>
<% impool.each do |im| %>
<% if (state_image = im.render_state) && (im['TEMPLATE/EBS'] == 'YES') %>
<% if (state_image = im.render_state) && (im['TEMPLATE/EBS_VOLUME'] == 'YES') %>
<item>
<volumeId>vol-<%= sprintf('%08i', im.id) %></volumeId>
<size><%= im.render_size %></size>