puppetdb_foreman 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/puppetdb_foreman/puppetdb_controller.rb +7 -0
- data/app/models/puppetdb_foreman/host_extensions.rb +0 -16
- data/app/views/puppetdb_foreman/puppetdb/error.html.erb +1 -1
- data/lib/puppetdb_foreman/engine.rb +0 -15
- data/lib/puppetdb_foreman.rb +0 -16
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a81b111e883eae3b66330a375019b9f65227baa
|
4
|
+
data.tar.gz: 3611a9e15096142d581d8c35eef162b23050d0d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca1268d68b4d4fc521f4bd6cc79efdb2bb9a3e0823067a1ad50b8c52b6dfa2268a9dd968b729b82baf6b3614b03a5cdb865d8e612e63fd4ca579aed914e6e1dc
|
7
|
+
data.tar.gz: 23f80d5b4ae21f6ecfc96630f7d36699d1ce5a11144347fe2f0e33ffab154a37fd1bbcad52bb71f6056fc0bab9f7bf96802283a878bd2cdf6f84cfc243508940
|
@@ -12,6 +12,13 @@ module PuppetdbForeman
|
|
12
12
|
result = Net::HTTP.get_response(uri.host, puppetdb_url, uri.port)
|
13
13
|
render :text => result.body, :layout => layout
|
14
14
|
rescue SocketError => error
|
15
|
+
@proxy_error = "Problem connecting to host #{uri.host} on port #{uri.port}"
|
16
|
+
render :action => :error, :layout => true
|
17
|
+
rescue Errno::ECONNREFUSED => error
|
18
|
+
@proxy_error = "#{uri.host} refused our conneciton"
|
19
|
+
render :action => :error, :layout => true
|
20
|
+
rescue EOFError => error
|
21
|
+
@proxy_error = "Don't use ssl (https)"
|
15
22
|
render :action => :error, :layout => true
|
16
23
|
end
|
17
24
|
end
|
@@ -1,19 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2013 CERN, Switzerland
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
# you may not use this file except in compliance with the License.
|
6
|
-
# You may obtain a copy of the License at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
# See the License for the specific language governing permissions and
|
14
|
-
# limitations under the License.
|
15
|
-
|
16
|
-
|
17
1
|
module PuppetdbForeman
|
18
2
|
module HostExtensions
|
19
3
|
extend ActiveSupport::Concern
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<div class="alert alert-block alert-warning">
|
2
|
-
<p><strong><%= _("Notice") %></strong> <%= _("Error Proxying PuppetDB Dashboard") %></p>
|
2
|
+
<p><strong><%= _("Notice") %></strong> <%= _("Error Proxying PuppetDB Dashboard: #{@proxy_error}") %></p>
|
3
3
|
<p><%= _("Maybe you need to set") %> <%= link_to(_("puppetdb_dashboard_address"), settings_path(:search => 'puppetdb_dashboard_address')) %> <%= _("in Settings") %></p>
|
4
4
|
</div>
|
@@ -1,18 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2013 CERN, Switzerland
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
# you may not use this file except in compliance with the License.
|
6
|
-
# You may obtain a copy of the License at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
# See the License for the specific language governing permissions and
|
14
|
-
# limitations under the License.
|
15
|
-
|
16
1
|
module PuppetdbForeman
|
17
2
|
class Engine < ::Rails::Engine
|
18
3
|
|
data/lib/puppetdb_foreman.rb
CHANGED
@@ -1,19 +1,3 @@
|
|
1
|
-
#
|
2
|
-
# Copyright 2013 CERN, Switzerland
|
3
|
-
#
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
# you may not use this file except in compliance with the License.
|
6
|
-
# You may obtain a copy of the License at
|
7
|
-
#
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
#
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
# See the License for the specific language governing permissions and
|
14
|
-
# limitations under the License.
|
15
|
-
#
|
16
|
-
|
17
1
|
module PuppetdbForeman
|
18
2
|
require 'puppetdb_foreman/engine' if defined?(Rails) && Rails::VERSION::MAJOR == 3
|
19
3
|
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: 0.1.
|
4
|
+
version: 0.1.2
|
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: 2014-
|
11
|
+
date: 2014-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'Disable hosts on PuppetDB after they are deleted or built in Foreman,
|
14
14
|
and proxy the PuppetDB dashboard to Foreman. Follow https://github.com/theforeman/puppetdb_foreman
|
@@ -28,7 +28,7 @@ files:
|
|
28
28
|
- lib/puppetdb_foreman/engine.rb
|
29
29
|
homepage: http://www.github.com/theforeman/puppetdb_foreman
|
30
30
|
licenses:
|
31
|
-
-
|
31
|
+
- GPL-3
|
32
32
|
metadata: {}
|
33
33
|
post_install_message:
|
34
34
|
rdoc_options: []
|