class OS::Puppet::Fencing::FencingRunner
Public Class Methods
new(config_location, nodes_location)
click to toggle source
# File lib/fencing.rb, line 14 def initialize(config_location, nodes_location) Log.log("Fencing runner started") config_json = JSON.parse(File.read(config_location)) config = OS::Puppet::Fencing::Config.new(config_json) facter_adapter = OS::Puppet::Fencing::FacterAdapter.new @classifier = OS::Puppet::Fencing::Classifier.new(config, facter_adapter) @resolver = OS::Puppet::Fencing::NodeResolver.new(nodes_location) end
Public Instance Methods
lookup(host_name)
click to toggle source
# File lib/fencing.rb, line 24 def lookup(host_name) node_file_name = @classifier.resolve_node(host_name) node_definition = @resolver.resolve(node_file_name) end