185
186
187
188
189
190
191
192
193
194
195
196
|
# File 'lib/smartcloud.rb', line 185
def export_image(name, size, image_id, location)
storage_offering=describe_storage_offerings(location, size)
response = post("/storage", :name => name, :size => storage_offering.Capacity, :format => 'EXT3', :offeringID => storage_offering.ID, :location => location)
volumeID = response.Volume.ID
poll_for_volume_state(volumeID, :unmounted)
response = put("/storage/#{volumeID}", :imageId => image_id)
response.Volume.ID
end
|