Class: Puppet::Network::Handler::Report
- Defined in:
- lib/vendor/puppet/network/handler/report.rb
Class Method Summary collapse
-
.newreport(name, options = {}, &block) ⇒ Object
Add a new report type.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Report
constructor
A new instance of Report.
-
#report(report, client = nil, clientip = nil) ⇒ Object
Accept a report from a client.
Constructor Details
Class Method Details
.newreport(name, options = {}, &block) ⇒ Object
Add a new report type.
16 17 18 19 |
# File 'lib/vendor/puppet/network/handler/report.rb', line 16 def self.newreport(name, = {}, &block) Puppet.warning "The interface for registering report types has changed; use Puppet::Reports.register_report for report type #{name}" Puppet::Reports.register_report(name, , &block) end |
Instance Method Details
#report(report, client = nil, clientip = nil) ⇒ Object
Accept a report from a client.
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/vendor/puppet/network/handler/report.rb', line 27 def report(report, client = nil, clientip = nil) # Unescape the report report = CGI.unescape(report) unless @local Puppet.info "Processing reports #{reports().join(", ")} for #{client}" begin process(report) rescue => detail Puppet.err "Could not process report for #{client}: #{detail}" puts detail.backtrace if Puppet[:trace] end end |