puppetdb_foreman 3.0.2 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -3
- data/Rakefile +0 -0
- data/app/models/setting/puppetdb.rb +5 -1
- data/app/services/puppetdb.rb +18 -2
- data/app/services/puppetdb_client/base.rb +1 -2
- data/app/services/puppetdb_client/v1.rb +4 -0
- data/app/services/puppetdb_client/v3.rb +4 -0
- data/app/services/puppetdb_client/v4.rb +4 -0
- data/app/services/puppetdb_host.rb +1 -1
- data/app/views/api/v2/puppetdb_nodes/import.json.rabl +1 -1
- data/app/views/api/v2/puppetdb_nodes/unknown.json.rabl +1 -1
- data/db/migrate/20170717140010_migrate_puppetdb_api_version_setting.rb +11 -0
- data/lib/puppetdb_foreman/engine.rb +6 -0
- data/lib/puppetdb_foreman/version.rb +1 -1
- data/test/controllers/api/v2/puppetdb_nodes_controller_test.rb +4 -4
- data/test/controllers/nodes_controller_test.rb +3 -3
- data/test/models/host_test.rb +1 -1
- data/test/static_fixtures/query_nodes_v3_4.json +61 -0
- data/test/unit/puppetdb_test.rb +59 -1
- metadata +11 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0caa999450fb58ce6c2923534687870680804fdb
|
4
|
+
data.tar.gz: b62f62df85cfc07a2fe43b500526cd9f8ac13e46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f12ab8b9fd1d77c0ea9aad5a9acd3556f8ad11a28064ef42c1872a8bf92e9b388e3c38ce5fc3a59c1c96fe30a46ab097e761ca77962d9c7750f55556821a7969
|
7
|
+
data.tar.gz: 98bada2282f588ddda9b107047ec6ef4548665abbbad470cca09f826bc9395f8e51bb334230d1e951bc329a961ab896b9ea58ff23a77ae6cc070f0f6caabe09e
|
data/README.md
CHANGED
@@ -55,9 +55,10 @@ for PuppetDB 4
|
|
55
55
|
:enabled: true
|
56
56
|
:address: 'https://puppetdb:8081/pdb/cmd/v1'
|
57
57
|
:dashboard_address: 'http://puppetdb:8080/pdb/dashboard'
|
58
|
-
:
|
59
|
-
:
|
60
|
-
:
|
58
|
+
:ssl_ca_file: '/etc/puppetlabs/puppet/ssl/certs/ca.pem'
|
59
|
+
:ssl_certificate: '/etc/puppetlabs/puppet/ssl/certs/FQDN.pem'
|
60
|
+
:ssl_private_key: '/etc/puppetlabs/puppet/ssl/private_keys/FQDN.pem'
|
61
|
+
:api_version: 4
|
61
62
|
```
|
62
63
|
|
63
64
|
You can find the dashboard under Monitor > PuppetDB dashboard. Only administrators and users with a role `view_puppetdb_dashboard` will be able to access it. Aside from convenience, the PuppetDB dashboard cannot be served over HTTPS, you can restrict your dashboard requests to only Foreman boxes and serve it securely to your users through HTTPS in Foreman.
|
data/Rakefile
CHANGED
File without changes
|
@@ -3,6 +3,7 @@ class Setting::Puppetdb < ::Setting
|
|
3
3
|
BLANK_ATTRS << 'puppetdb_ssl_ca_file'
|
4
4
|
BLANK_ATTRS << 'puppetdb_ssl_certificate'
|
5
5
|
BLANK_ATTRS << 'puppetdb_ssl_private_key'
|
6
|
+
BLANK_ATTRS << 'puppetdb_api_version'
|
6
7
|
|
7
8
|
def self.default_settings
|
8
9
|
if SETTINGS[:puppetdb].present?
|
@@ -12,6 +13,7 @@ class Setting::Puppetdb < ::Setting
|
|
12
13
|
default_ssl_ca_file = SETTINGS[:puppetdb][:ssl_ca_file]
|
13
14
|
default_ssl_certificate = SETTINGS[:puppetdb][:ssl_certificate]
|
14
15
|
default_ssl_private_key = SETTINGS[:puppetdb][:ssl_private_key]
|
16
|
+
default_api_version = SETTINGS[:puppetdb][:api_version]
|
15
17
|
end
|
16
18
|
|
17
19
|
default_enabled = false if default_enabled.nil?
|
@@ -20,6 +22,7 @@ class Setting::Puppetdb < ::Setting
|
|
20
22
|
default_ssl_ca_file ||= (SETTINGS[:ssl_ca_file]).to_s
|
21
23
|
default_ssl_certificate ||= (SETTINGS[:ssl_certificate]).to_s
|
22
24
|
default_ssl_private_key ||= (SETTINGS[:ssl_priv_key]).to_s
|
25
|
+
default_api_version ||= 4
|
23
26
|
|
24
27
|
[
|
25
28
|
set('puppetdb_enabled', _("Integration with PuppetDB, enabled will deactivate a host in PuppetDB when it's deleted in Foreman"), default_enabled),
|
@@ -27,7 +30,8 @@ class Setting::Puppetdb < ::Setting
|
|
27
30
|
set('puppetdb_dashboard_address', _('Foreman will proxy PuppetDB Performance Dashboard requests to this address'), default_dashboard_address),
|
28
31
|
set('puppetdb_ssl_ca_file', _('Foreman will send PuppetDB requests with this CA file'), default_ssl_ca_file),
|
29
32
|
set('puppetdb_ssl_certificate', _('Foreman will send PuppetDB requests with this certificate file'), default_ssl_certificate),
|
30
|
-
set('puppetdb_ssl_private_key', _('Foreman will send PuppetDB requests with this key file'), default_ssl_private_key)
|
33
|
+
set('puppetdb_ssl_private_key', _('Foreman will send PuppetDB requests with this key file'), default_ssl_private_key),
|
34
|
+
set('puppetdb_api_version', _('Foreman will use this PuppetDB API version'), default_api_version, N_('PuppetDB API Version'), nil, collection: proc { ::PuppetDB::API_VERSIONS })
|
31
35
|
]
|
32
36
|
end
|
33
37
|
|
data/app/services/puppetdb.rb
CHANGED
@@ -1,4 +1,10 @@
|
|
1
1
|
module Puppetdb
|
2
|
+
API_VERSIONS = {
|
3
|
+
'4' => 'v4: PuppetDB 2.3, 3.0, 3.1, 3.2, 4.0 (PE 3.8, 2015.2, 2015.3)',
|
4
|
+
'3' => 'v3: PuppetDB 1.5, 1.6 (PE 3.1, 3.2, 3.3)',
|
5
|
+
'2' => 'v2: PuppetDB 1.1, 1.2, 1.3, 1.4'
|
6
|
+
}.freeze
|
7
|
+
|
2
8
|
def self.client
|
3
9
|
options = {
|
4
10
|
:uri => uri,
|
@@ -6,13 +12,23 @@ module Puppetdb
|
|
6
12
|
:ssl_certificate_file => Setting[:puppetdb_ssl_certificate],
|
7
13
|
:ssl_private_key_file => Setting[:puppetdb_ssl_private_key]
|
8
14
|
}
|
9
|
-
|
15
|
+
|
16
|
+
case api_version
|
17
|
+
when 1
|
18
|
+
PuppetdbClient::V1.new(options)
|
19
|
+
when 3
|
10
20
|
PuppetdbClient::V3.new(options)
|
21
|
+
when 4
|
22
|
+
PuppetdbClient::V4.new(options)
|
11
23
|
else
|
12
|
-
|
24
|
+
raise Foreman::Exception, N_('Unsupported PuppetDB version.')
|
13
25
|
end
|
14
26
|
end
|
15
27
|
|
28
|
+
def self.api_version
|
29
|
+
Setting[:puppetdb_api_version].to_i
|
30
|
+
end
|
31
|
+
|
16
32
|
def self.uri
|
17
33
|
URI.parse(Setting[:puppetdb_address])
|
18
34
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class MigratePuppetdbApiVersionSetting < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
puppetdb_address = Setting.where(:category => 'Setting::Puppetdb', :name => 'puppetdb_address').first.try(:value)
|
4
|
+
return unless puppetdb_address
|
5
|
+
|
6
|
+
api_version = URI.parse(puppetdb_address).path.start_with?('/pdb') ? 3 : 1
|
7
|
+
setting = Setting.where(:category => 'Setting::Puppetdb', :name => 'puppetdb_api_version').first_or_create
|
8
|
+
setting.value = api_version
|
9
|
+
setting.save
|
10
|
+
end
|
11
|
+
end
|
@@ -10,6 +10,12 @@ module PuppetdbForeman
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
+
initializer 'puppetdb_foreman.load_app_instance_data' do |app|
|
14
|
+
PuppetdbForeman::Engine.paths['db/migrate'].existent.each do |path|
|
15
|
+
app.config.paths['db/migrate'] << path
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
13
19
|
initializer 'puppetdb_foreman.register_plugin', :before => :finisher_hook do |_app|
|
14
20
|
Foreman::Plugin.register :puppetdb_foreman do
|
15
21
|
requires_foreman '>= 1.11'
|
@@ -9,7 +9,7 @@ class Api::V2::PuppetdbNodesControllerTest < ActionController::TestCase
|
|
9
9
|
|
10
10
|
context '#index' do
|
11
11
|
test 'lists puppetdb nodes unknown to foreman' do
|
12
|
-
::PuppetdbClient::
|
12
|
+
::PuppetdbClient::V4.any_instance.stubs(:query_nodes).returns(['one.example.com', 'two.example.com'])
|
13
13
|
get :index, {}, set_session_user
|
14
14
|
assert_response :success
|
15
15
|
response = ActiveSupport::JSON.decode(@response.body)
|
@@ -22,7 +22,7 @@ class Api::V2::PuppetdbNodesControllerTest < ActionController::TestCase
|
|
22
22
|
context '#unknown' do
|
23
23
|
test 'lists puppetdb nodes unknown to foreman' do
|
24
24
|
host = FactoryGirl.create(:host, :managed)
|
25
|
-
::PuppetdbClient::
|
25
|
+
::PuppetdbClient::V4.any_instance.stubs(:query_nodes).returns([host.name, 'two.example.com'])
|
26
26
|
get :unknown, {}, set_session_user
|
27
27
|
assert_response :success
|
28
28
|
response = ActiveSupport::JSON.decode(@response.body)
|
@@ -37,7 +37,7 @@ class Api::V2::PuppetdbNodesControllerTest < ActionController::TestCase
|
|
37
37
|
let(:uuid) { SecureRandom.uuid }
|
38
38
|
|
39
39
|
before do
|
40
|
-
::PuppetdbClient::
|
40
|
+
::PuppetdbClient::V4.any_instance.expects(:deactivate_node).with(node).returns(uuid)
|
41
41
|
end
|
42
42
|
|
43
43
|
test 'imports a host by puppetdb facts' do
|
@@ -54,7 +54,7 @@ class Api::V2::PuppetdbNodesControllerTest < ActionController::TestCase
|
|
54
54
|
let(:host) { FactoryGirl.create(:host) }
|
55
55
|
|
56
56
|
before do
|
57
|
-
::PuppetdbClient::
|
57
|
+
::PuppetdbClient::V4.any_instance.expects(:facts).with(node).returns({})
|
58
58
|
PuppetdbHost.any_instance.expects(:to_host).returns(host)
|
59
59
|
end
|
60
60
|
|
@@ -12,7 +12,7 @@ class NodesControllerTest < ActionController::TestCase
|
|
12
12
|
context '#index' do
|
13
13
|
test 'lists puppetdb nodes unknown to foreman' do
|
14
14
|
host = FactoryGirl.create(:host, :managed)
|
15
|
-
::PuppetdbClient::
|
15
|
+
::PuppetdbClient::V4.any_instance.stubs(:query_nodes).returns([host.name, 'two.example.com'])
|
16
16
|
get :index, {}, set_session_user
|
17
17
|
assert_response :success
|
18
18
|
refute response.body =~ /#{host.name}/m
|
@@ -23,7 +23,7 @@ class NodesControllerTest < ActionController::TestCase
|
|
23
23
|
context '#destroy' do
|
24
24
|
let(:node) { 'test.example.com' }
|
25
25
|
test 'deactivating a node in puppetdb' do
|
26
|
-
::PuppetdbClient::
|
26
|
+
::PuppetdbClient::V4.any_instance.expects(:deactivate_node).with(node).returns(true)
|
27
27
|
delete :destroy, { :id => node }, set_session_user
|
28
28
|
assert_response :found
|
29
29
|
assert_redirected_to puppetdb_foreman_nodes_path
|
@@ -38,7 +38,7 @@ class NodesControllerTest < ActionController::TestCase
|
|
38
38
|
let(:host) { FactoryGirl.create(:host) }
|
39
39
|
|
40
40
|
before do
|
41
|
-
::PuppetdbClient::
|
41
|
+
::PuppetdbClient::V4.any_instance.expects(:facts).with(node).returns({})
|
42
42
|
PuppetdbHost.any_instance.expects(:to_host).returns(host)
|
43
43
|
end
|
44
44
|
|
data/test/models/host_test.rb
CHANGED
@@ -25,7 +25,7 @@ class HostTest < ActiveSupport::TestCase
|
|
25
25
|
end
|
26
26
|
|
27
27
|
test '#delPuppetdb' do
|
28
|
-
::PuppetdbClient::
|
28
|
+
::PuppetdbClient::V4.any_instance.expects(:deactivate_node).with(host.name).returns(true)
|
29
29
|
host.send(:delPuppetdb)
|
30
30
|
end
|
31
31
|
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
[ {
|
2
|
+
"certname" : "server1.example.com",
|
3
|
+
"deactivated" : null,
|
4
|
+
"catalog_timestamp" : "2017-04-20T15:07:27.114Z",
|
5
|
+
"facts_timestamp" : "2017-04-20T15:06:52.738Z",
|
6
|
+
"report_timestamp" : null
|
7
|
+
}, {
|
8
|
+
"certname" : "server2.example.com",
|
9
|
+
"deactivated" : null,
|
10
|
+
"catalog_timestamp" : "2017-04-20T15:06:28.282Z",
|
11
|
+
"facts_timestamp" : "2017-04-20T15:06:12.253Z",
|
12
|
+
"report_timestamp" : null
|
13
|
+
}, {
|
14
|
+
"certname" : "server3.example.com",
|
15
|
+
"deactivated" : null,
|
16
|
+
"catalog_timestamp" : "2017-04-20T15:12:56.090Z",
|
17
|
+
"facts_timestamp" : "2017-04-20T15:12:32.117Z",
|
18
|
+
"report_timestamp" : null
|
19
|
+
}, {
|
20
|
+
"certname" : "server4.example.com",
|
21
|
+
"deactivated" : null,
|
22
|
+
"catalog_timestamp" : "2017-04-20T15:04:01.154Z",
|
23
|
+
"facts_timestamp" : "2017-04-20T15:03:38.150Z",
|
24
|
+
"report_timestamp" : null
|
25
|
+
}, {
|
26
|
+
"certname" : "server5.example.com",
|
27
|
+
"deactivated" : null,
|
28
|
+
"catalog_timestamp" : "2017-04-20T15:20:06.853Z",
|
29
|
+
"facts_timestamp" : "2017-04-20T15:19:49.088Z",
|
30
|
+
"report_timestamp" : null
|
31
|
+
}, {
|
32
|
+
"certname" : "server6.example.com",
|
33
|
+
"deactivated" : null,
|
34
|
+
"catalog_timestamp" : "2017-04-20T15:21:11.520Z",
|
35
|
+
"facts_timestamp" : "2017-04-20T15:20:57.685Z",
|
36
|
+
"report_timestamp" : null
|
37
|
+
}, {
|
38
|
+
"certname" : "server7.example.com",
|
39
|
+
"deactivated" : null,
|
40
|
+
"catalog_timestamp" : "2017-04-20T15:15:37.033Z",
|
41
|
+
"facts_timestamp" : "2017-04-20T15:15:13.918Z",
|
42
|
+
"report_timestamp" : null
|
43
|
+
}, {
|
44
|
+
"certname" : "server8.example.com",
|
45
|
+
"deactivated" : null,
|
46
|
+
"catalog_timestamp" : "2017-04-20T15:19:18.236Z",
|
47
|
+
"facts_timestamp" : "2017-04-20T15:19:02.659Z",
|
48
|
+
"report_timestamp" : null
|
49
|
+
}, {
|
50
|
+
"certname" : "server9.example.com",
|
51
|
+
"deactivated" : null,
|
52
|
+
"catalog_timestamp" : "2017-04-20T14:39:35.070Z",
|
53
|
+
"facts_timestamp" : "2017-04-20T14:39:19.003Z",
|
54
|
+
"report_timestamp" : null
|
55
|
+
}, {
|
56
|
+
"certname" : "server10.example.com",
|
57
|
+
"deactivated" : null,
|
58
|
+
"catalog_timestamp" : "2017-04-20T15:17:06.209Z",
|
59
|
+
"facts_timestamp" : "2017-04-20T15:16:50.007Z",
|
60
|
+
"report_timestamp" : null
|
61
|
+
} ]
|
data/test/unit/puppetdb_test.rb
CHANGED
@@ -12,6 +12,7 @@ class PuppetdbTest < ActiveSupport::TestCase
|
|
12
12
|
|
13
13
|
context 'with V1 API' do
|
14
14
|
setup do
|
15
|
+
Setting[:puppetdb_api_version] = 1
|
15
16
|
Setting[:puppetdb_address] = 'https://localhost:8080/v3/commands'
|
16
17
|
end
|
17
18
|
|
@@ -48,6 +49,10 @@ class PuppetdbTest < ActiveSupport::TestCase
|
|
48
49
|
end
|
49
50
|
|
50
51
|
context 'with V3 API' do
|
52
|
+
setup do
|
53
|
+
Setting[:puppetdb_api_version] = 3
|
54
|
+
end
|
55
|
+
|
51
56
|
let(:producer_timestamp) { Time.now.iso8601.to_s }
|
52
57
|
|
53
58
|
test 'deactivate_node' do
|
@@ -64,7 +69,48 @@ class PuppetdbTest < ActiveSupport::TestCase
|
|
64
69
|
test 'query_nodes' do
|
65
70
|
stub_request(:get, 'https://puppetdb:8081/pdb/query/v4/nodes')
|
66
71
|
.with(:headers => { 'Accept' => 'application/json' })
|
67
|
-
.to_return(:status => 200, :body => fixture('
|
72
|
+
.to_return(:status => 200, :body => fixture('query_nodes_v3_4.json'), :headers => { 'Content-Type' => 'application/json; charset=utf-8' })
|
73
|
+
expected = (1..10).map { |i| "server#{i}.example.com" }
|
74
|
+
assert_equal expected, client.query_nodes
|
75
|
+
end
|
76
|
+
|
77
|
+
test 'facts' do
|
78
|
+
stub_request(:get, 'https://puppetdb:8081/pdb/query/v4/facts?query=%5B%22=%22,%20%22certname%22,%20%22host.example.com%22%5D')
|
79
|
+
.with(:headers => { 'Accept' => 'application/json' })
|
80
|
+
.to_return(:status => 200, :body => fixture('facts.json'), :headers => { 'Content-Type' => 'application/json; charset=utf-8' })
|
81
|
+
facts = client.facts('host.example.com')
|
82
|
+
assert_kind_of Array, facts
|
83
|
+
sample = {
|
84
|
+
'value' => 'CEST',
|
85
|
+
'name' => 'timezone',
|
86
|
+
'certname' => 'host.example.com'
|
87
|
+
}
|
88
|
+
assert_includes facts, sample
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
context 'with V4 API' do
|
93
|
+
setup do
|
94
|
+
Setting[:puppetdb_api_version] = 4
|
95
|
+
end
|
96
|
+
|
97
|
+
let(:producer_timestamp) { Time.now.iso8601.to_s }
|
98
|
+
|
99
|
+
test 'deactivate_node' do
|
100
|
+
client.stubs(:producer_timestamp).returns(producer_timestamp)
|
101
|
+
|
102
|
+
stub_request(:post, 'https://puppetdb:8081/pdb/cmd/v1')
|
103
|
+
.with(:body => "{\"command\":\"deactivate node\",\"version\":3,\"payload\":{\"certname\":\"www.example.com\",\"producer_timestamp\":\"#{producer_timestamp}\"}}",
|
104
|
+
:headers => { 'Accept' => 'application/json', 'Content-Type' => 'application/json' })
|
105
|
+
.to_return(:status => 200, :body => "{\"uuid\" : \"#{uuid}\"}", :headers => { 'Content-Type' => 'application/json; charset=utf-8' })
|
106
|
+
|
107
|
+
assert_equal uuid, client.deactivate_node('www.example.com')
|
108
|
+
end
|
109
|
+
|
110
|
+
test 'query_nodes' do
|
111
|
+
stub_request(:get, 'https://puppetdb:8081/pdb/query/v4/nodes')
|
112
|
+
.with(:headers => { 'Accept' => 'application/json' })
|
113
|
+
.to_return(:status => 200, :body => fixture('query_nodes_v3_4.json'), :headers => { 'Content-Type' => 'application/json; charset=utf-8' })
|
68
114
|
expected = (1..10).map { |i| "server#{i}.example.com" }
|
69
115
|
assert_equal expected, client.query_nodes
|
70
116
|
end
|
@@ -83,4 +129,16 @@ class PuppetdbTest < ActiveSupport::TestCase
|
|
83
129
|
assert_includes facts, sample
|
84
130
|
end
|
85
131
|
end
|
132
|
+
|
133
|
+
context 'when the puppetdb version is not supported' do
|
134
|
+
setup do
|
135
|
+
Setting[:puppetdb_api_version] = -10
|
136
|
+
end
|
137
|
+
|
138
|
+
test 'it raises error about unsupported version' do
|
139
|
+
assert_raises Foreman::Exception do
|
140
|
+
client
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
86
144
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppetdb_foreman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Lobato Garcia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: rubocop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.49.1
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.49.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rdoc
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -88,6 +88,7 @@ files:
|
|
88
88
|
- app/services/puppetdb_client/base.rb
|
89
89
|
- app/services/puppetdb_client/v1.rb
|
90
90
|
- app/services/puppetdb_client/v3.rb
|
91
|
+
- app/services/puppetdb_client/v4.rb
|
91
92
|
- app/services/puppetdb_host.rb
|
92
93
|
- app/views/api/v2/puppetdb_nodes/import.json.rabl
|
93
94
|
- app/views/api/v2/puppetdb_nodes/index.json.rabl
|
@@ -95,6 +96,7 @@ files:
|
|
95
96
|
- app/views/puppetdb_foreman/nodes/index.html.erb
|
96
97
|
- app/views/puppetdb_foreman/puppetdb/error.html.erb
|
97
98
|
- config/routes.rb
|
99
|
+
- db/migrate/20170717140010_migrate_puppetdb_api_version_setting.rb
|
98
100
|
- lib/puppetdb_foreman.rb
|
99
101
|
- lib/puppetdb_foreman/engine.rb
|
100
102
|
- lib/puppetdb_foreman/version.rb
|
@@ -104,6 +106,7 @@ files:
|
|
104
106
|
- test/models/host_test.rb
|
105
107
|
- test/static_fixtures/facts.json
|
106
108
|
- test/static_fixtures/query_nodes.json
|
109
|
+
- test/static_fixtures/query_nodes_v3_4.json
|
107
110
|
- test/test_plugin_helper.rb
|
108
111
|
- test/unit/puppetdb_host_test.rb
|
109
112
|
- test/unit/puppetdb_test.rb
|
@@ -127,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
130
|
version: '0'
|
128
131
|
requirements: []
|
129
132
|
rubyforge_project:
|
130
|
-
rubygems_version: 2.6.
|
133
|
+
rubygems_version: 2.6.12
|
131
134
|
signing_key:
|
132
135
|
specification_version: 4
|
133
136
|
summary: This is a Foreman plugin to interact with PuppetDB.
|
@@ -137,6 +140,7 @@ test_files:
|
|
137
140
|
- test/models/host_test.rb
|
138
141
|
- test/static_fixtures/facts.json
|
139
142
|
- test/static_fixtures/query_nodes.json
|
143
|
+
- test/static_fixtures/query_nodes_v3_4.json
|
140
144
|
- test/test_plugin_helper.rb
|
141
145
|
- test/unit/puppetdb_host_test.rb
|
142
146
|
- test/unit/puppetdb_test.rb
|