foreman_discovery 22.0.2 → 23.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/foreman_discovery/locale/ca/foreman_discovery.js +847 -0
- data/app/assets/javascripts/foreman_discovery/locale/cs_CZ/foreman_discovery.js +847 -0
- data/app/assets/javascripts/foreman_discovery/locale/de/foreman_discovery.js +847 -0
- data/app/assets/javascripts/foreman_discovery/locale/en/foreman_discovery.js +846 -0
- data/app/assets/javascripts/foreman_discovery/locale/en_GB/foreman_discovery.js +847 -0
- data/app/assets/javascripts/foreman_discovery/locale/es/foreman_discovery.js +850 -0
- data/app/assets/javascripts/foreman_discovery/locale/fr/foreman_discovery.js +850 -0
- data/app/assets/javascripts/foreman_discovery/locale/gl/foreman_discovery.js +847 -0
- data/app/assets/javascripts/foreman_discovery/locale/it/foreman_discovery.js +847 -0
- data/app/assets/javascripts/foreman_discovery/locale/ja/foreman_discovery.js +844 -0
- data/app/assets/javascripts/foreman_discovery/locale/ka/foreman_discovery.js +847 -0
- data/app/assets/javascripts/foreman_discovery/locale/ko/foreman_discovery.js +847 -0
- data/app/assets/javascripts/foreman_discovery/locale/pt_BR/foreman_discovery.js +850 -0
- data/app/assets/javascripts/foreman_discovery/locale/ru/foreman_discovery.js +851 -0
- data/app/assets/javascripts/foreman_discovery/locale/sv_SE/foreman_discovery.js +847 -0
- data/app/assets/javascripts/foreman_discovery/locale/zh_CN/foreman_discovery.js +844 -0
- data/app/assets/javascripts/foreman_discovery/locale/zh_TW/foreman_discovery.js +847 -0
- data/app/controllers/discovered_hosts_controller.rb +5 -1
- data/app/helpers/discovered_hosts_helper.rb +9 -2
- data/app/models/host/discovered.rb +3 -3
- data/app/services/foreman_discovery/import_hooks/lock_templates.rb +1 -1
- data/app/services/foreman_discovery/node_api/node_resource.rb +5 -5
- data/app/services/foreman_discovery/ui_notifications/failed_discovery.rb +1 -1
- data/app/views/discovered_hosts/_discovered_host.html.erb +1 -1
- data/app/views/discovered_hosts/_discovered_hosts_list.html.erb +1 -1
- data/db/migrate/20221102065954_fix_discovery_settings_category_to_dsl.rb +1 -1
- data/db/migrate/20221102075151_migrate_discovery_hostname_and_fact_column_to_array.rb +13 -0
- data/extra/discover-host +1 -1
- data/lib/foreman_discovery/engine.rb +8 -20
- data/lib/foreman_discovery/version.rb +1 -1
- data/locale/ca/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ca/foreman_discovery.edit.po +1122 -0
- data/locale/ca/foreman_discovery.po +22 -10
- data/locale/cs_CZ/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/cs_CZ/foreman_discovery.edit.po +1120 -0
- data/locale/cs_CZ/foreman_discovery.po +846 -0
- data/locale/de/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/de/foreman_discovery.edit.po +1129 -0
- data/locale/de/foreman_discovery.po +22 -10
- data/locale/en/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/en/foreman_discovery.edit.po +1115 -0
- data/locale/en/foreman_discovery.po +19 -7
- data/locale/en_GB/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/en_GB/foreman_discovery.edit.po +1125 -0
- data/locale/en_GB/foreman_discovery.po +22 -10
- data/locale/es/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/es/foreman_discovery.edit.po +1130 -0
- data/locale/es/foreman_discovery.po +81 -65
- data/locale/foreman_discovery.pot +231 -211
- data/locale/fr/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/fr/foreman_discovery.edit.po +1126 -0
- data/locale/fr/foreman_discovery.po +35 -19
- data/locale/gl/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/gl/foreman_discovery.edit.po +1120 -0
- data/locale/gl/foreman_discovery.po +19 -7
- data/locale/it/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/it/foreman_discovery.edit.po +1123 -0
- data/locale/it/foreman_discovery.po +21 -8
- data/locale/ja/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ja/foreman_discovery.edit.po +1119 -0
- data/locale/ja/foreman_discovery.po +34 -22
- data/locale/ka/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ka/foreman_discovery.edit.po +1120 -0
- data/locale/ka/foreman_discovery.po +846 -0
- data/locale/ko/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ko/foreman_discovery.edit.po +1119 -0
- data/locale/ko/foreman_discovery.po +20 -8
- data/locale/pt_BR/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/pt_BR/foreman_discovery.edit.po +1132 -0
- data/locale/pt_BR/foreman_discovery.po +61 -45
- data/locale/ru/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ru/foreman_discovery.edit.po +1131 -0
- data/locale/ru/foreman_discovery.po +21 -9
- data/locale/sv_SE/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/sv_SE/foreman_discovery.edit.po +1123 -0
- data/locale/sv_SE/foreman_discovery.po +19 -7
- data/locale/zh_CN/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/zh_CN/foreman_discovery.edit.po +1117 -0
- data/locale/zh_CN/foreman_discovery.po +31 -19
- data/locale/zh_TW/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/zh_TW/foreman_discovery.edit.po +1120 -0
- data/locale/zh_TW/foreman_discovery.po +19 -7
- data/package.json +0 -1
- data/test/functional/api/v2/fact_value_extensions_test.rb +1 -1
- data/test/functional/discovered_hosts_controller_test.rb +1 -1
- data/test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb +75 -0
- data/test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb.orig +81 -0
- data/test/test_helper_discovery.rb +1 -1
- data/test/unit/discovery_attribute_set_test.rb +1 -1
- data/test/unit/host_discovered_test.rb +3 -3
- data/webpack/src/ForemanDiscovery/DiscoveryRules/Components/EmptyState/EmptyState.js +1 -1
- metadata +50 -8
- data/app/models/setting/discovered.rb +0 -22
@@ -5,7 +5,7 @@
|
|
5
5
|
# Translators:
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_discovery
|
8
|
+
"Project-Id-Version: foreman_discovery v22.0.4\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
10
|
"PO-Revision-Date: 2013-11-15 17:25+0000\n"
|
11
11
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
@@ -86,9 +86,6 @@ msgstr "複製 %s"
|
|
86
86
|
msgid "Collapse All"
|
87
87
|
msgstr "全部收回"
|
88
88
|
|
89
|
-
msgid "Command line options for kexec during PXE-less provisioning."
|
90
|
-
msgstr ""
|
91
|
-
|
92
89
|
msgid "Could not get facts from proxy %{url}: %{error}"
|
93
90
|
msgstr ""
|
94
91
|
|
@@ -175,7 +172,7 @@ msgstr ""
|
|
175
172
|
msgid "Discovered hosts summary"
|
176
173
|
msgstr ""
|
177
174
|
|
178
|
-
msgid "Discovery
|
175
|
+
msgid "Discovery"
|
179
176
|
msgstr ""
|
180
177
|
|
181
178
|
msgid "Discovery Proxy"
|
@@ -259,7 +256,7 @@ msgstr ""
|
|
259
256
|
msgid "Expected discovery_fact '%s' is missing, unable to detect primary interface and set hostname"
|
260
257
|
msgstr ""
|
261
258
|
|
262
|
-
msgid "Extra facter columns to show in host lists
|
259
|
+
msgid "Extra facter columns to show in host lists"
|
263
260
|
msgstr ""
|
264
261
|
|
265
262
|
msgid "Fact + prefix"
|
@@ -304,6 +301,9 @@ msgstr ""
|
|
304
301
|
msgid "Force DNS entries creation when provisioning discovered host"
|
305
302
|
msgstr ""
|
306
303
|
|
304
|
+
msgid "Foreman Discovery"
|
305
|
+
msgstr ""
|
306
|
+
|
307
307
|
msgid "Foreman discovered hosts summary"
|
308
308
|
msgstr ""
|
309
309
|
|
@@ -446,7 +446,7 @@ msgstr ""
|
|
446
446
|
msgid "List all fact values of a given discovered host"
|
447
447
|
msgstr ""
|
448
448
|
|
449
|
-
msgid "List of facts to use for the hostname (
|
449
|
+
msgid "List of facts to use for the hostname (first wins)"
|
450
450
|
msgstr ""
|
451
451
|
|
452
452
|
msgid "Location"
|
@@ -548,6 +548,18 @@ msgstr ""
|
|
548
548
|
msgid "One or more hosts have been discovered"
|
549
549
|
msgstr ""
|
550
550
|
|
551
|
+
msgid "One or more hosts with failed discovery due to error: %s"
|
552
|
+
msgstr ""
|
553
|
+
|
554
|
+
msgid "Option 'url' must be provided"
|
555
|
+
msgstr ""
|
556
|
+
|
557
|
+
msgid "Option 'url' must be valid URI: %s"
|
558
|
+
msgstr ""
|
559
|
+
|
560
|
+
msgid "Options must be hash"
|
561
|
+
msgstr ""
|
562
|
+
|
551
563
|
msgid "Organization"
|
552
564
|
msgstr "組織"
|
553
565
|
|
data/package.json
CHANGED
@@ -28,7 +28,7 @@ class DiscoveredHostsControllerTest < ActionController::TestCase
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def test_index_with_custom_column
|
31
|
-
Setting['discovery_fact_column'] = "bios_vendor"
|
31
|
+
Setting['discovery_fact_column'] = ["bios_vendor"]
|
32
32
|
facts = @facts.merge({"bios_vendor" => "QEMU"})
|
33
33
|
discover_host_from_facts(facts)
|
34
34
|
get :index, params: {}, session: set_session_user_default_reader
|
data/test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
require_relative '../test_plugin_helper'
|
2
|
+
require ForemanDiscovery::Engine.root.join('db/migrate/20221102075151_migrate_discovery_hostname_and_fact_column_to_array')
|
3
|
+
|
4
|
+
class MigrateDiscoveryHostnameAndFactColumnToArrayTest < ActiveSupport::TestCase
|
5
|
+
let(:migrations_paths) { ActiveRecord::Migrator.migrations_paths + [ForemanDiscovery::Engine.root.join('db/migrate/').to_s] }
|
6
|
+
|
7
|
+
let(:previous_version) { '20221102065954'.to_i }
|
8
|
+
let(:current_version) { '20221102075151'.to_i }
|
9
|
+
|
10
|
+
#only load the two migrations we care about (previous one and current one)
|
11
|
+
let(:migrations) do
|
12
|
+
[
|
13
|
+
ActiveRecord::MigrationProxy.new("FixDiscoverySettingsCategoryToDsl", previous_version, "#{ForemanDiscovery::Engine.root}/db/migrate/20221102065954_fix_discovery_settings_category_to_dsl.rb", ""),
|
14
|
+
ActiveRecord::MigrationProxy.new("MigrateDiscoveryHostnameAndFactColumnToArray", current_version, "#{ForemanDiscovery::Engine.root}/db/migrate/20221102075151_migrate_discovery_hostname_and_fact_column_to_array.rb", "")
|
15
|
+
]
|
16
|
+
end
|
17
|
+
|
18
|
+
def migrate_up
|
19
|
+
ActiveRecord::Migrator.new(:up, migrations, ActiveRecord::SchemaMigration, current_version).migrate
|
20
|
+
end
|
21
|
+
|
22
|
+
def setup
|
23
|
+
ActiveRecord::Migration.suppress_messages do
|
24
|
+
ActiveRecord::Migrator.new(:down, migrations, ActiveRecord::SchemaMigration, previous_version).migrate
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def setup_setting(name, value)
|
29
|
+
setting = Setting.find_or_create_by(name: name)
|
30
|
+
setting.value = value
|
31
|
+
setting.save(validate: false)
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_discovery_hostname_string
|
35
|
+
setup_setting('discovery_hostname', 'discovery_bootif')
|
36
|
+
migrate_up
|
37
|
+
assert_equal ['discovery_bootif'], Setting['discovery_hostname']
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_discovery_hostname_multistring
|
41
|
+
setup_setting('discovery_hostname', 'discovery_bootif, fqdn')
|
42
|
+
migrate_up
|
43
|
+
assert_equal ['discovery_bootif', 'fqdn'], Setting['discovery_hostname']
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_discovery_hostname_array
|
47
|
+
Setting['discovery_hostname'] = ['discovery_bootif']
|
48
|
+
migrate_up
|
49
|
+
assert_equal ['discovery_bootif'], Setting['discovery_hostname']
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_discovery_fact_column_empty
|
53
|
+
setup_setting('discovery_fact_column', '')
|
54
|
+
migrate_up
|
55
|
+
assert_equal [], Setting['discovery_fact_column']
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_discovery_fact_column_string
|
59
|
+
setup_setting('discovery_fact_column', 'bios_vendor')
|
60
|
+
migrate_up
|
61
|
+
assert_equal ['bios_vendor'], Setting['discovery_fact_column']
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_discovery_fact_column_multistring
|
65
|
+
setup_setting('discovery_fact_column', 'bios_vendor, fqdn')
|
66
|
+
migrate_up
|
67
|
+
assert_equal ['bios_vendor', 'fqdn'], Setting['discovery_fact_column']
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_discovery_fact_column_array
|
71
|
+
Setting['discovery_fact_column'] = ['bios_vendor']
|
72
|
+
migrate_up
|
73
|
+
assert_equal ['bios_vendor'], Setting['discovery_fact_column']
|
74
|
+
end
|
75
|
+
end
|
data/test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb.orig
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
require_relative '../test_plugin_helper'
|
2
|
+
require ForemanDiscovery::Engine.root.join('db/migrate/20221102075151_migrate_discovery_hostname_and_fact_column_to_array')
|
3
|
+
|
4
|
+
class MigrateDiscoveryHostnameAndFactColumnToArrayTest < ActiveSupport::TestCase
|
5
|
+
let(:migrations_paths) { ActiveRecord::Migrator.migrations_paths + [ForemanDiscovery::Engine.root.join('db/migrate/').to_s] }
|
6
|
+
|
7
|
+
let(:previous_version) { '20221102065954'.to_i }
|
8
|
+
let(:current_version) { '20221102075151'.to_i }
|
9
|
+
|
10
|
+
#only load the two migrations we care about (previous one and current one)
|
11
|
+
let(:migrations) do
|
12
|
+
[
|
13
|
+
ActiveRecord::MigrationProxy.new("FixDiscoverySettingsCategoryToDsl", previous_version, "#{ForemanDiscovery::Engine.root}/db/migrate/20221102065954_fix_discovery_settings_category_to_dsl.rb", ""),
|
14
|
+
ActiveRecord::MigrationProxy.new("MigrateDiscoveryHostnameAndFactColumnToArray", current_version, "#{ForemanDiscovery::Engine.root}/db/migrate/20221102075151_migrate_discovery_hostname_and_fact_column_to_array.rb", "")
|
15
|
+
]
|
16
|
+
end
|
17
|
+
|
18
|
+
def migrate_up
|
19
|
+
ActiveRecord::Migrator.new(:up, migrations, ActiveRecord::SchemaMigration, current_version).migrate
|
20
|
+
end
|
21
|
+
|
22
|
+
def setup
|
23
|
+
ActiveRecord::Migration.suppress_messages do
|
24
|
+
ActiveRecord::Migrator.new(:down, migrations, ActiveRecord::SchemaMigration, previous_version).migrate
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def setup_setting(name, value)
|
29
|
+
setting = Setting.find_or_create_by(name: name)
|
30
|
+
setting.value = value
|
31
|
+
setting.save(validate: false)
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_discovery_hostname_string
|
35
|
+
setup_setting('discovery_hostname', 'discovery_bootif')
|
36
|
+
migrate_up
|
37
|
+
assert_equal ['discovery_bootif'], Setting['discovery_hostname']
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_discovery_hostname_multistring
|
41
|
+
setup_setting('discovery_hostname', 'discovery_bootif, fqdn')
|
42
|
+
migrate_up
|
43
|
+
assert_equal ['discovery_bootif', 'fqdn'], Setting['discovery_hostname']
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_discovery_hostname_array
|
47
|
+
Setting['discovery_hostname'] = ['discovery_bootif']
|
48
|
+
migrate_up
|
49
|
+
assert_equal ['discovery_bootif'], Setting['discovery_hostname']
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_discovery_fact_column_empty
|
53
|
+
setup_setting('discovery_fact_column', '')
|
54
|
+
migrate_up
|
55
|
+
assert_equal [], Setting['discovery_fact_column']
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_discovery_fact_column_string
|
59
|
+
setup_setting('discovery_fact_column', 'bios_vendor')
|
60
|
+
migrate_up
|
61
|
+
assert_equal ['bios_vendor'], Setting['discovery_fact_column']
|
62
|
+
end
|
63
|
+
|
64
|
+
def test_discovery_fact_column_multistring
|
65
|
+
setup_setting('discovery_fact_column', 'bios_vendor, fqdn')
|
66
|
+
migrate_up
|
67
|
+
assert_equal ['bios_vendor', 'fqdn'], Setting['discovery_fact_column']
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_discovery_fact_column_array
|
71
|
+
Setting['discovery_fact_column'] = ['bios_vendor']
|
72
|
+
<<<<<<< HEAD
|
73
|
+
migrate_up
|
74
|
+
=======
|
75
|
+
|
76
|
+
migrate_up
|
77
|
+
|
78
|
+
>>>>>>> fd3524f (Fix tests for array settings migrations)
|
79
|
+
assert_equal ['bios_vendor'], Setting['discovery_fact_column']
|
80
|
+
end
|
81
|
+
end
|
@@ -53,7 +53,7 @@ end
|
|
53
53
|
|
54
54
|
def set_default_settings
|
55
55
|
Setting['discovery_fact'] = 'discovery_bootif'
|
56
|
-
Setting['discovery_hostname'] = 'discovery_bootif'
|
56
|
+
Setting['discovery_hostname'] = ['discovery_bootif']
|
57
57
|
Setting['discovery_auto'] = true
|
58
58
|
Setting['discovery_reboot'] = true
|
59
59
|
Setting['discovery_organization'] = "Organization 1"
|
@@ -6,7 +6,7 @@ class DiscoveryAttributeSetTest < ActiveSupport::TestCase
|
|
6
6
|
|
7
7
|
setup do
|
8
8
|
@facts = parse_json_fixture('regular_host', true)
|
9
|
-
Setting['discovery_hostname'] = 'discovery_bootif'
|
9
|
+
Setting['discovery_hostname'] = ['discovery_bootif']
|
10
10
|
Setting['discovery_prefix'] = 'mac'
|
11
11
|
::ForemanDiscovery::HostConverter.stubs(:unused_ip_for_host)
|
12
12
|
end
|
@@ -181,7 +181,7 @@ class HostDiscoveredTest < ActiveSupport::TestCase
|
|
181
181
|
end
|
182
182
|
|
183
183
|
test "should create discovered host with hostname if a fact was supplied" do
|
184
|
-
Setting[:discovery_hostname] = 'somefact'
|
184
|
+
Setting[:discovery_hostname] = ['somefact']
|
185
185
|
facts = @facts.merge({"somefact" => "somename"})
|
186
186
|
host = discover_host_from_facts(facts)
|
187
187
|
assert_equal 'macsomename', host.name
|
@@ -219,7 +219,7 @@ class HostDiscoveredTest < ActiveSupport::TestCase
|
|
219
219
|
|
220
220
|
test "should create discovered host with fact_name as a name if it is a valid mac" do
|
221
221
|
Setting[:discovery_fact] = 'somefact'
|
222
|
-
Setting[:discovery_hostname] = 'somefact'
|
222
|
+
Setting[:discovery_hostname] = ['somefact']
|
223
223
|
facts = @facts.merge({"somefact" => "E4:1F:13:CC:36:5A"})
|
224
224
|
host = discover_host_from_facts(facts)
|
225
225
|
assert_equal 'mace41f13cc365a', host.name
|
@@ -277,7 +277,7 @@ class HostDiscoveredTest < ActiveSupport::TestCase
|
|
277
277
|
end
|
278
278
|
|
279
279
|
test "should raise when hostname fact cannot be found" do
|
280
|
-
Setting[:discovery_hostname] = 'macaddress_foo'
|
280
|
+
Setting[:discovery_hostname] = ['macaddress_foo']
|
281
281
|
exception = assert_raises(::Foreman::Exception) do
|
282
282
|
discover_host_from_facts(@facts)
|
283
283
|
end
|
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:
|
4
|
+
version: 23.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aditi Puntambekar
|
@@ -76,7 +76,7 @@ authors:
|
|
76
76
|
autorequire:
|
77
77
|
bindir: bin
|
78
78
|
cert_chain: []
|
79
|
-
date:
|
79
|
+
date: 2023-11-22 00:00:00.000000000 Z
|
80
80
|
dependencies: []
|
81
81
|
description: MaaS Discovery Plugin engine for Foreman
|
82
82
|
email: gsutclif@redhat.com
|
@@ -88,6 +88,23 @@ extra_rdoc_files:
|
|
88
88
|
files:
|
89
89
|
- LICENSE
|
90
90
|
- README.md
|
91
|
+
- app/assets/javascripts/foreman_discovery/locale/ca/foreman_discovery.js
|
92
|
+
- app/assets/javascripts/foreman_discovery/locale/cs_CZ/foreman_discovery.js
|
93
|
+
- app/assets/javascripts/foreman_discovery/locale/de/foreman_discovery.js
|
94
|
+
- app/assets/javascripts/foreman_discovery/locale/en/foreman_discovery.js
|
95
|
+
- app/assets/javascripts/foreman_discovery/locale/en_GB/foreman_discovery.js
|
96
|
+
- app/assets/javascripts/foreman_discovery/locale/es/foreman_discovery.js
|
97
|
+
- app/assets/javascripts/foreman_discovery/locale/fr/foreman_discovery.js
|
98
|
+
- app/assets/javascripts/foreman_discovery/locale/gl/foreman_discovery.js
|
99
|
+
- app/assets/javascripts/foreman_discovery/locale/it/foreman_discovery.js
|
100
|
+
- app/assets/javascripts/foreman_discovery/locale/ja/foreman_discovery.js
|
101
|
+
- app/assets/javascripts/foreman_discovery/locale/ka/foreman_discovery.js
|
102
|
+
- app/assets/javascripts/foreman_discovery/locale/ko/foreman_discovery.js
|
103
|
+
- app/assets/javascripts/foreman_discovery/locale/pt_BR/foreman_discovery.js
|
104
|
+
- app/assets/javascripts/foreman_discovery/locale/ru/foreman_discovery.js
|
105
|
+
- app/assets/javascripts/foreman_discovery/locale/sv_SE/foreman_discovery.js
|
106
|
+
- app/assets/javascripts/foreman_discovery/locale/zh_CN/foreman_discovery.js
|
107
|
+
- app/assets/javascripts/foreman_discovery/locale/zh_TW/foreman_discovery.js
|
91
108
|
- app/controllers/api/v2/discovered_hosts_controller.rb
|
92
109
|
- app/controllers/api/v2/discovery_rules_controller.rb
|
93
110
|
- app/controllers/api/v2/fact_values_controller_extensions.rb
|
@@ -109,7 +126,6 @@ files:
|
|
109
126
|
- app/models/host/managed_extensions.rb
|
110
127
|
- app/models/hostgroup_extensions.rb
|
111
128
|
- app/models/nic/managed_extensions.rb
|
112
|
-
- app/models/setting/discovered.rb
|
113
129
|
- app/services/discovery_fact_importer.rb
|
114
130
|
- app/services/foreman_discovery/fact_parser.rb
|
115
131
|
- app/services/foreman_discovery/fact_to_category_resolver.rb
|
@@ -190,6 +206,7 @@ files:
|
|
190
206
|
- db/migrate/20171222120314_add_constraints_on_discovery_rules_hostgroups.rb
|
191
207
|
- db/migrate/20180412124505_add_priority_score_to_discovery_rules.rb
|
192
208
|
- db/migrate/20221102065954_fix_discovery_settings_category_to_dsl.rb
|
209
|
+
- db/migrate/20221102075151_migrate_discovery_hostname_and_fact_column_to_array.rb
|
193
210
|
- db/seeds.d/60_discovery_proxy_feature.rb
|
194
211
|
- db/seeds.d/70_discovery_mail_notification.rb
|
195
212
|
- db/seeds.d/80_discovery_ui_notification.rb
|
@@ -201,35 +218,56 @@ files:
|
|
201
218
|
- lib/foreman_discovery/engine.rb
|
202
219
|
- lib/foreman_discovery/version.rb
|
203
220
|
- locale/ca/LC_MESSAGES/foreman_discovery.mo
|
221
|
+
- locale/ca/foreman_discovery.edit.po
|
204
222
|
- locale/ca/foreman_discovery.po
|
223
|
+
- locale/cs_CZ/LC_MESSAGES/foreman_discovery.mo
|
224
|
+
- locale/cs_CZ/foreman_discovery.edit.po
|
225
|
+
- locale/cs_CZ/foreman_discovery.po
|
205
226
|
- locale/de/LC_MESSAGES/foreman_discovery.mo
|
227
|
+
- locale/de/foreman_discovery.edit.po
|
206
228
|
- locale/de/foreman_discovery.po
|
207
229
|
- locale/en/LC_MESSAGES/foreman_discovery.mo
|
230
|
+
- locale/en/foreman_discovery.edit.po
|
208
231
|
- locale/en/foreman_discovery.po
|
209
232
|
- locale/en_GB/LC_MESSAGES/foreman_discovery.mo
|
233
|
+
- locale/en_GB/foreman_discovery.edit.po
|
210
234
|
- locale/en_GB/foreman_discovery.po
|
211
235
|
- locale/es/LC_MESSAGES/foreman_discovery.mo
|
236
|
+
- locale/es/foreman_discovery.edit.po
|
212
237
|
- locale/es/foreman_discovery.po
|
213
238
|
- locale/foreman_discovery.pot
|
214
239
|
- locale/fr/LC_MESSAGES/foreman_discovery.mo
|
240
|
+
- locale/fr/foreman_discovery.edit.po
|
215
241
|
- locale/fr/foreman_discovery.po
|
216
242
|
- locale/gl/LC_MESSAGES/foreman_discovery.mo
|
243
|
+
- locale/gl/foreman_discovery.edit.po
|
217
244
|
- locale/gl/foreman_discovery.po
|
218
245
|
- locale/it/LC_MESSAGES/foreman_discovery.mo
|
246
|
+
- locale/it/foreman_discovery.edit.po
|
219
247
|
- locale/it/foreman_discovery.po
|
220
248
|
- locale/ja/LC_MESSAGES/foreman_discovery.mo
|
249
|
+
- locale/ja/foreman_discovery.edit.po
|
221
250
|
- locale/ja/foreman_discovery.po
|
251
|
+
- locale/ka/LC_MESSAGES/foreman_discovery.mo
|
252
|
+
- locale/ka/foreman_discovery.edit.po
|
253
|
+
- locale/ka/foreman_discovery.po
|
222
254
|
- locale/ko/LC_MESSAGES/foreman_discovery.mo
|
255
|
+
- locale/ko/foreman_discovery.edit.po
|
223
256
|
- locale/ko/foreman_discovery.po
|
224
257
|
- locale/pt_BR/LC_MESSAGES/foreman_discovery.mo
|
258
|
+
- locale/pt_BR/foreman_discovery.edit.po
|
225
259
|
- locale/pt_BR/foreman_discovery.po
|
226
260
|
- locale/ru/LC_MESSAGES/foreman_discovery.mo
|
261
|
+
- locale/ru/foreman_discovery.edit.po
|
227
262
|
- locale/ru/foreman_discovery.po
|
228
263
|
- locale/sv_SE/LC_MESSAGES/foreman_discovery.mo
|
264
|
+
- locale/sv_SE/foreman_discovery.edit.po
|
229
265
|
- locale/sv_SE/foreman_discovery.po
|
230
266
|
- locale/zh_CN/LC_MESSAGES/foreman_discovery.mo
|
267
|
+
- locale/zh_CN/foreman_discovery.edit.po
|
231
268
|
- locale/zh_CN/foreman_discovery.po
|
232
269
|
- locale/zh_TW/LC_MESSAGES/foreman_discovery.mo
|
270
|
+
- locale/zh_TW/foreman_discovery.edit.po
|
233
271
|
- locale/zh_TW/foreman_discovery.po
|
234
272
|
- package.json
|
235
273
|
- test/factories/discovery_host_related.rb
|
@@ -257,6 +295,8 @@ files:
|
|
257
295
|
- test/functional/discovery_rules_controller_test.rb
|
258
296
|
- test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
|
259
297
|
- test/integration/discovered_hosts_test.rb
|
298
|
+
- test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb
|
299
|
+
- test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb.orig
|
260
300
|
- test/static_fixtures/redhat_kexec.erb
|
261
301
|
- test/test_helper_discovery.rb
|
262
302
|
- test/test_plugin_helper.rb
|
@@ -315,8 +355,8 @@ signing_key:
|
|
315
355
|
specification_version: 4
|
316
356
|
summary: MaaS Discovery Plugin for Foreman
|
317
357
|
test_files:
|
318
|
-
- test/factories/discovery_host_related.rb
|
319
358
|
- test/factories/discovery_rule_related.rb
|
359
|
+
- test/factories/discovery_host_related.rb
|
320
360
|
- test/facts/bond0-eth0-eth1-active-passive.json
|
321
361
|
- test/facts/default.json
|
322
362
|
- test/facts/dell_npars.json
|
@@ -337,21 +377,23 @@ test_files:
|
|
337
377
|
- test/functional/api/v2/discovery_rules_controller_test.rb
|
338
378
|
- test/functional/api/v2/fact_value_extensions_test.rb
|
339
379
|
- test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
|
340
|
-
- test/functional/discovery_rules_controller_test.rb
|
341
380
|
- test/functional/discovered_hosts_controller_test.rb
|
381
|
+
- test/functional/discovery_rules_controller_test.rb
|
342
382
|
- test/integration/discovered_hosts_test.rb
|
343
383
|
- test/unit/ui_notifications/destroy_host_test.rb
|
344
384
|
- test/unit/ui_notifications/new_host_test.rb
|
345
385
|
- test/unit/discovered_mailer_test.rb
|
386
|
+
- test/unit/discovered_extensions_test.rb
|
346
387
|
- test/unit/discovery_attribute_set_test.rb
|
347
388
|
- test/unit/discovery_rule_test.rb
|
348
389
|
- test/unit/discovery_taxonomy_extensions_test.rb
|
349
390
|
- test/unit/fact_parser_test.rb
|
350
391
|
- test/unit/fact_to_category_resolver_test.rb
|
351
392
|
- test/unit/lldp_neighbors_test.rb
|
352
|
-
- test/unit/discovered_extensions_test.rb
|
353
|
-
- test/unit/host_discovered_test.rb
|
354
393
|
- test/unit/managed_extensions_test.rb
|
355
|
-
- test/
|
394
|
+
- test/unit/host_discovered_test.rb
|
356
395
|
- test/test_plugin_helper.rb
|
396
|
+
- test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb.orig
|
397
|
+
- test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb
|
357
398
|
- test/static_fixtures/redhat_kexec.erb
|
399
|
+
- test/test_helper_discovery.rb
|
@@ -1,22 +0,0 @@
|
|
1
|
-
class Setting::Discovered
|
2
|
-
def self.discovery_fact_column_array
|
3
|
-
from_array(Setting['discovery_fact_column'])
|
4
|
-
end
|
5
|
-
|
6
|
-
def self.discovery_hostname_fact_array
|
7
|
-
return [] if !Setting['discovery_hostname'].present?
|
8
|
-
from_array Setting['discovery_hostname']
|
9
|
-
end
|
10
|
-
|
11
|
-
def self.discovery_lock?
|
12
|
-
Foreman::Cast.to_bool(Setting['discovery_lock'])
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.from_array(setting)
|
16
|
-
return [] unless setting.present?
|
17
|
-
setting.to_s.split(",").map(&:strip)
|
18
|
-
rescue Exception => e
|
19
|
-
logger.warn "Failed to parse discovery_fact_column, ignoring: #{e}"
|
20
|
-
[]
|
21
|
-
end
|
22
|
-
end
|