Removing obsolete references (they're in the indirection

reference), and adding error handling to puppetdoc.
This commit is contained in:
Luke Kanies 2008-02-13 08:56:06 -06:00
Родитель 98dbfa2865
Коммит 068b61e022
3 изменённых файлов: 13 добавлений и 33 удалений

Просмотреть файл

@ -128,11 +128,19 @@ else
else
with_contents = true
end
exit_code = 0
options[:references].sort { |a,b| a.to_s <=> b.to_s }.each do |name|
section = Puppet::Util::Reference.reference(name)
raise "Could not find reference %s" % name unless section = Puppet::Util::Reference.reference(name)
# Add the per-section text, but with no ToC
text += section.send(options[:format], with_contents)
begin
# Add the per-section text, but with no ToC
text += section.send(options[:format], with_contents)
rescue => detail
puts detail.backtrace
$stderr.puts "Could not generate reference %s: %s" % [name, detail]
exit_code = 1
next
end
end
unless with_contents # We've only got one reference
@ -147,6 +155,8 @@ else
else
puts text
end
exit exit_code
end

Просмотреть файл

@ -1,9 +0,0 @@
require 'puppet/node'
noderef = Puppet::Util::Reference.newreference :node_source, :doc => "Sources of node configuration information" do
Puppet::Network::Handler.node.docs
end
noderef.header = "
Nodes can be searched for in different locations. This document describes those different locations.
"

Просмотреть файл

@ -1,21 +0,0 @@
report = Puppet::Util::Reference.newreference :report, :doc => "All available transaction reports" do
Puppet::Network::Handler.report.reportdocs
end
report.header = "
Puppet clients can report back to the server after each transaction. This
transaction report is sent as a YAML dump of the
``Puppet::Transaction::Report`` class and includes every log message that was
generated during the transaction along with as many metrics as Puppet knows how
to collect. See `ReportsAndReporting Reports and Reporting`:trac:
for more information on how to use reports.
Currently, clients default to not sending in reports; you can enable reporting
by setting the ``report`` parameter to true.
To use a report, set the ``reports`` parameter on the server; multiple
reports must be comma-separated. You can also specify ``none`` to disable
reports entirely.
Puppet provides multiple report handlers that will process client reports:
"