foreman_discovery 24.0.0 → 24.0.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/api/v2/discovered_hosts_controller.rb +1 -1
- data/app/helpers/discovered_hosts_helper.rb +1 -1
- data/app/models/host/discovered.rb +1 -1
- data/app/views/discovered_hosts/show.html.erb +23 -21
- data/app/views/discovered_hosts/welcome.html.erb +4 -0
- data/app/views/discovery_rules/_form.html.erb +0 -6
- data/app/views/discovery_rules/welcome.html.erb +4 -0
- data/db/migrate/20141223142759_fill_discovery_attribute_sets_for_existing_hosts.rb +1 -1
- data/db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb +1 -1
- data/lib/foreman_discovery/version.rb +1 -1
- data/lib/foreman_discovery.rake +1 -5
- data/package.json +0 -2
- data/test/functional/discovered_hosts_controller_test.rb +1 -1
- metadata +13 -32
- data/locale/ca/foreman_discovery.edit.po +0 -1122
- data/locale/cs_CZ/foreman_discovery.edit.po +0 -1120
- data/locale/de/foreman_discovery.edit.po +0 -1129
- data/locale/en/foreman_discovery.edit.po +0 -1115
- data/locale/en_GB/foreman_discovery.edit.po +0 -1125
- data/locale/es/foreman_discovery.edit.po +0 -1130
- data/locale/fr/foreman_discovery.edit.po +0 -1126
- data/locale/gl/foreman_discovery.edit.po +0 -1120
- data/locale/it/foreman_discovery.edit.po +0 -1123
- data/locale/ja/foreman_discovery.edit.po +0 -1119
- data/locale/ka/foreman_discovery.edit.po +0 -1120
- data/locale/ko/foreman_discovery.edit.po +0 -1119
- data/locale/pt_BR/foreman_discovery.edit.po +0 -1132
- data/locale/ru/foreman_discovery.edit.po +0 -1131
- data/locale/sv_SE/foreman_discovery.edit.po +0 -1123
- data/locale/zh_CN/foreman_discovery.edit.po +0 -1117
- data/locale/zh_TW/foreman_discovery.edit.po +0 -1120
- data/test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb.orig +0 -81
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05b8cafa7d0abfcd8fc5f580c4bfbdcb01272ab544f08e928f508fab2032bdd3
|
4
|
+
data.tar.gz: f4bdd5460bdf918d821f9809e6ee947d2c6dde5b721044d210641dd78b5897be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2ef3c4d713cf531a706ee23447534a17a6a0ab4154179da49279b99ca84d5729a10e4074eaf613a63f5ca4320ba23cc34cc7b140a74ed312986ca18d02be620
|
7
|
+
data.tar.gz: cbafe123851d9ebc5afb10ae5c115dbb5ad314e44c647a1da4744ab59bd49a8063e255488c89136dcddba7a6d50211f88f248b83ef7cec0c00483a2a8cced0a0
|
@@ -162,7 +162,7 @@ module Api
|
|
162
162
|
|
163
163
|
total_count = 0
|
164
164
|
overall_errors = ""
|
165
|
-
Host::Discovered.all.
|
165
|
+
Host::Discovered.all.find_each do |discovered_host|
|
166
166
|
if rule = find_discovery_rule(discovered_host)
|
167
167
|
result &= perform_auto_provision(discovered_host, rule)
|
168
168
|
unless discovered_host.errors.empty?
|
@@ -222,7 +222,7 @@ class Host::Discovered < ::Host::Base
|
|
222
222
|
end
|
223
223
|
|
224
224
|
def self.normalize_string_for_hostname(hostname)
|
225
|
-
hostname = hostname.to_s.downcase.gsub(/(^[^a-z0-9]*|[^a-z0-9
|
225
|
+
hostname = hostname.to_s.downcase.gsub(/(^[^a-z0-9]*|[^a-z0-9-]|[^a-z0-9]*$)/,'')
|
226
226
|
raise(::Foreman::Exception.new(N_("Invalid hostname: Could not normalize the hostname"))) unless hostname && hostname.present?
|
227
227
|
hostname
|
228
228
|
end
|
@@ -96,28 +96,30 @@
|
|
96
96
|
</div>
|
97
97
|
</div>
|
98
98
|
|
99
|
-
|
100
|
-
|
101
|
-
$(
|
102
|
-
|
99
|
+
<% content_for(:javascripts) do -%>
|
100
|
+
<script type="text/javascript" charset="utf-8">
|
101
|
+
$(document).ready(function(){
|
102
|
+
$("table").css('padding', '0');
|
103
|
+
$("table").css("cssText", 'margin-bottom: 0 !important;');
|
103
104
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
105
|
+
provision_class = 'active'
|
106
|
+
primary_class = 'active'
|
107
|
+
var flag_primary = '<i class="glyphicon glyphicon glyphicon-tag primary-flag '+ primary_class +'" title="" data-original-title="'+ __('Primary') +'"></i>';
|
108
|
+
var flags_provision = '<i class="glyphicon glyphicon glyphicon-hdd provision-flag '+ provision_class +'" title="" data-original-title="'+ __('Provisioning') +'"></i>';
|
108
109
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
110
|
+
$('.flag-primary').html(flag_primary);
|
111
|
+
$('.flag-provision').append(flags_provision);
|
112
|
+
$('.primary-flag').tooltip();
|
113
|
+
$('.provision-flag').tooltip();
|
113
114
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
115
|
+
expand_all_toggle_action = { 'Expand All': 'show', 'Collapse All': 'hide' };
|
116
|
+
$('#expand_all').on('click', function () {
|
117
|
+
$(this).text(function(i, text){
|
118
|
+
$('#accordion .panel-collapse').collapse(expand_all_toggle_action[text]);
|
119
|
+
return text === "Expand All" ? "Collapse All" : "Expand All";
|
120
|
+
})
|
121
|
+
});
|
121
122
|
|
122
|
-
|
123
|
-
</script>
|
123
|
+
});
|
124
|
+
</script>
|
125
|
+
<% end %>
|
@@ -4,7 +4,7 @@ end
|
|
4
4
|
|
5
5
|
class FillDiscoveryAttributeSetsForExistingHosts < ActiveRecord::Migration[4.2]
|
6
6
|
def up
|
7
|
-
FakeDiscoveredHost.where(:type => "Host::Discovered").all.
|
7
|
+
FakeDiscoveredHost.where(:type => "Host::Discovered").all.find_each do |host|
|
8
8
|
begin
|
9
9
|
say "Populating attribute set for discovered host #{host.name}"
|
10
10
|
ForemanDiscovery::ImportHooks::DiscoveryAttribute.new(host: host, facts: host.facts_hash).after_populate
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class RemoveOldDiscoveryReaderPermissions < ActiveRecord::Migration[4.2]
|
2
2
|
def up
|
3
|
-
Permission.where("name like '%_discovery_rules' and resource_type is null").
|
3
|
+
Permission.where("name like '%_discovery_rules' and resource_type is null").find_each do |permission|
|
4
4
|
permission.update(:resource_type => 'DiscoveryRule')
|
5
5
|
end
|
6
6
|
end
|
data/lib/foreman_discovery.rake
CHANGED
@@ -4,11 +4,7 @@ namespace :test do
|
|
4
4
|
Rake::TestTask.new(:foreman_discovery) do |t|
|
5
5
|
test_dir = File.join(File.dirname(__FILE__), '..', 'test')
|
6
6
|
t.libs << ["test",test_dir]
|
7
|
-
|
8
|
-
t.pattern = ENV['FILE'] || ENV['TEST']
|
9
|
-
else
|
10
|
-
t.pattern = "#{test_dir}/**/*_test.rb"
|
11
|
-
end
|
7
|
+
t.pattern = ENV['FILE'] || ENV['TEST'] || "#{test_dir}/**/*_test.rb"
|
12
8
|
t.verbose = true
|
13
9
|
t.warning = false
|
14
10
|
end
|
data/package.json
CHANGED
@@ -9,8 +9,6 @@
|
|
9
9
|
"test:watch": "tfm-test --plugin --watchAll",
|
10
10
|
"test:current": "tfm-test --plugin --watch",
|
11
11
|
"publish-coverage": "tfm-publish-coverage",
|
12
|
-
"stories": "tfm-stories --plugin",
|
13
|
-
"stories:build": "tfm-build-stories --plugin",
|
14
12
|
"create-react-component": "yo react-domain"
|
15
13
|
},
|
16
14
|
"repository": {
|
@@ -41,7 +41,7 @@ class DiscoveredHostsControllerTest < ActionController::TestCase
|
|
41
41
|
[:multiple_destroy, :select_multiple_organization, :select_multiple_location].each do |action|
|
42
42
|
process action, method: :post, params: {:host_ids => [host.id]}, session: set_session_user, xhr: true
|
43
43
|
assert_response :success
|
44
|
-
|
44
|
+
assert_includes(response.body, host.name)
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
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: 24.0.
|
4
|
+
version: 24.0.2
|
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: 2024-
|
79
|
+
date: 2024-07-18 00:00:00.000000000 Z
|
80
80
|
dependencies: []
|
81
81
|
description: MaaS Discovery Plugin engine for Foreman
|
82
82
|
email: gsutclif@redhat.com
|
@@ -218,56 +218,39 @@ files:
|
|
218
218
|
- lib/foreman_discovery/engine.rb
|
219
219
|
- lib/foreman_discovery/version.rb
|
220
220
|
- locale/ca/LC_MESSAGES/foreman_discovery.mo
|
221
|
-
- locale/ca/foreman_discovery.edit.po
|
222
221
|
- locale/ca/foreman_discovery.po
|
223
222
|
- locale/cs_CZ/LC_MESSAGES/foreman_discovery.mo
|
224
|
-
- locale/cs_CZ/foreman_discovery.edit.po
|
225
223
|
- locale/cs_CZ/foreman_discovery.po
|
226
224
|
- locale/de/LC_MESSAGES/foreman_discovery.mo
|
227
|
-
- locale/de/foreman_discovery.edit.po
|
228
225
|
- locale/de/foreman_discovery.po
|
229
226
|
- locale/en/LC_MESSAGES/foreman_discovery.mo
|
230
|
-
- locale/en/foreman_discovery.edit.po
|
231
227
|
- locale/en/foreman_discovery.po
|
232
228
|
- locale/en_GB/LC_MESSAGES/foreman_discovery.mo
|
233
|
-
- locale/en_GB/foreman_discovery.edit.po
|
234
229
|
- locale/en_GB/foreman_discovery.po
|
235
230
|
- locale/es/LC_MESSAGES/foreman_discovery.mo
|
236
|
-
- locale/es/foreman_discovery.edit.po
|
237
231
|
- locale/es/foreman_discovery.po
|
238
232
|
- locale/foreman_discovery.pot
|
239
233
|
- locale/fr/LC_MESSAGES/foreman_discovery.mo
|
240
|
-
- locale/fr/foreman_discovery.edit.po
|
241
234
|
- locale/fr/foreman_discovery.po
|
242
235
|
- locale/gl/LC_MESSAGES/foreman_discovery.mo
|
243
|
-
- locale/gl/foreman_discovery.edit.po
|
244
236
|
- locale/gl/foreman_discovery.po
|
245
237
|
- locale/it/LC_MESSAGES/foreman_discovery.mo
|
246
|
-
- locale/it/foreman_discovery.edit.po
|
247
238
|
- locale/it/foreman_discovery.po
|
248
239
|
- locale/ja/LC_MESSAGES/foreman_discovery.mo
|
249
|
-
- locale/ja/foreman_discovery.edit.po
|
250
240
|
- locale/ja/foreman_discovery.po
|
251
241
|
- locale/ka/LC_MESSAGES/foreman_discovery.mo
|
252
|
-
- locale/ka/foreman_discovery.edit.po
|
253
242
|
- locale/ka/foreman_discovery.po
|
254
243
|
- locale/ko/LC_MESSAGES/foreman_discovery.mo
|
255
|
-
- locale/ko/foreman_discovery.edit.po
|
256
244
|
- locale/ko/foreman_discovery.po
|
257
245
|
- locale/pt_BR/LC_MESSAGES/foreman_discovery.mo
|
258
|
-
- locale/pt_BR/foreman_discovery.edit.po
|
259
246
|
- locale/pt_BR/foreman_discovery.po
|
260
247
|
- locale/ru/LC_MESSAGES/foreman_discovery.mo
|
261
|
-
- locale/ru/foreman_discovery.edit.po
|
262
248
|
- locale/ru/foreman_discovery.po
|
263
249
|
- locale/sv_SE/LC_MESSAGES/foreman_discovery.mo
|
264
|
-
- locale/sv_SE/foreman_discovery.edit.po
|
265
250
|
- locale/sv_SE/foreman_discovery.po
|
266
251
|
- locale/zh_CN/LC_MESSAGES/foreman_discovery.mo
|
267
|
-
- locale/zh_CN/foreman_discovery.edit.po
|
268
252
|
- locale/zh_CN/foreman_discovery.po
|
269
253
|
- locale/zh_TW/LC_MESSAGES/foreman_discovery.mo
|
270
|
-
- locale/zh_TW/foreman_discovery.edit.po
|
271
254
|
- locale/zh_TW/foreman_discovery.po
|
272
255
|
- package.json
|
273
256
|
- test/factories/discovery_host_related.rb
|
@@ -297,7 +280,6 @@ files:
|
|
297
280
|
- test/integration/discovered_hosts_test.rb
|
298
281
|
- test/integration/menu_test.rb
|
299
282
|
- test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb
|
300
|
-
- test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb.orig
|
301
283
|
- test/static_fixtures/redhat_kexec.erb
|
302
284
|
- test/test_helper_discovery.rb
|
303
285
|
- test/test_plugin_helper.rb
|
@@ -351,13 +333,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
351
333
|
- !ruby/object:Gem::Version
|
352
334
|
version: '0'
|
353
335
|
requirements: []
|
354
|
-
rubygems_version: 3.
|
336
|
+
rubygems_version: 3.2.3
|
355
337
|
signing_key:
|
356
338
|
specification_version: 4
|
357
339
|
summary: MaaS Discovery Plugin for Foreman
|
358
340
|
test_files:
|
359
|
-
- test/factories/discovery_rule_related.rb
|
360
341
|
- test/factories/discovery_host_related.rb
|
342
|
+
- test/factories/discovery_rule_related.rb
|
361
343
|
- test/facts/bond0-eth0-eth1-active-passive.json
|
362
344
|
- test/facts/default.json
|
363
345
|
- test/facts/dell_npars.json
|
@@ -377,25 +359,24 @@ test_files:
|
|
377
359
|
- test/functional/api/v2/discovered_hosts_controller_test.rb
|
378
360
|
- test/functional/api/v2/discovery_rules_controller_test.rb
|
379
361
|
- test/functional/api/v2/fact_value_extensions_test.rb
|
380
|
-
- test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
|
381
362
|
- test/functional/discovered_hosts_controller_test.rb
|
382
363
|
- test/functional/discovery_rules_controller_test.rb
|
364
|
+
- test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
|
383
365
|
- test/integration/discovered_hosts_test.rb
|
384
366
|
- test/integration/menu_test.rb
|
385
|
-
- test/
|
386
|
-
- test/
|
387
|
-
- test/
|
367
|
+
- test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb
|
368
|
+
- test/static_fixtures/redhat_kexec.erb
|
369
|
+
- test/test_helper_discovery.rb
|
370
|
+
- test/test_plugin_helper.rb
|
388
371
|
- test/unit/discovered_extensions_test.rb
|
372
|
+
- test/unit/discovered_mailer_test.rb
|
389
373
|
- test/unit/discovery_attribute_set_test.rb
|
390
374
|
- test/unit/discovery_rule_test.rb
|
391
375
|
- test/unit/discovery_taxonomy_extensions_test.rb
|
392
376
|
- test/unit/fact_parser_test.rb
|
393
377
|
- test/unit/fact_to_category_resolver_test.rb
|
378
|
+
- test/unit/host_discovered_test.rb
|
394
379
|
- test/unit/lldp_neighbors_test.rb
|
395
380
|
- test/unit/managed_extensions_test.rb
|
396
|
-
- test/unit/
|
397
|
-
- test/
|
398
|
-
- test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb.orig
|
399
|
-
- test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb
|
400
|
-
- test/static_fixtures/redhat_kexec.erb
|
401
|
-
- test/test_helper_discovery.rb
|
381
|
+
- test/unit/ui_notifications/destroy_host_test.rb
|
382
|
+
- test/unit/ui_notifications/new_host_test.rb
|