puppet 0.24.1 → 0.24.2
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 +94 -0
- data/Rakefile +0 -4
- data/bin/puppet +18 -10
- data/bin/puppetd +1 -1
- data/bin/puppetdoc +14 -4
- data/bin/puppetmasterd +1 -1
- data/bin/puppetrun +3 -8
- data/bin/ralsh +12 -11
- data/conf/freebsd/puppetd +1 -1
- data/conf/freebsd/puppetmasterd +1 -1
- data/conf/gentoo/puppet/puppet.conf +29 -0
- data/conf/namespaceauth.conf +20 -0
- data/conf/redhat/puppet.spec +4 -1
- data/conf/solaris/smf/puppetd.xml +1 -1
- data/conf/solaris/smf/puppetmasterd.xml +1 -1
- data/conf/suse/puppet.spec +10 -8
- data/examples/root/etc/puppet/{puppetmasterd.conf → puppet.conf} +6 -3
- data/ext/logcheck/puppet +7 -0
- data/ext/puppet-test +28 -5
- data/lib/puppet.rb +2 -1
- data/lib/puppet/defaults.rb +12 -5
- data/lib/puppet/dsl.rb +43 -45
- data/lib/puppet/external/{gratr/rdot.rb → dot.rb} +0 -0
- data/lib/puppet/external/nagios.rb +50 -0
- data/lib/puppet/external/nagios/base.rb +421 -0
- data/lib/puppet/external/nagios/parser.rb +816 -0
- data/lib/puppet/file_serving/file_base.rb +16 -3
- data/lib/puppet/file_serving/metadata.rb +29 -11
- data/lib/puppet/indirector/terminus.rb +1 -0
- data/lib/puppet/metatype/closure.rb +4 -0
- data/lib/puppet/metatype/evaluation.rb +2 -17
- data/lib/puppet/metatype/metaparams.rb +1 -1
- data/lib/puppet/network.rb +3 -0
- data/lib/puppet/network/client.rb +4 -5
- data/lib/puppet/network/client/master.rb +10 -7
- data/lib/puppet/network/handler/fileserver.rb +22 -45
- data/lib/puppet/network/http_pool.rb +3 -0
- data/lib/puppet/network/http_server/mongrel.rb +7 -1
- data/lib/puppet/network/http_server/webrick.rb +4 -3
- data/lib/puppet/network/xmlrpc/client.rb +12 -1
- data/lib/puppet/node/catalog.rb +51 -40
- data/lib/puppet/parser/ast.rb +27 -49
- data/lib/puppet/parser/ast/astarray.rb +5 -24
- data/lib/puppet/parser/ast/caseopt.rb +4 -4
- data/lib/puppet/parser/ast/casestatement.rb +4 -5
- data/lib/puppet/parser/ast/collection.rb +3 -5
- data/lib/puppet/parser/ast/collexpr.rb +3 -5
- data/lib/puppet/parser/ast/definition.rb +148 -159
- data/lib/puppet/parser/ast/else.rb +2 -3
- data/lib/puppet/parser/ast/function.rb +3 -10
- data/lib/puppet/parser/ast/hostclass.rb +66 -59
- data/lib/puppet/parser/ast/ifstatement.rb +4 -5
- data/lib/puppet/parser/ast/leaf.rb +6 -6
- data/lib/puppet/parser/ast/node.rb +26 -58
- data/lib/puppet/parser/ast/resource.rb +5 -7
- data/lib/puppet/parser/ast/resource_defaults.rb +2 -4
- data/lib/puppet/parser/ast/resource_override.rb +4 -6
- data/lib/puppet/parser/ast/resource_reference.rb +2 -4
- data/lib/puppet/parser/ast/resourceparam.rb +2 -4
- data/lib/puppet/parser/ast/selector.rb +5 -6
- data/lib/puppet/parser/ast/tag.rb +2 -4
- data/lib/puppet/parser/ast/vardef.rb +3 -4
- data/lib/puppet/parser/collector.rb +5 -5
- data/lib/puppet/parser/{compile.rb → compiler.rb} +69 -107
- data/lib/puppet/parser/functions.rb +3 -3
- data/lib/puppet/parser/interpreter.rb +32 -23
- data/lib/puppet/parser/lexer.rb +391 -282
- data/lib/puppet/parser/parser.rb +5 -4
- data/lib/puppet/parser/parser_support.rb +3 -6
- data/lib/puppet/parser/resource.rb +24 -36
- data/lib/puppet/parser/resource/param.rb +1 -1
- data/lib/puppet/parser/resource/reference.rb +7 -3
- data/lib/puppet/parser/scope.rb +12 -7
- data/lib/puppet/parser/templatewrapper.rb +1 -1
- data/lib/puppet/pgraph.rb +9 -98
- data/lib/puppet/provider/interface/redhat.rb +65 -65
- data/lib/puppet/provider/mount/parsed.rb +1 -1
- data/lib/puppet/provider/naginator.rb +55 -0
- data/lib/puppet/provider/nameservice/directoryservice.rb +6 -7
- data/lib/puppet/provider/package/fink.rb +0 -2
- data/lib/puppet/provider/package/gem.rb +9 -5
- data/lib/puppet/provider/package/openbsd.rb +1 -1
- data/lib/puppet/provider/package/pkgdmg.rb +3 -8
- data/lib/puppet/provider/package/portage.rb +4 -4
- data/lib/puppet/provider/package/yumhelper.py +8 -6
- data/lib/puppet/provider/parsedfile.rb +7 -1
- data/lib/puppet/provider/service/debian.rb +2 -0
- data/lib/puppet/provider/service/gentoo.rb +4 -0
- data/lib/puppet/provider/service/init.rb +1 -1
- data/lib/puppet/provider/sshkey/parsed.rb +2 -0
- data/lib/puppet/provider/user/useradd.rb +1 -1
- data/lib/puppet/rails.rb +4 -0
- data/lib/puppet/rails/database/001_add_created_at_to_all_tables.rb +17 -0
- data/lib/puppet/rails/fact_value.rb +4 -0
- data/lib/puppet/rails/host.rb +1 -2
- data/lib/puppet/rails/param_value.rb +4 -0
- data/lib/puppet/rails/resource_tag.rb +4 -0
- data/lib/puppet/rails/source_file.rb +4 -1
- data/lib/puppet/relationship.rb +5 -1
- data/lib/puppet/reports/tagmail.rb +12 -1
- data/lib/puppet/resource_reference.rb +1 -1
- data/lib/puppet/simple_graph.rb +78 -11
- data/lib/puppet/sslcertificates.rb +1 -1
- data/lib/puppet/sslcertificates/ca.rb +3 -3
- data/lib/puppet/transaction.rb +7 -4
- data/lib/puppet/transportable.rb +1 -1
- data/lib/puppet/type.rb +3 -10
- data/lib/puppet/type/cron.rb +18 -0
- data/lib/puppet/type/exec.rb +18 -12
- data/lib/puppet/type/{pfile.rb → file.rb} +66 -84
- data/lib/puppet/type/file/checksum.rb +271 -0
- data/lib/puppet/type/{pfile → file}/content.rb +10 -15
- data/lib/puppet/type/{pfile → file}/ensure.rb +15 -8
- data/lib/puppet/type/{pfile → file}/group.rb +0 -0
- data/lib/puppet/type/{pfile → file}/mode.rb +0 -0
- data/lib/puppet/type/{pfile → file}/owner.rb +0 -0
- data/lib/puppet/type/{pfile → file}/source.rb +34 -48
- data/lib/puppet/type/{pfile → file}/target.rb +0 -0
- data/lib/puppet/type/{pfile → file}/type.rb +0 -0
- data/lib/puppet/type/{pfilebucket.rb → filebucket.rb} +0 -0
- data/lib/puppet/type/host.rb +13 -0
- data/lib/puppet/type/mailalias.rb +1 -1
- data/lib/puppet/type/nagios_command.rb +3 -0
- data/lib/puppet/type/nagios_contact.rb +3 -0
- data/lib/puppet/type/nagios_contactgroup.rb +3 -0
- data/lib/puppet/type/nagios_host.rb +3 -0
- data/lib/puppet/type/nagios_hostextinfo.rb +3 -0
- data/lib/puppet/type/nagios_hostgroup.rb +3 -0
- data/lib/puppet/type/nagios_hostgroupescalation.rb +3 -0
- data/lib/puppet/type/nagios_service.rb +3 -0
- data/lib/puppet/type/nagios_servicedependency.rb +3 -0
- data/lib/puppet/type/nagios_serviceescalation.rb +3 -0
- data/lib/puppet/type/nagios_serviceextinfo.rb +3 -0
- data/lib/puppet/type/nagios_timeperiod.rb +3 -0
- data/lib/puppet/type/package.rb +4 -12
- data/lib/puppet/type/service.rb +9 -0
- data/lib/puppet/type/sshkey.rb +3 -3
- data/lib/puppet/util/autoload.rb +5 -5
- data/lib/puppet/util/checksums.rb +51 -13
- data/lib/puppet/util/constant_inflector.rb +14 -0
- data/lib/puppet/util/filetype.rb +1 -1
- data/lib/puppet/util/graph.rb +3 -9
- data/lib/puppet/util/nagios_maker.rb +57 -0
- data/lib/puppet/util/settings.rb +19 -16
- data/lib/puppet/util/tagging.rb +39 -0
- data/test/executables/puppetbin.rb +17 -0
- data/test/language/ast.rb +8 -58
- data/test/language/ast/casestatement.rb +3 -3
- data/test/language/ast/resource.rb +6 -7
- data/test/language/ast/resource_reference.rb +12 -12
- data/test/language/ast/selector.rb +2 -2
- data/test/language/ast/variable.rb +2 -2
- data/test/language/functions.rb +24 -24
- data/test/language/parser.rb +20 -8
- data/test/language/resource.rb +5 -42
- data/test/language/scope.rb +21 -37
- data/test/language/snippets.rb +7 -0
- data/test/lib/puppettest.rb +28 -14
- data/test/lib/puppettest/parsertesting.rb +10 -10
- data/test/lib/puppettest/support/resources.rb +1 -1
- data/test/network/client/master.rb +10 -0
- data/test/network/handler/fileserver.rb +51 -49
- data/test/network/server/webrick.rb +1 -1
- data/test/other/dsl.rb +3 -4
- data/test/other/transactions.rb +6 -4
- data/test/rails/ast.rb +2 -2
- data/test/rails/configuration.rb +1 -1
- data/test/rails/railsparameter.rb +2 -0
- data/test/rails/railsresource.rb +1 -0
- data/test/ral/manager/type.rb +4 -4
- data/test/ral/providers/cron/crontab.rb +3 -1
- data/test/ral/providers/package.rb +1 -1
- data/test/ral/{types → type}/basic.rb +2 -2
- data/test/ral/{types → type}/cron.rb +0 -0
- data/test/ral/{types → type}/exec.rb +42 -2
- data/test/ral/{types → type}/file.rb +34 -79
- data/test/ral/{types → type}/file/target.rb +0 -0
- data/test/ral/{types → type}/filebucket.rb +0 -0
- data/test/ral/{types → type}/fileignoresource.rb +0 -0
- data/test/ral/{types → type}/filesources.rb +8 -27
- data/test/ral/{types → type}/group.rb +0 -0
- data/test/ral/{types → type}/host.rb +16 -0
- data/test/ral/{types → type}/mailalias.rb +0 -0
- data/test/ral/{types → type}/parameter.rb +0 -0
- data/test/ral/{types → type}/port.rb +0 -0
- data/test/ral/{types → type}/property.rb +0 -0
- data/test/ral/{types → type}/resources.rb +0 -0
- data/test/ral/{types → type}/service.rb +0 -0
- data/test/ral/{types → type}/sshkey.rb +0 -0
- data/test/ral/{types → type}/tidy.rb +1 -0
- data/test/ral/{types → type}/user.rb +0 -0
- data/test/ral/{types → type}/yumrepo.rb +0 -0
- data/test/ral/{types → type}/zone.rb +0 -0
- data/test/util/autoload.rb +24 -5
- metadata +60 -107
- data/conf/gentoo/puppet/puppetca.conf +0 -29
- data/conf/gentoo/puppet/puppetd.conf +0 -29
- data/conf/gentoo/puppet/puppetmasterd.conf +0 -29
- data/examples/root/etc/puppet/puppetd.conf +0 -4
- data/lib/puppet/external/gratr.rb +0 -33
- data/lib/puppet/external/gratr/adjacency_graph.rb +0 -257
- data/lib/puppet/external/gratr/base.rb +0 -34
- data/lib/puppet/external/gratr/biconnected.rb +0 -116
- data/lib/puppet/external/gratr/chinese_postman.rb +0 -123
- data/lib/puppet/external/gratr/common.rb +0 -73
- data/lib/puppet/external/gratr/comparability.rb +0 -92
- data/lib/puppet/external/gratr/digraph.rb +0 -116
- data/lib/puppet/external/gratr/digraph_distance.rb +0 -185
- data/lib/puppet/external/gratr/dot.rb +0 -90
- data/lib/puppet/external/gratr/edge.rb +0 -145
- data/lib/puppet/external/gratr/graph.rb +0 -303
- data/lib/puppet/external/gratr/graph_api.rb +0 -83
- data/lib/puppet/external/gratr/import.rb +0 -44
- data/lib/puppet/external/gratr/labels.rb +0 -90
- data/lib/puppet/external/gratr/maximum_flow.rb +0 -64
- data/lib/puppet/external/gratr/search.rb +0 -409
- data/lib/puppet/external/gratr/strong_components.rb +0 -127
- data/lib/puppet/external/gratr/undirected_graph.rb +0 -153
- data/lib/puppet/rails/external/tagging/acts_as_taggable.rb +0 -62
- data/lib/puppet/rails/external/tagging/init.rb +0 -5
- data/lib/puppet/rails/external/tagging/tag.rb +0 -50
- data/lib/puppet/rails/external/tagging/tagging.rb +0 -12
- data/lib/puppet/rails/puppet_class.rb +0 -6
- data/lib/puppet/reference/node_source.rb +0 -9
- data/lib/puppet/reference/report.rb +0 -21
- data/lib/puppet/type/pfile/checksum.rb +0 -326
- data/test/language/ast/definition.rb +0 -166
- data/test/language/ast/hostclass.rb +0 -184
- data/test/language/compile.rb +0 -569
- data/test/language/lexer.rb +0 -276
- data/test/lib/mocha.rb +0 -19
- data/test/lib/mocha/any_instance_method.rb +0 -35
- data/test/lib/mocha/auto_verify.rb +0 -113
- data/test/lib/mocha/central.rb +0 -35
- data/test/lib/mocha/class_method.rb +0 -62
- data/test/lib/mocha/deprecation.rb +0 -22
- data/test/lib/mocha/exception_raiser.rb +0 -17
- data/test/lib/mocha/expectation.rb +0 -378
- data/test/lib/mocha/expectation_error.rb +0 -6
- data/test/lib/mocha/infinite_range.rb +0 -25
- data/test/lib/mocha/inspect.rb +0 -39
- data/test/lib/mocha/instance_method.rb +0 -8
- data/test/lib/mocha/is_a.rb +0 -9
- data/test/lib/mocha/metaclass.rb +0 -7
- data/test/lib/mocha/missing_expectation.rb +0 -27
- data/test/lib/mocha/mock.rb +0 -207
- data/test/lib/mocha/multiple_yields.rb +0 -20
- data/test/lib/mocha/no_yields.rb +0 -11
- data/test/lib/mocha/object.rb +0 -110
- data/test/lib/mocha/parameter_matchers.rb +0 -9
- data/test/lib/mocha/parameter_matchers/all_of.rb +0 -39
- data/test/lib/mocha/parameter_matchers/any_of.rb +0 -44
- data/test/lib/mocha/parameter_matchers/anything.rb +0 -30
- data/test/lib/mocha/parameter_matchers/has_entry.rb +0 -39
- data/test/lib/mocha/parameter_matchers/has_key.rb +0 -39
- data/test/lib/mocha/parameter_matchers/has_value.rb +0 -39
- data/test/lib/mocha/parameter_matchers/includes.rb +0 -37
- data/test/lib/mocha/pretty_parameters.rb +0 -28
- data/test/lib/mocha/return_values.rb +0 -31
- data/test/lib/mocha/setup_and_teardown.rb +0 -23
- data/test/lib/mocha/single_return_value.rb +0 -24
- data/test/lib/mocha/single_yield.rb +0 -18
- data/test/lib/mocha/standalone.rb +0 -32
- data/test/lib/mocha/stub.rb +0 -18
- data/test/lib/mocha/test_case_adapter.rb +0 -49
- data/test/lib/mocha/yield_parameters.rb +0 -31
data/test/language/scope.rb
CHANGED
@@ -27,7 +27,7 @@ class TestScope < Test::Unit::TestCase
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def test_variables
|
30
|
-
config =
|
30
|
+
config = mkcompiler
|
31
31
|
topscope = config.topscope
|
32
32
|
midscope = config.newscope(topscope)
|
33
33
|
botscope = config.newscope(midscope)
|
@@ -94,7 +94,7 @@ class TestScope < Test::Unit::TestCase
|
|
94
94
|
classes = ["", "one", "one::two", "one::two::three"].each do |name|
|
95
95
|
klass = parser.newclass(name)
|
96
96
|
Puppet::Parser::Resource.new(:type => "class", :title => name, :scope => scope, :source => mock('source')).evaluate
|
97
|
-
scopes[name] = scope.
|
97
|
+
scopes[name] = scope.compiler.class_scope(klass)
|
98
98
|
end
|
99
99
|
|
100
100
|
classes.each do |name|
|
@@ -125,7 +125,7 @@ class TestScope < Test::Unit::TestCase
|
|
125
125
|
end
|
126
126
|
|
127
127
|
def test_setdefaults
|
128
|
-
config =
|
128
|
+
config = mkcompiler
|
129
129
|
|
130
130
|
scope = config.topscope
|
131
131
|
|
@@ -151,7 +151,7 @@ class TestScope < Test::Unit::TestCase
|
|
151
151
|
end
|
152
152
|
|
153
153
|
def test_lookupdefaults
|
154
|
-
config =
|
154
|
+
config = mkcompiler
|
155
155
|
top = config.topscope
|
156
156
|
|
157
157
|
# Make a subscope
|
@@ -179,7 +179,7 @@ class TestScope < Test::Unit::TestCase
|
|
179
179
|
end
|
180
180
|
|
181
181
|
def test_parent
|
182
|
-
config =
|
182
|
+
config = mkcompiler
|
183
183
|
top = config.topscope
|
184
184
|
|
185
185
|
# Make a subscope
|
@@ -205,7 +205,7 @@ class TestScope < Test::Unit::TestCase
|
|
205
205
|
%w{one one::two one::two::three}.each do |name|
|
206
206
|
klass = parser.newclass(name)
|
207
207
|
Puppet::Parser::Resource.new(:type => "class", :title => name, :scope => scope, :source => mock('source')).evaluate
|
208
|
-
scopes[name] = scope.
|
208
|
+
scopes[name] = scope.compiler.class_scope(klass)
|
209
209
|
scopes[name].setvar("test", "value-%s" % name.sub(/.+::/,''))
|
210
210
|
end
|
211
211
|
|
@@ -284,13 +284,13 @@ class TestScope < Test::Unit::TestCase
|
|
284
284
|
)
|
285
285
|
|
286
286
|
assert_nothing_raised do
|
287
|
-
function.evaluate
|
287
|
+
function.evaluate scope
|
288
288
|
end
|
289
289
|
|
290
|
-
scope.
|
290
|
+
scope.compiler.send(:evaluate_generators)
|
291
291
|
|
292
292
|
[myclass, otherclass].each do |klass|
|
293
|
-
assert(scope.
|
293
|
+
assert(scope.compiler.class_scope(klass),
|
294
294
|
"%s was not set" % klass.classname)
|
295
295
|
end
|
296
296
|
end
|
@@ -328,18 +328,17 @@ class TestScope < Test::Unit::TestCase
|
|
328
328
|
"undef considered true")
|
329
329
|
end
|
330
330
|
|
331
|
-
if defined? ActiveRecord
|
332
331
|
# Verify that we recursively mark as exported the results of collectable
|
333
332
|
# components.
|
334
|
-
def
|
335
|
-
config =
|
333
|
+
def test_virtual_definitions_do_not_get_evaluated
|
334
|
+
config = mkcompiler
|
336
335
|
parser = config.parser
|
337
336
|
|
338
337
|
# Create a default source
|
339
338
|
config.topscope.source = parser.newclass "", ""
|
340
339
|
|
341
340
|
# And a scope resource
|
342
|
-
scope_res = stub 'scope_resource', :virtual? => true, :exported? => false, :tags => []
|
341
|
+
scope_res = stub 'scope_resource', :virtual? => true, :exported? => false, :tags => [], :builtin? => true, :type => "eh", :title => "bee"
|
343
342
|
config.topscope.resource = scope_res
|
344
343
|
|
345
344
|
args = AST::ASTArray.new(
|
@@ -348,7 +347,7 @@ class TestScope < Test::Unit::TestCase
|
|
348
347
|
:children => [nameobj("arg")]
|
349
348
|
)
|
350
349
|
|
351
|
-
# Create a top-level
|
350
|
+
# Create a top-level define
|
352
351
|
parser.newdefine "one", :arguments => [%w{arg}],
|
353
352
|
:code => AST::ASTArray.new(
|
354
353
|
:children => [
|
@@ -356,41 +355,26 @@ class TestScope < Test::Unit::TestCase
|
|
356
355
|
]
|
357
356
|
)
|
358
357
|
|
359
|
-
#
|
360
|
-
|
361
|
-
:code => AST::ASTArray.new(
|
362
|
-
:children => [
|
363
|
-
resourcedef("one", "ptest", {"arg" => varref("arg")})
|
364
|
-
]
|
365
|
-
)
|
366
|
-
|
367
|
-
# And then a third component that calls the second
|
368
|
-
parser.newdefine "three", :arguments => [%w{arg}],
|
369
|
-
:code => AST::ASTArray.new(
|
370
|
-
:children => [
|
371
|
-
resourcedef("two", "yay", {"arg" => varref("arg")})
|
372
|
-
]
|
373
|
-
)
|
374
|
-
|
375
|
-
# lastly, create an object that calls our third component
|
376
|
-
obj = resourcedef("three", "boo", {"arg" => "parentfoo"})
|
358
|
+
# create a resource that calls our third define
|
359
|
+
obj = resourcedef("one", "boo", {"arg" => "parentfoo"})
|
377
360
|
|
378
|
-
# And mark it as
|
379
|
-
obj.
|
361
|
+
# And mark it as virtual
|
362
|
+
obj.virtual = true
|
380
363
|
|
381
364
|
# And then evaluate it
|
382
|
-
obj.evaluate
|
365
|
+
obj.evaluate config.topscope
|
383
366
|
|
384
367
|
# And run the loop.
|
385
368
|
config.send(:evaluate_generators)
|
386
369
|
|
387
370
|
%w{File}.each do |type|
|
388
|
-
objects = config.resources.find_all { |r| r.type == type and r.
|
371
|
+
objects = config.resources.find_all { |r| r.type == type and r.virtual }
|
389
372
|
|
390
|
-
assert(
|
373
|
+
assert(objects.empty?, "Virtual define got evaluated")
|
391
374
|
end
|
392
375
|
end
|
393
376
|
|
377
|
+
if defined? ActiveRecord
|
394
378
|
# Verify that we can both store and collect an object in the same
|
395
379
|
# run, whether it's in the same scope as a collection or a different
|
396
380
|
# scope.
|
data/test/language/snippets.rb
CHANGED
@@ -15,6 +15,8 @@ class TestSnippets < Test::Unit::TestCase
|
|
15
15
|
def setup
|
16
16
|
super
|
17
17
|
@file = Puppet::Type.type(:file)
|
18
|
+
Facter.stubs(:to_hash).returns({})
|
19
|
+
Facter.stubs(:value).returns("whatever")
|
18
20
|
end
|
19
21
|
|
20
22
|
def self.snippetdir
|
@@ -422,6 +424,11 @@ class TestSnippets < Test::Unit::TestCase
|
|
422
424
|
assert_file("/tmp/realize_defined_test2")
|
423
425
|
end
|
424
426
|
|
427
|
+
def snippet_collection_within_virtual_definitions
|
428
|
+
assert_file("/tmp/collection_within_virtual_definitions1_foo.txt")
|
429
|
+
assert_file("/tmp/collection_within_virtual_definitions2_foo2.txt")
|
430
|
+
end
|
431
|
+
|
425
432
|
def snippet_fqparents
|
426
433
|
assert_file("/tmp/fqparent1", "Did not make file from parent class")
|
427
434
|
assert_file("/tmp/fqparent2", "Did not make file from subclass")
|
data/test/lib/puppettest.rb
CHANGED
@@ -6,6 +6,17 @@ mainlib = File.expand_path(File.join(File.dirname(__FILE__), '../../lib'))
|
|
6
6
|
$LOAD_PATH.unshift(mainlib) unless $LOAD_PATH.include?(mainlib)
|
7
7
|
|
8
8
|
require 'puppet'
|
9
|
+
|
10
|
+
# include any gems in vendor/gems
|
11
|
+
Dir["#{mainlib}/../vendor/gems/**"].each do |path|
|
12
|
+
libpath = File.join(path, "lib")
|
13
|
+
if File.directory?(libpath)
|
14
|
+
$LOAD_PATH.unshift(libpath)
|
15
|
+
else
|
16
|
+
$LOAD_PATH.unshift(path)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
9
20
|
require 'mocha'
|
10
21
|
|
11
22
|
# Only load the test/unit class if we're not in the spec directory.
|
@@ -25,9 +36,9 @@ class Class
|
|
25
36
|
def publicize_methods(*methods)
|
26
37
|
saved_private_instance_methods = methods.empty? ? self.private_instance_methods : methods
|
27
38
|
|
28
|
-
self.class_eval { public
|
39
|
+
self.class_eval { public(*saved_private_instance_methods) }
|
29
40
|
yield
|
30
|
-
self.class_eval { private
|
41
|
+
self.class_eval { private(*saved_private_instance_methods) }
|
31
42
|
end
|
32
43
|
end
|
33
44
|
|
@@ -187,7 +198,7 @@ module PuppetTest
|
|
187
198
|
|
188
199
|
# If we're running under rake, then disable debugging and such.
|
189
200
|
#if rake? or ! Puppet[:debug]
|
190
|
-
if defined?($puppet_debug) or ! rake?
|
201
|
+
#if defined?($puppet_debug) or ! rake?
|
191
202
|
if textmate?
|
192
203
|
Puppet[:color] = false
|
193
204
|
end
|
@@ -199,11 +210,11 @@ module PuppetTest
|
|
199
210
|
end
|
200
211
|
Puppet::Util::Log.level = :debug
|
201
212
|
#$VERBOSE = 1
|
202
|
-
else
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
end
|
213
|
+
#else
|
214
|
+
# Puppet::Util::Log.close
|
215
|
+
# Puppet::Util::Log.newdestination(@logs)
|
216
|
+
# Puppet[:httplog] = tempfile()
|
217
|
+
#end
|
207
218
|
|
208
219
|
Puppet[:ignoreschedules] = true
|
209
220
|
|
@@ -256,11 +267,7 @@ module PuppetTest
|
|
256
267
|
@tmpdir
|
257
268
|
end
|
258
269
|
|
259
|
-
def
|
260
|
-
#@stop = Time.now
|
261
|
-
#File.open("/tmp/test_times.log", ::File::WRONLY|::File::CREAT|::File::APPEND) { |f| f.puts "%0.4f %s %s" % [@stop - @start, @method_name, self.class] }
|
262
|
-
@@cleaners.each { |cleaner| cleaner.call() }
|
263
|
-
|
270
|
+
def remove_tmp_files
|
264
271
|
@@tmpfiles.each { |file|
|
265
272
|
unless file =~ /tmp/
|
266
273
|
puts "Not deleting tmpfile %s" % file
|
@@ -272,6 +279,14 @@ module PuppetTest
|
|
272
279
|
end
|
273
280
|
}
|
274
281
|
@@tmpfiles.clear
|
282
|
+
end
|
283
|
+
|
284
|
+
def teardown
|
285
|
+
#@stop = Time.now
|
286
|
+
#File.open("/tmp/test_times.log", ::File::WRONLY|::File::CREAT|::File::APPEND) { |f| f.puts "%0.4f %s %s" % [@stop - @start, @method_name, self.class] }
|
287
|
+
@@cleaners.each { |cleaner| cleaner.call() }
|
288
|
+
|
289
|
+
remove_tmp_files
|
275
290
|
|
276
291
|
@@tmppids.each { |pid|
|
277
292
|
%x{kill -INT #{pid} 2>/dev/null}
|
@@ -306,7 +321,6 @@ module PuppetTest
|
|
306
321
|
rescue Timeout::Error
|
307
322
|
# just move on
|
308
323
|
end
|
309
|
-
mocha_verify
|
310
324
|
end
|
311
325
|
|
312
326
|
def logstore
|
@@ -5,7 +5,7 @@ module PuppetTest::ParserTesting
|
|
5
5
|
include PuppetTest
|
6
6
|
AST = Puppet::Parser::AST
|
7
7
|
|
8
|
-
|
8
|
+
Compiler = Puppet::Parser::Compiler
|
9
9
|
|
10
10
|
# A fake class that we can use for testing evaluation.
|
11
11
|
class FakeAST
|
@@ -41,10 +41,10 @@ module PuppetTest::ParserTesting
|
|
41
41
|
)
|
42
42
|
end
|
43
43
|
|
44
|
-
def
|
44
|
+
def mkcompiler(parser = nil)
|
45
45
|
parser ||= mkparser
|
46
46
|
node = mknode
|
47
|
-
return
|
47
|
+
return Compiler.new(node, parser)
|
48
48
|
end
|
49
49
|
|
50
50
|
def mknode(name = nil)
|
@@ -58,21 +58,21 @@ module PuppetTest::ParserTesting
|
|
58
58
|
Puppet::Parser::Interpreter.new
|
59
59
|
end
|
60
60
|
|
61
|
-
def mkparser
|
62
|
-
Puppet::Parser::Parser.new()
|
61
|
+
def mkparser(args = {})
|
62
|
+
Puppet::Parser::Parser.new(args)
|
63
63
|
end
|
64
64
|
|
65
65
|
def mkscope(hash = {})
|
66
66
|
hash[:parser] ||= mkparser
|
67
|
-
|
68
|
-
|
67
|
+
compiler ||= mkcompiler(hash[:parser])
|
68
|
+
compiler.topscope.source = (hash[:parser].findclass("", "") || hash[:parser].newclass(""))
|
69
69
|
|
70
|
-
unless
|
70
|
+
unless compiler.topscope.source
|
71
71
|
raise "Could not find source for scope"
|
72
72
|
end
|
73
73
|
# Make the 'main' stuff
|
74
|
-
|
75
|
-
|
74
|
+
compiler.send(:evaluate_main)
|
75
|
+
compiler.topscope
|
76
76
|
end
|
77
77
|
|
78
78
|
def classobj(name, hash = {})
|
@@ -18,7 +18,7 @@ module PuppetTest::Support::Resources
|
|
18
18
|
if resource.is_a?(String)
|
19
19
|
resource = tree_resource(resource)
|
20
20
|
end
|
21
|
-
config.add_edge
|
21
|
+
config.add_edge(comp, resource)
|
22
22
|
config.add_resource resource unless config.resource(resource.ref)
|
23
23
|
end
|
24
24
|
return comp
|
@@ -211,6 +211,16 @@ end
|
|
211
211
|
"Lost value to hostname")
|
212
212
|
end
|
213
213
|
|
214
|
+
# Make sure that setting environment by fact takes precedence to configuration
|
215
|
+
def test_setenvironmentwithfact
|
216
|
+
name = "environment"
|
217
|
+
value = "test_environment"
|
218
|
+
|
219
|
+
Facter.stubs(:to_hash).returns(name => value)
|
220
|
+
|
221
|
+
assert_equal(value, Puppet::Network::Client.master.facts[name])
|
222
|
+
end
|
223
|
+
|
214
224
|
# Make sure we load all facts on startup.
|
215
225
|
def test_loadfacts
|
216
226
|
dirs = [tempfile(), tempfile()]
|
@@ -109,13 +109,13 @@ class TestFileServer < Test::Unit::TestCase
|
|
109
109
|
# and verify different iterations of 'root' return the same value
|
110
110
|
list = nil
|
111
111
|
assert_nothing_raised {
|
112
|
-
list = server.list("/test/", :
|
112
|
+
list = server.list("/test/", :manage, true, false)
|
113
113
|
}
|
114
114
|
|
115
115
|
assert(list =~ pattern)
|
116
116
|
|
117
117
|
assert_nothing_raised {
|
118
|
-
list = server.list("/test", :
|
118
|
+
list = server.list("/test", :manage, true, false)
|
119
119
|
}
|
120
120
|
assert(list =~ pattern)
|
121
121
|
|
@@ -143,7 +143,7 @@ class TestFileServer < Test::Unit::TestCase
|
|
143
143
|
list = nil
|
144
144
|
sfile = "/test/tmpfile"
|
145
145
|
assert_nothing_raised {
|
146
|
-
list = server.list(sfile, :
|
146
|
+
list = server.list(sfile, :manage, true, false)
|
147
147
|
}
|
148
148
|
|
149
149
|
assert_nothing_raised {
|
@@ -200,7 +200,7 @@ class TestFileServer < Test::Unit::TestCase
|
|
200
200
|
list = nil
|
201
201
|
sfile = "/test/"
|
202
202
|
assert_nothing_raised {
|
203
|
-
list = server.list(sfile, :
|
203
|
+
list = server.list(sfile, :manage, true, false)
|
204
204
|
}
|
205
205
|
|
206
206
|
# create the new file
|
@@ -210,7 +210,7 @@ class TestFileServer < Test::Unit::TestCase
|
|
210
210
|
|
211
211
|
newlist = nil
|
212
212
|
assert_nothing_raised {
|
213
|
-
newlist = server.list(sfile, :
|
213
|
+
newlist = server.list(sfile, :manage, true, false)
|
214
214
|
}
|
215
215
|
|
216
216
|
# verify the list has changed
|
@@ -239,12 +239,12 @@ class TestFileServer < Test::Unit::TestCase
|
|
239
239
|
|
240
240
|
list = nil
|
241
241
|
assert_nothing_raised {
|
242
|
-
list = server.list("/root/" + testdir, :
|
242
|
+
list = server.list("/root/" + testdir, :manage, true, false)
|
243
243
|
}
|
244
244
|
|
245
245
|
assert(list =~ pattern)
|
246
246
|
assert_nothing_raised {
|
247
|
-
list = server.list("/root" + testdir, :
|
247
|
+
list = server.list("/root" + testdir, :manage, true, false)
|
248
248
|
}
|
249
249
|
|
250
250
|
assert(list =~ pattern)
|
@@ -279,7 +279,7 @@ class TestFileServer < Test::Unit::TestCase
|
|
279
279
|
# get our list
|
280
280
|
list = nil
|
281
281
|
assert_nothing_raised {
|
282
|
-
list = server.list("/test/with", :
|
282
|
+
list = server.list("/test/with", :manage, false, false)
|
283
283
|
}
|
284
284
|
|
285
285
|
# make sure we only got one line, since we're not recursing
|
@@ -288,7 +288,7 @@ class TestFileServer < Test::Unit::TestCase
|
|
288
288
|
# for each level of recursion, make sure we get the right list
|
289
289
|
[0, 1, 2].each { |num|
|
290
290
|
assert_nothing_raised {
|
291
|
-
list = server.list("/test/with", :
|
291
|
+
list = server.list("/test/with", :manage, num, false)
|
292
292
|
}
|
293
293
|
|
294
294
|
count = 0
|
@@ -332,13 +332,13 @@ class TestFileServer < Test::Unit::TestCase
|
|
332
332
|
list = nil
|
333
333
|
# and then check a few dirs
|
334
334
|
assert_nothing_raised {
|
335
|
-
list = server.list("/localhost/with", :
|
335
|
+
list = server.list("/localhost/with", :manage, false, false)
|
336
336
|
}
|
337
337
|
|
338
338
|
assert(list !~ /with/)
|
339
339
|
|
340
340
|
assert_nothing_raised {
|
341
|
-
list = server.list("/localhost/with/some/sub", :
|
341
|
+
list = server.list("/localhost/with/some/sub", :manage, true, false)
|
342
342
|
}
|
343
343
|
|
344
344
|
assert(list !~ /sub/)
|
@@ -370,7 +370,7 @@ class TestFileServer < Test::Unit::TestCase
|
|
370
370
|
|
371
371
|
list = nil
|
372
372
|
assert_nothing_raised {
|
373
|
-
list = server.list("/localhost/", :
|
373
|
+
list = server.list("/localhost/", :manage, 1, false)
|
374
374
|
}
|
375
375
|
assert_instance_of(String, list, "Server returned %s instead of string")
|
376
376
|
list = list.split("\n")
|
@@ -402,7 +402,7 @@ class TestFileServer < Test::Unit::TestCase
|
|
402
402
|
list = nil
|
403
403
|
sfile = "/test/"
|
404
404
|
assert_nothing_raised {
|
405
|
-
list = server.list(sfile, :
|
405
|
+
list = server.list(sfile, :manage, true, false)
|
406
406
|
}
|
407
407
|
|
408
408
|
# and describe each file in the list
|
@@ -492,7 +492,7 @@ class TestFileServer < Test::Unit::TestCase
|
|
492
492
|
mounts.each { |mount, files|
|
493
493
|
mount = "/#{mount}/"
|
494
494
|
assert_nothing_raised {
|
495
|
-
list = server.list(mount, :
|
495
|
+
list = server.list(mount, :manage, true, false)
|
496
496
|
}
|
497
497
|
|
498
498
|
assert_nothing_raised {
|
@@ -544,12 +544,12 @@ class TestFileServer < Test::Unit::TestCase
|
|
544
544
|
assert_raise(Puppet::AuthorizationError,
|
545
545
|
"Host %s, ip %s, allowed %s" %
|
546
546
|
[host, ip, mount]) {
|
547
|
-
list = server.list(mount, :
|
547
|
+
list = server.list(mount, :manage, true, false, host, ip)
|
548
548
|
}
|
549
549
|
when :allow:
|
550
550
|
assert_nothing_raised("Host %s, ip %s, denied %s" %
|
551
551
|
[host, ip, mount]) {
|
552
|
-
list = server.list(mount, :
|
552
|
+
list = server.list(mount, :manage, true, false, host, ip)
|
553
553
|
}
|
554
554
|
end
|
555
555
|
}
|
@@ -602,7 +602,7 @@ class TestFileServer < Test::Unit::TestCase
|
|
602
602
|
|
603
603
|
assert_raise(Puppet::Network::Handler::FileServerError,
|
604
604
|
"Invalid mount was mounted") {
|
605
|
-
server.list(mount, :
|
605
|
+
server.list(mount, :manage)
|
606
606
|
}
|
607
607
|
}
|
608
608
|
|
@@ -654,13 +654,13 @@ class TestFileServer < Test::Unit::TestCase
|
|
654
654
|
|
655
655
|
list = nil
|
656
656
|
assert_nothing_raised {
|
657
|
-
list = server.list("/thing/", :
|
657
|
+
list = server.list("/thing/", :manage, false, false,
|
658
658
|
"test1.domain.com", "127.0.0.1")
|
659
659
|
}
|
660
660
|
assert(list != "", "List returned nothing in rereard test")
|
661
661
|
|
662
662
|
assert_raise(Puppet::AuthorizationError, "List allowed invalid host") {
|
663
|
-
list = server.list("/thing/", :
|
663
|
+
list = server.list("/thing/", :manage, false, false,
|
664
664
|
"test2.domain.com", "127.0.0.1")
|
665
665
|
}
|
666
666
|
|
@@ -675,12 +675,12 @@ class TestFileServer < Test::Unit::TestCase
|
|
675
675
|
}
|
676
676
|
|
677
677
|
assert_raise(Puppet::AuthorizationError, "List allowed invalid host") {
|
678
|
-
list = server.list("/thing/", :
|
678
|
+
list = server.list("/thing/", :manage, false, false,
|
679
679
|
"test1.domain.com", "127.0.0.1")
|
680
680
|
}
|
681
681
|
|
682
682
|
assert_nothing_raised {
|
683
|
-
list = server.list("/thing/", :
|
683
|
+
list = server.list("/thing/", :manage, false, false,
|
684
684
|
"test2.domain.com", "127.0.0.1")
|
685
685
|
}
|
686
686
|
|
@@ -735,7 +735,7 @@ class TestFileServer < Test::Unit::TestCase
|
|
735
735
|
# Then not
|
736
736
|
results = {}
|
737
737
|
assert_nothing_raised {
|
738
|
-
server.describe("/mount/link", :
|
738
|
+
server.describe("/mount/link", :manage).split("\t").zip(
|
739
739
|
Puppet::Network::Handler.fileserver::CHECKPARAMS
|
740
740
|
).each { |v,p| results[p] = v }
|
741
741
|
}
|
@@ -801,28 +801,28 @@ allow *
|
|
801
801
|
list = nil
|
802
802
|
sfile = "/host/file.txt"
|
803
803
|
assert_nothing_raised {
|
804
|
-
list = server.list(sfile, :
|
804
|
+
list = server.list(sfile, :manage, true, false, client1, ip)
|
805
805
|
}
|
806
806
|
assert_equal("/\tfile", list)
|
807
807
|
assert_nothing_raised {
|
808
|
-
list = server.list(sfile, :
|
808
|
+
list = server.list(sfile, :manage, true, false, client2, ip)
|
809
809
|
}
|
810
810
|
assert_equal("", list)
|
811
811
|
|
812
812
|
sfile = "/fqdn/file.txt"
|
813
813
|
assert_nothing_raised {
|
814
|
-
list = server.list(sfile, :
|
814
|
+
list = server.list(sfile, :manage, true, false, client1, ip)
|
815
815
|
}
|
816
816
|
assert_equal("", list)
|
817
817
|
assert_nothing_raised {
|
818
|
-
list = server.list(sfile, :
|
818
|
+
list = server.list(sfile, :manage, true, false, client2, ip)
|
819
819
|
}
|
820
820
|
assert_equal("/\tfile", list)
|
821
821
|
|
822
822
|
# check describe
|
823
823
|
sfile = "/host/file.txt"
|
824
824
|
assert_nothing_raised {
|
825
|
-
list = server.describe(sfile, :
|
825
|
+
list = server.describe(sfile, :manage, client1, ip).split("\t")
|
826
826
|
}
|
827
827
|
assert_equal(5, list.size)
|
828
828
|
assert_equal("file", list[1])
|
@@ -830,18 +830,18 @@ allow *
|
|
830
830
|
assert_equal("{md5}#{md5}", list[4])
|
831
831
|
|
832
832
|
assert_nothing_raised {
|
833
|
-
list = server.describe(sfile, :
|
833
|
+
list = server.describe(sfile, :manage, client2, ip).split("\t")
|
834
834
|
}
|
835
835
|
assert_equal([], list)
|
836
836
|
|
837
837
|
sfile = "/fqdn/file.txt"
|
838
838
|
assert_nothing_raised {
|
839
|
-
list = server.describe(sfile, :
|
839
|
+
list = server.describe(sfile, :manage, client1, ip).split("\t")
|
840
840
|
}
|
841
841
|
assert_equal([], list)
|
842
842
|
|
843
843
|
assert_nothing_raised {
|
844
|
-
list = server.describe(sfile, :
|
844
|
+
list = server.describe(sfile, :manage, client2, ip).split("\t")
|
845
845
|
}
|
846
846
|
assert_equal(5, list.size)
|
847
847
|
assert_equal("file", list[1])
|
@@ -851,23 +851,23 @@ allow *
|
|
851
851
|
# Check retrieve
|
852
852
|
sfile = "/host/file.txt"
|
853
853
|
assert_nothing_raised {
|
854
|
-
list = server.retrieve(sfile, :
|
854
|
+
list = server.retrieve(sfile, :manage, client1, ip).chomp
|
855
855
|
}
|
856
856
|
assert_equal(contents[client1_hostdir].chomp, list)
|
857
857
|
|
858
858
|
assert_nothing_raised {
|
859
|
-
list = server.retrieve(sfile, :
|
859
|
+
list = server.retrieve(sfile, :manage, client2, ip).chomp
|
860
860
|
}
|
861
861
|
assert_equal("", list)
|
862
862
|
|
863
863
|
sfile = "/fqdn/file.txt"
|
864
864
|
assert_nothing_raised {
|
865
|
-
list = server.retrieve(sfile, :
|
865
|
+
list = server.retrieve(sfile, :manage, client1, ip).chomp
|
866
866
|
}
|
867
867
|
assert_equal("", list)
|
868
868
|
|
869
869
|
assert_nothing_raised {
|
870
|
-
list = server.retrieve(sfile, :
|
870
|
+
list = server.retrieve(sfile, :manage, client2, ip).chomp
|
871
871
|
}
|
872
872
|
assert_equal(contents[client2_fqdndir].chomp, list)
|
873
873
|
end
|
@@ -945,12 +945,14 @@ allow *
|
|
945
945
|
# Now, check that they use Facter info
|
946
946
|
Puppet.notice "The following messages are normal"
|
947
947
|
client = nil
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
948
|
+
Facter.stubs(:value).with(:ipaddress).returns("127.0.0.1")
|
949
|
+
Facter.stubs(:value).with { |v| v.to_s == "hostname" }.returns("myhost")
|
950
|
+
Facter.stubs(:value).with { |v| v.to_s == "domain" }.returns("mydomain.com")
|
951
|
+
Facter.stubs(:value).with(:domain).returns("mydomain.com")
|
952
|
+
|
953
|
+
{"%h" => "myhost", # Short name
|
954
|
+
"%H" => "myhost.mydomain.com", # Full name
|
955
|
+
"%d" => "mydomain.com", # domain
|
954
956
|
"%%" => "%", # escape
|
955
957
|
"%o" => "%o" # other
|
956
958
|
}.each do |pat, repl|
|
@@ -993,18 +995,18 @@ allow *
|
|
993
995
|
|
994
996
|
ret = nil
|
995
997
|
assert_nothing_raised do
|
996
|
-
ret = server.list("/name", :
|
998
|
+
ret = server.list("/name", :manage, false, false, host, ip)
|
997
999
|
end
|
998
1000
|
|
999
1001
|
assert_equal("/\tfile", ret)
|
1000
1002
|
|
1001
1003
|
assert_nothing_raised do
|
1002
|
-
ret = server.describe("/name", :
|
1004
|
+
ret = server.describe("/name", :manage, host, ip)
|
1003
1005
|
end
|
1004
|
-
assert(ret =~ /\tfile\t/, "Did not get valid a description")
|
1006
|
+
assert(ret =~ /\tfile\t/, "Did not get valid a description (#{ret.inspect})")
|
1005
1007
|
|
1006
1008
|
assert_nothing_raised do
|
1007
|
-
ret = server.retrieve("/name", :
|
1009
|
+
ret = server.retrieve("/name", :manage, host, ip)
|
1008
1010
|
end
|
1009
1011
|
|
1010
1012
|
assert_equal(ret, File.read(file))
|
@@ -1050,7 +1052,7 @@ allow *
|
|
1050
1052
|
mount = "/#{mod.name}/"
|
1051
1053
|
list = nil
|
1052
1054
|
assert_nothing_raised {
|
1053
|
-
list = server.list(mount, :
|
1055
|
+
list = server.list(mount, :manage, true, false)
|
1054
1056
|
}
|
1055
1057
|
list = list.split("\n")
|
1056
1058
|
if mod.name == "green"
|
@@ -1063,7 +1065,7 @@ allow *
|
|
1063
1065
|
end
|
1064
1066
|
|
1065
1067
|
assert_nothing_raised("Host 'allow' denied #{mount}") {
|
1066
|
-
server.list(mount, :
|
1068
|
+
server.list(mount, :manage, true, false,
|
1067
1069
|
'allow.example.com', "192.168.0.1")
|
1068
1070
|
}
|
1069
1071
|
end
|
@@ -1106,7 +1108,7 @@ allow *
|
|
1106
1108
|
list = nil
|
1107
1109
|
mount = "/#{mod.name}/"
|
1108
1110
|
assert_nothing_raised {
|
1109
|
-
list = server.list(mount, :
|
1111
|
+
list = server.list(mount, :manage, true, false)
|
1110
1112
|
}
|
1111
1113
|
|
1112
1114
|
assert_nothing_raised {
|
@@ -1121,11 +1123,11 @@ allow *
|
|
1121
1123
|
# now let's check that things are being correctly forbidden
|
1122
1124
|
assert_raise(Puppet::AuthorizationError,
|
1123
1125
|
"Host 'deny' allowed #{mount}") {
|
1124
|
-
server.list(mount, :
|
1126
|
+
server.list(mount, :manage, true, false,
|
1125
1127
|
'deny.example.com', "192.168.1.1")
|
1126
1128
|
}
|
1127
1129
|
assert_nothing_raised("Host 'allow' denied #{mount}") {
|
1128
|
-
server.list(mount, :
|
1130
|
+
server.list(mount, :manage, true, false,
|
1129
1131
|
'allow.example.com', "192.168.0.1")
|
1130
1132
|
}
|
1131
1133
|
end
|