quixoten-puppetdb-terminus 4.0.2 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2beeafd2b943f5158710e52f7259993967907f2
|
4
|
+
data.tar.gz: 36d572bb13b7fae7a36c7e63909caca5dff33a4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cef8319dc50e514dcbd3d8e2e30ce8315e455166c4fec1ae953ca81d2433f8510cb27ce4638d78820c458ef7ebff0468d36b5a92c23656b8e5a51d76187893d
|
7
|
+
data.tar.gz: 172206b91329c1f365af100a877ab2f10204af225840e88b837aa68604ba321f107423519c972fbc61bd9aeb10e5ae0c27644b2793687b2f7a7a896966a3d386
|
@@ -1,5 +1,9 @@
|
|
1
1
|
require 'puppet/util/puppetdb'
|
2
2
|
Puppet::Functions.create_function(:puppetdb_query) do
|
3
|
+
dispatch :puppetdb_query do
|
4
|
+
required_param 'Variant[String[1], Array[Data, 1]]', :query
|
5
|
+
end
|
6
|
+
|
3
7
|
def puppetdb_query(query)
|
4
8
|
Puppet::Util::Puppetdb.query_puppetdb(query)
|
5
9
|
end
|
@@ -38,7 +38,7 @@ Puppet::Reports.register_report(:puppetdb) do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
resources = build_resources_list
|
41
|
-
is_noop = resources.any? { |rs| has_noop_event?(rs) }
|
41
|
+
is_noop = resources.any? { |rs| has_noop_event?(rs) } && resources.none? { |rs| has_enforcement_event?(rs) }
|
42
42
|
|
43
43
|
|
44
44
|
defaulted_catalog_uuid = defined?(catalog_uuid) ? catalog_uuid : transaction_uuid
|
@@ -74,8 +74,8 @@ Puppet::Reports.register_report(:puppetdb) do
|
|
74
74
|
|
75
75
|
# @return TrueClass
|
76
76
|
# @api private
|
77
|
-
def
|
78
|
-
resource["events"].any? { |event| event["status"]
|
77
|
+
def has_enforcement_event?(resource)
|
78
|
+
resource["events"].any? { |event| event["status"] != 'noop' }
|
79
79
|
end
|
80
80
|
|
81
81
|
# @return Array[Hash]
|