foreman_discovery 20.0.1 → 21.0.0
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 +4 -4
- data/app/models/host/discovered.rb +10 -1
- data/app/services/foreman_discovery/host_converter.rb +9 -2
- data/app/views/foreman_discovery/debian_kexec.erb +3 -1
- data/app/views/foreman_discovery/redhat_kexec.erb +3 -1
- 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 +27 -19
- data/locale/ca/foreman_discovery.po +17 -11
- data/locale/de/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/de/foreman_discovery.edit.po +19 -11
- data/locale/de/foreman_discovery.po +9 -3
- data/locale/en/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/en/foreman_discovery.edit.po +16 -8
- data/locale/en/foreman_discovery.po +7 -1
- data/locale/en_GB/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/en_GB/foreman_discovery.edit.po +19 -11
- data/locale/en_GB/foreman_discovery.po +9 -3
- data/locale/es/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/es/foreman_discovery.edit.po +19 -11
- data/locale/es/foreman_discovery.po +9 -3
- data/locale/foreman_discovery.pot +23 -9
- data/locale/fr/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/fr/foreman_discovery.edit.po +49 -41
- data/locale/fr/foreman_discovery.po +39 -33
- data/locale/gl/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/gl/foreman_discovery.edit.po +29 -21
- data/locale/gl/foreman_discovery.po +19 -13
- data/locale/it/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/it/foreman_discovery.edit.po +19 -11
- data/locale/it/foreman_discovery.po +9 -3
- data/locale/ja/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ja/foreman_discovery.edit.po +21 -13
- data/locale/ja/foreman_discovery.po +11 -5
- data/locale/ko/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ko/foreman_discovery.edit.po +19 -11
- data/locale/ko/foreman_discovery.po +9 -3
- data/locale/pt_BR/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/pt_BR/foreman_discovery.edit.po +19 -11
- data/locale/pt_BR/foreman_discovery.po +9 -3
- data/locale/ru/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ru/foreman_discovery.edit.po +19 -11
- data/locale/ru/foreman_discovery.po +9 -3
- data/locale/sv_SE/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/sv_SE/foreman_discovery.edit.po +29 -21
- data/locale/sv_SE/foreman_discovery.po +19 -13
- data/locale/zh_CN/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/zh_CN/foreman_discovery.edit.po +21 -13
- data/locale/zh_CN/foreman_discovery.po +11 -5
- data/locale/zh_TW/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/zh_TW/foreman_discovery.edit.po +19 -11
- data/locale/zh_TW/foreman_discovery.po +9 -3
- data/test/unit/discovered_extensions_test.rb +14 -1
- data/test/unit/host_discovered_test.rb +7 -1
- metadata +6 -4
@@ -8,10 +8,10 @@
|
|
8
8
|
# johnny.westerlund <johnny.westerlund@gmail.com>, 2014
|
9
9
|
msgid ""
|
10
10
|
msgstr ""
|
11
|
-
"Project-Id-Version: foreman_discovery
|
11
|
+
"Project-Id-Version: foreman_discovery 21.0.0\n"
|
12
12
|
"Report-Msgid-Bugs-To: \n"
|
13
|
-
"PO-Revision-Date:
|
14
|
-
"Last-Translator:
|
13
|
+
"PO-Revision-Date: 2013-11-15 17:25+0000\n"
|
14
|
+
"Last-Translator: johnny.westerlund <johnny.westerlund@gmail.com>, 2014\n"
|
15
15
|
"Language-Team: Swedish (Sweden) (http://www.transifex.com/foreman/foreman/lang"
|
16
16
|
"uage/sv_SE/)\n"
|
17
17
|
"MIME-Version: 1.0\n"
|
@@ -66,7 +66,7 @@ msgid "Automatically reboot or kexec discovered host during provisioning"
|
|
66
66
|
msgstr ""
|
67
67
|
|
68
68
|
msgid "Back"
|
69
|
-
msgstr ""
|
69
|
+
msgstr "Tillbaka"
|
70
70
|
|
71
71
|
msgid "CPUs"
|
72
72
|
msgstr "CPUer"
|
@@ -135,7 +135,7 @@ msgid "Destroyed selected hosts"
|
|
135
135
|
msgstr "Förstör markerade värdar"
|
136
136
|
|
137
137
|
msgid "Details"
|
138
|
-
msgstr ""
|
138
|
+
msgstr "Detaljer"
|
139
139
|
|
140
140
|
msgid "Disable"
|
141
141
|
msgstr ""
|
@@ -311,7 +311,7 @@ msgid "Foreman discovered hosts summary"
|
|
311
311
|
msgstr ""
|
312
312
|
|
313
313
|
msgid "Hardware"
|
314
|
-
msgstr ""
|
314
|
+
msgstr "Hårdvara"
|
315
315
|
|
316
316
|
msgid "Hardware facts"
|
317
317
|
msgstr ""
|
@@ -366,7 +366,7 @@ msgid "Hostnames must not start with numbers. A good approach is to use unique i
|
|
366
366
|
msgstr ""
|
367
367
|
|
368
368
|
msgid "Hosts"
|
369
|
-
msgstr ""
|
369
|
+
msgstr "Värdar"
|
370
370
|
|
371
371
|
msgid "Hosts Limit"
|
372
372
|
msgstr ""
|
@@ -456,7 +456,7 @@ msgid "Location"
|
|
456
456
|
msgstr "Lokation"
|
457
457
|
|
458
458
|
msgid "Locations"
|
459
|
-
msgstr ""
|
459
|
+
msgstr "Lokationer"
|
460
460
|
|
461
461
|
msgid "Lock PXE"
|
462
462
|
msgstr ""
|
@@ -498,7 +498,7 @@ msgid "Name of the parameter"
|
|
498
498
|
msgstr "Parameterns namn"
|
499
499
|
|
500
500
|
msgid "Network"
|
501
|
-
msgstr ""
|
501
|
+
msgstr "Nätverk"
|
502
502
|
|
503
503
|
msgid "Network facts"
|
504
504
|
msgstr ""
|
@@ -512,12 +512,18 @@ msgstr ""
|
|
512
512
|
msgid "New in the last 24 hours"
|
513
513
|
msgstr ""
|
514
514
|
|
515
|
+
msgid "No Discovery Rules found in this context. Create Discovery Rules to perform automated provisioning on Discovered Hosts"
|
516
|
+
msgstr ""
|
517
|
+
|
515
518
|
msgid "No discovered hosts available"
|
516
519
|
msgstr ""
|
517
520
|
|
518
521
|
msgid "No discovered hosts for the selected period"
|
519
522
|
msgstr ""
|
520
523
|
|
524
|
+
msgid "No discovered hosts found in this context. This page shows discovered bare-metal or virtual nodes waiting to be provisioned."
|
525
|
+
msgstr ""
|
526
|
+
|
521
527
|
msgid "No discovered hosts to provision"
|
522
528
|
msgstr ""
|
523
529
|
|
@@ -549,7 +555,7 @@ msgid "Organization"
|
|
549
555
|
msgstr "Organisation"
|
550
556
|
|
551
557
|
msgid "Organizations"
|
552
|
-
msgstr ""
|
558
|
+
msgstr "Organisationer"
|
553
559
|
|
554
560
|
msgid "PXEGrub template to be used when pinning a host to discovery"
|
555
561
|
msgstr ""
|
@@ -573,7 +579,7 @@ msgid "Prefer IPv6 to IPv4 when calling discovered nodes"
|
|
573
579
|
msgstr ""
|
574
580
|
|
575
581
|
msgid "Primary"
|
576
|
-
msgstr ""
|
582
|
+
msgstr "Primär"
|
577
583
|
|
578
584
|
msgid "Provision"
|
579
585
|
msgstr "Provisionera"
|
@@ -678,7 +684,7 @@ msgid "Specify target hostname template pattern in the same syntax as in Provisi
|
|
678
684
|
msgstr ""
|
679
685
|
|
680
686
|
msgid "Storage"
|
681
|
-
msgstr ""
|
687
|
+
msgstr "Lagring"
|
682
688
|
|
683
689
|
msgid "Storage facts"
|
684
690
|
msgstr ""
|
@@ -717,7 +723,7 @@ msgid "This might take a while, as all hosts, facts and reports will be destroye
|
|
717
723
|
msgstr "Detta kan dröja då alla värdar, fakta och rapporter också kommer bli förstörda"
|
718
724
|
|
719
725
|
msgid "Type"
|
720
|
-
msgstr ""
|
726
|
+
msgstr "Typ"
|
721
727
|
|
722
728
|
msgid "Type of name generator"
|
723
729
|
msgstr ""
|
Binary file
|
@@ -5,11 +5,11 @@
|
|
5
5
|
# Translators:
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_discovery
|
8
|
+
"Project-Id-Version: foreman_discovery 21.0.0\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
|
-
"POT-Creation-Date:
|
11
|
-
"PO-Revision-Date:
|
12
|
-
"Last-Translator:
|
10
|
+
"POT-Creation-Date: 2022-03-17 14:06+0100\n"
|
11
|
+
"PO-Revision-Date: 2013-11-15 17:25+0000\n"
|
12
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13
13
|
"Language-Team: Chinese (China) (http://www.transifex.com/foreman/foreman/langu"
|
14
14
|
"age/zh_CN/)\n"
|
15
15
|
"MIME-Version: 1.0\n"
|
@@ -460,31 +460,31 @@ msgstr "无效详情,必须是 Hash"
|
|
460
460
|
msgid "Expected discovery_fact '%s' is missing, unable to detect primary interface and set hostname"
|
461
461
|
msgstr "缺少期望的 discovery_fact '%s',无法检测主接口和设置主机名称"
|
462
462
|
|
463
|
-
#: ../app/models/host/discovered.rb:
|
463
|
+
#: ../app/models/host/discovered.rb:74
|
464
464
|
msgid "Invalid facts: hash does not contain a valid value for any of the facts in the discovery_hostname setting: %s"
|
465
465
|
msgstr "无效详情:hash 不包含 discovery_hostname 设置中任何详情的有效值:%s"
|
466
466
|
|
467
|
-
#: ../app/models/host/discovered.rb:
|
467
|
+
#: ../app/models/host/discovered.rb:103
|
468
468
|
msgid "Facts could not be imported"
|
469
469
|
msgstr "无法导入详情"
|
470
470
|
|
471
|
-
#: ../app/models/host/discovered.rb:
|
471
|
+
#: ../app/models/host/discovered.rb:161
|
472
472
|
msgid "Could not get facts from proxy %{url}: %{error}"
|
473
473
|
msgstr "无法从代理 %{url} 获得详情:%{error}"
|
474
474
|
|
475
|
-
#: ../app/models/host/discovered.rb:
|
475
|
+
#: ../app/models/host/discovered.rb:179
|
476
476
|
msgid "Unable to perform reboot on %{name} (%{url}): %{msg}"
|
477
477
|
msgstr "无法在%{name}(%{url})上执行重新引导:%{msg}"
|
478
478
|
|
479
|
-
#: ../app/models/host/discovered.rb:
|
479
|
+
#: ../app/models/host/discovered.rb:183 ../app/models/host/discovered.rb:206
|
480
480
|
msgid "Unable to perform %{action} on %{ips}"
|
481
481
|
msgstr "无法在 %{ips} 上执行 %{action}"
|
482
482
|
|
483
|
-
#: ../app/models/host/discovered.rb:
|
483
|
+
#: ../app/models/host/discovered.rb:202
|
484
484
|
msgid "Unable to perform kexec on %{name} (%{url}): %{msg}"
|
485
485
|
msgstr "无法在 %{name} (%{url}) 上执行 kexec : %{msg}"
|
486
486
|
|
487
|
-
#: ../app/models/host/discovered.rb:
|
487
|
+
#: ../app/models/host/discovered.rb:226
|
488
488
|
msgid "Invalid hostname: Could not normalize the hostname"
|
489
489
|
msgstr "无效的主机名:无法标准化主机名"
|
490
490
|
|
@@ -694,11 +694,11 @@ msgstr "名称生成器类型"
|
|
694
694
|
|
695
695
|
#: ../app/models/setting/discovered.rb:40
|
696
696
|
msgid "Prefer IPv6 to IPv4 when calling discovered nodes"
|
697
|
-
msgstr ""
|
697
|
+
msgstr "在调用发现节点时,首选 IPv6 而不是 IPv4"
|
698
698
|
|
699
699
|
#: ../app/models/setting/discovered.rb:40
|
700
700
|
msgid "Prefer IPv6"
|
701
|
-
msgstr ""
|
701
|
+
msgstr "首选使用 IPv6"
|
702
702
|
|
703
703
|
#: ../app/services/foreman_discovery/fact_parser.rb:4
|
704
704
|
msgid "Discovery fact parser does not work with non-discovery host '%{host}'"
|
@@ -1077,6 +1077,14 @@ msgstr "查看详情 "
|
|
1077
1077
|
msgid "documentation"
|
1078
1078
|
msgstr "文档"
|
1079
1079
|
|
1080
|
+
#: ../webpack/src/ForemanDiscovery/DiscoveredHosts/Components/EmptyState/EmptyState.js:7
|
1081
|
+
msgid "No discovered hosts found in this context. This page shows discovered bare-metal or virtual nodes waiting to be provisioned."
|
1082
|
+
msgstr ""
|
1083
|
+
|
1084
|
+
#: ../webpack/src/ForemanDiscovery/DiscoveryRules/Components/EmptyState/EmptyState.js:12
|
1085
|
+
msgid "No Discovery Rules found in this context. Create Discovery Rules to perform automated provisioning on Discovered Hosts"
|
1086
|
+
msgstr ""
|
1087
|
+
|
1080
1088
|
#: action_names.rb:2
|
1081
1089
|
msgid "Remote action:"
|
1082
1090
|
msgstr "远程操作:"
|
@@ -5,10 +5,10 @@
|
|
5
5
|
# Translators:
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_discovery
|
8
|
+
"Project-Id-Version: foreman_discovery 21.0.0\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
|
-
"PO-Revision-Date:
|
11
|
-
"Last-Translator:
|
10
|
+
"PO-Revision-Date: 2013-11-15 17:25+0000\n"
|
11
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
12
12
|
"Language-Team: Chinese (China) (http://www.transifex.com/foreman/foreman/langu"
|
13
13
|
"age/zh_CN/)\n"
|
14
14
|
"MIME-Version: 1.0\n"
|
@@ -506,12 +506,18 @@ msgstr "新主机"
|
|
506
506
|
msgid "New in the last 24 hours"
|
507
507
|
msgstr "在最近 24 小时之内新建"
|
508
508
|
|
509
|
+
msgid "No Discovery Rules found in this context. Create Discovery Rules to perform automated provisioning on Discovered Hosts"
|
510
|
+
msgstr ""
|
511
|
+
|
509
512
|
msgid "No discovered hosts available"
|
510
513
|
msgstr "没有可用的发现主机"
|
511
514
|
|
512
515
|
msgid "No discovered hosts for the selected period"
|
513
516
|
msgstr "选定时间段内没有发现主机"
|
514
517
|
|
518
|
+
msgid "No discovered hosts found in this context. This page shows discovered bare-metal or virtual nodes waiting to be provisioned."
|
519
|
+
msgstr ""
|
520
|
+
|
515
521
|
msgid "No discovered hosts to provision"
|
516
522
|
msgstr "没有要置备的发现主机"
|
517
523
|
|
@@ -561,10 +567,10 @@ msgid "Please Confirm"
|
|
561
567
|
msgstr "请确认"
|
562
568
|
|
563
569
|
msgid "Prefer IPv6"
|
564
|
-
msgstr ""
|
570
|
+
msgstr "首选使用 IPv6"
|
565
571
|
|
566
572
|
msgid "Prefer IPv6 to IPv4 when calling discovered nodes"
|
567
|
-
msgstr ""
|
573
|
+
msgstr "在调用发现节点时,首选 IPv6 而不是 IPv4"
|
568
574
|
|
569
575
|
msgid "Primary"
|
570
576
|
msgstr "主"
|
Binary file
|
@@ -5,11 +5,11 @@
|
|
5
5
|
# Translators:
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_discovery
|
8
|
+
"Project-Id-Version: foreman_discovery 21.0.0\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
|
-
"POT-Creation-Date:
|
11
|
-
"PO-Revision-Date:
|
12
|
-
"Last-Translator:
|
10
|
+
"POT-Creation-Date: 2022-03-17 14:06+0100\n"
|
11
|
+
"PO-Revision-Date: 2013-11-15 17:25+0000\n"
|
12
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13
13
|
"Language-Team: Chinese (Taiwan) (http://www.transifex.com/foreman/foreman/lang"
|
14
14
|
"uage/zh_TW/)\n"
|
15
15
|
"MIME-Version: 1.0\n"
|
@@ -462,31 +462,31 @@ msgstr ""
|
|
462
462
|
msgid "Expected discovery_fact '%s' is missing, unable to detect primary interface and set hostname"
|
463
463
|
msgstr ""
|
464
464
|
|
465
|
-
#: ../app/models/host/discovered.rb:
|
465
|
+
#: ../app/models/host/discovered.rb:74
|
466
466
|
msgid "Invalid facts: hash does not contain a valid value for any of the facts in the discovery_hostname setting: %s"
|
467
467
|
msgstr ""
|
468
468
|
|
469
|
-
#: ../app/models/host/discovered.rb:
|
469
|
+
#: ../app/models/host/discovered.rb:103
|
470
470
|
msgid "Facts could not be imported"
|
471
471
|
msgstr ""
|
472
472
|
|
473
|
-
#: ../app/models/host/discovered.rb:
|
473
|
+
#: ../app/models/host/discovered.rb:161
|
474
474
|
msgid "Could not get facts from proxy %{url}: %{error}"
|
475
475
|
msgstr ""
|
476
476
|
|
477
|
-
#: ../app/models/host/discovered.rb:
|
477
|
+
#: ../app/models/host/discovered.rb:179
|
478
478
|
msgid "Unable to perform reboot on %{name} (%{url}): %{msg}"
|
479
479
|
msgstr ""
|
480
480
|
|
481
|
-
#: ../app/models/host/discovered.rb:
|
481
|
+
#: ../app/models/host/discovered.rb:183 ../app/models/host/discovered.rb:206
|
482
482
|
msgid "Unable to perform %{action} on %{ips}"
|
483
483
|
msgstr ""
|
484
484
|
|
485
|
-
#: ../app/models/host/discovered.rb:
|
485
|
+
#: ../app/models/host/discovered.rb:202
|
486
486
|
msgid "Unable to perform kexec on %{name} (%{url}): %{msg}"
|
487
487
|
msgstr ""
|
488
488
|
|
489
|
-
#: ../app/models/host/discovered.rb:
|
489
|
+
#: ../app/models/host/discovered.rb:226
|
490
490
|
msgid "Invalid hostname: Could not normalize the hostname"
|
491
491
|
msgstr ""
|
492
492
|
|
@@ -1080,6 +1080,14 @@ msgstr ""
|
|
1080
1080
|
msgid "documentation"
|
1081
1081
|
msgstr ""
|
1082
1082
|
|
1083
|
+
#: ../webpack/src/ForemanDiscovery/DiscoveredHosts/Components/EmptyState/EmptyState.js:7
|
1084
|
+
msgid "No discovered hosts found in this context. This page shows discovered bare-metal or virtual nodes waiting to be provisioned."
|
1085
|
+
msgstr ""
|
1086
|
+
|
1087
|
+
#: ../webpack/src/ForemanDiscovery/DiscoveryRules/Components/EmptyState/EmptyState.js:12
|
1088
|
+
msgid "No Discovery Rules found in this context. Create Discovery Rules to perform automated provisioning on Discovered Hosts"
|
1089
|
+
msgstr ""
|
1090
|
+
|
1083
1091
|
#: action_names.rb:2
|
1084
1092
|
msgid "Remote action:"
|
1085
1093
|
msgstr "遠端動作:"
|
@@ -5,10 +5,10 @@
|
|
5
5
|
# Translators:
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_discovery
|
8
|
+
"Project-Id-Version: foreman_discovery 21.0.0\n"
|
9
9
|
"Report-Msgid-Bugs-To: \n"
|
10
|
-
"PO-Revision-Date:
|
11
|
-
"Last-Translator:
|
10
|
+
"PO-Revision-Date: 2013-11-15 17:25+0000\n"
|
11
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
12
12
|
"Language-Team: Chinese (Taiwan) (http://www.transifex.com/foreman/foreman/lang"
|
13
13
|
"uage/zh_TW/)\n"
|
14
14
|
"MIME-Version: 1.0\n"
|
@@ -509,12 +509,18 @@ msgstr ""
|
|
509
509
|
msgid "New in the last 24 hours"
|
510
510
|
msgstr ""
|
511
511
|
|
512
|
+
msgid "No Discovery Rules found in this context. Create Discovery Rules to perform automated provisioning on Discovered Hosts"
|
513
|
+
msgstr ""
|
514
|
+
|
512
515
|
msgid "No discovered hosts available"
|
513
516
|
msgstr ""
|
514
517
|
|
515
518
|
msgid "No discovered hosts for the selected period"
|
516
519
|
msgstr ""
|
517
520
|
|
521
|
+
msgid "No discovered hosts found in this context. This page shows discovered bare-metal or virtual nodes waiting to be provisioned."
|
522
|
+
msgstr ""
|
523
|
+
|
518
524
|
msgid "No discovered hosts to provision"
|
519
525
|
msgstr ""
|
520
526
|
|
@@ -196,6 +196,19 @@ class DiscoveredExtensionsTest < ActiveSupport::TestCase
|
|
196
196
|
def suggest_ip
|
197
197
|
"192.168.101.13"
|
198
198
|
end
|
199
|
+
|
200
|
+
def ip_addr
|
201
|
+
@ip_addr ||= IPAddr.new("#{suggest_ip}/24")
|
202
|
+
end
|
203
|
+
|
204
|
+
|
205
|
+
def subnet_range
|
206
|
+
@subnet_range ||= ip_addr.to_range
|
207
|
+
end
|
208
|
+
|
209
|
+
def ip_include?(ip)
|
210
|
+
ip_addr.include?(ip)
|
211
|
+
end
|
199
212
|
end
|
200
213
|
|
201
214
|
test "subnet is changed and unused_ip called" do
|
@@ -208,7 +221,7 @@ class DiscoveredExtensionsTest < ActiveSupport::TestCase
|
|
208
221
|
assert_equal subnet, host.subnet
|
209
222
|
hostgroup = FactoryBot.create(:hostgroup, :with_rootpass, :with_os, :pxe_loader => "PXELinux BIOS", :subnet => subnet2, :domain => domain)
|
210
223
|
r1 = FactoryBot.create(:discovery_rule, :priority => 1, :search => "facts.somefact = abc", :organizations => [host.organization], :locations => [host.location], :hostgroup => hostgroup)
|
211
|
-
Subnet.any_instance.expects(:unused_ip).with(host.mac).returns(StubIPAM.new)
|
224
|
+
Subnet.any_instance.expects(:unused_ip).at_least_once.with(host.mac).returns(StubIPAM.new)
|
212
225
|
host.primary_interface.stubs(:queue_tftp)
|
213
226
|
host.primary_interface.stubs(:queue_dhcp)
|
214
227
|
managed_host = perform_auto_provision(host, r1)
|
@@ -408,12 +408,18 @@ class HostDiscoveredTest < ActiveSupport::TestCase
|
|
408
408
|
assert_match(/Invalid hostname: Could not normalize the hostname/, exception.message)
|
409
409
|
end
|
410
410
|
|
411
|
-
test "
|
411
|
+
test "choosing the first valid fact from array of fact names" do
|
412
412
|
facts = {"custom_hostname" => "testhostname","notmyfact" => "notusedfactvalue"}
|
413
413
|
discovery_hostname_fact_array = ['macaddress','custom_hostname','someotherfact']
|
414
414
|
assert_equal Host::Discovered.return_first_valid_fact(discovery_hostname_fact_array,facts),"testhostname"
|
415
415
|
end
|
416
416
|
|
417
|
+
test "choosing the first valid MAC address from array of fact names" do
|
418
|
+
facts = {"custom_hostname" => "testhostname","macaddress" => "e5:17:4e:28:02:4c","notmyfact" => "notusedfactvalue"}
|
419
|
+
discovery_hostname_fact_array = ['custom_hostname','macaddress','someotherfact']
|
420
|
+
assert_equal Host::Discovered.return_first_valid_mac(discovery_hostname_fact_array,facts),"e5:17:4e:28:02:4c"
|
421
|
+
end
|
422
|
+
|
417
423
|
context 'notification recipients' do
|
418
424
|
setup do
|
419
425
|
@admins = User.except_hidden.where(:admin => true).pluck(:id)
|
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: 21.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aditi Puntambekar
|
@@ -31,6 +31,8 @@ authors:
|
|
31
31
|
- imriz
|
32
32
|
- Imri Zvik
|
33
33
|
- Ivan Nečas
|
34
|
+
- Jan Matusz
|
35
|
+
- John Mazzie
|
34
36
|
- Joseph Mitchell Magen
|
35
37
|
- June Zhang
|
36
38
|
- kgaikwad
|
@@ -74,7 +76,7 @@ authors:
|
|
74
76
|
autorequire:
|
75
77
|
bindir: bin
|
76
78
|
cert_chain: []
|
77
|
-
date: 2022-
|
79
|
+
date: 2022-03-17 00:00:00.000000000 Z
|
78
80
|
dependencies: []
|
79
81
|
description: MaaS Discovery Plugin engine for Foreman
|
80
82
|
email: gsutclif@redhat.com
|
@@ -325,7 +327,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
325
327
|
- !ruby/object:Gem::Version
|
326
328
|
version: '0'
|
327
329
|
requirements: []
|
328
|
-
rubygems_version: 3.1.
|
330
|
+
rubygems_version: 3.1.6
|
329
331
|
signing_key:
|
330
332
|
specification_version: 4
|
331
333
|
summary: MaaS Discovery Plugin for Foreman
|
@@ -362,9 +364,9 @@ test_files:
|
|
362
364
|
- test/unit/lldp_neighbors_test.rb
|
363
365
|
- test/unit/discovery_rule_test.rb
|
364
366
|
- test/unit/fact_to_category_resolver_test.rb
|
365
|
-
- test/unit/discovered_extensions_test.rb
|
366
367
|
- test/unit/discovery_attribute_set_test.rb
|
367
368
|
- test/unit/fact_parser_test.rb
|
369
|
+
- test/unit/discovered_extensions_test.rb
|
368
370
|
- test/unit/host_discovered_test.rb
|
369
371
|
- test/unit/managed_extensions_test.rb
|
370
372
|
- test/test_helper_discovery.rb
|