Class: Migrant::Clouds::Rackspace
- Defined in:
- lib/migrant/clouds/rackspace.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #connect ⇒ Object
-
#initialize(env) ⇒ Rackspace
constructor
A new instance of Rackspace.
- #log_server_info ⇒ Object
Methods inherited from Base
#bootstrap_server, #connect_to_server, #destroy, #execute, register, registered
Constructor Details
#initialize(env) ⇒ Rackspace
Returns a new instance of Rackspace.
6 7 8 |
# File 'lib/migrant/clouds/rackspace.rb', line 6 def initialize(env) super end |
Instance Method Details
#connect ⇒ Object
10 11 12 13 14 |
# File 'lib/migrant/clouds/rackspace.rb', line 10 def connect @connection = Fog::Compute.new(:provider => 'Rackspace', :rackspace_api_key => @environment.setting('provider.api_key'), :rackspace_username => @environment.setting('provider.user_name')) end |
#log_server_info ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/migrant/clouds/rackspace.rb', line 16 def log_server_info super @environment.ui.notice " Name: #{@environment.server.name}" @environment.ui.notice " IP Address: #{@environment.server.addresses['public']}" @environment.ui.notice " Image ID: #{@environment.server.image.name}" @environment.ui.notice " Flavor: #{@environment.server.flavor.name}" end |