foreman_discovery 15.1.0 → 16.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/api/v2/discovered_hosts_controller.rb +10 -3
  3. data/app/controllers/api/v2/discovery_rules_controller.rb +1 -1
  4. data/app/controllers/concerns/foreman/controller/discovered_extensions.rb +4 -0
  5. data/app/controllers/discovered_hosts_controller.rb +1 -0
  6. data/app/controllers/discovery_rules_controller.rb +1 -1
  7. data/app/models/discovery_rule.rb +1 -1
  8. data/app/models/host/discovered.rb +39 -17
  9. data/app/models/host/managed_extensions.rb +2 -2
  10. data/app/models/setting/discovered.rb +26 -33
  11. data/app/services/foreman_discovery/fact_parser.rb +1 -1
  12. data/app/services/foreman_discovery/host_converter.rb +38 -2
  13. data/app/services/foreman_discovery/import_hooks/subnet_and_taxonomy.rb +6 -14
  14. data/app/services/foreman_discovery/node_api/node_resource.rb +1 -0
  15. data/app/services/foreman_discovery/subnet_suggestion.rb +26 -0
  16. data/app/views/discovered_hosts/_discovered_host_modal.html.erb +2 -0
  17. data/app/views/foreman_discovery/debian_kexec.erb +1 -1
  18. data/config/routes.rb +2 -0
  19. data/db/migrate/20150512150432_remove_old_discovery_reader_permissions.rb +1 -1
  20. data/db/migrate/20151023144501_regenerate_red_hat_kexec.rb +1 -1
  21. data/db/migrate/20180412124505_add_priority_score_to_discovery_rules.rb +1 -1
  22. data/extra/discover-host +21 -7
  23. data/lib/foreman_discovery/engine.rb +4 -4
  24. data/lib/foreman_discovery/version.rb +1 -1
  25. data/locale/ca/LC_MESSAGES/foreman_discovery.mo +0 -0
  26. data/locale/ca/foreman_discovery.edit.po +226 -263
  27. data/locale/ca/foreman_discovery.po +28 -8
  28. data/locale/de/LC_MESSAGES/foreman_discovery.mo +0 -0
  29. data/locale/de/foreman_discovery.edit.po +229 -265
  30. data/locale/de/foreman_discovery.po +31 -11
  31. data/locale/en/LC_MESSAGES/foreman_discovery.mo +0 -0
  32. data/locale/en/foreman_discovery.edit.po +169 -119
  33. data/locale/en/foreman_discovery.po +24 -4
  34. data/locale/en_GB/LC_MESSAGES/foreman_discovery.mo +0 -0
  35. data/locale/en_GB/foreman_discovery.edit.po +237 -266
  36. data/locale/en_GB/foreman_discovery.po +31 -11
  37. data/locale/es/LC_MESSAGES/foreman_discovery.mo +0 -0
  38. data/locale/es/foreman_discovery.edit.po +236 -265
  39. data/locale/es/foreman_discovery.po +30 -10
  40. data/locale/foreman_discovery.pot +110 -84
  41. data/locale/fr/LC_MESSAGES/foreman_discovery.mo +0 -0
  42. data/locale/fr/foreman_discovery.edit.po +230 -262
  43. data/locale/fr/foreman_discovery.po +28 -8
  44. data/locale/gl/LC_MESSAGES/foreman_discovery.mo +0 -0
  45. data/locale/gl/foreman_discovery.edit.po +221 -261
  46. data/locale/gl/foreman_discovery.po +26 -6
  47. data/locale/it/LC_MESSAGES/foreman_discovery.mo +0 -0
  48. data/locale/it/foreman_discovery.edit.po +221 -261
  49. data/locale/it/foreman_discovery.po +26 -6
  50. data/locale/ja/LC_MESSAGES/foreman_discovery.mo +0 -0
  51. data/locale/ja/foreman_discovery.edit.po +235 -264
  52. data/locale/ja/foreman_discovery.po +29 -9
  53. data/locale/ko/LC_MESSAGES/foreman_discovery.mo +0 -0
  54. data/locale/ko/foreman_discovery.edit.po +223 -262
  55. data/locale/ko/foreman_discovery.po +28 -8
  56. data/locale/pt_BR/LC_MESSAGES/foreman_discovery.mo +0 -0
  57. data/locale/pt_BR/foreman_discovery.edit.po +233 -264
  58. data/locale/pt_BR/foreman_discovery.po +29 -9
  59. data/locale/ru/LC_MESSAGES/foreman_discovery.mo +0 -0
  60. data/locale/ru/foreman_discovery.edit.po +227 -265
  61. data/locale/ru/foreman_discovery.po +29 -9
  62. data/locale/sv_SE/LC_MESSAGES/foreman_discovery.mo +0 -0
  63. data/locale/sv_SE/foreman_discovery.edit.po +222 -262
  64. data/locale/sv_SE/foreman_discovery.po +27 -7
  65. data/locale/zh_CN/LC_MESSAGES/foreman_discovery.mo +0 -0
  66. data/locale/zh_CN/foreman_discovery.edit.po +234 -263
  67. data/locale/zh_CN/foreman_discovery.po +28 -8
  68. data/locale/zh_TW/LC_MESSAGES/foreman_discovery.mo +0 -0
  69. data/locale/zh_TW/foreman_discovery.edit.po +223 -261
  70. data/locale/zh_TW/foreman_discovery.po +26 -6
  71. data/test/facts/bond0-eth0-eth1-active-passive.json +128 -0
  72. data/test/facts/facts_with_lldp_bond_candidate.json +2 -9
  73. data/test/functional/api/v2/discovered_hosts_controller_test.rb +1 -0
  74. data/test/functional/discovered_hosts_controller_test.rb +15 -6
  75. data/test/integration/discovered_hosts_test.rb +1 -0
  76. data/test/test_helper_discovery.rb +12 -0
  77. data/test/unit/discovered_extensions_test.rb +54 -0
  78. data/test/unit/discovery_attribute_set_test.rb +1 -0
  79. data/test/unit/discovery_rule_test.rb +1 -0
  80. data/test/unit/host_discovered_test.rb +32 -13
  81. data/test/unit/managed_extensions_test.rb +2 -0
  82. metadata +36 -31
@@ -14,6 +14,7 @@ class DiscoveryAttributeSetTest < ActiveSupport::TestCase
14
14
  :name => 'discovery_prefix',
15
15
  :value => 'mac',
16
16
  :category => 'Setting::Discovered')
17
+ ::ForemanDiscovery::HostConverter.stubs(:unused_ip_for_host)
17
18
  end
18
19
 
19
20
  test "can search discovered hosts by cpu" do
@@ -3,6 +3,7 @@ require_relative '../test_plugin_helper'
3
3
  class DiscoveryRuleTest < ActiveSupport::TestCase
4
4
  setup do
5
5
  @hostgroup = FactoryBot.create(:hostgroup)
6
+ ::ForemanDiscovery::HostConverter.stubs(:unused_ip_for_host)
6
7
  end
7
8
 
8
9
  should allow_values(*valid_name_list).for(:name)
@@ -7,6 +7,7 @@ class HostDiscoveredTest < ActiveSupport::TestCase
7
7
  setup do
8
8
  @facts = parse_json_fixture('regular_host', true)
9
9
  set_default_settings
10
+ ::ForemanDiscovery::HostConverter.stubs(:unused_ip_for_host)
10
11
  end
11
12
 
12
13
  test "should be able to create Host::Discovered objects" do
@@ -38,9 +39,20 @@ class HostDiscoveredTest < ActiveSupport::TestCase
38
39
  assert_equal discovered_host.id, fact_value.host.id
39
40
  end
40
41
 
42
+ test "should detect bridge as the primary" do
43
+ # Detected primary should be the bridge (.2)
44
+ # "ipaddress_br180": "10.35.27.2"
45
+ # "ipaddress_eth0": "10.35.27.3"
46
+ # "ipaddress": "10.35.27.2"
47
+ subnet = FactoryBot.create(:subnet_ipv4, :name => 'Subnet99', :network => '10.35.27.0', :organizations => [organization_one], :locations => [location_one])
48
+ Subnet.expects(:subnet_for).with('10.35.27.2').returns(subnet)
49
+ host = discover_host_from_facts(@facts)
50
+ assert_equal '10.35.27.2', host.primary_interface.ip
51
+ end
52
+
41
53
  test "should setup subnet" do
42
54
  subnet = FactoryBot.create(:subnet_ipv4, :name => 'Subnet99', :network => '10.35.27.0', :organizations => [organization_one], :locations => [location_one])
43
- Subnet.expects(:subnet_for).with('10.35.27.3').returns(subnet)
55
+ Subnet.expects(:subnet_for).with('10.35.27.2').returns(subnet)
44
56
  host = discover_host_from_facts(@facts)
45
57
  assert_equal subnet, host.primary_interface.subnet
46
58
  end
@@ -48,7 +60,7 @@ class HostDiscoveredTest < ActiveSupport::TestCase
48
60
  test "should setup subnet when update_subnets_from_facts is true" do
49
61
  Setting[:update_subnets_from_facts] = true
50
62
  subnet = FactoryBot.create(:subnet_ipv4, :name => 'Subnet99', :network => '10.35.27.0', :organizations => [organization_one], :locations => [location_one])
51
- Subnet.expects(:subnet_for).with('10.35.27.3').returns(subnet)
63
+ Subnet.expects(:subnet_for).with('10.35.27.2').returns(subnet)
52
64
  host = discover_host_from_facts(@facts)
53
65
  assert_equal subnet, host.primary_interface.subnet
54
66
  end
@@ -59,7 +71,7 @@ class HostDiscoveredTest < ActiveSupport::TestCase
59
71
  Setting['discovery_organization'] = org.name
60
72
  Setting['discovery_location'] = loc.name
61
73
  subnet = FactoryBot.create(:subnet_ipv4, :name => 'Subnet99', :network => '10.35.27.0', :organizations => [org], :locations => [loc])
62
- Subnet.expects(:subnet_for).with('10.35.27.3').returns(subnet)
74
+ Subnet.expects(:subnet_for).with('10.35.27.2').returns(subnet)
63
75
  host = discover_host_from_facts(@facts)
64
76
  assert_equal subnet, host.primary_interface.subnet
65
77
  assert_equal org, host.organization
@@ -74,7 +86,7 @@ class HostDiscoveredTest < ActiveSupport::TestCase
74
86
  Setting['discovery_organization'] = nil
75
87
  Setting['discovery_location'] = nil
76
88
  subnet = FactoryBot.create(:subnet_ipv4, :name => 'Subnet99', :network => '10.35.27.0', :organizations => [org, org2], :locations => [loc, loc2])
77
- Subnet.expects(:subnet_for).with('10.35.27.3').returns(subnet)
89
+ Subnet.expects(:subnet_for).with('10.35.27.2').returns(subnet)
78
90
  host = discover_host_from_facts(@facts)
79
91
  assert_equal subnet, host.primary_interface.subnet
80
92
  assert host.organization
@@ -92,7 +104,7 @@ class HostDiscoveredTest < ActiveSupport::TestCase
92
104
  Setting['discovery_organization'] = org.name
93
105
  Setting['discovery_location'] = loc.name
94
106
  subnet = FactoryBot.create(:subnet_ipv4, :name => 'Subnet99', :network => '10.35.27.0', :organizations => [org], :locations => [loc])
95
- Subnet.expects(:subnet_for).with('10.35.27.3').returns(subnet)
107
+ Subnet.expects(:subnet_for).with('10.35.27.2').returns(subnet)
96
108
  host = discover_host_from_facts(@facts.merge("test_org" => bad_org.title, "test_loc" => bad_loc.title))
97
109
  assert_equal subnet, host.primary_interface.subnet
98
110
  assert_equal org, host.organization
@@ -111,7 +123,7 @@ class HostDiscoveredTest < ActiveSupport::TestCase
111
123
  Setting['discovery_organization'] = org.name
112
124
  Setting['discovery_location'] = loc.name
113
125
  subnet = FactoryBot.create(:subnet_ipv4, :name => 'Subnet99', :network => '10.35.27.0', :organizations => [org, bad_org], :locations => [loc, bad_loc])
114
- Subnet.expects(:subnet_for).with('10.35.27.3').returns(subnet)
126
+ Subnet.expects(:subnet_for).with('10.35.27.2').returns(subnet)
115
127
  host = discover_host_from_facts(@facts.merge("foreman_organization" => bad_org.title, "foreman_location" => bad_loc.title))
116
128
  assert_equal subnet, host.primary_interface.subnet
117
129
  assert_equal org, host.organization
@@ -129,7 +141,7 @@ class HostDiscoveredTest < ActiveSupport::TestCase
129
141
  Setting['discovery_organization'] = org.name
130
142
  Setting['discovery_location'] = loc.name
131
143
  subnet = FactoryBot.create(:subnet_ipv4, :name => 'Subnet99', :network => '10.35.27.0', :organizations => [org, bad_org], :locations => [loc, bad_loc])
132
- Subnet.expects(:subnet_for).with('10.35.27.3').returns(subnet)
144
+ Subnet.expects(:subnet_for).with('10.35.27.2').returns(subnet)
133
145
  host = discover_host_from_facts(@facts)
134
146
  assert_equal subnet, host.primary_interface.subnet
135
147
  assert_equal org, host.organization
@@ -148,7 +160,7 @@ class HostDiscoveredTest < ActiveSupport::TestCase
148
160
  Setting['discovery_organization'] = org.name
149
161
  Setting['discovery_location'] = loc.name
150
162
  subnet = FactoryBot.create(:subnet_ipv4, :name => 'Subnet99', :network => '10.35.27.0', :organizations => [org], :locations => [loc])
151
- Subnet.expects(:subnet_for).with('10.35.27.3').returns(subnet)
163
+ Subnet.expects(:subnet_for).with('10.35.27.2').returns(subnet)
152
164
  host = discover_host_from_facts(@facts)
153
165
  assert_equal org, host.organization
154
166
  assert_equal loc, host.location
@@ -188,7 +200,7 @@ class HostDiscoveredTest < ActiveSupport::TestCase
188
200
  :organizations => [organization_one],
189
201
  :locations => [location_one]
190
202
  )
191
- Subnet.expects(:subnet_for).with('10.35.27.3').returns(subnet)
203
+ Subnet.expects(:subnet_for).with('10.35.27.2').returns(subnet)
192
204
  ProxyAPI::TFTP.any_instance.expects(:set).with(anything, 'e4:1f:13:cc:36:58', anything).returns(true).times(3)
193
205
  TemplateKind::PXE.each do |kind|
194
206
  ProvisioningTemplate.where(:name => "#{kind.downcase}_discovery").first_or_create(
@@ -259,14 +271,14 @@ class HostDiscoveredTest < ActiveSupport::TestCase
259
271
  assert_equal 'mace41f13cc3658', host1.name
260
272
  assert_equal 'IBM System x -[7870K4G]-', host1.facts["productname"]
261
273
  assert_equal 1, Host::Discovered.where(:name => 'mace41f13cc3658').count
262
- assert_equal '10.35.27.3', host1.ip
274
+ assert_equal '10.35.27.2', host1.ip
263
275
 
264
276
  @facts["ipaddress_eth0"] = "1.2.3.4"
265
277
  @facts["productname"] = "Dishwasher DW400"
266
278
  host2 = discover_host_from_facts(@facts)
267
279
  assert_equal 'mace41f13cc3658', host2.name
268
280
  assert_equal 'Dishwasher DW400', host2.facts["productname"]
269
- assert_equal '1.2.3.4', host2.ip
281
+ assert_equal '10.35.27.2', host2.ip
270
282
  assert_equal 1, Host::Discovered.where(:name => 'mace41f13cc3658').count
271
283
  end
272
284
 
@@ -438,12 +450,19 @@ class HostDiscoveredTest < ActiveSupport::TestCase
438
450
  end
439
451
  end
440
452
 
453
+ test "primary interface via tagged VLAN is discovered with an IP" do
454
+ raw = parse_json_fixture('rhel7-vlan')
455
+ host = discover_host_from_facts(raw)
456
+ assert_equal "192.168.1.16", host.ip
457
+ assert_equal "eno49.444", host.primary_interface.identifier
458
+ end
459
+
441
460
  test "primary interface isn't touched with no LLDP facts" do
442
461
  Setting[:discovery_auto_bond] = true
443
462
  raw = parse_json_fixture('regular_host', true)
444
463
  host = discover_host_from_facts(raw)
445
464
  refute_nil host.primary_interface
446
- assert_equal "eth0", host.primary_interface.identifier
465
+ assert_equal "br180", host.primary_interface.identifier
447
466
  end
448
467
 
449
468
  test "provision_interface isn't touched with no peer on the same VLAN" do
@@ -451,7 +470,7 @@ class HostDiscoveredTest < ActiveSupport::TestCase
451
470
  raw = parse_json_fixture('facts_with_lldp', true)
452
471
  host = discover_host_from_facts(raw)
453
472
  refute_nil host.primary_interface
454
- assert_equal "eth0", host.primary_interface.identifier
473
+ assert_equal "br180", host.primary_interface.identifier
455
474
  end
456
475
 
457
476
  test "provision_interface is switched to bond0 with more than one interface on the same VLAN" do
@@ -18,6 +18,7 @@ class ManagedExtensionsTest < ActiveSupport::TestCase
18
18
 
19
19
  @host = StubHost.new
20
20
  @host.type = "Host::Discovered"
21
+ @host.stubs(:ip).returns("192.168.1.1")
21
22
  @host.stubs(:old).returns(@host)
22
23
  @facts = {}
23
24
  @host.stubs(:facts).returns(@facts)
@@ -30,6 +31,7 @@ class ManagedExtensionsTest < ActiveSupport::TestCase
30
31
  @host.stubs(:medium).returns('http://a_medium')
31
32
  @host.stubs(:architecture).returns(FactoryBot.create(:architecture))
32
33
  ::MediumProviders::Default.any_instance.stubs(:validate).returns([])
34
+ ::ForemanDiscovery::HostConverter.stubs(:unused_ip_for_host)
33
35
  end
34
36
 
35
37
  test "queue_reboot enques reboot command when there is no kexec fact" do
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: 15.1.0
4
+ version: 16.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aditi Puntambekar
@@ -9,6 +9,7 @@ authors:
9
9
  - Alon Goldboim
10
10
  - amirfefer
11
11
  - Amit Karsale
12
+ - Amit Upadhye
12
13
  - Amos Benari
13
14
  - Avi Sharvit
14
15
  - Bryan Kearney
@@ -34,6 +35,7 @@ authors:
34
35
  - kgaikwad
35
36
  - Lars Berntzon
36
37
  - ldjebran
38
+ - Leos Stejskal
37
39
  - Lukas Zapletal
38
40
  - Lukáš Zapletal
39
41
  - Marek Hulan
@@ -66,10 +68,10 @@ authors:
66
68
  - Tom Caspy
67
69
  - Tomer Brisker
68
70
  - Yann Cézard
69
- autorequire:
71
+ autorequire:
70
72
  bindir: bin
71
73
  cert_chain: []
72
- date: 2019-08-09 00:00:00.000000000 Z
74
+ date: 2021-01-11 00:00:00.000000000 Z
73
75
  dependencies: []
74
76
  description: MaaS Discovery Plugin engine for Foreman
75
77
  email: gsutclif@redhat.com
@@ -115,6 +117,7 @@ files:
115
117
  - app/services/foreman_discovery/node_api/node_resource.rb
116
118
  - app/services/foreman_discovery/node_api/power.rb
117
119
  - app/services/foreman_discovery/node_api/power_service.rb
120
+ - app/services/foreman_discovery/subnet_suggestion.rb
118
121
  - app/services/foreman_discovery/ui_notifications/destroy_host.rb
119
122
  - app/services/foreman_discovery/ui_notifications/new_host.rb
120
123
  - app/views/api/v2/discovered_hosts/base.json.rabl
@@ -235,6 +238,7 @@ files:
235
238
  - locale/zh_TW/foreman_discovery.po
236
239
  - test/factories/discovery_host_related.rb
237
240
  - test/factories/discovery_rule_related.rb
241
+ - test/facts/bond0-eth0-eth1-active-passive.json
238
242
  - test/facts/default.json
239
243
  - test/facts/dell_npars.json
240
244
  - test/facts/dell_vlan.json
@@ -275,7 +279,7 @@ homepage: https://github.com/theforeman/foreman_discovery
275
279
  licenses:
276
280
  - GPL-3.0
277
281
  metadata: {}
278
- post_install_message:
282
+ post_install_message:
279
283
  rdoc_options: []
280
284
  require_paths:
281
285
  - lib
@@ -290,46 +294,47 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
294
  - !ruby/object:Gem::Version
291
295
  version: '0'
292
296
  requirements: []
293
- rubygems_version: 3.0.3
294
- signing_key:
297
+ rubygems_version: 3.1.2
298
+ signing_key:
295
299
  specification_version: 4
296
300
  summary: MaaS Discovery Plugin for Foreman
297
301
  test_files:
298
- - test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
299
- - test/functional/discovered_hosts_controller_test.rb
300
- - test/functional/api/v2/discovered_hosts_controller_test.rb
301
- - test/functional/api/v2/fact_value_extensions_test.rb
302
- - test/functional/api/v2/settings_controller_test.rb
303
- - test/functional/api/v2/discovery_rules_controller_test.rb
304
- - test/functional/discovery_rules_controller_test.rb
305
- - test/integration/discovered_hosts_test.rb
306
- - test/test_plugin_helper.rb
307
- - test/facts/facts_with_lldp.json
308
- - test/facts/dell_vlan.json
309
- - test/facts/simple-bond.json
310
- - test/facts/rhel-r730.json
302
+ - test/factories/discovery_host_related.rb
303
+ - test/factories/discovery_rule_related.rb
304
+ - test/facts/bond0-eth0-eth1-active-passive.json
305
+ - test/facts/default.json
311
306
  - test/facts/dell_npars.json
307
+ - test/facts/dell_vlan.json
308
+ - test/facts/facts_with_lldp.json
309
+ - test/facts/facts_with_lldp_bond_candidate.json
312
310
  - test/facts/pxeless-vlan.json
313
311
  - test/facts/regular_host.json
314
- - test/facts/facts_with_lldp_bond_candidate.json
315
- - test/facts/rhel7-vlan.json
316
- - test/facts/default.json
317
312
  - test/facts/rhel-dl380-1kdisks.json
313
+ - test/facts/rhel-r730.json
314
+ - test/facts/rhel7-vlan.json
315
+ - test/facts/simple-bond.json
318
316
  - test/facts/suse-vmware.json
319
317
  - test/facts/vmware_local.json
318
+ - test/functional/api/v2/discovered_hosts_controller_test.rb
319
+ - test/functional/api/v2/discovery_rules_controller_test.rb
320
+ - test/functional/api/v2/fact_value_extensions_test.rb
321
+ - test/functional/api/v2/settings_controller_test.rb
322
+ - test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
323
+ - test/functional/discovered_hosts_controller_test.rb
324
+ - test/functional/discovery_rules_controller_test.rb
325
+ - test/integration/discovered_hosts_test.rb
326
+ - test/models/setting_test.rb
327
+ - test/test_helper_discovery.rb
328
+ - test/test_plugin_helper.rb
329
+ - test/unit/discovered_mailer_test.rb
330
+ - test/unit/discovery_attribute_set_test.rb
320
331
  - test/unit/discovery_rule_test.rb
321
332
  - test/unit/discovery_taxonomy_extensions_test.rb
322
- - test/unit/discovered_mailer_test.rb
323
333
  - test/unit/fact_parser_test.rb
324
- - test/unit/discovered_extensions_test.rb
325
- - test/unit/setting_discovered_test.rb
326
- - test/unit/host_discovered_test.rb
327
334
  - test/unit/lldp_neighbors_test.rb
335
+ - test/unit/setting_discovered_test.rb
328
336
  - test/unit/ui_notifications/destroy_host_test.rb
329
337
  - test/unit/ui_notifications/new_host_test.rb
330
- - test/unit/discovery_attribute_set_test.rb
338
+ - test/unit/discovered_extensions_test.rb
331
339
  - test/unit/managed_extensions_test.rb
332
- - test/models/setting_test.rb
333
- - test/test_helper_discovery.rb
334
- - test/factories/discovery_rule_related.rb
335
- - test/factories/discovery_host_related.rb
340
+ - test/unit/host_discovered_test.rb