puppetdb_query 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/puppetdb_query/to_mongo.rb +6 -0
- data/lib/puppetdb_query/updater.rb +6 -3
- data/lib/puppetdb_query/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fa2048576d21df343ea568b1c52851d45e967de
|
4
|
+
data.tar.gz: 7bb2731ef4c718a00c9c485ad5383a3e480a4f59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38290e90316fb047076863bd8d44f601cb8c3d65b7a4277a5c13efe4b3767fc5e36c4885b24a277f48fdb082970fbcd704326360db141b021600f7d6a4507cf0
|
7
|
+
data.tar.gz: 74a70703c7c9c0ebeec8d246dab7868a82b65839512290787b0a11f11b9de690124209882b4eff0c3c998dc846836ae2aab8468d1d10fd6bbbbe62334c89b5ed
|
data/README.md
CHANGED
@@ -37,6 +37,12 @@ module PuppetDBQuery
|
|
37
37
|
{ :$and => terms }
|
38
38
|
when :or
|
39
39
|
{ :$or => terms }
|
40
|
+
when :not
|
41
|
+
# $not currently (<=2.5.1) only supports negating equality operators.
|
42
|
+
# so you can do { field: { $not : { [$eq,$gt,$lt,...] } }
|
43
|
+
# but there is no way to negate an entire expression.
|
44
|
+
# see https://jira.mongodb.org/browse/SERVER-10708
|
45
|
+
{ :$nor => terms }
|
40
46
|
when :equal
|
41
47
|
{ term.args[0] => term.args[1].to_s }
|
42
48
|
when :not_equal
|
@@ -16,7 +16,7 @@ module PuppetDBQuery
|
|
16
16
|
# update by deleting missing nodes and iterating over all nodes and
|
17
17
|
# update or insert facts for each one
|
18
18
|
#
|
19
|
-
#
|
19
|
+
# mongo: 1598 nodes in 63.46 seconds
|
20
20
|
def update1
|
21
21
|
logger.info "update1 started (full update)"
|
22
22
|
tsb = Time.now
|
@@ -40,7 +40,7 @@ module PuppetDBQuery
|
|
40
40
|
# update by deleting missing nodes and get a complete map of nodes with facts
|
41
41
|
# and update or insert facts for each one
|
42
42
|
#
|
43
|
-
#
|
43
|
+
# mongo: 1597 nodes in 35.31 seconds
|
44
44
|
def update2
|
45
45
|
logger.info "update2 started (full update)"
|
46
46
|
tsb = Time.now
|
@@ -65,7 +65,7 @@ module PuppetDBQuery
|
|
65
65
|
# update by deleting missing nodes and getting a list of nodes
|
66
66
|
# with changed facts, iterate over them and update or insert facts for each one
|
67
67
|
#
|
68
|
-
#
|
68
|
+
# mongo: 56 nodes in 2.62 seconds
|
69
69
|
def update3(last_update_timestamp)
|
70
70
|
logger.info "update3 started (incremental)"
|
71
71
|
tsb = Time.now
|
@@ -87,6 +87,9 @@ module PuppetDBQuery
|
|
87
87
|
destination.meta_fact_update("update3", tsb, tse) unless errors
|
88
88
|
end
|
89
89
|
|
90
|
+
# update node update information
|
91
|
+
#
|
92
|
+
# mongo: 1602 nodes in 0.42 seconds
|
90
93
|
def update_node_properties
|
91
94
|
logger.info "update_node_properties started"
|
92
95
|
tsb = Time.now
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppetdb_query
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Meyling
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|