1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[rackspace] updated examples to use Chicago data center; updated error message to indicate we were using the Chicago data center.

This commit is contained in:
Kyle Rames 2013-03-28 14:38:46 -05:00
parent 3b9d057b8a
commit 9c903ad003
17 changed files with 33 additions and 22 deletions

View file

@ -11,7 +11,7 @@ def get_user_input(prompt)
end
def select_server(servers)
abort "\nThere are not any servers. Try running create_server.rb\n\n" if servers.empty?
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|
@ -23,7 +23,7 @@ def select_server(servers)
end
def select_attachment(attachments)
abort "\nThis server does not contain any volumes. Try running server_attachments.rb\n\n" if attachments.empty?
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|
@ -52,12 +52,14 @@ compute_service = Fog::Compute.new({
:rackspace_username => rackspace_username,
:rackspace_api_key => rackspace_api_key,
:version => :v2, # Use Next Gen Cloud Servers
:rackspace_region => :ord #Use Chicago Region
})
#create Cloud Block Storage service
cbs_service = Fog::Rackspace::BlockStorage.new({
:rackspace_username => rackspace_username,
:rackspace_api_key => rackspace_api_key,
:rackspace_region => :ord #Use Chicago Region
})
# retrieve list of servers

View file

@ -36,6 +36,7 @@ end
service = Fog::Rackspace::BlockStorage.new({
:rackspace_username => rackspace_username,
:rackspace_api_key => rackspace_api_key,
:rackspace_region => :ord #Use Chicago Region
})
# retrieve list of volume types

View file

@ -11,7 +11,7 @@ def get_user_input(prompt)
end
def select_volume(volumes)
abort "\nThere are not any volumes to delete. Try running create_volume.rb\n\n" if volumes.empty?
abort "\nThere are not any volumes to delete in the Chicago region. Try running create_volume.rb\n\n" if volumes.empty?
puts "\nSelect Volume:\n\n"
volumes.each_with_index do |volume, i|
@ -38,6 +38,7 @@ end
service = Fog::Rackspace::BlockStorage.new({
:rackspace_username => rackspace_username,
:rackspace_api_key => rackspace_api_key,
:rackspace_region => :ord #Use Chicago Region
})
# retrieve list of volumes

View file

@ -11,7 +11,7 @@ def get_user_input(prompt)
end
def select_server(servers)
abort "\nThere are not any servers avaliable to image. Try running create_server.rb\n\n" if servers.empty?
abort "\nThere are not any servers available to image in the Chicago region. Try running create_server.rb\n\n" if servers.empty?
puts "\nSelect Server To Image:\n\n"
servers.each_with_index do |server, i|

View file

@ -11,7 +11,7 @@ def get_user_input(prompt)
end
def select_image(snapshot_images)
abort "\nThere are not any images to delete. Try running create_image.rb\n\n" if snapshot_images.empty?
abort "\nThere are not any images to delete in the Chicago region. Try running create_image.rb\n\n" if snapshot_images.empty?
puts "\nSelect Image To Delete:\n\n"
snapshot_images.each_with_index do |image, i|

View file

@ -11,7 +11,7 @@ def get_user_input(prompt)
end
def select_server(servers)
abort "\nThere are not any servers to delete. Try running create_server.rb\n\n" if servers.empty?
abort "\nThere are not any servers to delete in the Chicago region. Try running create_server.rb\n\n" if servers.empty?
puts "\nSelect Server To Delete:\n\n"
servers.each_with_index do |server, i|

View file

@ -11,7 +11,7 @@ def get_user_input(prompt)
end
def select_server(servers)
abort "\nThere are not any servers. Try running create_server.rb\n\n" if servers.empty?
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|
@ -23,7 +23,7 @@ def select_server(servers)
end
def select_attachment(attachments)
abort "\nThis server does not contain any volumes. Try running server_attachments.rb\n\n" if attachments.empty?
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|

View file

@ -22,7 +22,7 @@ def select_flavor(flavors, server)
end
def select_server(servers)
abort "\nThere are not any servers to resize. Try running create_server.rb\n\n" if servers.empty?
abort "\nThere are not any servers to resize in the Chicago region. Try running create_server.rb\n\n" if servers.empty?
puts "\nSelect Server Resize:\n\n"
servers.each_with_index do |server, i|

View file

@ -11,7 +11,7 @@ def get_user_input(prompt)
end
def select_server(servers)
abort "\nThere are not any servers. Try running create_server.rb\n\n" if servers.empty?
abort "\nThere are not any servers in the Chicago region. Try running create_server.rb\n\n" if servers.empty?
puts "\nSelect Server For Attachment:\n\n"
servers.each_with_index do |server, i|
@ -46,7 +46,7 @@ compute_service = Fog::Compute.new({
cbs_service = Fog::Rackspace::BlockStorage.new({
:rackspace_username => rackspace_username,
:rackspace_api_key => rackspace_api_key,
:rackspace_endpoint => Fog::Rackspace::BlockStorage::ORD_ENDPOINT #Use Chicago Region
:rackspace_region => :ord #Use Chicago Region
})
# retrieve list of servers

View file

@ -54,7 +54,7 @@ end
puts "[DONE]\n\n"
puts "Initial Metadata\n"
puts "Initial Metadata\n"
print_metadata(server)
puts "Adding New Metadata\n"

View file

@ -26,7 +26,8 @@ end
service = Fog::Storage.new({
:provider => 'Rackspace',
:rackspace_username => rackspace_username,
:rackspace_api_key => rackspace_api_key
:rackspace_api_key => rackspace_api_key,
:rackspace_region => :ord #Use Chicago Region
})
# prompt for directory name

View file

@ -26,7 +26,8 @@ end
service = Fog::Storage.new({
:provider => 'Rackspace',
:rackspace_username => rackspace_username,
:rackspace_api_key => rackspace_api_key
:rackspace_api_key => rackspace_api_key,
:rackspace_region => :ord #Use Chicago Region
})

View file

@ -11,7 +11,7 @@ def get_user_input(prompt)
end
def select_directory(directories)
abort "\nThere are not any directories to delete. Try running create_directory.rb\n\n" if directories.empty?
abort "\nThere are not any directories to delete in the Chicago region. Try running create_directory.rb\n\n" if directories.empty?
puts "\nSelect Directory To Delete:\n\n"
directories.each_with_index do |dir, i|
@ -38,7 +38,8 @@ end
service = Fog::Storage.new({
:provider => 'Rackspace',
:rackspace_username => rackspace_username,
:rackspace_api_key => rackspace_api_key
:rackspace_api_key => rackspace_api_key,
:rackspace_region => :ord #Use Chicago Region
})
# retrieve directories

View file

@ -11,7 +11,7 @@ def get_user_input(prompt)
end
def select_directory(directories)
abort "\nThere are not any directories with files to delete. Try running create_file.rb\n\n" if directories.empty?
abort "\nThere are not any directories with files to delete in the Chicago region. Try running create_file.rb\n\n" if directories.empty?
puts "\nSelect Directory:\n\n"
directories.each_with_index do |dir, i|
@ -48,7 +48,8 @@ end
service = Fog::Storage.new({
:provider => 'Rackspace',
:rackspace_username => rackspace_username,
:rackspace_api_key => rackspace_api_key
:rackspace_api_key => rackspace_api_key,
:rackspace_region => :ord #Use Chicago Region
})
# retrieve directories with files

View file

@ -11,7 +11,7 @@ def get_user_input(prompt)
end
def select_directory(directories)
abort "\nThere are not any directories with files. Try running create_file.rb\n\n" if directories.empty?
abort "\nThere are not any directories with files in the Chicago region. Try running create_file.rb\n\n" if directories.empty?
puts "\nSelect Directory:\n\n"
directories.each_with_index do |dir, i|
@ -48,7 +48,8 @@ end
service = Fog::Storage.new({
:provider => 'Rackspace',
:rackspace_username => rackspace_username,
:rackspace_api_key => rackspace_api_key
:rackspace_api_key => rackspace_api_key,
:rackspace_region => :ord #Use Chicago Region
})
# retrieve directories with files

View file

@ -28,7 +28,8 @@ end
service = Fog::Storage.new({
:provider => 'Rackspace',
:rackspace_username => rackspace_username,
:rackspace_api_key => rackspace_api_key
:rackspace_api_key => rackspace_api_key,
:rackspace_region => :ord #Use Chicago Region
})

View file

@ -26,7 +26,8 @@ end
service = Fog::Storage.new({
:provider => 'Rackspace',
:rackspace_username => rackspace_username,
:rackspace_api_key => rackspace_api_key
:rackspace_api_key => rackspace_api_key,
:rackspace_region => :ord #Use Chicago Region
})
# prompt for directory name