axtro-rubber 1.0.2.6 → 1.0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -165,8 +165,13 @@ module Rubber
165
165
  return response.return == "true"
166
166
  end
167
167
 
168
- def create_volume(size, zone, snapshot_id = nil)
169
- response = @ec2.create_volume(:size => size.to_s, :availability_zone => zone, :snapshot_id => snapshot_id)
168
+ def create_volume(size, zone, base_volume_id = nil)
169
+ snapshot = {}
170
+ if base_volume_id
171
+ base_snapshots = @ec2.describe_snapshots["snapshotSet"]["item"].select{|s|s["volumeId"] == base_volume_id}
172
+ snapshot = base_snapshots.sort{|a,b| b["startTime"] <=> a["startTime"]}.first
173
+ end
174
+ response = @ec2.create_volume(:size => size.to_s, :availability_zone => zone, :snapshot_id => snapshot["snapshotId"])
170
175
  return response.volumeId
171
176
  end
172
177
 
@@ -282,10 +282,10 @@ namespace :rubber do
282
282
  value = Capistrano::CLI.ui.ask("About to DESTROY #{instance_alias} (#{instance_item.instance_id}) in mode #{RUBBER_ENV}. Are you SURE [yes/NO]?: ")
283
283
  fatal("Exiting", 0) if value != "yes"
284
284
 
285
- if instance_item.static_ip
286
- value = Capistrano::CLI.ui.ask("Instance has a static ip, do you want to release it? [y/N]?: ")
287
- destroy_static_ip(instance_item.static_ip) if value =~ /^y/
288
- end
285
+ # if instance_item.static_ip
286
+ # value = Capistrano::CLI.ui.ask("Instance has a static ip, do you want to release it? [y/N]?: ")
287
+ # destroy_static_ip(instance_item.static_ip) if value =~ /^y/
288
+ # end
289
289
 
290
290
  if instance_item.volumes
291
291
  value = Capistrano::CLI.ui.ask("Instance has persistent volumes, do you want to destroy them? [y/N]?: ")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: axtro-rubber
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2.6
4
+ version: 1.0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Conway