Sha256: c9792d267e15598d7a96115a8643fe1db7cd43766768adceebaea09e44f592dc
Contents?: true
Size: 1.38 KB
Versions: 9
Compression:
Stored size: 1.38 KB
Contents
module CORL module Machine class Rackspace < Fog #----------------------------------------------------------------------------- # Checks #----------------------------------------------------------------------------- # Property accessors / modifiers #----------------------------------------------------------------------------- # 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
9 entries across 9 versions & 1 rubygems