foreman_discovery 11.0.0 → 12.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/controllers/api/v2/discovered_hosts_controller.rb +1 -2
- data/app/controllers/concerns/foreman/controller/discovered_extensions.rb +1 -1
- data/app/controllers/discovered_hosts_controller.rb +21 -11
- data/app/controllers/foreman_discovery/concerns/hosts_controller_extensions.rb +1 -1
- data/app/helpers/discovered_hosts_helper.rb +9 -11
- data/app/models/discovery_rule.rb +3 -0
- data/app/models/host/discovered.rb +59 -19
- data/app/models/setting/discovered.rb +1 -0
- data/app/services/foreman_discovery/fact_parser.rb +6 -2
- data/app/services/foreman_discovery/ui_notifications/new_host.rb +3 -1
- data/app/views/dashboard/_discovery_widget_host_list.html.erb +1 -1
- data/app/views/discovered_hosts/_discovered_hosts_list.html.erb +2 -3
- data/app/views/discovered_hosts/_selected_hosts.html.erb +1 -1
- data/app/views/discovered_hosts/index.html.erb +0 -2
- data/app/views/discovered_hosts/multiple_auto_provision.html.erb +4 -0
- data/app/views/discovered_hosts/multiple_reboot.html.erb +4 -0
- data/app/views/discovered_hosts/show.html.erb +27 -15
- data/app/views/discovery_rules/_form.html.erb +9 -3
- data/app/views/discovery_rules/edit.html.erb +1 -1
- data/app/views/discovery_rules/index.html.erb +2 -2
- data/app/views/foreman_discovery/debian_kexec.erb +1 -1
- data/app/views/foreman_discovery/redhat_kexec.erb +1 -1
- data/config/as_deprecation_whitelist.yaml +395 -0
- data/config/routes.rb +7 -5
- data/db/migrate/20171222120314_add_constraints_on_discovery_rules_hostgroups.rb +10 -0
- data/db/migrate/20180412124505_add_priority_score_to_discovery_rules.rb +24 -0
- data/extra/discover-host +7 -5
- data/extra/discovery/simple-bond.json +167 -0
- data/lib/foreman_discovery/engine.rb +9 -3
- 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 +148 -221
- data/locale/ca/foreman_discovery.po +25 -19
- data/locale/de/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/de/foreman_discovery.edit.po +147 -221
- data/locale/de/foreman_discovery.po +26 -20
- data/locale/en/foreman_discovery.edit.po +106 -98
- data/locale/en/foreman_discovery.po +24 -18
- data/locale/en_GB/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/en_GB/foreman_discovery.edit.po +149 -222
- data/locale/en_GB/foreman_discovery.po +26 -20
- data/locale/es/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/es/foreman_discovery.edit.po +149 -222
- data/locale/es/foreman_discovery.po +26 -20
- data/locale/foreman_discovery.pot +115 -103
- data/locale/fr/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/fr/foreman_discovery.edit.po +147 -221
- data/locale/fr/foreman_discovery.po +26 -20
- data/locale/gl/foreman_discovery.edit.po +147 -220
- data/locale/gl/foreman_discovery.po +24 -18
- data/locale/it/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/it/foreman_discovery.edit.po +148 -221
- data/locale/it/foreman_discovery.po +25 -19
- data/locale/ja/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ja/foreman_discovery.edit.po +149 -222
- data/locale/ja/foreman_discovery.po +26 -20
- data/locale/ko/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ko/foreman_discovery.edit.po +149 -221
- data/locale/ko/foreman_discovery.po +26 -20
- data/locale/pt_BR/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/pt_BR/foreman_discovery.edit.po +149 -222
- data/locale/pt_BR/foreman_discovery.po +26 -20
- data/locale/ru/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ru/foreman_discovery.edit.po +152 -223
- data/locale/ru/foreman_discovery.po +26 -20
- data/locale/sv_SE/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/sv_SE/foreman_discovery.edit.po +147 -220
- data/locale/sv_SE/foreman_discovery.po +24 -18
- data/locale/zh_CN/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/zh_CN/foreman_discovery.edit.po +155 -224
- data/locale/zh_CN/foreman_discovery.po +26 -20
- data/locale/zh_TW/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/zh_TW/foreman_discovery.edit.po +151 -222
- data/locale/zh_TW/foreman_discovery.po +26 -20
- data/test/functional/api/v2/discovered_hosts_controller_test.rb +2 -0
- data/test/functional/api/v2/discovery_rules_controller_test.rb +96 -9
- data/test/functional/api/v2/settings_controller_test.rb +22 -0
- data/test/functional/discovered_hosts_controller_test.rb +20 -21
- data/test/functional/discovery_rules_controller_test.rb +5 -4
- data/test/integration/discovered_hosts_test.rb +20 -10
- data/test/models/setting_test.rb +11 -0
- data/test/test_helper_discovery.rb +1 -0
- data/test/unit/discovered_extensions_test.rb +2 -13
- data/test/unit/discovery_rule_test.rb +87 -1
- data/test/unit/fact_parser_test.rb +2 -2
- data/test/unit/host_discovered_test.rb +60 -28
- data/test/unit/ui_notifications/destroy_host_test.rb +14 -4
- data/test/unit/ui_notifications/new_host_test.rb +8 -1
- metadata +22 -4
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'test_plugin_helper'
|
2
2
|
|
3
3
|
class NewHostNotificationTest < ActiveSupport::TestCase
|
4
|
+
include FactImporterIsolation
|
5
|
+
allow_transactions_for_any_importer
|
4
6
|
alias_method :blueprint, :discovered_notification_blueprint
|
5
7
|
|
6
8
|
setup do
|
@@ -8,8 +10,9 @@ class NewHostNotificationTest < ActiveSupport::TestCase
|
|
8
10
|
end
|
9
11
|
|
10
12
|
test 'new discovered host should generate a notification' do
|
13
|
+
set_default_settings
|
11
14
|
assert_difference('blueprint.notifications.count') do
|
12
|
-
|
15
|
+
discover_host_from_facts(parse_json_fixture('/../facts.json')['facts'])
|
13
16
|
end
|
14
17
|
end
|
15
18
|
|
@@ -23,4 +26,8 @@ class NewHostNotificationTest < ActiveSupport::TestCase
|
|
23
26
|
assert_equal 1, blueprint.notifications.count
|
24
27
|
assert_not_equal expired_at, blueprint.notifications.first.expired_at
|
25
28
|
end
|
29
|
+
|
30
|
+
def parse_json_fixture(relative_path)
|
31
|
+
return JSON.parse(File.read(File.expand_path(File.dirname(__FILE__) + relative_path)))
|
32
|
+
end
|
26
33
|
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: 12.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alongoldboim
|
@@ -9,10 +9,13 @@ authors:
|
|
9
9
|
- amirfefer
|
10
10
|
- Amit Karsale
|
11
11
|
- Amos Benari
|
12
|
+
- Avi Sharvit
|
12
13
|
- Bryan Kearney
|
14
|
+
- bshuster
|
13
15
|
- Daniel Lobato
|
14
16
|
- Daniel Lobato Garcia
|
15
17
|
- Daniel Lobato García
|
18
|
+
- Danny Smit
|
16
19
|
- David Davis
|
17
20
|
- Dominic Cleal
|
18
21
|
- Eric D. Helms
|
@@ -20,11 +23,14 @@ authors:
|
|
20
23
|
- Frank Wall
|
21
24
|
- Greg Sutcliffe
|
22
25
|
- ChairmanTubeAmp
|
26
|
+
- Ido Kanner
|
23
27
|
- imriz
|
24
28
|
- Imri Zvik
|
25
29
|
- Joseph Mitchell Magen
|
26
30
|
- June Zhang
|
31
|
+
- kgaikwad
|
27
32
|
- Lars Berntzon
|
33
|
+
- ldjebran
|
28
34
|
- Lukas Zapletal
|
29
35
|
- Lukáš Zapletal
|
30
36
|
- Marek Hulan
|
@@ -33,6 +39,7 @@ authors:
|
|
33
39
|
- Matt Jarvis
|
34
40
|
- Michael Moll
|
35
41
|
- Nick
|
42
|
+
- odovzhenko
|
36
43
|
- Ohad Levy
|
37
44
|
- Ondrej Prazak
|
38
45
|
- Ori Rabin
|
@@ -49,6 +56,7 @@ authors:
|
|
49
56
|
- Shlomi Zadok
|
50
57
|
- Stephen Benjamin
|
51
58
|
- Swapnil Abnave
|
59
|
+
- Thomas Gelf
|
52
60
|
- Timo Goebel
|
53
61
|
- Tom Caspy
|
54
62
|
- Tomer Brisker
|
@@ -56,7 +64,7 @@ authors:
|
|
56
64
|
autorequire:
|
57
65
|
bindir: bin
|
58
66
|
cert_chain: []
|
59
|
-
date: 2018-
|
67
|
+
date: 2018-06-21 00:00:00.000000000 Z
|
60
68
|
dependencies: []
|
61
69
|
description: MaaS Discovery Plugin engine for Foreman
|
62
70
|
email: gsutclif@redhat.com
|
@@ -115,7 +123,9 @@ files:
|
|
115
123
|
- app/views/discovered_hosts/_selected_hosts.html.erb
|
116
124
|
- app/views/discovered_hosts/edit.html.erb
|
117
125
|
- app/views/discovered_hosts/index.html.erb
|
126
|
+
- app/views/discovered_hosts/multiple_auto_provision.html.erb
|
118
127
|
- app/views/discovered_hosts/multiple_destroy.html.erb
|
128
|
+
- app/views/discovered_hosts/multiple_reboot.html.erb
|
119
129
|
- app/views/discovered_hosts/select_multiple_location.html.erb
|
120
130
|
- app/views/discovered_hosts/select_multiple_organization.html.erb
|
121
131
|
- app/views/discovered_hosts/show.html.erb
|
@@ -130,6 +140,7 @@ files:
|
|
130
140
|
- app/views/discovery_rules/new.html.erb
|
131
141
|
- app/views/foreman_discovery/debian_kexec.erb
|
132
142
|
- app/views/foreman_discovery/redhat_kexec.erb
|
143
|
+
- config/as_deprecation_whitelist.yaml
|
133
144
|
- config/initializers/discovery_setup.rb
|
134
145
|
- config/routes.rb
|
135
146
|
- db/migrate/20141107091416_create_discovery_rules.rb
|
@@ -150,6 +161,8 @@ files:
|
|
150
161
|
- db/migrate/20160925213030_change_discovery_widget_names.rb
|
151
162
|
- db/migrate/20160927164411_define_explicit_length_for_discovery_rule_attributes.rb
|
152
163
|
- db/migrate/20161006094714_add_constraints_on_subnets_smart_proxies.rb
|
164
|
+
- db/migrate/20171222120314_add_constraints_on_discovery_rules_hostgroups.rb
|
165
|
+
- db/migrate/20180412124505_add_priority_score_to_discovery_rules.rb
|
153
166
|
- db/seeds.d/50_discovery_templates.rb
|
154
167
|
- db/seeds.d/60_discovery_proxy_feature.rb
|
155
168
|
- db/seeds.d/70_discovery_mail_notification.rb
|
@@ -160,6 +173,7 @@ files:
|
|
160
173
|
- extra/discovery/rhel-dl380-1kdisks.json
|
161
174
|
- extra/discovery/rhel-r730.json
|
162
175
|
- extra/discovery/rhel7-vlan.json
|
176
|
+
- extra/discovery/simple-bond.json
|
163
177
|
- extra/discovery/suse-vmware.json
|
164
178
|
- extra/generate-authors-file
|
165
179
|
- lib/discovery.rake
|
@@ -218,10 +232,12 @@ files:
|
|
218
232
|
- test/functional/api/v2/discovered_hosts_controller_test.rb
|
219
233
|
- test/functional/api/v2/discovery_rules_controller_test.rb
|
220
234
|
- test/functional/api/v2/fact_value_extensions_test.rb
|
235
|
+
- test/functional/api/v2/settings_controller_test.rb
|
221
236
|
- test/functional/discovered_hosts_controller_test.rb
|
222
237
|
- test/functional/discovery_rules_controller_test.rb
|
223
238
|
- test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
|
224
239
|
- test/integration/discovered_hosts_test.rb
|
240
|
+
- test/models/setting_test.rb
|
225
241
|
- test/test_helper_discovery.rb
|
226
242
|
- test/test_plugin_helper.rb
|
227
243
|
- test/unit/discovered_extensions_test.rb
|
@@ -236,7 +252,7 @@ files:
|
|
236
252
|
- test/unit/setting_discovered_test.rb
|
237
253
|
- test/unit/ui_notifications/destroy_host_test.rb
|
238
254
|
- test/unit/ui_notifications/new_host_test.rb
|
239
|
-
homepage:
|
255
|
+
homepage: https://github.com/theforeman/foreman_discovery
|
240
256
|
licenses:
|
241
257
|
- GPL-3.0
|
242
258
|
metadata: {}
|
@@ -256,11 +272,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
256
272
|
version: '0'
|
257
273
|
requirements: []
|
258
274
|
rubyforge_project:
|
259
|
-
rubygems_version: 2.6
|
275
|
+
rubygems_version: 2.7.6
|
260
276
|
signing_key:
|
261
277
|
specification_version: 4
|
262
278
|
summary: MaaS Discovery Plugin for Foreman
|
263
279
|
test_files:
|
280
|
+
- test/models/setting_test.rb
|
264
281
|
- test/test_plugin_helper.rb
|
265
282
|
- test/test_helper_discovery.rb
|
266
283
|
- test/integration/discovered_hosts_test.rb
|
@@ -281,6 +298,7 @@ test_files:
|
|
281
298
|
- test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
|
282
299
|
- test/functional/api/v2/fact_value_extensions_test.rb
|
283
300
|
- test/functional/api/v2/discovered_hosts_controller_test.rb
|
301
|
+
- test/functional/api/v2/settings_controller_test.rb
|
284
302
|
- test/functional/api/v2/discovery_rules_controller_test.rb
|
285
303
|
- test/functional/discovered_hosts_controller_test.rb
|
286
304
|
- test/functional/discovery_rules_controller_test.rb
|