puppet 0.24.3 → 0.24.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- data/CHANGELOG +66 -0
- data/Rakefile +8 -0
- data/bin/puppetd +20 -10
- data/bin/puppetmasterd +3 -0
- data/conf/redhat/puppet.spec +1 -1
- data/ext/emacs/puppet-mode.el +132 -70
- data/ext/puppet-test +2 -1
- data/install.rb +70 -0
- data/lib/puppet.rb +1 -1
- data/lib/puppet/defaults.rb +7 -8
- data/lib/puppet/file_serving/configuration/parser.rb +4 -2
- data/lib/puppet/indirector/facts/facter.rb +2 -1
- data/lib/puppet/indirector/node/ldap.rb +2 -1
- data/lib/puppet/indirector/node/plain.rb +7 -0
- data/lib/puppet/indirector/report/processor.rb +2 -1
- data/lib/puppet/indirector/yaml.rb +0 -5
- data/lib/puppet/metatype/evaluation.rb +13 -3
- data/lib/puppet/metatype/metaparams.rb +3 -3
- data/lib/puppet/metatype/providers.rb +2 -9
- data/lib/puppet/network/authstore.rb +2 -1
- data/lib/puppet/network/client.rb +3 -2
- data/lib/puppet/network/client/master.rb +4 -2
- data/lib/puppet/network/handler/fileserver.rb +0 -49
- data/lib/puppet/network/handler/master.rb +1 -1
- data/lib/puppet/network/handler/report.rb +2 -1
- data/lib/puppet/network/http/mongrel/rest.rb +4 -2
- data/lib/puppet/network/http/webrick/rest.rb +5 -3
- data/lib/puppet/network/http_pool.rb +18 -7
- data/lib/puppet/node.rb +1 -1
- data/lib/puppet/node/environment.rb +2 -1
- data/lib/puppet/parser/parser_support.rb +12 -9
- data/lib/puppet/provider/mailalias/aliases.rb +4 -1
- data/lib/puppet/provider/package/openbsd.rb +10 -2
- data/lib/puppet/provider/package/ports.rb +1 -2
- data/lib/puppet/provider/user/useradd.rb +1 -1
- data/lib/puppet/provider/zone/solaris.rb +2 -1
- data/lib/puppet/resource_reference.rb +2 -1
- data/lib/puppet/transportable.rb +28 -20
- data/lib/puppet/type/exec.rb +5 -0
- data/lib/puppet/type/host.rb +2 -1
- data/lib/puppet/type/service.rb +3 -1
- data/lib/puppet/util.rb +2 -1
- data/lib/puppet/util/constant_inflector.rb +2 -1
- data/lib/puppet/util/diff.rb +2 -2
- data/lib/puppet/util/fileparsing.rb +2 -1
- data/lib/puppet/util/settings.rb +26 -23
- data/lib/puppet/util/tagging.rb +2 -1
- data/test/language/parser.rb +1 -0
- data/test/lib/puppettest.rb +6 -1
- data/test/network/client/client.rb +0 -29
- data/test/network/client/master.rb +31 -0
- data/test/network/handler/master.rb +4 -0
- data/test/ral/manager/provider.rb +21 -5
- data/test/ral/providers/cron/crontab.rb +0 -1
- data/test/ral/providers/mailalias/aliases.rb +0 -1
- data/test/ral/providers/sshkey/parsed.rb +0 -1
- data/test/ral/type/tidy.rb +6 -7
- metadata +2 -2
@@ -90,11 +90,15 @@ class TestMaster < Test::Unit::TestCase
|
|
90
90
|
resname, resip = master.send(:clientname, nil, nil, facts)
|
91
91
|
assert_equal(facts["hostname"], resname, "Did not use fact hostname when no certname was present")
|
92
92
|
assert_equal(facts["ipaddress"], resip, "Did not use fact ip when no certname was present")
|
93
|
+
assert_equal(facts["domain"], "fact_domain", "Did not use fact domain when no certname was present")
|
94
|
+
assert_equal(facts["fqdn"], "fact_hostname.fact_domain", "Did not use fact fqdn when no certname was present")
|
93
95
|
|
94
96
|
# Now try it with the cert stuff present
|
95
97
|
resname, resip = master.send(:clientname, certname, certip, facts)
|
96
98
|
assert_equal(certname, resname, "Did not use cert hostname when certname was present")
|
97
99
|
assert_equal(certip, resip, "Did not use cert ip when certname was present")
|
100
|
+
assert_equal(facts["domain"], certdomain, "Did not use cert domain when certname was present")
|
101
|
+
assert_equal(facts["fqdn"], certname, "Did not use cert fqdn when certname was present")
|
98
102
|
|
99
103
|
# And reset the node_name stuff and make sure we use it.
|
100
104
|
Puppet[:node_name] = :facter
|
@@ -73,11 +73,6 @@ class TestTypeProviders < Test::Unit::TestCase
|
|
73
73
|
confine :exists => "/no/such/file"
|
74
74
|
end
|
75
75
|
|
76
|
-
inst = provider.new(:name => "bar")
|
77
|
-
assert_raise(Puppet::Error, "Did not fail on unsuitable provider instance") do
|
78
|
-
resource = @type.create :name => "bar", :provider => inst
|
79
|
-
end
|
80
|
-
|
81
76
|
# And make sure the provider must be a valid provider type for this resource
|
82
77
|
pkgprov = Puppet::Type.type(:package).create(:name => "yayness").provider
|
83
78
|
assert(provider, "did not get package provider")
|
@@ -87,5 +82,26 @@ class TestTypeProviders < Test::Unit::TestCase
|
|
87
82
|
end
|
88
83
|
|
89
84
|
end
|
85
|
+
|
86
|
+
# #571 -- so we can cause a provider to become suitable within
|
87
|
+
# a run.
|
88
|
+
def test_unsuitable_providers_should_not_fail_at_initialization
|
89
|
+
Puppet::Type.type(:user).provider(:useradd).stubs(:suitable?).returns false
|
90
|
+
|
91
|
+
assert_nothing_raised("Unsuitable providers failed at initialization") do
|
92
|
+
Puppet::Type.type(:user).create :name => "luke", :ensure => :present, :provider => :useradd
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# #571 -- so we can cause a provider to become suitable within
|
97
|
+
# a run.
|
98
|
+
def test_unsuitable_providers_should_fail_at_evaluation
|
99
|
+
Puppet::Type.type(:user).provider(:useradd).stubs(:suitable?).returns false
|
100
|
+
|
101
|
+
user = Puppet::Type.type(:user).create :name => "luke", :ensure => :present, :provider => :useradd
|
102
|
+
assert_raise(Puppet::Error, "Unsuitable provider did not fail at evaluation") do
|
103
|
+
user.evaluate
|
104
|
+
end
|
105
|
+
end
|
90
106
|
end
|
91
107
|
|
data/test/ral/type/tidy.rb
CHANGED
@@ -4,7 +4,6 @@ require File.dirname(__FILE__) + '/../../lib/puppettest'
|
|
4
4
|
|
5
5
|
require 'puppettest'
|
6
6
|
require 'puppettest/support/utils'
|
7
|
-
require 'puppet/type/tidy'
|
8
7
|
|
9
8
|
class TestTidy < Test::Unit::TestCase
|
10
9
|
include PuppetTest::Support::Utils
|
@@ -76,7 +75,7 @@ class TestTidy < Test::Unit::TestCase
|
|
76
75
|
|
77
76
|
# Test the different age iterations.
|
78
77
|
def test_age_conversions
|
79
|
-
tidy = Puppet::Type.
|
78
|
+
tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :age => "1m"
|
80
79
|
|
81
80
|
convertors = {
|
82
81
|
:second => 1,
|
@@ -119,7 +118,7 @@ class TestTidy < Test::Unit::TestCase
|
|
119
118
|
:gb => 3
|
120
119
|
}
|
121
120
|
|
122
|
-
tidy = Puppet::Type.
|
121
|
+
tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :age => "1m"
|
123
122
|
|
124
123
|
# First make sure we default to kb
|
125
124
|
assert_nothing_raised do
|
@@ -149,7 +148,7 @@ class TestTidy < Test::Unit::TestCase
|
|
149
148
|
end
|
150
149
|
|
151
150
|
def test_agetest
|
152
|
-
tidy = Puppet::Type.
|
151
|
+
tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :age => "1m"
|
153
152
|
|
154
153
|
age = tidy.property(:age)
|
155
154
|
|
@@ -161,7 +160,7 @@ class TestTidy < Test::Unit::TestCase
|
|
161
160
|
end
|
162
161
|
|
163
162
|
def test_sizetest
|
164
|
-
tidy = Puppet::Type.
|
163
|
+
tidy = Puppet::Type.type(:tidy).create :path => tempfile(), :size => "1k"
|
165
164
|
|
166
165
|
size = tidy.property(:size)
|
167
166
|
|
@@ -175,7 +174,7 @@ class TestTidy < Test::Unit::TestCase
|
|
175
174
|
# Make sure we can remove different types of files
|
176
175
|
def test_tidytypes
|
177
176
|
path = tempfile()
|
178
|
-
tidy = Puppet::Type.
|
177
|
+
tidy = Puppet::Type.type(:tidy).create :path => path, :size => "1b", :age => "1s"
|
179
178
|
|
180
179
|
# Start with a file
|
181
180
|
File.open(path, "w") { |f| f.puts "this is a test" }
|
@@ -232,7 +231,7 @@ class TestTidy < Test::Unit::TestCase
|
|
232
231
|
Dir.mkdir(dir)
|
233
232
|
File.symlink(target, link)
|
234
233
|
|
235
|
-
tidy = Puppet::Type.
|
234
|
+
tidy = Puppet::Type.type(:tidy).create :path => dir, :size => "1b", :recurse => true
|
236
235
|
assert_apply(tidy)
|
237
236
|
assert(! FileTest.symlink?(link), "link was not tidied")
|
238
237
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: puppet
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.24.
|
7
|
-
date: 2008-03-
|
6
|
+
version: 0.24.4
|
7
|
+
date: 2008-03-25 00:00:00 +01:00
|
8
8
|
summary: System Automation and Configuration Management Software
|
9
9
|
require_paths:
|
10
10
|
- lib
|