Please review pull request #743: (#14348) Hiera is the default data binding terminus opened by (kelseyhightower)
Description:
This patch makes Hiera the default data binding terminus. Users have the
option of "turning it off" by setting data_binding_terminus in
puppet.conf to "none":
# puppet.conf
[main]
data_binding_terminus = "none"
This patch includes updated specs.
- Opened: Mon May 07 22:37:00 UTC 2012
- Based on: puppetlabs:master (c9386b541e9ecf6c0daffde2825bad385ea4da2b)
- Requested merge: kelseyhightower:ticket/master/14348_hiera_should_be_the_default_data_binding_terminus (07a3c7fbdec0357e63f9bb7432fea8e773f6873c)
Diff follows:
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index dc498e7..fae41d9 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -229,7 +229,7 @@ module Puppet
:desc => "Where to find information about nodes.",
},
:data_binding_terminus => {
- :default => "none",
+ :default => "hiera",
:desc => "Where to retrive information about data.",
},
:hiera_config => {
diff --git a/spec/integration/defaults_spec.rb b/spec/integration/defaults_spec.rb
index b4da93e..6d3a9f1 100755
--- a/spec/integration/defaults_spec.rb
+++ b/spec/integration/defaults_spec.rb
@@ -317,8 +317,8 @@
Puppet.settings[:data_binding_terminus].should_not be_nil
end
- it "should be set to none by default" do
- Puppet.settings[:data_binding_terminus].should == 'none'
+ it "should be set to hiera by default" do
+ Puppet.settings[:data_binding_terminus].should == 'hiera'
end
end
end
diff --git a/spec/unit/data_binding_spec.rb b/spec/unit/data_binding_spec.rb
index df181a1..3713d23 100644
--- a/spec/unit/data_binding_spec.rb
+++ b/spec/unit/data_binding_spec.rb
@@ -3,9 +3,9 @@
describe Puppet::DataBinding do
describe "when indirecting" do
- it "should default to the 'none' data_binding terminus" do
+ it "should default to the 'hiera' data_binding terminus" do
Puppet::DataBinding.indirection.reset_terminus_class
- Puppet::DataBinding.indirection.terminus_class.should == :none
+ Puppet::DataBinding.indirection.terminus_class.should == :hiera
end
end
end
diff --git a/spec/unit/indirector/hiera_spec.rb b/spec/unit/indirector/hiera_spec.rb
index ce03c68..e7cd5f7 100644
--- a/spec/unit/indirector/hiera_spec.rb
+++ b/spec/unit/indirector/hiera_spec.rb
@@ -44,8 +44,8 @@ module Testing; end
end
let(:facter_obj) { stub(:values => facts) }
- it "should not be the default data_binding terminus" do
- Puppet.settings[:data_binding_terminus].should_not == 'hiera'
+ it "should be the default data_binding terminus" do
+ Puppet.settings[:data_binding_terminus].should == 'hiera'
end
it "should raise an error if we don't have the hiera feature" do
diff --git a/spec/unit/indirector/none_spec.rb b/spec/unit/indirector/none_spec.rb
index 997e69e..ae621c3 100644
--- a/spec/unit/indirector/none_spec.rb
+++ b/spec/unit/indirector/none_spec.rb
@@ -21,8 +21,8 @@ module Testing; end
:model => model)
end
- it "should be the default data_binding_terminus" do
- Puppet.settings[:data_binding_terminus].should == 'none'
+ it "should not be the default data_binding_terminus" do
+ Puppet.settings[:data_binding_terminus].should_not == 'none'
end
describe "the behavior of the find method" do
diff --git a/spec/unit/parser/compiler_spec.rb b/spec/unit/parser/compiler_spec.rb
index e545dde..8f6c709 100755
--- a/spec/unit/parser/compiler_spec.rb
+++ b/spec/unit/parser/compiler_spec.rb
@@ -558,6 +558,7 @@ def add_resource(name, parent = nil)
describe "when evaluating found classes" do
before do
+ Puppet.settings[:data_binding_terminus] = "none"
@class = stub 'class', :name => "my::class"
@scope.stubs(:find_hostclass).with("myclass", {:assume_fqname => false}).returns(@class)
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
