foreman_discovery 16.1.4 → 16.3.6

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/api/v2/discovered_hosts_controller.rb +14 -8
  3. data/app/helpers/discovered_hosts_helper.rb +5 -0
  4. data/app/models/host/discovered.rb +11 -15
  5. data/app/models/setting/discovered.rb +3 -1
  6. data/app/services/foreman_discovery/host_fact_importer.rb +10 -0
  7. data/app/services/foreman_discovery/import_hooks/subnet_and_taxonomy.rb +2 -0
  8. data/app/views/api/v2/discovery_rules/create.json.rabl +3 -0
  9. data/app/views/discovered_hosts/welcome.html.erb +14 -9
  10. data/app/views/discovery_rules/index.html.erb +1 -1
  11. data/app/views/foreman_discovery/debian_kexec.erb +3 -2
  12. data/app/views/foreman_discovery/redhat_kexec.erb +3 -2
  13. data/extra/discover-host +3 -3
  14. data/lib/foreman_discovery/engine.rb +3 -2
  15. data/lib/foreman_discovery/version.rb +1 -1
  16. data/locale/ca/LC_MESSAGES/foreman_discovery.mo +0 -0
  17. data/locale/ca/foreman_discovery.edit.po +104 -75
  18. data/locale/ca/foreman_discovery.po +25 -10
  19. data/locale/de/LC_MESSAGES/foreman_discovery.mo +0 -0
  20. data/locale/de/foreman_discovery.edit.po +111 -82
  21. data/locale/de/foreman_discovery.po +25 -10
  22. data/locale/en/LC_MESSAGES/foreman_discovery.mo +0 -0
  23. data/locale/en/foreman_discovery.edit.po +97 -73
  24. data/locale/en/foreman_discovery.po +25 -10
  25. data/locale/en_GB/LC_MESSAGES/foreman_discovery.mo +0 -0
  26. data/locale/en_GB/foreman_discovery.edit.po +110 -81
  27. data/locale/en_GB/foreman_discovery.po +25 -10
  28. data/locale/es/LC_MESSAGES/foreman_discovery.mo +0 -0
  29. data/locale/es/foreman_discovery.edit.po +112 -83
  30. data/locale/es/foreman_discovery.po +25 -10
  31. data/locale/foreman_discovery.pot +137 -114
  32. data/locale/fr/LC_MESSAGES/foreman_discovery.mo +0 -0
  33. data/locale/fr/foreman_discovery.edit.po +112 -83
  34. data/locale/fr/foreman_discovery.po +25 -10
  35. data/locale/gl/LC_MESSAGES/foreman_discovery.mo +0 -0
  36. data/locale/gl/foreman_discovery.edit.po +103 -74
  37. data/locale/gl/foreman_discovery.po +25 -10
  38. data/locale/it/LC_MESSAGES/foreman_discovery.mo +0 -0
  39. data/locale/it/foreman_discovery.edit.po +110 -81
  40. data/locale/it/foreman_discovery.po +25 -10
  41. data/locale/ja/LC_MESSAGES/foreman_discovery.mo +0 -0
  42. data/locale/ja/foreman_discovery.edit.po +112 -83
  43. data/locale/ja/foreman_discovery.po +25 -10
  44. data/locale/ko/LC_MESSAGES/foreman_discovery.mo +0 -0
  45. data/locale/ko/foreman_discovery.edit.po +110 -81
  46. data/locale/ko/foreman_discovery.po +25 -10
  47. data/locale/pt_BR/LC_MESSAGES/foreman_discovery.mo +0 -0
  48. data/locale/pt_BR/foreman_discovery.edit.po +112 -83
  49. data/locale/pt_BR/foreman_discovery.po +25 -10
  50. data/locale/ru/LC_MESSAGES/foreman_discovery.mo +0 -0
  51. data/locale/ru/foreman_discovery.edit.po +111 -82
  52. data/locale/ru/foreman_discovery.po +25 -10
  53. data/locale/sv_SE/LC_MESSAGES/foreman_discovery.mo +0 -0
  54. data/locale/sv_SE/foreman_discovery.edit.po +104 -75
  55. data/locale/sv_SE/foreman_discovery.po +25 -10
  56. data/locale/zh_CN/LC_MESSAGES/foreman_discovery.mo +0 -0
  57. data/locale/zh_CN/foreman_discovery.edit.po +112 -83
  58. data/locale/zh_CN/foreman_discovery.po +25 -10
  59. data/locale/zh_TW/LC_MESSAGES/foreman_discovery.mo +0 -0
  60. data/locale/zh_TW/foreman_discovery.edit.po +110 -81
  61. data/locale/zh_TW/foreman_discovery.po +25 -10
  62. data/package.json +39 -0
  63. data/test/facts/only-ipv6.json +205 -0
  64. data/test/facts/skylake-ipv6.json +223 -0
  65. data/test/functional/api/v2/settings_controller_test.rb +2 -2
  66. data/test/functional/discovered_hosts_controller_test.rb +1 -1
  67. data/test/functional/discovery_rules_controller_test.rb +1 -1
  68. data/test/unit/host_discovered_test.rb +0 -16
  69. data/webpack/index.js +18 -0
  70. data/webpack/src/ForemanDiscovery/DiscoveredHosts/Components/EmptyState/EmptyState.js +28 -0
  71. data/webpack/src/ForemanDiscovery/DiscoveredHosts/Components/EmptyState/index.js +1 -0
  72. data/webpack/src/ForemanDiscovery/DiscoveredHosts/index.js +6 -0
  73. data/webpack/src/reducers.js +7 -0
  74. metadata +21 -11
  75. data/test/facts/vmware-facter4-nolegacy.json +0 -402
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93f2f0828e78292ef40c46535f34d32d616ccf00b91465a5ca103d497510de5b
4
- data.tar.gz: 3f661f14112f905f9e6b4c15955ebdd8b942f5a88349ab08c6568a07b51bed5f
3
+ metadata.gz: 5404d1b999eff25f29e39cf14d77a7e85473e29a50a677ac3254aadfd1bc53a4
4
+ data.tar.gz: 803b2278dd981b8123cd88593f7fb00fd974b69711e848da60f31fd85dabbb90
5
5
  SHA512:
6
- metadata.gz: bbbc9c3d5fa3d24b86beecb90c7237e5ea8093331762a9667576d3472df5e7e099dcf076c0d3e277c8bc75bfc56a8ff5079dd381514e7ac4ded899bc22205e37
7
- data.tar.gz: 209b24b5230750c5a428198c87405607ac925fa6bf173a45c5e593a93408d4b8a46e476f3563c93f2031b8c965bb3f3077b146283a1f87aec29df94a037c72e1
6
+ metadata.gz: b4d290ab7aeb3cd8ed2254159ccead4c2ad69138b68e3758c9724e9eac5e99cfefcc654af9a12dda964201cca307f87f161682000f878a70dbcb1241996a57ad
7
+ data.tar.gz: 6398fa38e8625aee40bc6bc4ea387cced9ee50eba1e06fcdd711256e587f96c3d4d782738fd3efaf5b3bc0a3c2330f0f733088fdc5f8eafa8e3360a8bdeaea09
@@ -51,24 +51,30 @@ module Api
51
51
  param :id, :identifier, :required => true
52
52
  param :discovered_host, Hash, :action_aware => true do
53
53
  param :name, String
54
- param :environment_id, String
54
+ param :environment_id, String, :desc => N_("required if host is managed and value is not inherited from host group")
55
55
  param :ip, String, :desc => N_("not required if using a subnet with DHCP proxy")
56
56
  param :mac, String, :desc => N_("not required if it's a virtual machine")
57
- param :architecture_id, :number
58
- param :domain_id, :number
57
+ param :architecture_id, :number, :desc => N_("required if host is managed and value is not inherited from host group")
58
+ param :domain_id, :number, :desc => N_("required if host is managed and value is not inherited from host group")
59
59
  param :puppet_proxy_id, :number
60
60
  param :puppet_class_ids, Array
61
- param :operatingsystem_id, String
62
- param :medium_id, :number
63
- param :ptable_id, :number
64
- param :subnet_id, :number
61
+ param :operatingsystem_id, :number, :desc => N_("required if host is managed and value is not inherited from host group")
62
+ param :medium_id, String, :desc => N_("required if not imaged based provisioning and host is managed and value is not inherited from host group")
63
+ param :ptable_id, :number, :desc => N_("required if host is managed and custom partition has not been defined")
64
+ param :subnet_id, :number, :desc => N_("required if host is managed and value is not inherited from host group")
65
65
  param :sp_subnet_id, :number
66
66
  param :model_id, :number
67
67
  param :hostgroup_id, :number
68
68
  param :owner_id, :number
69
+ param :owner_type, Host::Base::OWNER_TYPES, :desc => N_("Host's owner type")
69
70
  param :puppet_ca_proxy_id, :number
70
71
  param :image_id, :number
71
- param :host_parameters_attributes, Array
72
+ param :host_parameters_attributes, Array, :desc => N_("Host's parameters (array or indexed hash)") do
73
+ param :name, String, :desc => N_("Name of the parameter"), :required => true
74
+ param :value, String, :desc => N_("Parameter value"), :required => true
75
+ param :parameter_type, Parameter::KEY_TYPES, :desc => N_("Type of value")
76
+ param :hidden_value, :bool
77
+ end
72
78
  param :build, :bool
73
79
  param :enabled, :bool
74
80
  param :provision_method, String
@@ -97,4 +97,9 @@ module DiscoveredHostsHelper
97
97
  return super unless controller_name == 'discovered_hosts'
98
98
  discovered_host_path(host)
99
99
  end
100
+
101
+ def discovery_doc_url
102
+ doc_version = Foreman::Plugin.find(:foreman_discovery).version.scan(/\d+\.\d+/).first
103
+ "https://theforeman.org/plugins/foreman_discovery/#{doc_version}"
104
+ end
100
105
  end
@@ -44,9 +44,13 @@ class Host::Discovered < ::Host::Base
44
44
 
45
45
  # Discovery import workflow:
46
46
  # discovered#import_host ->
47
- # discovered#import_facts -> base#import_facts -> base#parse_facts ->
48
- # discovered#populate_fields_from_facts -> base#populate_fields_from_facts -> base#set_interfaces
49
- # discovered#populate_discovery_fields_from_facts
47
+ # ForemanDiscovery::HostFactImporter#import_facts ->
48
+ # ::HostFactImporter#import_facts ->
49
+ # ::HostFactImporter#parse_facts ->
50
+ # discovered#populate_fields_from_facts ->
51
+ # base#populate_fields_from_facts ->
52
+ # base#set_interfaces ->
53
+ # discovered#populate_discovery_fields_from_facts
50
54
  def self.import_host facts
51
55
  raise(::Foreman::Exception.new(N_("Invalid facts, must be a Hash"))) unless facts.is_a?(Hash) || facts.is_a?(ActionController::Parameters)
52
56
 
@@ -92,19 +96,11 @@ class Host::Discovered < ::Host::Base
92
96
 
93
97
  # and save (interfaces are created via puppet parser extension)
94
98
  host.save(:validate => false) if host.new_record?
95
- raise ::Foreman::Exception.new(N_("Facts could not be imported")) unless host.import_facts(facts)
99
+ importer = ForemanDiscovery::HostFactImporter.new(host)
100
+ raise ::Foreman::Exception.new(N_("Facts could not be imported")) unless importer.import_facts(facts)
96
101
  host
97
102
  end
98
103
 
99
- def import_facts(facts)
100
- # Discovered Hosts won't report in via puppet, so we can use that field to
101
- # record the last time it sent facts...
102
- self.last_report = Time.now
103
- # Set the correct facts type for new foreman facts importing code.
104
- facts[:_type] = :foreman_discovery
105
- super(facts)
106
- end
107
-
108
104
  def setup_clone
109
105
  # Nic::Managed needs this method but Discovered hosts shouldn't
110
106
  # be doing orchestration anyway...
@@ -144,10 +140,10 @@ class Host::Discovered < ::Host::Base
144
140
  def refresh_facts
145
141
  facts = ::ForemanDiscovery::NodeAPI::Inventory.new(:url => proxy_url(self.ip)).facter
146
142
  self.class.import_host facts
147
- import_facts facts
143
+ ::ForemanDiscovery::HostFactImporter.new(self).import_facts facts
148
144
  rescue => e
149
145
  ::Foreman::Logging.exception("Unable to get facts from proxy", e)
150
- raise ::Foreman::WrappedException.new(e, N_("Could not get facts from proxy %{url}: %{error}"), :url => proxy_url, :error => e)
146
+ raise ::Foreman::WrappedException.new(e, N_("Could not get facts from proxy %{url}: %{error}"), :url => proxy_url(self.ip), :error => e)
151
147
  end
152
148
 
153
149
  def reboot(old_ip = nil, new_ip = nil)
@@ -8,7 +8,9 @@ class Setting::Discovered < ::Setting
8
8
  BLANK_ATTRS << 'discovery_facts_hardware'
9
9
  BLANK_ATTRS << 'discovery_facts_network'
10
10
  BLANK_ATTRS << 'discovery_facts_ipmi'
11
- BLANK_ATTRS << 'discovery_prefix'
11
+
12
+ STRING_PRESENCE_ATTRS = ['discovery_hostname', 'discovery_prefix']
13
+ validates :value, :presence => true, :if => proc { |s| STRING_PRESENCE_ATTRS.include?(s.name) }
12
14
 
13
15
  def self.default_settings
14
16
  [
@@ -0,0 +1,10 @@
1
+ class ForemanDiscovery::HostFactImporter < ::HostFactImporter
2
+ def import_facts(facts)
3
+ # Discovered Hosts won't report in via puppet, so we can use that field to
4
+ # record the last time it sent facts...
5
+ host.last_report = Time.now
6
+ # Set the correct facts type for new foreman facts importing code.
7
+ facts[:_type] = :foreman_discovery
8
+ super(facts)
9
+ end
10
+ end
@@ -35,6 +35,7 @@ module ForemanDiscovery
35
35
  Location.find_by_title(facts["discovery_location"]) ||
36
36
  Location.find_by_title(Setting[:discovery_location]) ||
37
37
  host.subnet.try(:locations).try(:first) ||
38
+ host.subnet6.try(:locations).try(:first) ||
38
39
  Location.first
39
40
  end
40
41
 
@@ -48,6 +49,7 @@ module ForemanDiscovery
48
49
  Organization.find_by_title(facts["discovery_organization"]) ||
49
50
  Organization.find_by_title(Setting[:discovery_organization]) ||
50
51
  host.subnet.try(:organizations).try(:first) ||
52
+ host.subnet6.try(:organizations).try(:first) ||
51
53
  Organization.first
52
54
  end
53
55
  end
@@ -0,0 +1,3 @@
1
+ object @discovery_rule
2
+
3
+ extends "api/v2/discovery_rules/show"
@@ -1,10 +1,15 @@
1
+ <% content_for(:javascripts) do %>
2
+ <%= webpacked_plugins_js_for :'foreman_discovery' %>
3
+ <% end %>
4
+ <% content_for(:stylesheets) do %>
5
+ <%= webpacked_plugins_css_for :'foreman_discovery' %>
6
+ <% end %>
7
+
1
8
  <% content_for(:title, _("Discovered Hosts")) %>
2
- <div class="blank-slate-pf">
3
- <div class="blank-slate-pf-icon">
4
- <%= icon_text("gears", "", :kind => "fa") %>
5
- </div>
6
- <h1><%= _('Discovered Hosts') %></h1>
7
- <p><%= _("No discovered hosts found in this context.") %>
8
- <%= _("This page shows discovered bare-metal or virtual nodes waiting to be provisioned.") %></p>
9
- <p><%= link_to _('Learn more about this in the documentation.'), documentation_url("#{ForemanDiscovery::VERSION.scan(/\d+\.\d+/).first}/index.html", {:root_url => 'https://theforeman.org/plugins/foreman_discovery/'})%></p>
10
- </div>
9
+
10
+ <% content_for(:content) do %>
11
+ <%= notifications %>
12
+ <div id="organization-id" data-id="<%= Organization.current.id if Organization.current %>" ></div>
13
+ <div id="user-id" data-id="<%= User.current.id if User.current %>" ></div>
14
+ <%= react_component('DiscoveredHosts', docUrl: discovery_doc_url ) %>
15
+ <% end %>
@@ -18,7 +18,7 @@
18
18
  <td><%= trunc_with_tooltip(rule.search) %></td>
19
19
  <td><%= label_with_link(rule.hostgroup, 26, authorizer) %></td>
20
20
  <td><%= rule.hosts.count %> / <%= rule.max_count %></td>
21
- <td><%= rule.enabled %></td>
21
+ <td><%= checked_icon rule.enabled %></td>
22
22
  <td><%= action_buttons(*permitted_discovery_actions(rule)) %></td>
23
23
  </tr>
24
24
  <% end %>
@@ -12,13 +12,14 @@ environments. The template must generate JSON format with the following items
12
12
  "kernel", "initram", "append" and "extra". The kexec command is composed in
13
13
  the following way:
14
14
 
15
- kexec --force --reset-vga --append=$append --initrd=$initram $extra $kernel
15
+ kexec --force --debug --append=$append --initrd=$initram $extra $kernel
16
16
 
17
17
  Please read kexec(8) man page for more information about semantics.
18
+ Extra options like --reset-vga can be set via "extra" array.
18
19
  -%>
19
20
  <%
20
21
  mac = @host.facts['discovery_bootif']
21
- bootif = '00-' + mac.gsub(':', '-') if mac
22
+ bootif = host_param("hardware_type", "01") + '-' + mac.gsub(':', '-') if mac
22
23
  ip_cidr = @host.facts['discovery_ip_cidr']
23
24
  ip = @host.facts['discovery_ip']
24
25
  mask = @host.facts['discovery_netmask']
@@ -22,13 +22,14 @@ environments. The template must generate JSON format with the following items
22
22
  "kernel", "initram", "append" and "extra". The kexec command is composed in
23
23
  the following way:
24
24
 
25
- kexec --force --reset-vga --append=$append --initrd=$initram $extra $kernel
25
+ kexec --force --debug --append=$append --initrd=$initram $extra $kernel
26
26
 
27
27
  Please read kexec(8) man page for more information about semantics.
28
+ Extra options like --reset-vga can be set via "extra" array.
28
29
  -%>
29
30
  <%
30
31
  mac = @host.facts['discovery_bootif']
31
- bootif = '00-' + mac.gsub(':', '-') if mac
32
+ bootif = host_param("hardware_type", "01") + '-' + mac.gsub(':', '-') if mac
32
33
  ip_cidr = @host.facts['discovery_ip_cidr']
33
34
  ip = @host.facts['discovery_ip']
34
35
  mask = @host.facts['discovery_netmask']
data/extra/discover-host CHANGED
@@ -79,12 +79,12 @@ unless preserve_interfaces
79
79
  name, subnet, mac, explicit_ip = iface
80
80
  mac ||= (["52"] + 5.times.map { '%02x' % rand(0..255) }).join(':')
81
81
  json["macaddress_#{name}"] = mac
82
- subnet_woprefix, prefix = subnet.split('/')
82
+ _, prefix = subnet.split('/')
83
83
  if subnet.include?('.')
84
- random_ip = IPAddr.new(subnet, Socket::AF_INET) | IPAddr.new(rand(2**prefix.to_i), Socket::AF_INET)
84
+ random_ip = IPAddr.new(subnet, Socket::AF_INET) | IPAddr.new(rand(2**(32 - prefix.to_i)), Socket::AF_INET)
85
85
  fact_name = "ipaddress"
86
86
  else
87
- random_ip = IPAddr.new(subnet, Socket::AF_INET6) | IPAddr.new(rand(2**prefix.to_i), Socket::AF_INET6)
87
+ random_ip = IPAddr.new(subnet, Socket::AF_INET6) | IPAddr.new(rand(2**(32 - prefix.to_i)), Socket::AF_INET6)
88
88
  fact_name = "ipaddress6"
89
89
  end
90
90
  json["#{fact_name}_#{name}"] = explicit_ip ? explicit_ip : random_ip
@@ -43,13 +43,14 @@ module ForemanDiscovery
43
43
 
44
44
  initializer 'foreman_discovery.register_plugin', :before => :finisher_hook do |app|
45
45
  Foreman::Plugin.register :foreman_discovery do
46
- requires_foreman '>= 1.24.0'
46
+ requires_foreman '>= 2.3'
47
47
 
48
48
  # discovered hosts permissions
49
49
  security_block :discovery do
50
50
  permission :view_discovered_hosts, {
51
51
  :discovered_hosts => [:index, :show, :auto_complete_search, :welcome],
52
- :"api/v2/discovered_hosts" => [:index, :show]
52
+ :"api/v2/discovered_hosts" => [:index, :show],
53
+ :'discovered_hosts/react' => [:index]
53
54
  }, :resource_type => 'Host'
54
55
  permission :submit_discovered_hosts, {
55
56
  :"api/v2/discovered_hosts" => [:facts, :create]
@@ -1,3 +1,3 @@
1
1
  module ForemanDiscovery
2
- VERSION = "16.1.4"
2
+ VERSION = "16.3.6"
3
3
  end
@@ -9,8 +9,9 @@ msgid ""
9
9
  msgstr ""
10
10
  "Project-Id-Version: foreman_discovery 16.3.4\n"
11
11
  "Report-Msgid-Bugs-To: \n"
12
- "PO-Revision-Date: 2020-10-29 17:16+0000\n"
13
- "Last-Translator: Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>\n"
12
+ "POT-Creation-Date: 2021-05-03 08:46+0200\n"
13
+ "PO-Revision-Date: 2021-01-25 08:35+0000\n"
14
+ "Last-Translator: Transifex Bot <>\n"
14
15
  "Language-Team: Catalan (http://www.transifex.com/foreman/foreman/language/ca/)"
15
16
  "\n"
16
17
  "MIME-Version: 1.0\n"
@@ -115,51 +116,51 @@ msgstr "Puja els objectes d'interès per a un amfitrió, creant el nou amfitrió
115
116
  msgid "hash containing facts for the host with minimum set of facts: discovery_bootif, macaddress_eth0, ipaddress, ipaddress_eth0, interfaces: eth0 (example in case primary interface is named eth0)"
116
117
  msgstr ""
117
118
 
118
- #: ../app/controllers/api/v2/discovered_hosts_controller.rb:129
119
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:130
119
120
  msgid "Execute rules against a discovered host"
120
121
  msgstr ""
121
122
 
122
- #: ../app/controllers/api/v2/discovered_hosts_controller.rb:135 ../app/controllers/discovered_hosts_controller.rb:160
123
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:136 ../app/controllers/discovered_hosts_controller.rb:157
123
124
  msgid "Host %{host} was provisioned with rule %{rule}"
124
125
  msgstr "L'amfitrió %{host} va ser aprovisionat amb la regla %{rule}"
125
126
 
126
- #: ../app/controllers/api/v2/discovered_hosts_controller.rb:138
127
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:139
127
128
  msgid "Unable to provision %{host}: %{errors}"
128
129
  msgstr "No es pot aprovisionar a %{host}: %{errors}"
129
130
 
130
- #: ../app/controllers/api/v2/discovered_hosts_controller.rb:144 ../app/controllers/discovered_hosts_controller.rb:167
131
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:145 ../app/controllers/discovered_hosts_controller.rb:164
131
132
  msgid "No rule found for host %s"
132
133
  msgstr "No s'ha trobat cap regla per a l'amfitrió %s"
133
134
 
134
- #: ../app/controllers/api/v2/discovered_hosts_controller.rb:151
135
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:152
135
136
  msgid "Execute rules against all currently discovered hosts"
136
137
  msgstr "Executa les regles contra tots els amfitrions detectats actualment"
137
138
 
138
- #: ../app/controllers/api/v2/discovered_hosts_controller.rb:155 ../app/controllers/discovered_hosts_controller.rb:173
139
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:156 ../app/controllers/discovered_hosts_controller.rb:170
139
140
  msgid "Errors during auto provisioning: %s"
140
141
  msgstr "Erros durant l'auto aprovisionament: %s"
141
142
 
142
- #: ../app/controllers/api/v2/discovered_hosts_controller.rb:158 ../app/controllers/discovered_hosts_controller.rb:176
143
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:159 ../app/controllers/discovered_hosts_controller.rb:173
143
144
  msgid "No discovered hosts to provision"
144
145
  msgstr "Sense amfitrions descoberts per aprovisionar"
145
146
 
146
- #: ../app/controllers/api/v2/discovered_hosts_controller.rb:180
147
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:181
147
148
  msgid "%s discovered hosts were provisioned"
148
149
  msgstr "%s amfitrions descoberts van ser aprovisionats"
149
150
 
150
- #: ../app/controllers/api/v2/discovered_hosts_controller.rb:191
151
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:192
151
152
  msgid "Refreshing the facts of a discovered host"
152
153
  msgstr "S'estan refrescant els objectes d'interès d'un amfitrió descobert"
153
154
 
154
- #: ../app/controllers/api/v2/discovered_hosts_controller.rb:200
155
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:201
155
156
  msgid "Rebooting a discovered host"
156
157
  msgstr "S'està reiniciant un amfitrió descobert"
157
158
 
158
- #: ../app/controllers/api/v2/discovered_hosts_controller.rb:209
159
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:210
159
160
  msgid "Rebooting all discovered hosts"
160
161
  msgstr "S'estan reiniciant tots els amfitrions descoberts"
161
162
 
162
- #: ../app/controllers/api/v2/discovered_hosts_controller.rb:220 ../app/controllers/discovered_hosts_controller.rb:129
163
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:221 ../app/controllers/discovered_hosts_controller.rb:126
163
164
  msgid "Discovered hosts are rebooting now"
164
165
  msgstr "Ara s'estan reiniciant els amfitrions descoberts"
165
166
 
@@ -239,110 +240,86 @@ msgstr "Errors durant el reinici: %s"
239
240
  msgid "No discovered hosts to reboot"
240
241
  msgstr ""
241
242
 
242
- #: ../app/controllers/discovered_hosts_controller.rb:63
243
+ #: ../app/controllers/discovered_hosts_controller.rb:60
243
244
  msgid "Successfully provisioned %s"
244
245
  msgstr ""
245
246
 
246
- #: ../app/controllers/discovered_hosts_controller.rb:97
247
+ #: ../app/controllers/discovered_hosts_controller.rb:94
247
248
  msgid "Facts refreshed for %s"
248
249
  msgstr "Els objectes d'interès que s'han refrescat per a %s"
249
250
 
250
- #: ../app/controllers/discovered_hosts_controller.rb:99
251
+ #: ../app/controllers/discovered_hosts_controller.rb:96
251
252
  msgid "Failed to refresh facts for %s"
252
253
  msgstr "No s'ha pogut refrescar els objectes d'interès per a %s"
253
254
 
254
- #: ../app/controllers/discovered_hosts_controller.rb:102
255
+ #: ../app/controllers/discovered_hosts_controller.rb:99
255
256
  msgid "Failed to refresh facts for %{hostname} with error %{error_message}"
256
257
  msgstr ""
257
258
 
258
- #: ../app/controllers/discovered_hosts_controller.rb:109
259
+ #: ../app/controllers/discovered_hosts_controller.rb:106
259
260
  msgid "Host of type %s can not be rebooted"
260
261
  msgstr ""
261
262
 
262
- #: ../app/controllers/discovered_hosts_controller.rb:113
263
+ #: ../app/controllers/discovered_hosts_controller.rb:110
263
264
  msgid "Rebooting host %s"
264
265
  msgstr "S'està reiniciant l'amfitrió %s"
265
266
 
266
- #: ../app/controllers/discovered_hosts_controller.rb:115
267
+ #: ../app/controllers/discovered_hosts_controller.rb:112
267
268
  msgid "Failed to reboot host %s"
268
269
  msgstr "No s'ha pogut reiniciar l'amfitrió %s."
269
270
 
270
- #: ../app/controllers/discovered_hosts_controller.rb:118
271
+ #: ../app/controllers/discovered_hosts_controller.rb:115
271
272
  msgid "Failed to reboot host %{hostname} with error %{error_message}"
272
273
  msgstr ""
273
274
 
274
- #: ../app/controllers/discovered_hosts_controller.rb:132
275
+ #: ../app/controllers/discovered_hosts_controller.rb:129
275
276
  msgid "Failed to reboot hosts with error %s"
276
277
  msgstr ""
277
278
 
278
- #: ../app/controllers/discovered_hosts_controller.rb:150
279
+ #: ../app/controllers/discovered_hosts_controller.rb:147
279
280
  msgid "Destroyed selected hosts"
280
281
  msgstr "S'han destruït els amfitrions seleccionats"
281
282
 
282
- #: ../app/controllers/discovered_hosts_controller.rb:152
283
+ #: ../app/controllers/discovered_hosts_controller.rb:149
283
284
  msgid "The following hosts were not deleted: %s"
284
285
  msgstr ""
285
286
 
286
- #: ../app/controllers/discovered_hosts_controller.rb:164
287
+ #: ../app/controllers/discovered_hosts_controller.rb:161
287
288
  msgid "Failed to auto provision host %s: %s"
288
289
  msgstr "No s'ha pogut auto aprovisionar l'amfitrió %s: %s"
289
290
 
290
- #: ../app/controllers/discovered_hosts_controller.rb:192
291
+ #: ../app/controllers/discovered_hosts_controller.rb:189
291
292
  msgid "Discovered hosts are provisioning now"
292
293
  msgstr "Els amfitrions descoberts ara tenen aprovisionament"
293
294
 
294
- #: ../app/controllers/discovered_hosts_controller.rb:226
295
- msgid "Highlights"
295
+ #: ../app/controllers/discovered_hosts_controller.rb:270
296
+ msgid "Discovered host reported from unknown subnet, communication will not be proxied."
296
297
  msgstr ""
297
298
 
298
- #: ../app/controllers/discovered_hosts_controller.rb:226
299
- msgid "Storage"
300
- msgstr ""
301
-
302
- #: ../app/controllers/discovered_hosts_controller.rb:226
303
- msgid "Hardware"
299
+ #: ../app/controllers/discovered_hosts_controller.rb:275
300
+ msgid "Discovered hosts reported from unknown subnet are %s, communication will not be proxied."
304
301
  msgstr ""
305
302
 
306
- #: ../app/controllers/discovered_hosts_controller.rb:226
307
- msgid "Network"
308
- msgstr ""
309
-
310
- #: ../app/controllers/discovered_hosts_controller.rb:226
311
- msgid "Software"
312
- msgstr ""
313
-
314
- #: ../app/controllers/discovered_hosts_controller.rb:226
315
- msgid "IPMI"
316
- msgstr ""
317
-
318
- #: ../app/controllers/discovered_hosts_controller.rb:226
319
- msgid "Miscellaneous"
320
- msgstr ""
321
-
322
- #: ../app/controllers/discovered_hosts_controller.rb:304
303
+ #: ../app/controllers/discovered_hosts_controller.rb:289
323
304
  msgid "No hosts were found with that id or name"
324
305
  msgstr "No s'ha trobat cap amfitrió amb aquest ID o nom"
325
306
 
326
- #: ../app/controllers/discovered_hosts_controller.rb:308
307
+ #: ../app/controllers/discovered_hosts_controller.rb:293
327
308
  msgid "No hosts selected"
328
309
  msgstr "Cap amfitrió seleccionat"
329
310
 
330
- #: ../app/controllers/discovered_hosts_controller.rb:314
311
+ #: ../app/controllers/discovered_hosts_controller.rb:299
331
312
  msgid "Something went wrong while selecting hosts - %s"
332
313
  msgstr "Alguna cosa va anar malament mentre se seleccionaven els amfitrions - %s"
333
314
 
334
- #: ../app/controllers/discovery_rules_controller.rb:72
315
+ #: ../app/controllers/discovery_rules_controller.rb:79
335
316
  msgid "Rule enabled"
336
317
  msgstr "Regla habilitada"
337
318
 
338
- #: ../app/controllers/discovery_rules_controller.rb:72
319
+ #: ../app/controllers/discovery_rules_controller.rb:79
339
320
  msgid "Rule disabled"
340
321
  msgstr "Regla inhabilitada"
341
322
 
342
- #: ../app/helpers/discovered_hosts_helper.rb:10
343
- msgid "%s ago"
344
- msgstr "fa %s"
345
-
346
323
  #: ../app/helpers/discovered_hosts_helper.rb:14 ../app/helpers/discovered_hosts_helper.rb:29 ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:40
347
324
  msgid "Auto Provision"
348
325
  msgstr "Auto aprovisiona"
@@ -428,6 +405,10 @@ msgid "Enable rule '%s'?"
428
405
  msgstr ""
429
406
 
430
407
  #: ../app/helpers/discovery_rules_helper.rb:33
408
+ msgid "Clone"
409
+ msgstr ""
410
+
411
+ #: ../app/helpers/discovery_rules_helper.rb:34
431
412
  msgid "Delete rule '%s'?"
432
413
  msgstr ""
433
414
 
@@ -451,13 +432,13 @@ msgstr "ha de començar amb una lletra o ERB."
451
432
  msgid "must be present."
452
433
  msgstr ""
453
434
 
454
- #: ../app/models/discovery_rule.rb:52
435
+ #: ../app/models/discovery_rule.rb:57
455
436
  msgid "Host group organization %s must also be associated to the discovery rule"
456
437
  msgid_plural "Host group organizations %s must also be associated to the discovery rule"
457
438
  msgstr[0] ""
458
439
  msgstr[1] ""
459
440
 
460
- #: ../app/models/discovery_rule.rb:56
441
+ #: ../app/models/discovery_rule.rb:61
461
442
  msgid "Host group location %s must also be associated to the discovery rule"
462
443
  msgid_plural "Host group locations %s must also be associated to the discovery rule"
463
444
  msgstr[0] ""
@@ -727,6 +708,34 @@ msgstr ""
727
708
  msgid "Unable to find primary NIC with %{mac} specified via '%{fact}', NIC filter: %{filter}"
728
709
  msgstr ""
729
710
 
711
+ #: ../app/services/foreman_discovery/fact_to_category_resolver.rb:7
712
+ msgid "Highlights"
713
+ msgstr ""
714
+
715
+ #: ../app/services/foreman_discovery/fact_to_category_resolver.rb:8
716
+ msgid "Storage"
717
+ msgstr ""
718
+
719
+ #: ../app/services/foreman_discovery/fact_to_category_resolver.rb:9
720
+ msgid "Hardware"
721
+ msgstr ""
722
+
723
+ #: ../app/services/foreman_discovery/fact_to_category_resolver.rb:10
724
+ msgid "Network"
725
+ msgstr ""
726
+
727
+ #: ../app/services/foreman_discovery/fact_to_category_resolver.rb:11
728
+ msgid "Software"
729
+ msgstr ""
730
+
731
+ #: ../app/services/foreman_discovery/fact_to_category_resolver.rb:12
732
+ msgid "IPMI"
733
+ msgstr ""
734
+
735
+ #: ../app/services/foreman_discovery/fact_to_category_resolver.rb:13
736
+ msgid "Miscellaneous"
737
+ msgstr ""
738
+
730
739
  #: ../app/services/foreman_discovery/host_converter.rb:47
731
740
  msgid "IPAM must be configured for subnet '%s'"
732
741
  msgstr ""
@@ -739,6 +748,10 @@ msgstr ""
739
748
  msgid "Image API processing error: %{msg} (HTTP/%{code}, body: %{body})"
740
749
  msgstr ""
741
750
 
751
+ #: ../app/services/foreman_discovery/ui_notifications/new_host.rb:22
752
+ msgid "Host %s has been dicovered"
753
+ msgstr ""
754
+
742
755
  #: ../app/views/dashboard/_discovery_widget.html.erb:5
743
756
  msgid "Discovered Host"
744
757
  msgid_plural "Discovered Hosts"
@@ -797,11 +810,11 @@ msgstr ""
797
810
  msgid "Disks Size"
798
811
  msgstr ""
799
812
 
800
- #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:16 ../app/views/discovered_hosts/_selected_hosts.html.erb:9
813
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:16 ../app/views/discovered_hosts/_selected_hosts.html.erb:9 ../app/views/discovery_rules/index.html.erb:11
801
814
  msgid "Location"
802
815
  msgstr "Ubicació"
803
816
 
804
- #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:17 ../app/views/discovered_hosts/_selected_hosts.html.erb:10
817
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:17 ../app/views/discovered_hosts/_selected_hosts.html.erb:10 ../app/views/discovery_rules/index.html.erb:12
805
818
  msgid "Organization"
806
819
  msgstr "Organització"
807
820
 
@@ -813,7 +826,7 @@ msgstr "Subxarxa"
813
826
  msgid "Last Facts Upload"
814
827
  msgstr ""
815
828
 
816
- #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:20 ../app/views/discovery_rules/index.html.erb:12
829
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:20 ../app/views/discovery_rules/index.html.erb:14
817
830
  msgid "Actions"
818
831
  msgstr "Accions"
819
832
 
@@ -961,6 +974,10 @@ msgstr ""
961
974
  msgid "Hostnames must not start with numbers. A good approach is to use unique information provided by facter (MAC address, BIOS or serial ID)."
962
975
  msgstr ""
963
976
 
977
+ #: ../app/views/discovery_rules/clone.erb:1
978
+ msgid "Clone %s"
979
+ msgstr ""
980
+
964
981
  #: ../app/views/discovery_rules/edit.html.erb:1
965
982
  msgid "Edit %s"
966
983
  msgstr "Edita %s"
@@ -993,7 +1010,7 @@ msgstr ""
993
1010
  msgid "Hosts/Limit"
994
1011
  msgstr ""
995
1012
 
996
- #: ../app/views/discovery_rules/index.html.erb:11
1013
+ #: ../app/views/discovery_rules/index.html.erb:13
997
1014
  msgid "DiscoveryRule|Enabled"
998
1015
  msgstr "Habilitada"
999
1016
 
@@ -1014,7 +1031,7 @@ msgid "A summary of discovered hosts"
1014
1031
  msgstr ""
1015
1032
 
1016
1033
  #: ../db/seeds.d/80_discovery_ui_notification.rb:4
1017
- msgid "Hosts"
1034
+ msgid "New hosts"
1018
1035
  msgstr ""
1019
1036
 
1020
1037
  #: ../db/seeds.d/80_discovery_ui_notification.rb:6
@@ -1025,19 +1042,27 @@ msgstr ""
1025
1042
  msgid "Details"
1026
1043
  msgstr ""
1027
1044
 
1028
- #: ../lib/foreman_discovery/engine.rb:180
1045
+ #: ../db/seeds.d/80_discovery_ui_notification.rb:18
1046
+ msgid "Hosts"
1047
+ msgstr ""
1048
+
1049
+ #: ../db/seeds.d/80_discovery_ui_notification.rb:20
1050
+ msgid "Error message goes here"
1051
+ msgstr ""
1052
+
1053
+ #: ../lib/foreman_discovery/engine.rb:176
1029
1054
  msgid "Discovery Kexec template"
1030
1055
  msgstr ""
1031
1056
 
1032
- #: ../lib/foreman_discovery/engine.rb:189
1057
+ #: ../lib/foreman_discovery/engine.rb:185
1033
1058
  msgid "Discovery Proxy"
1034
1059
  msgstr ""
1035
1060
 
1036
- #: ../lib/foreman_discovery/engine.rb:190
1061
+ #: ../lib/foreman_discovery/engine.rb:186
1037
1062
  msgid "Discovery Proxy to use within this subnet for managing connection to discovered hosts"
1038
1063
  msgstr ""
1039
1064
 
1040
- #: ../lib/foreman_discovery/engine.rb:191
1065
+ #: ../lib/foreman_discovery/engine.rb:187
1041
1066
  msgid "ID of Discovery Proxy to use within this subnet for managing connection to discovered hosts"
1042
1067
  msgstr ""
1043
1068
 
@@ -1050,17 +1075,21 @@ msgid "documentation"
1050
1075
  msgstr ""
1051
1076
 
1052
1077
  #: action_names.rb:2
1053
- msgid "Action with sub plans"
1078
+ msgid "Remote action:"
1054
1079
  msgstr ""
1055
1080
 
1056
1081
  #: action_names.rb:3
1057
- msgid "Import facts"
1082
+ msgid "Import Puppet classes"
1058
1083
  msgstr ""
1059
1084
 
1060
1085
  #: action_names.rb:4
1061
- msgid "Import Puppet classes"
1086
+ msgid "Import facts"
1062
1087
  msgstr ""
1063
1088
 
1064
1089
  #: action_names.rb:5
1065
- msgid "Remote action:"
1090
+ msgid "Action with sub plans"
1066
1091
  msgstr ""
1092
+
1093
+ #: ../app/helpers/discovered_hosts_helper.rb:10
1094
+ #~ msgid "%s ago"
1095
+ #~ msgstr "fa %s"