openvox 8.31.0 → 9.0.0.pre.alpha2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -111
- data/Gemfile +5 -5
- data/Rakefile +2 -3
- data/ext/redhat/client.sysconfig +0 -1
- data/lib/puppet/agent.rb +7 -79
- data/lib/puppet/application/ssl.rb +6 -7
- data/lib/puppet/defaults.rb +4 -2
- data/lib/puppet/face/epp.rb +1 -1
- data/lib/puppet/face/parser.rb +1 -1
- data/lib/puppet/feature/base.rb +1 -1
- data/lib/puppet/functions/tree_each.rb +1 -1
- data/lib/puppet/generate/type.rb +2 -6
- data/lib/puppet/indirector/facts/facter.rb +12 -13
- data/lib/puppet/node/server_facts.rb +0 -6
- data/lib/puppet/pal/json_catalog_encoder.rb +1 -1
- data/lib/puppet/pops/evaluator/deferred_resolver.rb +1 -4
- data/lib/puppet/pops/lookup/sub_lookup.rb +0 -3
- data/lib/puppet/pops/serialization/to_data_converter.rb +1 -1
- data/lib/puppet/provider/package/pacman.rb +1 -1
- data/lib/puppet/provider/package/puppetserver_gem.rb +1 -4
- data/lib/puppet/reference/metaparameter.rb +1 -1
- data/lib/puppet/resource/type.rb +8 -8
- data/lib/puppet/ssl/state_machine.rb +0 -6
- data/lib/puppet/type/file/ensure.rb +5 -14
- data/lib/puppet/util/json.rb +3 -15
- data/lib/puppet/util/rdoc/generators/puppet_generator.rb +902 -0
- data/lib/puppet/util/rdoc/generators/template/puppet/puppet.rb +1068 -0
- data/lib/puppet/util/rdoc.rb +3 -6
- data/lib/puppet/util/selinux.rb +1 -16
- data/lib/puppet/util.rb +6 -5
- data/lib/puppet/version.rb +1 -1
- data/tasks/vox.rake +2 -2
- metadata +6 -10
data/lib/puppet/resource/type.rb
CHANGED
|
@@ -34,13 +34,13 @@ class Puppet::Resource::Type
|
|
|
34
34
|
EMPTY_ARRAY = [].freeze
|
|
35
35
|
|
|
36
36
|
LOOKAROUND_OPERATORS = {
|
|
37
|
-
"(" => '
|
|
38
|
-
"?" => "
|
|
39
|
-
"<" => "
|
|
40
|
-
">" => "
|
|
41
|
-
"!" => "
|
|
42
|
-
"=" => "
|
|
43
|
-
")" => '
|
|
37
|
+
"(" => 'LP',
|
|
38
|
+
"?" => "QU",
|
|
39
|
+
"<" => "LT",
|
|
40
|
+
">" => "GT",
|
|
41
|
+
"!" => "EX",
|
|
42
|
+
"=" => "EQ",
|
|
43
|
+
")" => 'RP'
|
|
44
44
|
}.freeze
|
|
45
45
|
|
|
46
46
|
attr_accessor :file, :line, :doc, :code, :parent, :resource_type_collection, :override
|
|
@@ -206,7 +206,7 @@ class Puppet::Resource::Type
|
|
|
206
206
|
|
|
207
207
|
def name
|
|
208
208
|
if type == :node && name_is_regex?
|
|
209
|
-
# Normalize
|
|
209
|
+
# Normalize lookarround regex patthern
|
|
210
210
|
internal_name = @name.source.downcase.gsub(/\(\?[^)]*\)/) do |str|
|
|
211
211
|
str.gsub(/./) { |ch| LOOKAROUND_OPERATORS[ch] || ch }
|
|
212
212
|
end
|
|
@@ -121,10 +121,6 @@ class Puppet::SSL::StateMachine
|
|
|
121
121
|
rescue Puppet::HTTP::ResponseError => e
|
|
122
122
|
if e.response.code == 304
|
|
123
123
|
Puppet.info(_("CA certificate is unmodified, using existing CA certificate"))
|
|
124
|
-
# 304 confirms the local CA is current, so reset the TTL.
|
|
125
|
-
# Otherwise ca_last_update (backed by ca.pem mtime) never advances
|
|
126
|
-
# past the initial download and needs_refresh? triggers on every run.
|
|
127
|
-
@cert_provider.ca_last_update = Time.now
|
|
128
124
|
else
|
|
129
125
|
Puppet.info(_("Failed to refresh CA certificate, using existing CA certificate: %{message}") % { message: e.message })
|
|
130
126
|
end
|
|
@@ -223,8 +219,6 @@ class Puppet::SSL::StateMachine
|
|
|
223
219
|
rescue Puppet::HTTP::ResponseError => e
|
|
224
220
|
if e.response.code == 304
|
|
225
221
|
Puppet.info(_("CRL is unmodified, using existing CRL"))
|
|
226
|
-
# 304 confirms the local CRL is current, so reset the TTL.
|
|
227
|
-
@cert_provider.crl_last_update = Time.now
|
|
228
222
|
else
|
|
229
223
|
Puppet.info(_("Failed to refresh CRL, using existing CRL: %{message}") % { message: e.message })
|
|
230
224
|
end
|
|
@@ -86,21 +86,12 @@ module Puppet
|
|
|
86
86
|
raise Puppet::Error,
|
|
87
87
|
"Cannot create #{@resource[:path]}; parent directory #{parent} does not exist"
|
|
88
88
|
end
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
Dir.mkdir(@resource[:path], symbolic_mode_to_int(mode, 0o755, true))
|
|
93
|
-
end
|
|
94
|
-
else
|
|
95
|
-
Dir.mkdir(@resource[:path])
|
|
89
|
+
if mode
|
|
90
|
+
Puppet::Util.withumask(0o00) do
|
|
91
|
+
Dir.mkdir(@resource[:path], symbolic_mode_to_int(mode, 0o755, true))
|
|
96
92
|
end
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
# really is a directory now, treat that as success.
|
|
100
|
-
#
|
|
101
|
-
# Directory mode, and other properties, will be checked and enforced by
|
|
102
|
-
# the call to `property_fix`.
|
|
103
|
-
raise unless Puppet::FileSystem.directory?(@resource[:path])
|
|
93
|
+
else
|
|
94
|
+
Dir.mkdir(@resource[:path])
|
|
104
95
|
end
|
|
105
96
|
@resource.send(:property_fix)
|
|
106
97
|
return :directory_created
|
data/lib/puppet/util/json.rb
CHANGED
|
@@ -18,14 +18,6 @@ module Puppet::Util
|
|
|
18
18
|
|
|
19
19
|
require 'json'
|
|
20
20
|
|
|
21
|
-
# Generator options equivalent to the `JSON::PRETTY_STATE_PROTOTYPE`
|
|
22
|
-
# that json 2.x provided and json 3 removed.
|
|
23
|
-
PRETTY_OPTIONS = { :indent => ' ', :space => ' ', :object_nl => "\n", :array_nl => "\n" }.freeze
|
|
24
|
-
|
|
25
|
-
# Generator options that json 3 rejects as unknown. `quirks_mode` has been
|
|
26
|
-
# a no-op since json 2.0, when quirks mode became the only mode.
|
|
27
|
-
OBSOLETE_DUMP_OPTIONS = [:quirks_mode].freeze
|
|
28
|
-
|
|
29
21
|
# Load the content from a file as JSON if
|
|
30
22
|
# contents are in valid format. This method does not
|
|
31
23
|
# raise error but returns `nil` when invalid file is
|
|
@@ -49,20 +41,16 @@ module Puppet::Util
|
|
|
49
41
|
def self.load(string, options = {})
|
|
50
42
|
string = string.read if string.respond_to?(:read)
|
|
51
43
|
|
|
52
|
-
options = options.dup
|
|
53
44
|
options[:symbolize_names] = true if options.delete(:symbolize_keys)
|
|
54
|
-
|
|
55
|
-
::JSON.parse(string, **options)
|
|
45
|
+
::JSON.parse(string, options)
|
|
56
46
|
rescue JSON::ParserError => e
|
|
57
47
|
raise Puppet::Util::Json::ParseError.build(e, string)
|
|
58
48
|
end
|
|
59
49
|
|
|
60
50
|
def self.dump(object, options = {})
|
|
61
51
|
# Options is a state when we're being called recursively
|
|
62
|
-
|
|
63
|
-
options
|
|
64
|
-
OBSOLETE_DUMP_OPTIONS.each { |key| options.delete(key) }
|
|
65
|
-
options.merge!(PRETTY_OPTIONS) if options.delete(:pretty)
|
|
52
|
+
if !options.is_a?(JSON::State) && options.delete(:pretty)
|
|
53
|
+
options.merge!(::JSON::PRETTY_STATE_PROTOTYPE.to_h)
|
|
66
54
|
end
|
|
67
55
|
object.to_json(options)
|
|
68
56
|
end
|