Sha256: c53c1a672da837fa4763ee8532c3462cccea455ee26d1a4f1db0bf577812262f
Contents?: true
Size: 1.21 KB
Versions: 15
Compression:
Stored size: 1.21 KB
Contents
require 'set' module Kafo module Puppet class ReportWrapper attr_reader :transaction, :report def initialize(transaction, report) @transaction = transaction @report = report @supported = true @resources_seen = Set.new end # Needed to fool Puppet's logging framework def self.to_s "Puppet::Transaction::Report" end def add_resource_status(status, *args, &block) if @supported && report.respond_to?(:resource_statuses) && report.resource_statuses.is_a?(Hash) if transaction.in_main_catalog && report.resource_statuses[status.resource.to_s] && transaction.tracked_resources.include?(status.resource) && !@resources_seen.include?(status.resource) ::Puppet.info "RESOURCE #{status.resource}" @resources_seen << status.resource end report.add_resource_status(status, *args, &block) else ::Puppet.err "Your puppet env is not supported, report does not define resource_statuses" @supported = false end end def method_missing(method, *args, &block) report.send(method, *args, &block) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems