lib/fog/rackspace/examples/block_storage/create_snapshot.rb in fog-1.20.0 vs lib/fog/rackspace/examples/block_storage/create_snapshot.rb in fog-1.21.0
- old
+ new
@@ -10,11 +10,11 @@
gets.chomp
end
def select_server(servers)
abort "\nThere are not any servers in the Chicago region. Try running create_server.rb\n\n" if servers.empty?
-
+
puts "\nSelect Server For Volume Detachment:\n\n"
servers.each_with_index do |server, i|
puts "\t #{i}. #{server.name} [#{server.public_ip_address}]"
end
@@ -22,11 +22,11 @@
servers[delete_str.to_i]
end
def select_attachment(attachments)
abort "\nThis server does not contain any volumes in the Chicago region. Try running server_attachments.rb\n\n" if attachments.empty?
-
+
puts "\nSelect Volume To Detach:\n\n"
attachments.each_with_index do |attachment, i|
puts "\t #{i}. #{attachment.device}"
end
@@ -94,10 +94,10 @@
puts "Now Creating Snapshot #{snapshot_name}"
snapshot = cbs_service.snapshots.create :display_name => snapshot_name, :volume_id => attachment.volume_id
begin
- # Check every 5 seconds to see if snapshot is in the available state (ready?).
+ # Check every 5 seconds to see if snapshot is in the available state (ready?).
# If the available has not been built in 5 minutes (600 seconds) an exception will be raised.
snapshot.wait_for(600, 5) do
print "."
STDOUT.flush
ready?