foreman_discovery 25.0.1 → 25.1.1
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/assets/javascripts/foreman_discovery/locale/ca/foreman_discovery.js +13 -4
- data/app/assets/javascripts/foreman_discovery/locale/cs_CZ/foreman_discovery.js +13 -4
- data/app/assets/javascripts/foreman_discovery/locale/de/foreman_discovery.js +13 -4
- data/app/assets/javascripts/foreman_discovery/locale/es/foreman_discovery.js +14 -5
- data/app/assets/javascripts/foreman_discovery/locale/fr/foreman_discovery.js +17 -8
- data/app/assets/javascripts/foreman_discovery/locale/gl/foreman_discovery.js +13 -4
- data/app/assets/javascripts/foreman_discovery/locale/it/foreman_discovery.js +13 -4
- data/app/assets/javascripts/foreman_discovery/locale/ja/foreman_discovery.js +17 -8
- data/app/assets/javascripts/foreman_discovery/locale/ka/foreman_discovery.js +13 -4
- data/app/assets/javascripts/foreman_discovery/locale/ko/foreman_discovery.js +136 -130
- data/app/assets/javascripts/foreman_discovery/locale/pt_BR/foreman_discovery.js +13 -4
- data/app/assets/javascripts/foreman_discovery/locale/ru/foreman_discovery.js +13 -4
- data/app/assets/javascripts/foreman_discovery/locale/sv_SE/foreman_discovery.js +13 -4
- data/app/assets/javascripts/foreman_discovery/locale/zh_CN/foreman_discovery.js +18 -9
- data/app/assets/javascripts/foreman_discovery/locale/zh_TW/foreman_discovery.js +13 -4
- data/app/controllers/api/v2/discovered_hosts_controller.rb +2 -0
- data/app/controllers/concerns/foreman/controller/parameters/discovered_host.rb +41 -35
- data/app/controllers/concerns/foreman/controller/parameters/discovery_rule.rb +18 -12
- data/app/controllers/discovered_hosts_controller.rb +0 -13
- data/app/models/host/discovered.rb +1 -0
- data/app/services/foreman_discovery/fact_to_category_resolver.rb +11 -6
- data/app/services/foreman_discovery/lldp_neighbors.rb +6 -2
- data/app/views/api/v2/discovered_hosts/main.json.rabl +2 -1
- data/app/views/discovered_hosts/_discovered_host.html.erb +1 -0
- data/app/views/discovered_hosts/_discovered_hosts_list.html.erb +2 -1
- data/app/views/discovered_hosts/show.html.erb +3 -1
- data/app/views/discovered_mailer/_discovered_host.html.erb +5 -0
- data/lib/foreman_discovery/version.rb +1 -1
- data/locale/ca/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ca/foreman_discovery.po +13 -4
- data/locale/cs_CZ/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/cs_CZ/foreman_discovery.po +13 -4
- data/locale/de/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/de/foreman_discovery.po +13 -4
- data/locale/es/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/es/foreman_discovery.po +17 -8
- data/locale/foreman_discovery.pot +136 -137
- data/locale/fr/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/fr/foreman_discovery.po +17 -8
- data/locale/gl/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/gl/foreman_discovery.po +13 -4
- data/locale/it/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/it/foreman_discovery.po +13 -4
- data/locale/ja/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ja/foreman_discovery.po +17 -8
- data/locale/ka/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ka/foreman_discovery.po +13 -4
- data/locale/ko/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ko/foreman_discovery.po +136 -130
- data/locale/pt_BR/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/pt_BR/foreman_discovery.po +13 -4
- data/locale/ru/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/ru/foreman_discovery.po +13 -4
- data/locale/sv_SE/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/sv_SE/foreman_discovery.po +13 -4
- data/locale/zh_CN/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/zh_CN/foreman_discovery.po +20 -9
- data/locale/zh_TW/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/zh_TW/foreman_discovery.po +13 -4
- data/test/facts/facts_with_lldp_bond_candidate.json +7 -0
- data/test/functional/api/v2/discovered_hosts_controller_test.rb +35 -0
- data/test/test_helper_discovery.rb +21 -7
- data/test/unit/lldp_neighbors_test.rb +34 -0
- metadata +3 -26
- data/app/assets/javascripts/foreman_discovery/locale/en/foreman_discovery.js +0 -835
- data/app/assets/javascripts/foreman_discovery/locale/en_GB/foreman_discovery.js +0 -835
- 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/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/en/foreman_discovery.edit.po +0 -1115
- data/locale/en/foreman_discovery.po +0 -834
- data/locale/en_GB/LC_MESSAGES/foreman_discovery.mo +0 -0
- data/locale/en_GB/foreman_discovery.edit.po +0 -1125
- data/locale/en_GB/foreman_discovery.po +0 -839
- 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
Binary file
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# Valeria S Silva <valeriassilva@live.com>, 2015
|
14
14
|
msgid ""
|
15
15
|
msgstr ""
|
16
|
-
"Project-Id-Version: foreman_discovery 25.
|
16
|
+
"Project-Id-Version: foreman_discovery 25.1.0\n"
|
17
17
|
"Report-Msgid-Bugs-To: \n"
|
18
18
|
"PO-Revision-Date: 2013-11-15 17:25+0000\n"
|
19
19
|
"Last-Translator: Valeria S Silva <valeriassilva@live.com>, 2015\n"
|
@@ -386,9 +386,6 @@ msgstr "ID do proxy do Discovery a ser usado nesta sub-rede para gerenciar conex
|
|
386
386
|
msgid "IP Address"
|
387
387
|
msgstr "Endereço IP"
|
388
388
|
|
389
|
-
msgid "IP address"
|
390
|
-
msgstr "Endereco de IP"
|
391
|
-
|
392
389
|
msgid "IPAM must be configured for subnet '%s'"
|
393
390
|
msgstr "O IPAM deve ser configurado para a sub-rede '%s'"
|
394
391
|
|
@@ -398,6 +395,12 @@ msgstr "IPMI"
|
|
398
395
|
msgid "IPMI facts"
|
399
396
|
msgstr "Fatos IPMI"
|
400
397
|
|
398
|
+
msgid "IPv4"
|
399
|
+
msgstr "IPv4"
|
400
|
+
|
401
|
+
msgid "IPv6"
|
402
|
+
msgstr "IPv6"
|
403
|
+
|
401
404
|
msgid "Identifier"
|
402
405
|
msgstr "Identificador"
|
403
406
|
|
@@ -809,6 +812,9 @@ msgstr "não é obrigatório se for uma máquina virtual"
|
|
809
812
|
msgid "not required if using a subnet with DHCP proxy"
|
810
813
|
msgstr "não necessário se utilizar um subrede com proxy DHCP"
|
811
814
|
|
815
|
+
msgid "not required if using an IPv6 subnet with DHCP proxy"
|
816
|
+
msgstr ""
|
817
|
+
|
812
818
|
msgid "number of entries per request"
|
813
819
|
msgstr "número de entradas por requisições"
|
814
820
|
|
@@ -833,6 +839,9 @@ msgstr "requerido se o host é gerenciado e uma partição customizada não foi
|
|
833
839
|
msgid "required if host is managed and value is not inherited from host group"
|
834
840
|
msgstr "necessário se o host é gerenciado e valor não é herdado do grupo de host"
|
835
841
|
|
842
|
+
msgid "required if host is managed, does not have IPv4 IP / Subnet, or the value is not inherited from the host group"
|
843
|
+
msgstr ""
|
844
|
+
|
836
845
|
msgid "required if not imaged based provisioning and host is managed and value is not inherited from host group"
|
837
846
|
msgstr "solicitado se o provisionamento não for baseado em imagem, o host for gerenciado e o valor não for herdado do grupo de host"
|
838
847
|
|
Binary file
|
@@ -10,7 +10,7 @@
|
|
10
10
|
# Yulia <yulia.poyarkova@redhat.com>, 2016
|
11
11
|
msgid ""
|
12
12
|
msgstr ""
|
13
|
-
"Project-Id-Version: foreman_discovery 25.
|
13
|
+
"Project-Id-Version: foreman_discovery 25.1.0\n"
|
14
14
|
"Report-Msgid-Bugs-To: \n"
|
15
15
|
"PO-Revision-Date: 2013-11-15 17:25+0000\n"
|
16
16
|
"Last-Translator: Yulia <yulia.poyarkova@redhat.com>, 2016\n"
|
@@ -385,9 +385,6 @@ msgstr ""
|
|
385
385
|
msgid "IP Address"
|
386
386
|
msgstr "IP"
|
387
387
|
|
388
|
-
msgid "IP address"
|
389
|
-
msgstr "IP-адрес"
|
390
|
-
|
391
388
|
msgid "IPAM must be configured for subnet '%s'"
|
392
389
|
msgstr ""
|
393
390
|
|
@@ -397,6 +394,12 @@ msgstr "IPMI"
|
|
397
394
|
msgid "IPMI facts"
|
398
395
|
msgstr ""
|
399
396
|
|
397
|
+
msgid "IPv4"
|
398
|
+
msgstr "IPv4"
|
399
|
+
|
400
|
+
msgid "IPv6"
|
401
|
+
msgstr "IPv6"
|
402
|
+
|
400
403
|
msgid "Identifier"
|
401
404
|
msgstr "Идентификатор"
|
402
405
|
|
@@ -808,6 +811,9 @@ msgstr "не требуется для виртуальных машин"
|
|
808
811
|
msgid "not required if using a subnet with DHCP proxy"
|
809
812
|
msgstr "не требуется, если используется подсеть с DHCP прокси"
|
810
813
|
|
814
|
+
msgid "not required if using an IPv6 subnet with DHCP proxy"
|
815
|
+
msgstr ""
|
816
|
+
|
811
817
|
msgid "number of entries per request"
|
812
818
|
msgstr "количество записей на запрос"
|
813
819
|
|
@@ -832,6 +838,9 @@ msgstr "требуется, если узел находится под упра
|
|
832
838
|
msgid "required if host is managed and value is not inherited from host group"
|
833
839
|
msgstr "требуется, если узел уже контролируется, но значение не было унаследовано от группы узлов"
|
834
840
|
|
841
|
+
msgid "required if host is managed, does not have IPv4 IP / Subnet, or the value is not inherited from the host group"
|
842
|
+
msgstr ""
|
843
|
+
|
835
844
|
msgid "required if not imaged based provisioning and host is managed and value is not inherited from host group"
|
836
845
|
msgstr "требуется, если подготовка управляемого узла осуществляется без участия образов и при этом значение не было унаследовано от группы узлов"
|
837
846
|
|
Binary file
|
@@ -8,7 +8,7 @@
|
|
8
8
|
# johnny.westerlund <johnny.westerlund@gmail.com>, 2014
|
9
9
|
msgid ""
|
10
10
|
msgstr ""
|
11
|
-
"Project-Id-Version: foreman_discovery 25.
|
11
|
+
"Project-Id-Version: foreman_discovery 25.1.0\n"
|
12
12
|
"Report-Msgid-Bugs-To: \n"
|
13
13
|
"PO-Revision-Date: 2013-11-15 17:25+0000\n"
|
14
14
|
"Last-Translator: johnny.westerlund <johnny.westerlund@gmail.com>, 2014\n"
|
@@ -377,9 +377,6 @@ msgstr ""
|
|
377
377
|
msgid "IP Address"
|
378
378
|
msgstr "IPadress"
|
379
379
|
|
380
|
-
msgid "IP address"
|
381
|
-
msgstr ""
|
382
|
-
|
383
380
|
msgid "IPAM must be configured for subnet '%s'"
|
384
381
|
msgstr ""
|
385
382
|
|
@@ -389,6 +386,12 @@ msgstr ""
|
|
389
386
|
msgid "IPMI facts"
|
390
387
|
msgstr ""
|
391
388
|
|
389
|
+
msgid "IPv4"
|
390
|
+
msgstr ""
|
391
|
+
|
392
|
+
msgid "IPv6"
|
393
|
+
msgstr ""
|
394
|
+
|
392
395
|
msgid "Identifier"
|
393
396
|
msgstr ""
|
394
397
|
|
@@ -800,6 +803,9 @@ msgstr ""
|
|
800
803
|
msgid "not required if using a subnet with DHCP proxy"
|
801
804
|
msgstr ""
|
802
805
|
|
806
|
+
msgid "not required if using an IPv6 subnet with DHCP proxy"
|
807
|
+
msgstr ""
|
808
|
+
|
803
809
|
msgid "number of entries per request"
|
804
810
|
msgstr "antal poster per begäran"
|
805
811
|
|
@@ -824,6 +830,9 @@ msgstr ""
|
|
824
830
|
msgid "required if host is managed and value is not inherited from host group"
|
825
831
|
msgstr ""
|
826
832
|
|
833
|
+
msgid "required if host is managed, does not have IPv4 IP / Subnet, or the value is not inherited from the host group"
|
834
|
+
msgstr ""
|
835
|
+
|
827
836
|
msgid "required if not imaged based provisioning and host is managed and value is not inherited from host group"
|
828
837
|
msgstr ""
|
829
838
|
|
Binary file
|
@@ -3,12 +3,14 @@
|
|
3
3
|
# This file is distributed under the same license as the foreman_discovery package.
|
4
4
|
#
|
5
5
|
# Translators:
|
6
|
+
# Ewoud Kohl van Wijngaarden <ewoud+transifex@kohlvanwijngaarden.nl>, 2024
|
6
7
|
msgid ""
|
7
8
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_discovery 25.
|
9
|
+
"Project-Id-Version: foreman_discovery 25.1.0\n"
|
9
10
|
"Report-Msgid-Bugs-To: \n"
|
10
11
|
"PO-Revision-Date: 2013-11-15 17:25+0000\n"
|
11
|
-
"Last-Translator:
|
12
|
+
"Last-Translator: Ewoud Kohl van Wijngaarden <ewoud+transifex@kohlvanwijngaarde"
|
13
|
+
"n.nl>, 2024\n"
|
12
14
|
"Language-Team: Chinese (China) (http://app.transifex.com/foreman/foreman/langu"
|
13
15
|
"age/zh_CN/)\n"
|
14
16
|
"MIME-Version: 1.0\n"
|
@@ -39,7 +41,7 @@ msgid "Assign Organization"
|
|
39
41
|
msgstr "指定机构"
|
40
42
|
|
41
43
|
msgid "Associated Hosts"
|
42
|
-
msgstr "
|
44
|
+
msgstr "关联的主机"
|
43
45
|
|
44
46
|
msgid "Auto Provision"
|
45
47
|
msgstr "自动置备"
|
@@ -160,7 +162,7 @@ msgid "Discovered hosts are rebooting now"
|
|
160
162
|
msgstr "现在正在重启发现主机"
|
161
163
|
|
162
164
|
msgid "Discovered hosts from Foreman server at %{foreman_url}"
|
163
|
-
msgstr "来自
|
165
|
+
msgstr "来自 %{foreman_url} Foreman 服务器的发现主机"
|
164
166
|
|
165
167
|
msgid "Discovered hosts reported from unknown subnet are %s, communication will not be proxied."
|
166
168
|
msgstr "从未知子网报告发现的主机为 %s,通信数据将不会被代理。"
|
@@ -277,7 +279,7 @@ msgid "Failed to reboot host %s"
|
|
277
279
|
msgstr "重启主机 %s 失败"
|
278
280
|
|
279
281
|
msgid "Failed to reboot host %{hostname} with error %{error_message}"
|
280
|
-
msgstr "重启主机
|
282
|
+
msgstr "重启主机 %{hostname} 失败,错误为 %{error_message}"
|
281
283
|
|
282
284
|
msgid "Failed to reboot hosts with error %s"
|
283
285
|
msgstr "无法重启主机,错误 %s"
|
@@ -286,7 +288,7 @@ msgid "Failed to refresh facts for %s"
|
|
286
288
|
msgstr "%s 的事实刷新失败"
|
287
289
|
|
288
290
|
msgid "Failed to refresh facts for %{hostname} with error %{error_message}"
|
289
|
-
msgstr "为
|
291
|
+
msgstr "为 %{hostname} 刷新事实失败,错误为 %{error_message}"
|
290
292
|
|
291
293
|
msgid "For more information please see "
|
292
294
|
msgstr "查看详情 "
|
@@ -371,9 +373,6 @@ msgstr "本子网内用于管理到发现主机的连接的发现代理服务器
|
|
371
373
|
msgid "IP Address"
|
372
374
|
msgstr "IP 地址"
|
373
375
|
|
374
|
-
msgid "IP address"
|
375
|
-
msgstr "IP 地址"
|
376
|
-
|
377
376
|
msgid "IPAM must be configured for subnet '%s'"
|
378
377
|
msgstr "必须为子网 '%s' 配置 IPAM"
|
379
378
|
|
@@ -383,6 +382,12 @@ msgstr "IPMI"
|
|
383
382
|
msgid "IPMI facts"
|
384
383
|
msgstr "IPMI 详情"
|
385
384
|
|
385
|
+
msgid "IPv4"
|
386
|
+
msgstr "IPv4的"
|
387
|
+
|
388
|
+
msgid "IPv6"
|
389
|
+
msgstr "IPv6的"
|
390
|
+
|
386
391
|
msgid "Identifier"
|
387
392
|
msgstr "鉴定"
|
388
393
|
|
@@ -794,6 +799,9 @@ msgstr "如果是虚拟机,则不需要"
|
|
794
799
|
msgid "not required if using a subnet with DHCP proxy"
|
795
800
|
msgstr "如果使用带有 DHCP 代理的子网则不需要"
|
796
801
|
|
802
|
+
msgid "not required if using an IPv6 subnet with DHCP proxy"
|
803
|
+
msgstr "如果使用带有 DHCP 代理的 IPv6 子网,则不需要"
|
804
|
+
|
797
805
|
msgid "number of entries per request"
|
798
806
|
msgstr "每个请求的条目数"
|
799
807
|
|
@@ -818,6 +826,9 @@ msgstr "如果已管理主机,且未定义自定义分区,则需填写"
|
|
818
826
|
msgid "required if host is managed and value is not inherited from host group"
|
819
827
|
msgstr "如果主机是受管的,且值没有从主机组继承,则是必需的"
|
820
828
|
|
829
|
+
msgid "required if host is managed, does not have IPv4 IP / Subnet, or the value is not inherited from the host group"
|
830
|
+
msgstr "如果主机被管理,没有 IPv4 IP / Subnet,或值不是从主机组继承的,则不需要"
|
831
|
+
|
821
832
|
msgid "required if not imaged based provisioning and host is managed and value is not inherited from host group"
|
822
833
|
msgstr "如果不是基于置备镜像的,主机是受管的,且值没有从主机组继承,则是必需的"
|
823
834
|
|
Binary file
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# Translators:
|
6
6
|
msgid ""
|
7
7
|
msgstr ""
|
8
|
-
"Project-Id-Version: foreman_discovery 25.
|
8
|
+
"Project-Id-Version: foreman_discovery 25.1.0\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"
|
@@ -374,9 +374,6 @@ msgstr ""
|
|
374
374
|
msgid "IP Address"
|
375
375
|
msgstr "IP 位址"
|
376
376
|
|
377
|
-
msgid "IP address"
|
378
|
-
msgstr "IP 位址"
|
379
|
-
|
380
377
|
msgid "IPAM must be configured for subnet '%s'"
|
381
378
|
msgstr ""
|
382
379
|
|
@@ -386,6 +383,12 @@ msgstr "IPMI"
|
|
386
383
|
msgid "IPMI facts"
|
387
384
|
msgstr ""
|
388
385
|
|
386
|
+
msgid "IPv4"
|
387
|
+
msgstr "IPv4"
|
388
|
+
|
389
|
+
msgid "IPv6"
|
390
|
+
msgstr "IPv6"
|
391
|
+
|
389
392
|
msgid "Identifier"
|
390
393
|
msgstr "辨識碼"
|
391
394
|
|
@@ -797,6 +800,9 @@ msgstr ""
|
|
797
800
|
msgid "not required if using a subnet with DHCP proxy"
|
798
801
|
msgstr "若是使用一個含有 DHCP 協定的子網路則不需要"
|
799
802
|
|
803
|
+
msgid "not required if using an IPv6 subnet with DHCP proxy"
|
804
|
+
msgstr ""
|
805
|
+
|
800
806
|
msgid "number of entries per request"
|
801
807
|
msgstr "每個請求的項目數量"
|
802
808
|
|
@@ -821,6 +827,9 @@ msgstr "若主機是個受管理的主機,並且尚未定義自訂分割區的
|
|
821
827
|
msgid "required if host is managed and value is not inherited from host group"
|
822
828
|
msgstr "若主機是個受管理的主機,並且值不是由主機群組所繼承的話便需要"
|
823
829
|
|
830
|
+
msgid "required if host is managed, does not have IPv4 IP / Subnet, or the value is not inherited from the host group"
|
831
|
+
msgstr ""
|
832
|
+
|
824
833
|
msgid "required if not imaged based provisioning and host is managed and value is not inherited from host group"
|
825
834
|
msgstr "若不是基於映像檔的佈建,而主機受管理並且值並非由主機群組所繼承的話便需要"
|
826
835
|
|
@@ -44,7 +44,9 @@
|
|
44
44
|
"timezone": "GMT",
|
45
45
|
"fqdn": "a.server.b.domain",
|
46
46
|
"ipaddress_eth0": "10.35.27.3",
|
47
|
+
"ipaddress6_eth0": "2001:db8:9a7b:fb60::3",
|
47
48
|
"ipaddress_eth1": "10.35.27.4",
|
49
|
+
"ipaddress6_eth1": "2001:db8:9a7b:fb60::4",
|
48
50
|
"puppetversion": "2.6.12",
|
49
51
|
"path": "/root/.gem/bin:/root/.gem/ruby/1.8/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/sbin:/usr/sbin:/root/scripts",
|
50
52
|
"hardwaremodel": "x86_64",
|
@@ -58,11 +60,14 @@
|
|
58
60
|
"macaddress_eth0_182": "E4:1F:13:CC:36:58",
|
59
61
|
"memorysize": "15.57 GB",
|
60
62
|
"ipaddress": "10.35.27.2",
|
63
|
+
"ipaddress6": "2001:db8:5f42:7cd1::2",
|
61
64
|
"rubyversion": "1.8.7",
|
62
65
|
"macaddress_eth0_183": "E4:1F:13:CC:36:58",
|
63
66
|
"physicalprocessorcount": "1",
|
64
67
|
"network_lo": "127.0.0.0",
|
68
|
+
"network6_lo": "::1",
|
65
69
|
"gateway": "10.35.27.62",
|
70
|
+
"gateway6": "2001:db8:2c7d:f15e::3e",
|
66
71
|
"lsbdistid": "RedHatEnterpriseServer",
|
67
72
|
"lsbdistdescription": "Red Hat Enterprise Linux Server release 6.2 (Santiago)",
|
68
73
|
"swapsize": "17.70 GB",
|
@@ -90,11 +95,13 @@
|
|
90
95
|
"lldp_neighbor_portID_eth1": "Eth170/1/3",
|
91
96
|
"lldp_neighbor_sysName_eth1": "DC2-A03-DR-01",
|
92
97
|
"lldp_neighbor_mngAddr_ipv4_eth1": "192.0.2.13",
|
98
|
+
"lldp_neighbor_mngAddr_ipv6_eth1": "2001:db8:4d2b:dc7b::13",
|
93
99
|
"lldp_neighbor_PVID_eth1": "182",
|
94
100
|
"lldp_neighbor_chassisID_eth0": "e0:d1:73:38:5a:84",
|
95
101
|
"lldp_neighbor_portID_eth0": "Eth171/1/3",
|
96
102
|
"lldp_neighbor_sysName_eth0": "DC2-A04-DR-03",
|
97
103
|
"lldp_neighbor_mngAddr_ipv4_eth0": "192.0.2.13",
|
104
|
+
"lldp_neighbor_mngAddr_ipv6_eth0": "2001:db8:4d2b:dc7b::13",
|
98
105
|
"lldp_neighbor_PVID_eth0": "182"
|
99
106
|
}
|
100
107
|
}
|
@@ -25,6 +25,12 @@ class Api::V2::DiscoveredHostsControllerTest < ActionController::TestCase
|
|
25
25
|
"memorysize_mb" => "42000.42",
|
26
26
|
"discovery_version" => "3.0.0",
|
27
27
|
}
|
28
|
+
|
29
|
+
@facts6 = @facts.merge({
|
30
|
+
"ipaddress" => "2001:db8::1",
|
31
|
+
"ipaddress6_eth0" => "2001:db8::1",
|
32
|
+
})
|
33
|
+
|
28
34
|
set_default_settings
|
29
35
|
::ForemanDiscovery::NodeAPI::PowerService.any_instance.stubs(:reboot).returns(true)
|
30
36
|
::ForemanDiscovery::HostConverter.stubs(:unused_ip_for_host)
|
@@ -52,6 +58,16 @@ class Api::V2::DiscoveredHostsControllerTest < ActionController::TestCase
|
|
52
58
|
assert_equal Setting[:discovery_location], show_response["location_name"]
|
53
59
|
end
|
54
60
|
|
61
|
+
def test_show_host_ipv6
|
62
|
+
host = discover_host_from_facts(@facts6)
|
63
|
+
get :show, params: { :id => host.id }
|
64
|
+
assert_response :success
|
65
|
+
|
66
|
+
response = ActiveSupport::JSON.decode(@response.body)
|
67
|
+
assert_equal "macaabbccddeeff", response["name"]
|
68
|
+
assert_equal @facts6["ipaddress6_eth0"], response["ip6"]
|
69
|
+
end
|
70
|
+
|
55
71
|
def test_delete_discovered_host
|
56
72
|
host = discover_host_from_facts(@facts)
|
57
73
|
delete :destroy, params: { :id => host.id }
|
@@ -91,6 +107,25 @@ class Api::V2::DiscoveredHostsControllerTest < ActionController::TestCase
|
|
91
107
|
assert actual.build?
|
92
108
|
end
|
93
109
|
|
110
|
+
def test_provision_ipv6_host
|
111
|
+
subnet6 = FactoryBot.create(:subnet_ipv6, :network => "2001:db8::")
|
112
|
+
host = discover_host_from_facts(@facts6)
|
113
|
+
hostgroup = setup_hostgroup(host, subnets: { subnet6: subnet6 })
|
114
|
+
|
115
|
+
put :update, params: {
|
116
|
+
id: host.id,
|
117
|
+
discovered_host: {
|
118
|
+
hostgroup_id: hostgroup.id,
|
119
|
+
build: true
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
123
|
+
assert_response :success
|
124
|
+
actual = Host.unscoped.find(host.id)
|
125
|
+
assert actual.build?
|
126
|
+
assert_equal actual.ip6, @facts6["ipaddress6_eth0"]
|
127
|
+
end
|
128
|
+
|
94
129
|
def test_provision_host_without_build_flag
|
95
130
|
FactoryBot.create(:organization, :name => 'SomeOrg')
|
96
131
|
FactoryBot.create(:location, :name => 'SomeLoc')
|
@@ -70,9 +70,11 @@ def set_default_settings
|
|
70
70
|
Setting['discovery_auto_bond'] = false
|
71
71
|
end
|
72
72
|
|
73
|
-
def setup_hostgroup(host)
|
73
|
+
def setup_hostgroup(host, subnets: nil)
|
74
74
|
domain = FactoryBot.create(:domain)
|
75
|
-
|
75
|
+
subnets ||= {
|
76
|
+
subnet: FactoryBot.create(:subnet_ipv4, :network => "192.168.100.0")
|
77
|
+
}
|
76
78
|
medium = FactoryBot.create(:medium, :organizations => [host.organization], :locations => [host.location])
|
77
79
|
os = FactoryBot.create(:operatingsystem, :with_ptables, :with_archs, :media => [medium])
|
78
80
|
args = {
|
@@ -80,11 +82,11 @@ def setup_hostgroup(host)
|
|
80
82
|
:architecture => os.architectures.first,
|
81
83
|
:ptable => os.ptables.first,
|
82
84
|
:medium => os.media.first,
|
83
|
-
:subnet => subnet,
|
84
85
|
:domain => domain,
|
85
86
|
:organizations => [host.organization],
|
86
87
|
:locations => [host.location]
|
87
|
-
}
|
88
|
+
}.merge(subnets)
|
89
|
+
|
88
90
|
if defined?(ForemanPuppet)
|
89
91
|
environment = FactoryBot.create(:environment, :organizations => [host.organization], :locations => [host.location])
|
90
92
|
args[:environment] = environment
|
@@ -92,15 +94,26 @@ def setup_hostgroup(host)
|
|
92
94
|
else
|
93
95
|
hostgroup = FactoryBot.create(:hostgroup, :with_rootpass, **args)
|
94
96
|
end
|
95
|
-
|
97
|
+
|
98
|
+
hostgroup_subnets = [hostgroup.subnet6, hostgroup.subnet].compact
|
99
|
+
domain.subnets << hostgroup_subnets
|
100
|
+
|
101
|
+
hostgroup_taxonomies(hostgroup, hostgroup_subnets, host)
|
102
|
+
end
|
103
|
+
|
104
|
+
def hostgroup_taxonomies(hostgroup, hostgroup_subnets, host)
|
96
105
|
hostgroup.medium.organizations |= [host.organization]
|
97
106
|
hostgroup.medium.locations |= [host.location]
|
98
107
|
hostgroup.ptable.organizations |= [host.organization]
|
99
108
|
hostgroup.ptable.locations |= [host.location]
|
100
109
|
hostgroup.domain.organizations |= [host.organization]
|
101
110
|
hostgroup.domain.locations |= [host.location]
|
102
|
-
|
103
|
-
|
111
|
+
|
112
|
+
hostgroup_subnets.each do |subnet|
|
113
|
+
subnet.organizations |= [host.organization]
|
114
|
+
subnet.locations |= [host.location]
|
115
|
+
end
|
116
|
+
|
104
117
|
if defined?(ForemanPuppet)
|
105
118
|
hostgroup.environment.organizations |= [host.organization]
|
106
119
|
hostgroup.environment.locations |= [host.location]
|
@@ -109,6 +122,7 @@ def setup_hostgroup(host)
|
|
109
122
|
hostgroup.puppet_ca_proxy.organizations |= [host.organization]
|
110
123
|
hostgroup.puppet_ca_proxy.locations |= [host.location]
|
111
124
|
end
|
125
|
+
|
112
126
|
hostgroup
|
113
127
|
end
|
114
128
|
|
@@ -1,6 +1,9 @@
|
|
1
1
|
require_relative '../test_plugin_helper'
|
2
2
|
|
3
3
|
class LldpNeighborsTest < ActiveSupport::TestCase
|
4
|
+
include FactImporterIsolation
|
5
|
+
allow_transactions_for_any_importer
|
6
|
+
|
4
7
|
test "#get_neighbors_by_interface gives nothing with no LLDP facts" do
|
5
8
|
assert_nil simple_facts.get_neighbors_by_interface('eth0')
|
6
9
|
end
|
@@ -32,6 +35,37 @@ class LldpNeighborsTest < ActiveSupport::TestCase
|
|
32
35
|
assert_equal({'182' => %w(eth2), '184' => %w(eth1)}, lldp_facts.list_by_pvid)
|
33
36
|
end
|
34
37
|
|
38
|
+
test "#eventually_make_bond" do
|
39
|
+
facts = parse_json_fixture('facts_with_lldp_bond_candidate', true)
|
40
|
+
host = discover_host_from_facts(facts)
|
41
|
+
primary = host.primary_interface
|
42
|
+
|
43
|
+
assert_equal 0, host.interfaces.where(:type => 'Nic::Bond').count
|
44
|
+
|
45
|
+
assert primary.primary
|
46
|
+
assert primary.provision
|
47
|
+
assert primary.ip
|
48
|
+
assert primary.ip6
|
49
|
+
|
50
|
+
ForemanDiscovery::LldpNeighbors.eventually_make_bond(host)
|
51
|
+
|
52
|
+
bond = host.primary_interface
|
53
|
+
|
54
|
+
assert_nil primary.ip
|
55
|
+
assert_nil primary.ip6
|
56
|
+
assert_nil primary.name
|
57
|
+
assert_not primary.primary
|
58
|
+
assert_not primary.provision
|
59
|
+
assert_not primary.managed
|
60
|
+
|
61
|
+
assert bond.primary
|
62
|
+
assert bond.provision
|
63
|
+
assert bond.ip
|
64
|
+
assert bond.ip6
|
65
|
+
assert_equal bond.type, 'Nic::Bond'
|
66
|
+
assert_equal bond.identifier, 'bond0'
|
67
|
+
end
|
68
|
+
|
35
69
|
private
|
36
70
|
|
37
71
|
def simple_facts
|
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: 25.
|
4
|
+
version: 25.1.1
|
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: 2025-03-20 00:00:00.000000000 Z
|
80
80
|
dependencies: []
|
81
81
|
description: MaaS Discovery Plugin engine for Foreman
|
82
82
|
email: gsutclif@redhat.com
|
@@ -91,8 +91,6 @@ files:
|
|
91
91
|
- app/assets/javascripts/foreman_discovery/locale/ca/foreman_discovery.js
|
92
92
|
- app/assets/javascripts/foreman_discovery/locale/cs_CZ/foreman_discovery.js
|
93
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
94
|
- app/assets/javascripts/foreman_discovery/locale/es/foreman_discovery.js
|
97
95
|
- app/assets/javascripts/foreman_discovery/locale/fr/foreman_discovery.js
|
98
96
|
- app/assets/javascripts/foreman_discovery/locale/gl/foreman_discovery.js
|
@@ -219,56 +217,35 @@ files:
|
|
219
217
|
- lib/foreman_discovery/engine.rb
|
220
218
|
- lib/foreman_discovery/version.rb
|
221
219
|
- locale/ca/LC_MESSAGES/foreman_discovery.mo
|
222
|
-
- locale/ca/foreman_discovery.edit.po
|
223
220
|
- locale/ca/foreman_discovery.po
|
224
221
|
- locale/cs_CZ/LC_MESSAGES/foreman_discovery.mo
|
225
|
-
- locale/cs_CZ/foreman_discovery.edit.po
|
226
222
|
- locale/cs_CZ/foreman_discovery.po
|
227
223
|
- locale/de/LC_MESSAGES/foreman_discovery.mo
|
228
|
-
- locale/de/foreman_discovery.edit.po
|
229
224
|
- locale/de/foreman_discovery.po
|
230
|
-
- locale/en/LC_MESSAGES/foreman_discovery.mo
|
231
|
-
- locale/en/foreman_discovery.edit.po
|
232
|
-
- locale/en/foreman_discovery.po
|
233
|
-
- locale/en_GB/LC_MESSAGES/foreman_discovery.mo
|
234
|
-
- locale/en_GB/foreman_discovery.edit.po
|
235
|
-
- locale/en_GB/foreman_discovery.po
|
236
225
|
- locale/es/LC_MESSAGES/foreman_discovery.mo
|
237
|
-
- locale/es/foreman_discovery.edit.po
|
238
226
|
- locale/es/foreman_discovery.po
|
239
227
|
- locale/foreman_discovery.pot
|
240
228
|
- locale/fr/LC_MESSAGES/foreman_discovery.mo
|
241
|
-
- locale/fr/foreman_discovery.edit.po
|
242
229
|
- locale/fr/foreman_discovery.po
|
243
230
|
- locale/gl/LC_MESSAGES/foreman_discovery.mo
|
244
|
-
- locale/gl/foreman_discovery.edit.po
|
245
231
|
- locale/gl/foreman_discovery.po
|
246
232
|
- locale/it/LC_MESSAGES/foreman_discovery.mo
|
247
|
-
- locale/it/foreman_discovery.edit.po
|
248
233
|
- locale/it/foreman_discovery.po
|
249
234
|
- locale/ja/LC_MESSAGES/foreman_discovery.mo
|
250
|
-
- locale/ja/foreman_discovery.edit.po
|
251
235
|
- locale/ja/foreman_discovery.po
|
252
236
|
- locale/ka/LC_MESSAGES/foreman_discovery.mo
|
253
|
-
- locale/ka/foreman_discovery.edit.po
|
254
237
|
- locale/ka/foreman_discovery.po
|
255
238
|
- locale/ko/LC_MESSAGES/foreman_discovery.mo
|
256
|
-
- locale/ko/foreman_discovery.edit.po
|
257
239
|
- locale/ko/foreman_discovery.po
|
258
240
|
- locale/pt_BR/LC_MESSAGES/foreman_discovery.mo
|
259
|
-
- locale/pt_BR/foreman_discovery.edit.po
|
260
241
|
- locale/pt_BR/foreman_discovery.po
|
261
242
|
- locale/ru/LC_MESSAGES/foreman_discovery.mo
|
262
|
-
- locale/ru/foreman_discovery.edit.po
|
263
243
|
- locale/ru/foreman_discovery.po
|
264
244
|
- locale/sv_SE/LC_MESSAGES/foreman_discovery.mo
|
265
|
-
- locale/sv_SE/foreman_discovery.edit.po
|
266
245
|
- locale/sv_SE/foreman_discovery.po
|
267
246
|
- locale/zh_CN/LC_MESSAGES/foreman_discovery.mo
|
268
|
-
- locale/zh_CN/foreman_discovery.edit.po
|
269
247
|
- locale/zh_CN/foreman_discovery.po
|
270
248
|
- locale/zh_TW/LC_MESSAGES/foreman_discovery.mo
|
271
|
-
- locale/zh_TW/foreman_discovery.edit.po
|
272
249
|
- locale/zh_TW/foreman_discovery.po
|
273
250
|
- package.json
|
274
251
|
- test/factories/discovery_host_related.rb
|
@@ -351,7 +328,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
351
328
|
- !ruby/object:Gem::Version
|
352
329
|
version: '0'
|
353
330
|
requirements: []
|
354
|
-
rubygems_version: 3.5.
|
331
|
+
rubygems_version: 3.5.22
|
355
332
|
signing_key:
|
356
333
|
specification_version: 4
|
357
334
|
summary: MaaS Discovery Plugin for Foreman
|