foreman_discovery 26.0.1 → 26.1.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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_discovery/locale/ca/foreman_discovery.js +4 -1
  3. data/app/assets/javascripts/foreman_discovery/locale/cs_CZ/foreman_discovery.js +4 -1
  4. data/app/assets/javascripts/foreman_discovery/locale/de/foreman_discovery.js +4 -1
  5. data/app/assets/javascripts/foreman_discovery/locale/en_GB/foreman_discovery.js +847 -0
  6. data/app/assets/javascripts/foreman_discovery/locale/es/foreman_discovery.js +4 -1
  7. data/app/assets/javascripts/foreman_discovery/locale/fr/foreman_discovery.js +4 -1
  8. data/app/assets/javascripts/foreman_discovery/locale/gl/foreman_discovery.js +4 -1
  9. data/app/assets/javascripts/foreman_discovery/locale/it/foreman_discovery.js +4 -1
  10. data/app/assets/javascripts/foreman_discovery/locale/ja/foreman_discovery.js +4 -1
  11. data/app/assets/javascripts/foreman_discovery/locale/ka/foreman_discovery.js +4 -1
  12. data/app/assets/javascripts/foreman_discovery/locale/ko/foreman_discovery.js +4 -1
  13. data/app/assets/javascripts/foreman_discovery/locale/pt_BR/foreman_discovery.js +4 -1
  14. data/app/assets/javascripts/foreman_discovery/locale/ru/foreman_discovery.js +4 -1
  15. data/app/assets/javascripts/foreman_discovery/locale/sv_SE/foreman_discovery.js +4 -1
  16. data/app/assets/javascripts/foreman_discovery/locale/zh_CN/foreman_discovery.js +4 -1
  17. data/app/assets/javascripts/foreman_discovery/locale/zh_TW/foreman_discovery.js +4 -1
  18. data/app/services/foreman_discovery/host_converter.rb +5 -3
  19. data/lib/foreman_discovery/engine.rb +2 -8
  20. data/lib/foreman_discovery/version.rb +1 -1
  21. data/locale/ca/LC_MESSAGES/foreman_discovery.mo +0 -0
  22. data/locale/ca/foreman_discovery.po +4 -1
  23. data/locale/cs_CZ/LC_MESSAGES/foreman_discovery.mo +0 -0
  24. data/locale/cs_CZ/foreman_discovery.po +4 -1
  25. data/locale/de/LC_MESSAGES/foreman_discovery.mo +0 -0
  26. data/locale/de/foreman_discovery.po +4 -1
  27. data/locale/en_GB/LC_MESSAGES/foreman_discovery.mo +0 -0
  28. data/locale/en_GB/foreman_discovery.po +851 -0
  29. data/locale/es/LC_MESSAGES/foreman_discovery.mo +0 -0
  30. data/locale/es/foreman_discovery.po +4 -1
  31. data/locale/foreman_discovery.pot +8 -4
  32. data/locale/fr/LC_MESSAGES/foreman_discovery.mo +0 -0
  33. data/locale/fr/foreman_discovery.po +4 -1
  34. data/locale/gl/LC_MESSAGES/foreman_discovery.mo +0 -0
  35. data/locale/gl/foreman_discovery.po +4 -1
  36. data/locale/it/LC_MESSAGES/foreman_discovery.mo +0 -0
  37. data/locale/it/foreman_discovery.po +4 -1
  38. data/locale/ja/LC_MESSAGES/foreman_discovery.mo +0 -0
  39. data/locale/ja/foreman_discovery.po +4 -1
  40. data/locale/ka/LC_MESSAGES/foreman_discovery.mo +0 -0
  41. data/locale/ka/foreman_discovery.po +4 -1
  42. data/locale/ko/LC_MESSAGES/foreman_discovery.mo +0 -0
  43. data/locale/ko/foreman_discovery.po +4 -1
  44. data/locale/pt_BR/LC_MESSAGES/foreman_discovery.mo +0 -0
  45. data/locale/pt_BR/foreman_discovery.po +4 -1
  46. data/locale/ru/LC_MESSAGES/foreman_discovery.mo +0 -0
  47. data/locale/ru/foreman_discovery.po +4 -1
  48. data/locale/sv_SE/LC_MESSAGES/foreman_discovery.mo +0 -0
  49. data/locale/sv_SE/foreman_discovery.po +4 -1
  50. data/locale/zh_CN/LC_MESSAGES/foreman_discovery.mo +0 -0
  51. data/locale/zh_CN/foreman_discovery.po +4 -1
  52. data/locale/zh_TW/LC_MESSAGES/foreman_discovery.mo +0 -0
  53. data/locale/zh_TW/foreman_discovery.po +4 -1
  54. data/test/test_helper_discovery.rb +0 -1
  55. data/test/unit/host_discovered_test.rb +18 -1
  56. metadata +4 -1
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_discovery": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_discovery 25.1.0",
6
+ "Project-Id-Version": "foreman_discovery 26.0.1",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2013-11-15 17:25+0000",
9
9
  "Last-Translator": "Sergio Ocón-Cárdenas, 2014",
@@ -791,6 +791,9 @@
791
791
  "must be present.": [
792
792
  "debe estar presente."
793
793
  ],
794
+ "must start with a letter": [
795
+ ""
796
+ ],
794
797
  "must start with a letter or ERB.": [
795
798
  "debe comenzar con una letra o ERB."
796
799
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_discovery": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_discovery 25.1.0",
6
+ "Project-Id-Version": "foreman_discovery 26.0.1",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2013-11-15 17:25+0000",
9
9
  "Last-Translator": "Baptiste Agasse <baptiste.agasse@gmail.com>, 2018-2019",
@@ -791,6 +791,9 @@
791
791
  "must be present.": [
792
792
  "doit être présent."
793
793
  ],
794
+ "must start with a letter": [
795
+ ""
796
+ ],
794
797
  "must start with a letter or ERB.": [
795
798
  "doit commencer par une lettre ou par ERB."
796
799
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_discovery": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_discovery 25.1.0",
6
+ "Project-Id-Version": "foreman_discovery 26.0.1",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2013-11-15 17:25+0000",
9
9
  "Last-Translator": "FULL NAME <EMAIL@ADDRESS>",
@@ -788,6 +788,9 @@
788
788
  "must be present.": [
789
789
  ""
790
790
  ],
791
+ "must start with a letter": [
792
+ ""
793
+ ],
791
794
  "must start with a letter or ERB.": [
792
795
  ""
793
796
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_discovery": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_discovery 25.1.0",
6
+ "Project-Id-Version": "foreman_discovery 26.0.1",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2013-11-15 17:25+0000",
9
9
  "Last-Translator": "caifti <caifti@gmail.com>, 2014",
@@ -788,6 +788,9 @@
788
788
  "must be present.": [
789
789
  ""
790
790
  ],
791
+ "must start with a letter": [
792
+ ""
793
+ ],
791
794
  "must start with a letter or ERB.": [
792
795
  "deve iniziare con una lettera o ERB."
793
796
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_discovery": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_discovery 25.1.0",
6
+ "Project-Id-Version": "foreman_discovery 26.0.1",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2013-11-15 17:25+0000",
9
9
  "Last-Translator": "山田 修司 🍣 Shuji Yamada <uzy.exe@gmail.com>, 2015",
@@ -785,6 +785,9 @@
785
785
  "must be present.": [
786
786
  "必須です。"
787
787
  ],
788
+ "must start with a letter": [
789
+ ""
790
+ ],
788
791
  "must start with a letter or ERB.": [
789
792
  "文字または ERB で開始する必要があります。"
790
793
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_discovery": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_discovery 25.1.0",
6
+ "Project-Id-Version": "foreman_discovery 26.0.1",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2013-11-15 17:25+0000",
9
9
  "Last-Translator": "FULL NAME <EMAIL@ADDRESS>",
@@ -788,6 +788,9 @@
788
788
  "must be present.": [
789
789
  "უნდა არსებობდეს."
790
790
  ],
791
+ "must start with a letter": [
792
+ ""
793
+ ],
791
794
  "must start with a letter or ERB.": [
792
795
  "უნდა იწყებოდეს სიმბოლოთი ან ERB-ით."
793
796
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_discovery": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_discovery 25.1.0",
6
+ "Project-Id-Version": "foreman_discovery 26.0.1",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2013-11-15 17:25+0000",
9
9
  "Last-Translator": "Ewoud Kohl van Wijngaarden <ewoud+transifex@kohlvanwijngaarden.nl>, 2022",
@@ -785,6 +785,9 @@
785
785
  "must be present.": [
786
786
  "반드시 존재해야 합니다."
787
787
  ],
788
+ "must start with a letter": [
789
+ ""
790
+ ],
788
791
  "must start with a letter or ERB.": [
789
792
  "문자 또는 ERB로 시작해야 합니다."
790
793
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_discovery": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_discovery 25.1.0",
6
+ "Project-Id-Version": "foreman_discovery 26.0.1",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2013-11-15 17:25+0000",
9
9
  "Last-Translator": "Valeria S Silva <valeriassilva@live.com>, 2015",
@@ -791,6 +791,9 @@
791
791
  "must be present.": [
792
792
  "deve estar presente."
793
793
  ],
794
+ "must start with a letter": [
795
+ ""
796
+ ],
794
797
  "must start with a letter or ERB.": [
795
798
  "deve iniciar com uma letra ou ERB."
796
799
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_discovery": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_discovery 25.1.0",
6
+ "Project-Id-Version": "foreman_discovery 26.0.1",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2013-11-15 17:25+0000",
9
9
  "Last-Translator": "Yulia <yulia.poyarkova@redhat.com>, 2016",
@@ -792,6 +792,9 @@
792
792
  "must be present.": [
793
793
  ""
794
794
  ],
795
+ "must start with a letter": [
796
+ ""
797
+ ],
795
798
  "must start with a letter or ERB.": [
796
799
  "должен начинаться с буквы или ERB"
797
800
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_discovery": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_discovery 25.1.0",
6
+ "Project-Id-Version": "foreman_discovery 26.0.1",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2013-11-15 17:25+0000",
9
9
  "Last-Translator": "johnny.westerlund <johnny.westerlund@gmail.com>, 2014",
@@ -788,6 +788,9 @@
788
788
  "must be present.": [
789
789
  ""
790
790
  ],
791
+ "must start with a letter": [
792
+ ""
793
+ ],
791
794
  "must start with a letter or ERB.": [
792
795
  ""
793
796
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_discovery": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_discovery 25.1.0",
6
+ "Project-Id-Version": "foreman_discovery 26.0.1",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2013-11-15 17:25+0000",
9
9
  "Last-Translator": "Ewoud Kohl van Wijngaarden <ewoud+transifex@kohlvanwijngaarden.nl>, 2024",
@@ -785,6 +785,9 @@
785
785
  "must be present.": [
786
786
  "必须存在。"
787
787
  ],
788
+ "must start with a letter": [
789
+ ""
790
+ ],
788
791
  "must start with a letter or ERB.": [
789
792
  "必须以字母或 ERB 开始。"
790
793
  ],
@@ -3,7 +3,7 @@
3
3
  "locale_data": {
4
4
  "foreman_discovery": {
5
5
  "": {
6
- "Project-Id-Version": "foreman_discovery 25.1.0",
6
+ "Project-Id-Version": "foreman_discovery 26.0.1",
7
7
  "Report-Msgid-Bugs-To": "",
8
8
  "PO-Revision-Date": "2013-11-15 17:25+0000",
9
9
  "Last-Translator": "FULL NAME <EMAIL@ADDRESS>",
@@ -788,6 +788,9 @@
788
788
  "must be present.": [
789
789
  ""
790
790
  ],
791
+ "must start with a letter": [
792
+ ""
793
+ ],
791
794
  "must start with a letter or ERB.": [
792
795
  ""
793
796
  ],
@@ -5,14 +5,16 @@ class ForemanDiscovery::HostConverter
5
5
  def self.to_managed(original_host, set_managed = true, set_build = true, added_attributes = {})
6
6
  host = original_host.becomes(::Host::Managed)
7
7
  host.type = 'Host::Managed'
8
- host.attributes = host.apply_inherited_attributes(added_attributes)
9
- host.set_hostgroup_defaults if host.hostgroup_id.present?
10
8
 
11
9
  # the following flags can be skipped when parameters are set to false
12
10
  if set_managed
13
11
  host.managed = set_managed
14
12
  host.primary_interface.managed = set_managed
15
13
  end
14
+
15
+ host.attributes = host.apply_inherited_attributes(added_attributes)
16
+ host.set_hostgroup_defaults if host.hostgroup_id.present?
17
+
16
18
  # set build only and only on final save (facts are deleted)
17
19
  set_build_clean_facts(host) if set_build
18
20
  host
@@ -52,7 +54,7 @@ class ForemanDiscovery::HostConverter
52
54
  end
53
55
  end
54
56
 
55
- def self.ip_for_subnet(subnet, mac, ip)
57
+ def self.ip_for_subnet(subnet, mac, ip)
56
58
  return ip if ip && subnet&.unused_ip(mac)&.ip_include?(ip)
57
59
 
58
60
  unused_ip_for_subnet(subnet, mac, ip)
@@ -88,7 +88,8 @@ module ForemanDiscovery
88
88
  setting "discovery_prefix",
89
89
  type: :string,
90
90
  default: "mac",
91
- validate: { presence: true, format: { with: /\A[a-zA-Z]/, message: _("must start with a letter") } },
91
+ validate: { presence: true, format: { with: /\A[a-zA-Z][a-zA-Z0-9-]{0,61}\z/,
92
+ message: _("must start with a letter. Allowed characters: `a-z`, `A-Z`, `0-9` and `-`. Max length is 62 characters.") } },
92
93
  full_name: N_("Hostname prefix"),
93
94
  description: N_("The default prefix to use for the host name, must start with a letter")
94
95
 
@@ -147,13 +148,6 @@ module ForemanDiscovery
147
148
  full_name: N_("Locked PXELinux template name"),
148
149
  description: N_("PXELinux template to be used when pinning a host to discovery")
149
150
 
150
- setting "discovery_pxegrub_lock_template",
151
- type: :string,
152
- collection: snippets,
153
- default: "pxegrub_discovery",
154
- full_name: N_("Locked PXEGrub template name"),
155
- description: N_("PXEGrub template to be used when pinning a host to discovery")
156
-
157
151
  setting "discovery_pxegrub2_lock_template",
158
152
  type: :string,
159
153
  collection: snippets,
@@ -1,3 +1,3 @@
1
1
  module ForemanDiscovery
2
- VERSION = "26.0.1"
2
+ VERSION = "26.1.0"
3
3
  end
@@ -7,7 +7,7 @@
7
7
  # Robert Antoni Buj i Gelonch <rbuj@fedoraproject.org>, 2015-2016
8
8
  msgid ""
9
9
  msgstr ""
10
- "Project-Id-Version: foreman_discovery 25.1.0\n"
10
+ "Project-Id-Version: foreman_discovery 26.0.1\n"
11
11
  "Report-Msgid-Bugs-To: \n"
12
12
  "PO-Revision-Date: 2013-11-15 17:25+0000\n"
13
13
  "Last-Translator: Robert Antoni Buj i Gelonch <rbuj@fedoraproject.org>, 2017\n"
@@ -793,6 +793,9 @@ msgstr ""
793
793
  msgid "must be present."
794
794
  msgstr ""
795
795
 
796
+ msgid "must start with a letter"
797
+ msgstr ""
798
+
796
799
  msgid "must start with a letter or ERB."
797
800
  msgstr "ha de començar amb una lletra o ERB."
798
801
 
@@ -6,7 +6,7 @@
6
6
  # Pavel Borecki <pavel.borecki@gmail.com>, 2018-2020
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: foreman_discovery 25.1.0\n"
9
+ "Project-Id-Version: foreman_discovery 26.0.1\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
11
  "PO-Revision-Date: 2013-11-15 17:25+0000\n"
12
12
  "Last-Translator: Pavel Borecki <pavel.borecki@gmail.com>, 2018-2020\n"
@@ -793,6 +793,9 @@ msgstr ""
793
793
  msgid "must be present."
794
794
  msgstr ""
795
795
 
796
+ msgid "must start with a letter"
797
+ msgstr ""
798
+
796
799
  msgid "must start with a letter or ERB."
797
800
  msgstr ""
798
801
 
@@ -15,7 +15,7 @@
15
15
  # stbenjam <stephen@redhat.com>, 2016
16
16
  msgid ""
17
17
  msgstr ""
18
- "Project-Id-Version: foreman_discovery 25.1.0\n"
18
+ "Project-Id-Version: foreman_discovery 26.0.1\n"
19
19
  "Report-Msgid-Bugs-To: \n"
20
20
  "PO-Revision-Date: 2013-11-15 17:25+0000\n"
21
21
  "Last-Translator: pdolinic, 2021\n"
@@ -800,6 +800,9 @@ msgstr "Standort Kennung für bereitgestellte Hosts"
800
800
  msgid "must be present."
801
801
  msgstr "muss vorhanden sein."
802
802
 
803
+ msgid "must start with a letter"
804
+ msgstr ""
805
+
803
806
  msgid "must start with a letter or ERB."
804
807
  msgstr "muss mit einem Buchstaben oder ERB beginnen."
805
808