class Vmreverter::Hypervisor
Factory Pattern - Class to generate the correct hypervisor object, given type
Public Class Methods
register(type, hosts_to_provision, config)
click to toggle source
# File lib/vmreverter/hypervisor.rb, line 13 def self.register(type, hosts_to_provision, config) @logger = config.logger @logger.notify("Hypervisor found some #{type} boxes to hook") case type.downcase when /vsphere/ return Vmreverter::Vsphere.new(hosts_to_provision, config) when /aws/ return Vmreverter::AWS.new(hosts_to_provision, config) else report_and_raise(@logger, RuntimeError.new("Missing Class for hypervisor invocation: (#{type})"), "Hypervisor::register") end end
Public Instance Methods
configure(hosts)
click to toggle source
# File lib/vmreverter/hypervisor.rb, line 9 def configure(hosts) @logger.debug "No post-provisioning configuration necessary for #{self.class.name} boxes" end