foreman_discovery 18.0.4 → 18.0.5
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a6708c354c29e3e5f53cf0368d5e3fbaa2b478a61f54c8fd93a321e24f45df7
|
4
|
+
data.tar.gz: f1ba15c2d1c069dd694ec9356765c78eb58b8b1fb9b41f28d5d33722c074017b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 910af2e79a1ddde6022df9a851eabc357da0f79e2d7bae2c1106c8413cab21b70dd9a1e6b0f5c66ecedb2c39a3a768f19f071962b9d28a46e66556489f374fe0
|
7
|
+
data.tar.gz: ff026ad7368f99a13e847263771c8f5e53ae6f9ee756b52d2ea3cb51b61219f6184f2600d216c534fe74c8c19dcb807e8c146881083c78a98adecb5a4ad74eb3
|
@@ -1,6 +1,9 @@
|
|
1
1
|
module Foreman::Controller::Parameters::DiscoveredHost
|
2
2
|
extend ActiveSupport::Concern
|
3
3
|
include Foreman::Controller::Parameters::Host
|
4
|
+
if defined?(ForemanPuppet)
|
5
|
+
include ForemanPuppet::Extensions::ParametersHost
|
6
|
+
end
|
4
7
|
|
5
8
|
class_methods do
|
6
9
|
def discovered_host_params_filter
|
@@ -9,23 +12,32 @@ module Foreman::Controller::Parameters::DiscoveredHost
|
|
9
12
|
|
10
13
|
add_host_base_params_filter(filter)
|
11
14
|
add_host_common_params_filter(filter)
|
15
|
+
add_host_puppet_params_filter(filter) if defined?(ForemanPuppet)
|
12
16
|
end
|
13
17
|
end
|
14
18
|
end
|
15
19
|
|
16
20
|
def discovered_host_params
|
17
|
-
self.class.discovered_host_params_filter.filter_params(params, parameter_filter_context)
|
21
|
+
filtered_params = self.class.discovered_host_params_filter.filter_params(params, parameter_filter_context)
|
22
|
+
process_deprecated_puppet_params!(filtered_params) if defined?(ForemanPuppet)
|
23
|
+
filtered_params
|
18
24
|
end
|
19
25
|
|
20
26
|
def discovered_host_params_host
|
21
|
-
self.class.discovered_host_params_filter.filter_params(params, parameter_filter_context, :host)
|
27
|
+
filtered_params = self.class.discovered_host_params_filter.filter_params(params, parameter_filter_context, :host)
|
28
|
+
process_deprecated_puppet_params!(filtered_params) if defined?(ForemanPuppet)
|
29
|
+
filtered_params
|
22
30
|
end
|
23
31
|
|
24
32
|
def managed_host_params_host
|
25
|
-
self.class.host_params_filter.filter_params(params, parameter_filter_context, :host)
|
33
|
+
filtered_params = self.class.host_params_filter.filter_params(params, parameter_filter_context, :host)
|
34
|
+
process_deprecated_puppet_params!(filtered_params) if defined?(ForemanPuppet)
|
35
|
+
filtered_params
|
26
36
|
end
|
27
37
|
|
28
38
|
def managed_host_params
|
29
|
-
self.class.host_params_filter.filter_params(params, parameter_filter_context)
|
39
|
+
filtered_params = self.class.host_params_filter.filter_params(params, parameter_filter_context)
|
40
|
+
process_deprecated_puppet_params!(filtered_params) if defined?(ForemanPuppet)
|
41
|
+
filtered_params
|
30
42
|
end
|
31
43
|
end
|
@@ -15,7 +15,10 @@ class DiscoveredHostsController < ::ApplicationController
|
|
15
15
|
|
16
16
|
helper :hosts
|
17
17
|
if defined?(ForemanPuppet)
|
18
|
+
helper ForemanPuppet::HostsHelper
|
18
19
|
helper ForemanPuppet::HostsAndHostgroupsHelper
|
20
|
+
helper ForemanPuppet::PuppetclassesHelper
|
21
|
+
helper ForemanPuppet::PuppetclassLookupKeysHelper
|
19
22
|
end
|
20
23
|
|
21
24
|
layout 'layouts/application'
|
@@ -14,7 +14,14 @@ module ForemanDiscovery
|
|
14
14
|
def call
|
15
15
|
return unless ip
|
16
16
|
|
17
|
-
|
17
|
+
begin
|
18
|
+
subnet = Subnet.unscoped.subnet_for(ip)
|
19
|
+
rescue Exception => e
|
20
|
+
Rails.logger.error "Error while detecting subnet for IP #{ip}"
|
21
|
+
Foreman::Logging.exception "Unable to detect subnet", e
|
22
|
+
subnet = nil
|
23
|
+
end
|
24
|
+
|
18
25
|
if subnet
|
19
26
|
Rails.logger.info "Detected #{kind} subnet: #{subnet} with taxonomy #{subnet.organizations.collect(&:name)}/#{subnet.locations.collect(&:name)}"
|
20
27
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_discovery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 18.0.
|
4
|
+
version: 18.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aditi Puntambekar
|
@@ -74,7 +74,7 @@ authors:
|
|
74
74
|
autorequire:
|
75
75
|
bindir: bin
|
76
76
|
cert_chain: []
|
77
|
-
date: 2021-
|
77
|
+
date: 2021-11-23 00:00:00.000000000 Z
|
78
78
|
dependencies: []
|
79
79
|
description: MaaS Discovery Plugin engine for Foreman
|
80
80
|
email: gsutclif@redhat.com
|