Adding a dynamic? option for references, so those are not stored in trac
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2480 980ebf18-57e1-0310-9a29-db15c13687c0
This commit is contained in:
Родитель
1decfa31a5
Коммит
7835d2927e
|
@ -95,7 +95,10 @@ rescue GetoptLong::InvalidOption => detail
|
|||
end
|
||||
|
||||
if options[:all]
|
||||
options[:references] = Puppet::Util::Reference.loaded_instances(:reference)
|
||||
# Don't add dynamic references to the "all" list.
|
||||
options[:references] = Reference.references.reject do |ref|
|
||||
Reference.reference(ref).dynamic?
|
||||
end
|
||||
end
|
||||
|
||||
if options[:references].empty?
|
||||
|
|
|
@ -30,4 +30,8 @@ Most handlers are meant to be started on the server, usually within
|
|||
``puppetmasterd``, and the clients are mostly started on the client,
|
||||
usually within ``puppetd``.
|
||||
|
||||
You can find the server-side handler for each interface at
|
||||
``puppet/network/handler/<name>.rb`` and the client class at
|
||||
``puppet/network/client/<name>.rb``.
|
||||
|
||||
"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
providers = Puppet::Util::Reference.newreference :providers, :doc => "Which providers are valid for this machine" do
|
||||
# This doesn't get stored in trac, since it changes every time.
|
||||
providers = Puppet::Util::Reference.newreference :providers, :dynamic => true, :doc => "Which providers are valid for this machine" do
|
||||
types = []
|
||||
Puppet::Type.loadall
|
||||
Puppet::Type.eachtype do |klass|
|
||||
|
|
|
@ -74,7 +74,7 @@ class Puppet::Util::Reference
|
|||
|
||||
HEADER_LEVELS = [nil, "=", "-", "+", "'", "~"]
|
||||
|
||||
attr_accessor :page, :depth, :header, :title
|
||||
attr_accessor :page, :depth, :header, :title, :dynamic
|
||||
attr_writer :doc
|
||||
|
||||
def doc
|
||||
|
@ -85,6 +85,10 @@ class Puppet::Util::Reference
|
|||
end
|
||||
end
|
||||
|
||||
def dynamic?
|
||||
self.dynamic
|
||||
end
|
||||
|
||||
def h(name, level)
|
||||
return "%s\n%s\n\n" % [name, HEADER_LEVELS[level] * name.to_s.length]
|
||||
end
|
||||
|
@ -171,7 +175,6 @@ class Puppet::Util::Reference
|
|||
$stderr.puts output
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# $Id$
|
||||
|
|
Загрузка…
Ссылка в новой задаче