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:
parent
b9c486238b
commit
e49d79b9c2
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user