class CORL::Machine::Rackspace

Public Instance Methods

create_image(options = {}) click to toggle source
Calls superclass method
   # File lib/CORL/machine/rackspace.rb
49 def create_image(options = {})
50   super do |image_name, config, success|
51     image = server.create_image(image_name)
52     image.wait_for { ready? }
53 
54     if image
55       node[:image] = image.id
56       success      = true
57     end
58     success
59   end
60 end
init_server() click to toggle source
Calls superclass method
   # File lib/CORL/machine/rackspace.rb
20 def init_server
21   super do
22     myself.plugin_name = @server.id
23 
24     node[:id]           = plugin_name
25     node[:public_ip]    = @server.public_ip_address
26     node[:private_ip]   = @server.private_ip_address
27     node[:machine_type] = @server.flavor.id
28     node[:image]        = @server.image.id if @server.image
29     node.user           = @server.username unless node.user
30 
31     @server.private_key_path = node.private_key if node.private_key
32     @server.public_key_path  = node.public_key if node.public_key
33   end
34 end
reload(options = {}) click to toggle source
Calls superclass method
   # File lib/CORL/machine/rackspace.rb
38 def reload(options = {})
39   super do |config|
40     success = server.reboot(config.get(:type, 'SOFT'))
41 
42     server.wait_for { ready? } if success
43     success
44   end
45 end
set_connection() click to toggle source
Calls superclass method
   # File lib/CORL/machine/rackspace.rb
12 def set_connection
13   super
14   Kernel.load File.join(File.dirname(__FILE__), '..', '..', 'core', 'mod', 'fog_rackspace_server.rb')
15 end