Sha256: 6c6d8d50ed4bf8205a8b60b437c5140cf57522ae271fc57f46748f3f962fa291
Contents?: true
Size: 1.52 KB
Versions: 19
Compression:
Stored size: 1.52 KB
Contents
module CORL module Machine class Rackspace < Fog #----------------------------------------------------------------------------- # Checks #----------------------------------------------------------------------------- # Property accessors / modifiers def set_connection super Kernel.load File.join(File.dirname(__FILE__), '..', '..', 'core', 'mod', 'fog_rackspace_server.rb') end #----------------------------------------------------------------------------- # Management def init_server super do myself.plugin_name = @server.id node[:id] = plugin_name node[:public_ip] = @server.public_ip_address node[:private_ip] = @server.private_ip_address node[:machine_type] = @server.flavor.id node[:image] = @server.image.id node.user = @server.username unless node.user @server.private_key_path = node.private_key if node.private_key @server.public_key_path = node.public_key if node.public_key end end #--- def reload(options = {}) super do |config| success = server.reboot(config.get(:type, 'SOFT')) server.wait_for { ready? } if success success end end #--- def create_image(options = {}) super do |image_name, config, success| image = server.create_image(image_name) image.wait_for { ready? } if image node[:image] = image.id success = true end success end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems