feature #2276 Single Executable: use new names for settings sections

The puppet-internal settings sections aren't actually exposed to the
user, but to reduce confusion I've renamed them to be consistent with
the single-executable application names.

Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
This commit is contained in:
Jesse Wolfe 2010-05-12 18:16:29 -07:00 коммит произвёл test branch
Родитель 631552c58c
Коммит fc2904955c
9 изменённых файлов: 13 добавлений и 13 удалений

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

@ -233,7 +233,7 @@ class Puppet::Application::Agent < Puppet::Application
Puppet::Util::Log.newdestination(logdest)
end
Puppet.settings.use :main, :puppetd, :ssl
Puppet.settings.use :main, :agent, :ssl
# We need to specify a ca location for all of the SSL-related i
# indirected classes to work; in fingerprint mode we just need

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

@ -146,7 +146,7 @@ class Puppet::Application::Master < Puppet::Application
exit(Puppet.settings.print_configs ? 0 : 1)
end
Puppet.settings.use :main, :puppetmasterd, :ssl
Puppet.settings.use :main, :master, :ssl
# A temporary solution, to at least make the master work for now.
Puppet::Node::Facts.terminus_class = :yaml

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

@ -70,7 +70,7 @@ class Puppet::Configurer
# Just so we can specify that we are "the" instance.
def initialize
Puppet.settings.use(:main, :ssl, :puppetd)
Puppet.settings.use(:main, :ssl, :agent)
self.class.instance = self
@running = false

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

@ -368,7 +368,7 @@ module Puppet
}
)
self.setdefaults(:puppetmasterd,
self.setdefaults(:master,
:user => ["puppet", "The user puppetmasterd should run as."],
:group => ["puppet", "The group puppetmasterd should run as."],
:manifestdir => ["$confdir/manifests",
@ -458,7 +458,7 @@ module Puppet
in the catalogs."]
)
self.setdefaults(:puppetd,
setdefaults(:agent,
:localconfig => { :default => "$statedir/localconfig",
:owner => "root",
:mode => 0660,
@ -742,7 +742,7 @@ module Puppet
branch under your main directory."]
)
setdefaults(:puppetmasterd,
setdefaults(:master,
:storeconfigs => {:default => false, :desc => "Whether to store each client's configuration. This
requires ActiveRecord from Ruby on Rails.",
:call_on_define => true, # Call our hook with the default value, so we always get the libdir set.

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

@ -11,7 +11,7 @@ module Puppet::Rails
# the state dir on every test.
return if ActiveRecord::Base.connected?
Puppet.settings.use(:main, :rails, :puppetmasterd)
Puppet.settings.use(:main, :rails, :master)
ActiveRecord::Base.logger = Logger.new(Puppet[:railslog])
begin
@ -131,7 +131,7 @@ module Puppet::Rails
raise Puppet::DevError, "No activerecord, cannot init Puppet::Rails"
end
Puppet.settings.use(:puppetmasterd, :rails)
Puppet.settings.use(:master, :rails)
begin
ActiveRecord::Base.establish_connection(database_arguments())

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

@ -298,7 +298,7 @@ describe Puppet::Application::Agent do
end
it "should use :main, :puppetd, and :ssl" do
Puppet.settings.expects(:use).with(:main, :puppetd, :ssl)
Puppet.settings.expects(:use).with(:main, :agent, :ssl)
@puppetd.setup
end

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

@ -170,8 +170,8 @@ describe Puppet::Application::Master do
lambda { @master.setup }.should raise_error(SystemExit)
end
it "should tell Puppet.settings to use :main,:ssl and :puppetmasterd category" do
Puppet.settings.expects(:use).with(:main,:puppetmasterd,:ssl)
it "should tell Puppet.settings to use :main,:ssl and :master category" do
Puppet.settings.expects(:use).with(:main,:master,:ssl)
@master.setup
end

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

@ -17,7 +17,7 @@ describe Puppet::Rails, "when initializing any connection" do
end
it "should use settings" do
Puppet.settings.expects(:use).with(:main, :rails, :puppetmasterd)
Puppet.settings.expects(:use).with(:main, :rails, :master)
Puppet::Rails.connect
end

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

@ -72,7 +72,7 @@ class TestReports < Test::Unit::TestCase
# We have to reuse reporting here because of something going on in the
# server/report.rb file
Puppet.settings.use(:main, :puppetmasterd)
Puppet.settings.use(:main, :master)
3.times { |i|
log = Puppet.warning("Report test message %s" % i)