puppet 5.5.6-universal-darwin → 5.5.7-universal-darwin
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.
- checksums.yaml +4 -4
- data/Gemfile +3 -1
- data/Gemfile.lock +12 -12
- data/Rakefile +9 -0
- data/lib/puppet/application.rb +5 -0
- data/lib/puppet/application/apply.rb +1 -0
- data/lib/puppet/application/master.rb +9 -7
- data/lib/puppet/application/script.rb +1 -1
- data/lib/puppet/defaults.rb +51 -31
- data/lib/puppet/etc.rb +20 -0
- data/lib/puppet/file_serving/fileset.rb +1 -1
- data/lib/puppet/functions.rb +123 -0
- data/lib/puppet/functions/new.rb +37 -53
- data/lib/puppet/functions/warning.rb +1 -1
- data/lib/puppet/loaders.rb +1 -0
- data/lib/puppet/parser/functions.rb +3 -1
- data/lib/puppet/parser/functions/sprintf.rb +12 -1
- data/lib/puppet/pops/evaluator/runtime3_converter.rb +16 -0
- data/lib/puppet/pops/evaluator/runtime3_support.rb +3 -4
- data/lib/puppet/pops/issues.rb +8 -0
- data/lib/puppet/pops/loader/loader.rb +2 -2
- data/lib/puppet/pops/loader/loader_paths.rb +3 -1
- data/lib/puppet/pops/loader/module_loaders.rb +1 -1
- data/lib/puppet/pops/loader/ruby_legacy_function_instantiator.rb +62 -0
- data/lib/puppet/pops/loaders.rb +5 -21
- data/lib/puppet/pops/parser/heredoc_support.rb +1 -2
- data/lib/puppet/pops/parser/lexer2.rb +1 -1
- data/lib/puppet/pops/validation/checker4_0.rb +31 -6
- data/lib/puppet/pops/validation/validator_factory_4_0.rb +1 -0
- data/lib/puppet/property/keyvalue.rb +70 -8
- data/lib/puppet/provider/aix_object.rb +483 -0
- data/lib/puppet/provider/exec.rb +54 -57
- data/lib/puppet/provider/group/aix.rb +40 -115
- data/lib/puppet/provider/group/pw.rb +4 -8
- data/lib/puppet/provider/group/windows_adsi.rb +7 -4
- data/lib/puppet/provider/nameservice.rb +1 -25
- data/lib/puppet/provider/nameservice/directoryservice.rb +5 -3
- data/lib/puppet/provider/package/portage.rb +2 -2
- data/lib/puppet/provider/package/windows.rb +2 -2
- data/lib/puppet/provider/package/windows/exe_package.rb +3 -10
- data/lib/puppet/provider/package/zypper.rb +1 -1
- data/lib/puppet/provider/service/launchd.rb +19 -3
- data/lib/puppet/provider/service/windows.rb +49 -40
- data/lib/puppet/provider/user/aix.rb +180 -246
- data/lib/puppet/provider/user/windows_adsi.rb +9 -1
- data/lib/puppet/resource/catalog.rb +1 -5
- data/lib/puppet/type/augeas.rb +1 -1
- data/lib/puppet/type/exec.rb +16 -14
- data/lib/puppet/type/file.rb +2 -2
- data/lib/puppet/type/file/source.rb +9 -5
- data/lib/puppet/type/group.rb +65 -23
- data/lib/puppet/type/k5login.rb +2 -2
- data/lib/puppet/type/notify.rb +1 -1
- data/lib/puppet/type/package.rb +3 -6
- data/lib/puppet/type/resources.rb +12 -2
- data/lib/puppet/type/schedule.rb +8 -1
- data/lib/puppet/type/selboolean.rb +2 -2
- data/lib/puppet/type/selmodule.rb +3 -4
- data/lib/puppet/type/service.rb +2 -5
- data/lib/puppet/type/tidy.rb +1 -1
- data/lib/puppet/type/user.rb +15 -20
- data/lib/puppet/type/yumrepo.rb +2 -2
- data/lib/puppet/type/zone.rb +2 -2
- data/lib/puppet/util.rb +7 -3
- data/lib/puppet/util/execution.rb +15 -1
- data/lib/puppet/util/posix.rb +15 -0
- data/lib/puppet/util/storage.rb +12 -0
- data/lib/puppet/util/windows.rb +4 -2
- data/lib/puppet/util/windows/adsi.rb +235 -205
- data/lib/puppet/util/windows/process.rb +23 -3
- data/lib/puppet/util/windows/security.rb +14 -0
- data/lib/puppet/util/windows/service.rb +977 -0
- data/lib/puppet/util/windows/user.rb +3 -5
- data/lib/puppet/version.rb +1 -1
- data/locales/ja/puppet.po +705 -374
- data/locales/puppet.pot +485 -261
- data/man/man5/puppet.conf.5 +36 -15
- data/man/man8/puppet-agent.8 +1 -1
- data/man/man8/puppet-apply.8 +1 -1
- data/man/man8/puppet-ca.8 +1 -1
- data/man/man8/puppet-catalog.8 +1 -1
- data/man/man8/puppet-cert.8 +1 -1
- data/man/man8/puppet-certificate.8 +1 -1
- data/man/man8/puppet-certificate_request.8 +1 -1
- data/man/man8/puppet-certificate_revocation_list.8 +1 -1
- data/man/man8/puppet-config.8 +1 -1
- data/man/man8/puppet-describe.8 +1 -1
- data/man/man8/puppet-device.8 +1 -1
- data/man/man8/puppet-doc.8 +1 -1
- data/man/man8/puppet-epp.8 +1 -1
- data/man/man8/puppet-facts.8 +1 -1
- data/man/man8/puppet-filebucket.8 +1 -1
- data/man/man8/puppet-generate.8 +1 -1
- data/man/man8/puppet-help.8 +1 -1
- data/man/man8/puppet-key.8 +1 -1
- data/man/man8/puppet-lookup.8 +1 -1
- data/man/man8/puppet-man.8 +1 -1
- data/man/man8/puppet-master.8 +1 -1
- data/man/man8/puppet-module.8 +1 -1
- data/man/man8/puppet-node.8 +1 -1
- data/man/man8/puppet-parser.8 +1 -1
- data/man/man8/puppet-plugin.8 +1 -1
- data/man/man8/puppet-report.8 +1 -1
- data/man/man8/puppet-resource.8 +1 -1
- data/man/man8/puppet-script.8 +1 -1
- data/man/man8/puppet-status.8 +1 -1
- data/man/man8/puppet.8 +2 -2
- data/spec/fixtures/unit/provider/aix_object/aix_colon_list_real_world_input.out +1 -0
- data/spec/fixtures/unit/provider/aix_object/aix_colon_list_real_world_output.out +1 -0
- data/spec/fixtures/unit/provider/user/aix/aix_passwd_file.out +32 -0
- data/spec/integration/parser/collection_spec.rb +4 -8
- data/spec/integration/provider/service/windows_spec.rb +5 -5
- data/spec/integration/type/file_spec.rb +6 -6
- data/spec/integration/util/windows/adsi_spec.rb +6 -5
- data/spec/integration/util/windows/security_spec.rb +10 -7
- data/spec/integration/util/windows/user_spec.rb +37 -17
- data/spec/spec_helper.rb +0 -1
- data/spec/unit/application/apply_spec.rb +41 -2
- data/spec/unit/application/master_spec.rb +7 -0
- data/spec/unit/application_spec.rb +21 -3
- data/spec/unit/defaults_spec.rb +20 -0
- data/spec/unit/etc_spec.rb +25 -0
- data/spec/unit/file_serving/fileset_spec.rb +11 -11
- data/spec/unit/gettext/config_spec.rb +1 -1
- data/spec/unit/pops/evaluator/evaluating_parser_spec.rb +6 -6
- data/spec/unit/pops/loaders/loaders_spec.rb +40 -7
- data/spec/unit/pops/parser/parse_heredoc_spec.rb +16 -0
- data/spec/unit/pops/validator/validator_spec.rb +129 -10
- data/spec/unit/property/keyvalue_spec.rb +97 -6
- data/spec/unit/provider/aix_object_spec.rb +805 -0
- data/spec/unit/provider/group/aix_spec.rb +57 -0
- data/spec/unit/provider/group/pw_spec.rb +0 -6
- data/spec/unit/provider/group/windows_adsi_spec.rb +34 -35
- data/spec/unit/provider/nameservice/directoryservice_spec.rb +2 -2
- data/spec/unit/provider/package/windows/exe_package_spec.rb +3 -3
- data/spec/unit/provider/package/windows_spec.rb +4 -4
- data/spec/unit/provider/service/launchd_spec.rb +19 -0
- data/spec/unit/provider/service/windows_spec.rb +71 -78
- data/spec/unit/provider/user/aix_spec.rb +162 -116
- data/spec/unit/provider/user/windows_adsi_spec.rb +4 -4
- data/spec/unit/resource/catalog_spec.rb +2 -2
- data/spec/unit/ssl/certificate_authority_spec.rb +0 -1
- data/spec/unit/type/group_spec.rb +111 -13
- data/spec/unit/type/resources_spec.rb +18 -0
- data/spec/unit/util/execution_spec.rb +77 -0
- data/spec/unit/util/posix_spec.rb +28 -0
- data/spec/unit/util/storage_spec.rb +107 -0
- data/spec/unit/util/windows/adsi_spec.rb +108 -13
- data/spec/unit/util/windows/service_spec.rb +669 -0
- metadata +17 -5
- data/lib/puppet/provider/aixobject.rb +0 -392
- data/spec/unit/provider/aixobject_spec.rb +0 -101
@@ -1,101 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'puppet/provider/aixobject'
|
3
|
-
|
4
|
-
describe Puppet::Provider::AixObject do
|
5
|
-
let(:resource) do
|
6
|
-
Puppet::Type.type(:user).new(
|
7
|
-
:name => 'test_aix_user',
|
8
|
-
:ensure => :present
|
9
|
-
)
|
10
|
-
end
|
11
|
-
|
12
|
-
let(:provider) do
|
13
|
-
Puppet::Provider::AixObject.new resource
|
14
|
-
end
|
15
|
-
|
16
|
-
describe "base provider methods" do
|
17
|
-
[ :lscmd,
|
18
|
-
:addcmd,
|
19
|
-
:modifycmd,
|
20
|
-
:deletecmd
|
21
|
-
].each do |method|
|
22
|
-
it "should raise an error when unimplemented method #{method} called" do
|
23
|
-
expect do
|
24
|
-
provider.send(method)
|
25
|
-
end.to raise_error(Puppet::Error, /not defined/)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
describe "attribute mapping methods" do
|
31
|
-
let(:mapping) do
|
32
|
-
[
|
33
|
-
{ :aix_attr => :test_aix_property,
|
34
|
-
:puppet_prop => :test_puppet_property,
|
35
|
-
:to => :test_convert_to_aix_method,
|
36
|
-
:from => :test_convert_to_puppet_method
|
37
|
-
}
|
38
|
-
]
|
39
|
-
end
|
40
|
-
|
41
|
-
before(:each) do
|
42
|
-
provider.class.attribute_mapping = mapping
|
43
|
-
end
|
44
|
-
|
45
|
-
describe ".attribute_mapping_to" do
|
46
|
-
before(:each) do
|
47
|
-
if provider.class.instance_variable_defined? :@attribute_mapping_to
|
48
|
-
provider.class.send(:remove_instance_variable, :@attribute_mapping_to)
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
it "should create a hash where the key is the puppet property and the value is a hash with the aix property and the conversion method" do
|
53
|
-
hash = provider.class.attribute_mapping_to
|
54
|
-
expect(hash).to have_key :test_puppet_property
|
55
|
-
sub_hash = hash[:test_puppet_property]
|
56
|
-
expect(sub_hash).to have_key :key
|
57
|
-
expect(sub_hash).to have_key :method
|
58
|
-
expect(sub_hash[:key]).to eq(:test_aix_property)
|
59
|
-
expect(sub_hash[:method]).to eq(:test_convert_to_aix_method)
|
60
|
-
end
|
61
|
-
|
62
|
-
it "should cache results between calls" do
|
63
|
-
provider.class.expects(:attribute_mapping).returns(mapping).once
|
64
|
-
provider.class.attribute_mapping_to
|
65
|
-
provider.class.attribute_mapping_to
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
describe ".attribute_mapping_from" do
|
70
|
-
before(:each) do
|
71
|
-
if provider.class.instance_variable_defined? :@attribute_mapping_from
|
72
|
-
provider.class.send(:remove_instance_variable, :@attribute_mapping_from)
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
it "should create a hash where the key is the aix property and the value is a hash with the puppet property and the conversion method" do
|
77
|
-
hash = provider.class.attribute_mapping_from
|
78
|
-
expect(hash).to have_key :test_aix_property
|
79
|
-
sub_hash = hash[:test_aix_property]
|
80
|
-
expect(sub_hash).to have_key :key
|
81
|
-
expect(sub_hash).to have_key :method
|
82
|
-
expect(sub_hash[:key]).to eq(:test_puppet_property)
|
83
|
-
expect(sub_hash[:method]).to eq(:test_convert_to_puppet_method)
|
84
|
-
end
|
85
|
-
|
86
|
-
it "should cache results between calls" do
|
87
|
-
provider.class.expects(:attribute_mapping).returns(mapping).once
|
88
|
-
provider.class.attribute_mapping_from
|
89
|
-
provider.class.attribute_mapping_from
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
describe "#getinfo" do
|
95
|
-
it "should only execute the system command once" do
|
96
|
-
provider.stubs(:lscmd).returns "ls"
|
97
|
-
provider.expects(:execute).returns("bob=frank").once
|
98
|
-
provider.getinfo(true)
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|