diff options
| author | Luke Kanies <luke@madstop.com> | 2007-12-11 14:31:13 -0600 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-12-11 14:31:13 -0600 |
| commit | 7ac3bd79621f6c66cd3b5b7041aeba83c27c3602 (patch) | |
| tree | f0683599b09bb25e885f1f73bbf21e5b3275abe0 /lib | |
| parent | a21ee0059fbfc31988430e7e6bf0d102cb6f1d5a (diff) | |
| download | puppet-7ac3bd79621f6c66cd3b5b7041aeba83c27c3602.tar.gz puppet-7ac3bd79621f6c66cd3b5b7041aeba83c27c3602.tar.xz puppet-7ac3bd79621f6c66cd3b5b7041aeba83c27c3602.zip | |
Renaming the 'null' terminus type to 'plain', as
requested in #960.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/puppet/defaults.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/indirector/node/null.rb | 18 | ||||
| -rw-r--r-- | lib/puppet/indirector/node/plain.rb | 19 | ||||
| -rw-r--r-- | lib/puppet/indirector/plain.rb (renamed from lib/puppet/indirector/null.rb) | 2 |
4 files changed, 21 insertions, 20 deletions
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb index c5902cea9..ff3e70247 100644 --- a/lib/puppet/defaults.rb +++ b/lib/puppet/defaults.rb @@ -153,7 +153,7 @@ module Puppet but then ship with tools that do not know how to handle signed ints, so the UIDs show up as huge numbers that can then not be fed back into the system. This is a hackish way to fail in a slightly more useful way when that happens."], - :node_terminus => ["null", "Where to find information about nodes."] + :node_terminus => ["plain", "Where to find information about nodes."] ) hostname = Facter["hostname"].value diff --git a/lib/puppet/indirector/node/null.rb b/lib/puppet/indirector/node/null.rb deleted file mode 100644 index f7c4d25ea..000000000 --- a/lib/puppet/indirector/node/null.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'puppet/node' -require 'puppet/indirector/null' - -class Puppet::Node::Null < Puppet::Indirector::Null - desc "Always return an empty node object. This is the node source you should - use when you don't have some other, functional source you want to use, - as the compiler will not work without a valid node terminus. - - Note that class is responsible for merging the node's facts into the node - instance before it is returned." - - # Just return an empty node. - def find(name) - node = super - node.fact_merge - node - end -end diff --git a/lib/puppet/indirector/node/plain.rb b/lib/puppet/indirector/node/plain.rb new file mode 100644 index 000000000..d60cc3aa5 --- /dev/null +++ b/lib/puppet/indirector/node/plain.rb @@ -0,0 +1,19 @@ +require 'puppet/node' +require 'puppet/indirector/plain' + +class Puppet::Node::Plain < Puppet::Indirector::Plain + desc "Always return an empty node object. Assumes you keep track of nodes + in flat file manifests. You should use it when you don't have some other, + functional source you want to use, as the compiler will not work without a + valid node terminus. + + Note that class is responsible for merging the node's facts into the + node instance before it is returned." + + # Just return an empty node. + def find(name) + node = super + node.fact_merge + node + end +end diff --git a/lib/puppet/indirector/null.rb b/lib/puppet/indirector/plain.rb index db2b1db1c..8bdf8469c 100644 --- a/lib/puppet/indirector/null.rb +++ b/lib/puppet/indirector/plain.rb @@ -1,7 +1,7 @@ require 'puppet/indirector/terminus' # An empty terminus type, meant to just return empty objects. -class Puppet::Indirector::Null < Puppet::Indirector::Terminus +class Puppet::Indirector::Plain < Puppet::Indirector::Terminus # Just return nothing. def find(name) indirection.model.new(name) |
