foreman_discovery 5.0.0 → 5.0.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.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/api/v2/discovered_hosts_controller.rb +41 -51
  3. data/app/controllers/concerns/foreman/controller/discovered_extensions.rb +20 -23
  4. data/app/controllers/discovered_hosts_controller.rb +50 -46
  5. data/app/helpers/concerns/foreman_discovery/settings_helper_extensions.rb +34 -0
  6. data/app/helpers/discovery_rules_helper.rb +5 -6
  7. data/app/mailers/discovered_mailer.rb +19 -0
  8. data/app/models/discovery_rule.rb +3 -3
  9. data/app/models/host/discovered.rb +33 -11
  10. data/app/models/host/managed_extensions.rb +10 -0
  11. data/app/models/hostgroup_extensions.rb +1 -1
  12. data/app/models/setting/discovered.rb +17 -11
  13. data/app/services/foreman_discovery/fact_parser.rb +16 -0
  14. data/app/services/foreman_discovery/host_converter.rb +0 -4
  15. data/app/services/foreman_discovery/node_api/power.rb +3 -3
  16. data/app/views/discovered_hosts/_discovered_host.html.erb +4 -2
  17. data/app/views/discovered_hosts/_discovered_hosts_list.html.erb +1 -1
  18. data/app/views/discovered_mailer/_discovered_host.html.erb +10 -0
  19. data/app/views/discovered_mailer/discovered_summary.html.erb +35 -0
  20. data/app/views/discovered_mailer/discovered_summary.text.erb +24 -0
  21. data/config/routes.rb +3 -3
  22. data/db/seeds.d/70_discovery_mail_notification.rb +9 -0
  23. data/lib/foreman_discovery/engine.rb +12 -9
  24. data/lib/foreman_discovery/version.rb +1 -1
  25. data/locale/ca/LC_MESSAGES/foreman_discovery.mo +0 -0
  26. data/locale/ca/foreman_discovery.edit.po +780 -0
  27. data/locale/ca/foreman_discovery.po +358 -261
  28. data/locale/de/LC_MESSAGES/foreman_discovery.mo +0 -0
  29. data/locale/de/foreman_discovery.edit.po +774 -0
  30. data/locale/de/foreman_discovery.po +418 -311
  31. data/locale/en_GB/LC_MESSAGES/foreman_discovery.mo +0 -0
  32. data/locale/en_GB/foreman_discovery.edit.po +779 -0
  33. data/locale/en_GB/foreman_discovery.po +423 -313
  34. data/locale/es/LC_MESSAGES/foreman_discovery.mo +0 -0
  35. data/locale/es/foreman_discovery.edit.po +781 -0
  36. data/locale/es/foreman_discovery.po +425 -313
  37. data/locale/foreman_discovery.pot +496 -159
  38. data/locale/fr/LC_MESSAGES/foreman_discovery.mo +0 -0
  39. data/locale/fr/foreman_discovery.edit.po +778 -0
  40. data/locale/fr/foreman_discovery.po +458 -322
  41. data/locale/gl/LC_MESSAGES/foreman_discovery.mo +0 -0
  42. data/locale/gl/foreman_discovery.edit.po +757 -0
  43. data/locale/gl/foreman_discovery.po +306 -215
  44. data/locale/it/LC_MESSAGES/foreman_discovery.mo +0 -0
  45. data/locale/it/foreman_discovery.edit.po +771 -0
  46. data/locale/it/foreman_discovery.po +411 -301
  47. data/locale/ja/LC_MESSAGES/foreman_discovery.mo +0 -0
  48. data/locale/ja/foreman_discovery.edit.po +770 -0
  49. data/locale/ja/foreman_discovery.po +395 -300
  50. data/locale/ko/LC_MESSAGES/foreman_discovery.mo +0 -0
  51. data/locale/ko/foreman_discovery.edit.po +768 -0
  52. data/locale/ko/foreman_discovery.po +393 -299
  53. data/locale/pt_BR/LC_MESSAGES/foreman_discovery.mo +0 -0
  54. data/locale/pt_BR/foreman_discovery.edit.po +780 -0
  55. data/locale/pt_BR/foreman_discovery.po +438 -309
  56. data/locale/ru/LC_MESSAGES/foreman_discovery.mo +0 -0
  57. data/locale/ru/foreman_discovery.edit.po +775 -0
  58. data/locale/ru/foreman_discovery.po +413 -308
  59. data/locale/sv_SE/LC_MESSAGES/foreman_discovery.mo +0 -0
  60. data/locale/sv_SE/foreman_discovery.edit.po +766 -0
  61. data/locale/sv_SE/foreman_discovery.po +321 -232
  62. data/locale/zh_CN/LC_MESSAGES/foreman_discovery.mo +0 -0
  63. data/locale/zh_CN/foreman_discovery.edit.po +769 -0
  64. data/locale/zh_CN/foreman_discovery.po +393 -302
  65. data/locale/zh_TW/LC_MESSAGES/foreman_discovery.mo +0 -0
  66. data/locale/zh_TW/foreman_discovery.edit.po +769 -0
  67. data/locale/zh_TW/foreman_discovery.po +395 -302
  68. data/test/functional/api/v2/discovered_hosts_controller_test.rb +8 -0
  69. data/test/functional/api/v2/discovery_rules_controller_test.rb +9 -0
  70. data/test/functional/discovered_hosts_controller_test.rb +26 -17
  71. data/test/functional/discovery_rules_controller_test.rb +9 -8
  72. data/test/test_helper.rb +0 -4
  73. data/test/test_helper_discovery.rb +24 -0
  74. data/test/unit/discovered_extensions_test.rb +31 -0
  75. data/test/unit/discovered_mailer_test.rb +44 -0
  76. data/test/unit/discovery_attribute_set_test.rb +12 -0
  77. data/test/unit/discovery_rule_test.rb +20 -0
  78. data/test/unit/{puppet_fact_parser_extensions_test.rb → fact_parser_test.rb} +3 -16
  79. data/test/unit/host_discovered_test.rb +56 -11
  80. metadata +29 -5
  81. data/app/lib/puppet_fact_parser_extensions.rb +0 -29
@@ -41,18 +41,21 @@ class Host::Discovered < ::Host::Base
41
41
  # construct hostname
42
42
  prefix_from_settings = Setting[:discovery_prefix]
43
43
  hostname_prefix = prefix_from_settings if prefix_from_settings.present? && prefix_from_settings.match(/^[a-zA-Z].*/)
44
- hostname_prefix ||= 'mac'
45
- hostname = FacterUtils::bootif_mac(facts).try(:downcase).try(:gsub,/:/,'').try(:sub,/^/, hostname_prefix)
44
+
45
+ name_fact = return_first_valid_fact(Setting::Discovered.discovery_hostname_fact_array, facts)
46
+ raise(::Foreman::Exception.new(N_("Invalid facts: hash does not contain a valid value for any of the facts in the discovery_hostname setting: %s"), Setting::Discovered.discovery_hostname_fact_array.join(', '))) unless name_fact && name_fact.present?
47
+ hostname = normalize_string_for_hostname("#{hostname_prefix}#{name_fact}")
48
+ Rails.logger.warn "Hostname does not start with an alphabetical character" unless hostname.downcase.match /^[a-z]/
46
49
 
47
50
  # create new host record
48
- h = ::Host::Discovered.find_by_name hostname
49
- h ||= Host.new :name => hostname, :type => "Host::Discovered"
50
- h.type = "Host::Discovered"
51
+ host = ::Host::Discovered.includes(:interfaces).find_by_name hostname
52
+ host ||= Host.new :name => hostname, :type => "Host::Discovered"
53
+ host.type = "Host::Discovered"
51
54
 
52
55
  # and save (interfaces are created via puppet parser extension)
53
- h.save(:validate => false) if h.new_record?
54
- state = h.import_facts(facts)
55
- return h, state
56
+ host.save(:validate => false) if host.new_record?
57
+ state = host.import_facts(facts)
58
+ return host, state
56
59
  end
57
60
 
58
61
  def import_facts facts
@@ -72,15 +75,19 @@ class Host::Discovered < ::Host::Base
72
75
  super
73
76
  end
74
77
 
75
- def populate_fields_from_facts(facts = self.facts_hash, type = 'puppet')
78
+ def populate_fields_from_facts(facts = self.facts_hash, ignored_type)
76
79
  # detect interfaces and primary interface using extensions
77
- parser = super(facts, type)
80
+ parser = super(facts, :foreman_discovery)
78
81
 
79
82
  # set additional discovery attributes
80
83
  primary_ip = self.primary_interface.ip
81
84
  unless primary_ip.nil?
82
85
  subnet = Subnet.subnet_for(primary_ip)
83
- Rails.logger.warn "Subnet not detected for #{primary_ip}" if subnet.nil?
86
+ if subnet
87
+ Rails.logger.info "Detected subnet: #{subnet} with taxonomy #{subnet.organizations.collect(&:name)}/#{subnet.locations.collect(&:name)}"
88
+ else
89
+ Rails.logger.warn "Subnet could not be detected for #{primary_ip}"
90
+ end
84
91
  # set subnet
85
92
  self.primary_interface.subnet = subnet
86
93
  # set location and organization
@@ -88,11 +95,13 @@ class Host::Discovered < ::Host::Base
88
95
  self.location = Location.find_by_name(Setting[:discovery_location]) ||
89
96
  subnet.try(:locations).try(:first) ||
90
97
  Location.first
98
+ Rails.logger.info "Assigned location: #{self.location}"
91
99
  end
92
100
  if SETTINGS[:organizations_enabled]
93
101
  self.organization = Organization.find_by_name(Setting[:discovery_organization]) ||
94
102
  subnet.try(:organizations).try(:first) ||
95
103
  Organization.first
104
+ Rails.logger.info "Assigned organization: #{self.organization}"
96
105
  end
97
106
  else
98
107
  raise(::Foreman::Exception.new(N_("Unable to assign subnet, primary interface is missing IP address")))
@@ -178,4 +187,17 @@ class Host::Discovered < ::Host::Base
178
187
  "discovery-not-matched"
179
188
  end
180
189
 
190
+ def self.normalize_string_for_hostname(hostname)
191
+ hostname = hostname.to_s.downcase.gsub(/(^[^a-z0-9]*|[^a-z0-9\-]|[^a-z0-9]*$)/,'')
192
+ raise(::Foreman::Exception.new(N_("Invalid hostname: Could not normalize the hostname"))) unless hostname && hostname.present?
193
+ hostname
194
+ end
195
+
196
+ def self.return_first_valid_fact(facts_array, facts)
197
+ return facts[facts_array] if !facts_array.is_a?(Array)
198
+ facts_array.each do |value|
199
+ return facts[value] if !facts[value].nil?
200
+ end
201
+ return nil
202
+ end
181
203
  end
@@ -8,6 +8,8 @@ module Host::ManagedExtensions
8
8
 
9
9
  belongs_to :discovery_rule
10
10
 
11
+ scoped_search :in => :discovery_rule, :on => :name, :rename => :discovery_rule, :complete_value => true
12
+
11
13
  # extra flag for post_queue callbacks which has no access to facts
12
14
  attr_accessor :legacy_api
13
15
  attr_accessible :discovery_rule_id
@@ -35,6 +37,10 @@ module Host::ManagedExtensions
35
37
  true
36
38
  end
37
39
 
40
+ def delReboot
41
+ # no reboot on orchestration rollback
42
+ end
43
+
38
44
  def boot_url pxe_file
39
45
  raise ::Foreman::Exception.new(N_("Operating system not set for host/hostgroup")) unless operatingsystem
40
46
  base = operatingsystem.medium_uri(self)
@@ -56,6 +62,10 @@ module Host::ManagedExtensions
56
62
  true
57
63
  end
58
64
 
65
+ def delKexec
66
+ # no kexec on orchestration rollback
67
+ end
68
+
59
69
  def delete_discovery_attribute_set
60
70
  return if new_record?
61
71
  DiscoveryAttributeSet.destroy_all(:host_id => self.id) if type_changed?
@@ -2,7 +2,7 @@ module HostgroupExtensions
2
2
  extend ActiveSupport::Concern
3
3
 
4
4
  included do
5
- has_many :discovery_rules
5
+ has_many :discovery_rules, :dependent => :restrict_with_error
6
6
  attr_accessible :discovery_rules, :discovery_rule_ids, :discovery_rule_names, :type
7
7
  end
8
8
  end
@@ -8,6 +8,7 @@ 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
 
12
13
  def self.load_defaults
13
14
  # Check the table exists
@@ -15,7 +16,8 @@ class Setting::Discovered < ::Setting
15
16
 
16
17
  Setting.transaction do
17
18
  [
18
- self.set('discovery_fact', N_("Fact name to use for primary interface detection and hostname"), "discovery_bootif"),
19
+ self.set('discovery_fact', N_("Fact name to use for primary interface detection"), "discovery_bootif"),
20
+ self.set('discovery_hostname', N_("List of facts to use for the hostname (separated by comma, first wins)"), "discovery_bootif"),
19
21
  self.set('discovery_auto', N_("Automatically provision newly discovered hosts, according to the provisioning rules"), false),
20
22
  self.set('discovery_reboot', N_("Automatically reboot discovered host during provisioning"), true),
21
23
  ].compact.each { |s| self.create s.update(:category => "Setting::Discovered")}
@@ -59,18 +61,22 @@ class Setting::Discovered < ::Setting
59
61
  ].compact.each { |s| self.create s.update(:category => "Setting::Discovered")}
60
62
  end
61
63
  true
62
-
63
64
  end
64
65
 
65
66
  def self.discovery_fact_column_array
66
- return [] if !Setting['discovery_fact_column'].present?
67
- list = []
68
- Setting['discovery_fact_column'].to_s.split(",").each do |value|
69
- list << value.strip
70
- end
71
- rescue => error
72
- logger.warn "Failed to parse comma delimited list [%s] into array. Error: %s" % [list,error]
73
- ensure
74
- list
67
+ from_array(Setting['discovery_fact_column'])
68
+ end
69
+
70
+ def self.discovery_hostname_fact_array
71
+ return [] if !Setting['discovery_hostname'].present?
72
+ from_array Setting['discovery_hostname']
73
+ end
74
+
75
+ def self.from_array(setting)
76
+ return [] unless setting.present?
77
+ setting.to_s.split(",").map(&:strip)
78
+ rescue Exception => e
79
+ logger.warn "Failed to parse discovery_fact_column, ignoring: #{e}"
80
+ []
75
81
  end
76
82
  end
@@ -0,0 +1,16 @@
1
+ module ForemanDiscovery
2
+ class FactParser < ::PuppetFactParser
3
+ def suggested_primary_interface(host)
4
+ raise("Discovery fact parser does not work with non-discovery host #{host}") if host.type != "Host::Discovered"
5
+ bootif_mac = FacterUtils::bootif_mac(facts).try(:downcase)
6
+ detected = interfaces.detect { |_, values| values[:macaddress].try(:downcase) == bootif_mac }
7
+ Rails.logger.debug "Discovery fact parser detected primary interface: #{detected}"
8
+ # return the detected interface as array [name, facts]
9
+ detected || raise(::Foreman::Exception.new(N_("Unable to detect primary interface using MAC '%{mac}' specified by discovery_fact '%{fact}'") % {:mac => bootif_mac, :fact => FacterUtils::bootif_name}))
10
+ end
11
+
12
+ def parse_interfaces?
13
+ true # to make 'ignore_puppet_facts_for_provisioning' setting non-effective
14
+ end
15
+ end
16
+ end
@@ -2,11 +2,7 @@ class ForemanDiscovery::HostConverter
2
2
 
3
3
  # Converts discovered host to managed host without uptading the database.
4
4
  # Record must be saved explicitly (using save! or update_attributes! or similar).
5
- # This method MUST be called from a SQL transaction.
6
5
  def self.to_managed(original_host, set_managed = true, set_build = true)
7
- if ActiveRecord::Base.connection.open_transactions <= 0
8
- raise "This method must be executed with explicit transaction"
9
- end
10
6
  host = original_host.becomes(::Host::Managed)
11
7
  host.type = 'Host::Managed'
12
8
  # the following flags can be skipped when parameters are set to false
@@ -2,15 +2,15 @@ module ForemanDiscovery::NodeAPI
2
2
  class Power
3
3
  class << self
4
4
  def service(data)
5
- PowerService.new(data)
5
+ ForemanDiscovery::NodeAPI::PowerService.new(data)
6
6
  end
7
7
 
8
8
  def legacy_direct_service(data)
9
- PowerLegacyDirectService.new(data)
9
+ ForemanDiscovery::NodeAPI::PowerLegacyDirectService.new(data)
10
10
  end
11
11
 
12
12
  def legacy_proxied_service(data)
13
- PowerLegacyProxiedService.new(data)
13
+ ForemanDiscovery::NodeAPI::PowerLegacyProxiedService.new(data)
14
14
  end
15
15
  end
16
16
  end
@@ -5,6 +5,8 @@
5
5
  <td class="hidden-tablet hidden-xs"><%= number_to_human_size(discovery_attribute(host, :memory, 0) * 1024 * 1024) %></td>
6
6
  <td class="hidden-tablet hidden-xs"><%= discovery_attribute(host, :disk_count) %></td>
7
7
  <td class="hidden-tablet hidden-xs"><%= number_to_human_size(discovery_attribute(host, :disks_size, 0) * 1024 * 1024) %></td>
8
- <% Setting::Discovered.discovery_fact_column_array.each do |fact_column| %>
9
- <td class="hidden-tablet hidden-xs"><%= host.facts_hash[fact_column.strip] || 'N/A' %></td>
8
+ <%
9
+ Setting::Discovered.discovery_fact_column_array.each do |name|
10
+ %>
11
+ <td class="hidden-tablet hidden-xs"><%= @host_facts[host.id][name] || 'N/A' %></td>
10
12
  <% end %>
@@ -11,7 +11,7 @@
11
11
  <th class="hidden-tablet hidden-xs"><%= sort :disk_count, :as => _('Disk count') %></th>
12
12
  <th class="hidden-tablet hidden-xs"><%= sort :disks_size, :as => _('Disks size') %></th>
13
13
  <% Setting::Discovered.discovery_fact_column_array.each do |fact_column| %>
14
- <th class="hidden-tablet hidden-xs"><%= fact_column.strip.capitalize %></th>
14
+ <th class="hidden-tablet hidden-xs"><%= fact_column.capitalize %></th>
15
15
  <% end %>
16
16
  <% if SETTINGS[:locations_enabled] -%>
17
17
  <th class="hidden-tablet hidden-xs"><%= sort :location, :as => _('Location') %></th>
@@ -0,0 +1,10 @@
1
+ <% td_style = "text-align: left; border-collapse: collapse; background-color: #FFFFFF; padding: 4px; border: 1px solid #cccccc;" %>
2
+ <td style="<%= td_style%>">
3
+ <%= link_to host, discovered_host_path(:id => host, :host => @url.host, :port => @url.port, :only_path => false, :protocol => @url.scheme) %>
4
+ </td>
5
+ <td style="<%= td_style%>"><%= host.model_name %></td>
6
+ <td style="<%= td_style%>"><%= host.ip %></td>
7
+ <td style="<%= td_style%>"><%= discovery_attribute(host, :cpu_count) %></td>
8
+ <td style="<%= td_style%>"><%= number_to_human_size(discovery_attribute(host, :memory, 0) * 1024 * 1024) %></td>
9
+ <td style="<%= td_style%>"><%= discovery_attribute(host, :disk_count) %></td>
10
+ <td style="<%= td_style%>"><%= number_to_human_size(discovery_attribute(host, :disks_size, 0) * 1024 * 1024) %></td>
@@ -0,0 +1,35 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <%# this view contains style as some email clients ignore css files %>
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
6
+ <title><%= _('Summary report for discovered hosts from Foreman') %></title>
7
+ </head>
8
+ <body style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #3f3f3f; background-color: #f1f1f1; padding: 10px 24px">
9
+ <h2 style="font-weight: normal; text-transform: uppercase; font-size: 120%;"><%= _("<b>Foreman</b> Discovered hosts summary").html_safe %></h2>
10
+ <h2 style="margin: 5px 0px;"><%= _("Summary from %{time} ago to %{now}") % { :time => @time.in_time_zone, :now => Time.zone.now } %></h2>
11
+ <h3 style="margin: 0px;"><%= _("Discovered hosts from Foreman server at %{foreman_url}") % {:foreman_url => Setting[:foreman_url]} %></h3>
12
+ <div style="background: #fff; padding: 10px 20px; border: 1px solid #e1e2e3">
13
+ <% if @discovered_hosts.any? %>
14
+ <% table_style = "min-width: 400px; border: 1px solid #cccccc; padding: 5px; background-color: #ffffff; border-collapse: collapse; text-align: justify; width: 100%;" %>
15
+ <% th_style = "text-align: left; border-collapse: collapse; background: #f5f5f5; background: linear-gradient(#f5f5f5, #e8e8e8); padding: 4px; border: 1px solid #cccccc;" %>
16
+ <table style="<%= table_style %>">
17
+ <th style="<%= th_style %>"><%= _('Name') %></th>
18
+ <th style="<%= th_style %>"><%= _('Model') %></th>
19
+ <th style="<%= th_style %>"><%= _('IP Address') %></th>
20
+ <th style="<%= th_style %>"><%= _('CPUs') %></th>
21
+ <th style="<%= th_style %>"><%= _('Memory') %></th>
22
+ <th style="<%= th_style %>"><%= _('Disk count') %></th>
23
+ <th style="<%= th_style %>"><%= _('Disks size') %></th>
24
+ <% @discovered_hosts.each do |host| %>
25
+ <tr>
26
+ <%= render :partial => "discovered_host", :locals => {:host => host} %>
27
+ </tr>
28
+ <% end %>
29
+ </table>
30
+ <% else %>
31
+ <p><%= _('No discovered hosts for the selected period') %>
32
+ <% end %>
33
+ </div>
34
+ </body>
35
+ </html>
@@ -0,0 +1,24 @@
1
+ <%= _("Foreman discovered hosts summary") %>
2
+ =================================
3
+ <%= _("Discovered hosts from Foreman server at %{foreman_url}") % {:foreman_url => Setting[:foreman_url]} %>
4
+
5
+ <%= _("Summary from %{time} ago to %{now}") % { :time => @time.in_time_zone, :now => Time.zone.now } %>
6
+ <% if @discovered_hosts.any? %>
7
+
8
+ <% @discovered_hosts.each do |host| %>
9
+ <%= _('Name') %>: <%= host.to_label %>
10
+ <%= _('Model') %>: <%= host.model_name %>
11
+ <%= _('IP Address') %>: <%= host.ip %>
12
+ <%= _('CPUs') %>: <%= discovery_attribute(host, :cpu_count) %>
13
+ <%= _('Memory') %>: <%= number_to_human_size(discovery_attribute(host, :memory, 0) * 1024 * 1024) %>
14
+ <%= _('Disk count') %> <%= discovery_attribute(host, :disk_count) %>
15
+ <%= _('Disks size') %> <%= number_to_human_size(discovery_attribute(host, :disks_size, 0) * 1024 * 1024) %>
16
+
17
+ (<%= discovered_host_path(:id => host, :host => @url.host, :port => @url.port, :only_path => false, :protocol => @url.scheme) %>)
18
+ -
19
+ <% end %>
20
+ <% else %>
21
+ <%= _('No new discovered hosts for this period') %>
22
+ <% end %>
23
+
24
+ <%= discovered_hosts_path(:host => @url.host, :port => @url.port, :only_path => false, :protocol => @url.scheme, :search => @query) %>
@@ -2,9 +2,9 @@
2
2
  Rails.application.routes.draw do
3
3
 
4
4
  # Needed to make the hosts/edit form render
5
- get 'architecture_selected_discovered_hosts' => 'hosts#architecture_selected'
6
- get 'os_selected_discovered_hosts' => 'hosts#os_selected'
7
- get 'medium_selected_discovered_hosts' => 'hosts#medium_selected'
5
+ post 'architecture_selected_discovered_hosts' => 'hosts#architecture_selected'
6
+ post 'os_selected_discovered_hosts' => 'hosts#os_selected'
7
+ post 'medium_selected_discovered_hosts' => 'hosts#medium_selected'
8
8
 
9
9
  constraints(:id => /[^\/]+/) do
10
10
  resources :discovered_hosts, :except => [:new, :create] do
@@ -0,0 +1,9 @@
1
+ discovery_mail_notification = {
2
+ :name => :discovered_summary,
3
+ :description => N_('A summary of discovered hosts'),
4
+ :mailer => 'DiscoveredMailer',
5
+ :method => 'discovered_summary',
6
+ :subscription_type => 'report',
7
+ }
8
+
9
+ MailNotification.where(discovery_mail_notification).first_or_create
@@ -44,7 +44,7 @@ module ForemanDiscovery
44
44
  end
45
45
  end
46
46
 
47
- initializer 'foreman_discovery.register_plugin', :after=> :finisher_hook do |app|
47
+ initializer 'foreman_discovery.register_plugin', :before => :finisher_hook do |app|
48
48
  Foreman::Plugin.register :foreman_discovery do
49
49
  requires_foreman '>= 1.11.0'
50
50
 
@@ -103,12 +103,17 @@ module ForemanDiscovery
103
103
  end
104
104
 
105
105
  READER = [
106
- :view_discovered_hosts,
107
- :view_discovery_rules,
106
+ # core permissions
108
107
  :view_organizations,
109
108
  :view_locations,
109
+ :view_hosts,
110
+ # discovered_hosts
111
+ :view_discovered_hosts,
112
+ # discovered_rules
113
+ :view_discovery_rules,
110
114
  ]
111
115
  MANAGER = READER + [
116
+ # core permissions
112
117
  :assign_organizations,
113
118
  :assign_locations,
114
119
  # discovered_hosts
@@ -158,12 +163,8 @@ module ForemanDiscovery
158
163
  # Include extensions to models in this config.to_prepare block
159
164
  config.to_prepare do
160
165
 
161
- begin
162
- require_dependency 'puppet_fact_parser'
163
- ::PuppetFactParser.send :include, PuppetFactParserExtensions
164
- rescue LoadError
165
- Rails.logger.warn 'PuppetFactParser not found, not loading Parser extensions'
166
- end
166
+ # Fact parsing
167
+ ::FactParser.register_fact_parser(:foreman_discovery, ForemanDiscovery::FactParser)
167
168
 
168
169
  # Model extensions
169
170
  ::Host::Managed.send :include, Host::ManagedExtensions
@@ -174,6 +175,8 @@ module ForemanDiscovery
174
175
 
175
176
  # Include helper for dashboard
176
177
  ::DashboardHelper.send(:include, DiscoveredHostsHelper)
178
+
179
+ ::SettingsHelper.send :include, ForemanDiscovery::SettingsHelperExtensions
177
180
  end
178
181
 
179
182
  rake_tasks do
@@ -1,3 +1,3 @@
1
1
  module ForemanDiscovery
2
- VERSION = "5.0.0"
2
+ VERSION = "5.0.1"
3
3
  end
@@ -0,0 +1,780 @@
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) 2015 Foreman developers
3
+ # This file is distributed under the same license as the foreman_discovery package.
4
+ #
5
+ # Translators:
6
+ # Robert Antoni Buj i Gelonch <rbuj@fedoraproject.org>, 2015
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: Foreman\n"
10
+ "Report-Msgid-Bugs-To: foreman-dev@googlegroups.com\n"
11
+ "PO-Revision-Date: 2015-12-11 09:29+0000\n"
12
+ "Last-Translator: Robert Antoni Buj i Gelonch <rbuj@fedoraproject.org>\n"
13
+ "Language-Team: Catalan (http://www.transifex.com/foreman/foreman/language/ca/)"
14
+ "\n"
15
+ "MIME-Version: 1.0\n"
16
+ "Content-Type: text/plain; charset=UTF-8\n"
17
+ "Content-Transfer-Encoding: 8bit\n"
18
+ "Language: ca\n"
19
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
+
21
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:15
22
+ msgid "List all discovered hosts"
23
+ msgstr "Llista tots els amfitrions descoberts"
24
+
25
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:16 ../app/controllers/api/v2/discovery_rules_controller.rb:14
26
+ msgid "filter results"
27
+ msgstr "filtra els resultats"
28
+
29
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:17 ../app/controllers/api/v2/discovery_rules_controller.rb:15
30
+ msgid "sort results"
31
+ msgstr "ordena els resultats"
32
+
33
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:18 ../app/controllers/api/v2/discovery_rules_controller.rb:16
34
+ msgid "paginate results"
35
+ msgstr "pagina els resultats"
36
+
37
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:19 ../app/controllers/api/v2/discovery_rules_controller.rb:17
38
+ msgid "number of entries per request"
39
+ msgstr "Nombre d'entrades per petició"
40
+
41
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:25
42
+ msgid "Show a discovered host"
43
+ msgstr "Mostra un amfitrió descobert"
44
+
45
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:39
46
+ msgid "Create a discovered host for testing (use /facts to create new hosts)"
47
+ msgstr "Crea un amfitrió descobert per a provar-ho (utilitzeu /facts per crear nous amfitrions)"
48
+
49
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:47
50
+ msgid "Provision a discovered host"
51
+ msgstr ""
52
+
53
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:52
54
+ msgid "not required if using a subnet with DHCP proxy"
55
+ msgstr "no es requereix si s'està utilitzant una subxarxa amb servidor intermediari de DHCP"
56
+
57
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:53
58
+ msgid "not required if it's a virtual machine"
59
+ msgstr ""
60
+
61
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:73
62
+ msgid "UUID to track orchestration tasks status, GET /api/orchestration/:UUID/tasks"
63
+ msgstr ""
64
+
65
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:75
66
+ msgid "required if value is not inherited from host group or default password in settings"
67
+ msgstr ""
68
+
69
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:85
70
+ msgid "Delete a discovered host"
71
+ msgstr "Suprimeix un amfitrió descobert"
72
+
73
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:92
74
+ msgid "Upload facts for a host, creating the host if required"
75
+ msgstr "Puja els objectes d'interès per a un amfitrió, creant el nou amfitrió si fos necessari"
76
+
77
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:93
78
+ 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)"
79
+ msgstr ""
80
+
81
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:112
82
+ msgid "Execute rules against a discovered host"
83
+ msgstr ""
84
+
85
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:118 ../app/controllers/discovered_hosts_controller.rb:147
86
+ msgid "Host %{host} was provisioned with rule %{rule}"
87
+ msgstr ""
88
+
89
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:121
90
+ msgid "Unable to provision %{host}: %{errors}"
91
+ msgstr ""
92
+
93
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:127 ../app/controllers/discovered_hosts_controller.rb:154
94
+ msgid "No rule found for host %s"
95
+ msgstr ""
96
+
97
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:134
98
+ msgid "Execute rules against all currently discovered hosts"
99
+ msgstr ""
100
+
101
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:138 ../app/controllers/discovered_hosts_controller.rb:160
102
+ msgid "Errors during auto provisioning: %s"
103
+ msgstr ""
104
+
105
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:141 ../app/controllers/discovered_hosts_controller.rb:163
106
+ msgid "No discovered hosts to provision"
107
+ msgstr ""
108
+
109
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:163
110
+ msgid "%s discovered hosts were provisioned"
111
+ msgstr "%s amfitrions descoberts van ser aprovisionats"
112
+
113
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:174
114
+ msgid "Refreshing the facts of a discovered host"
115
+ msgstr "S'estan refrescant els objectes d'interès d'un amfitrió descobert"
116
+
117
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:183
118
+ msgid "Rebooting a discovered host"
119
+ msgstr "S'està reiniciant un amfitrió descobert"
120
+
121
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:192
122
+ msgid "Rebooting all discovered hosts"
123
+ msgstr "S'estan reiniciant tots els amfitrions descoberts"
124
+
125
+ #: ../app/controllers/api/v2/discovered_hosts_controller.rb:203 ../app/controllers/discovered_hosts_controller.rb:105
126
+ msgid "Discovered hosts are rebooting now"
127
+ msgstr ""
128
+
129
+ #: ../app/controllers/api/v2/discovery_rules_controller.rb:13
130
+ msgid "List all discovery rules"
131
+ msgstr "Llista totes les regles de descobriment"
132
+
133
+ #: ../app/controllers/api/v2/discovery_rules_controller.rb:23
134
+ msgid "Show a discovery rule"
135
+ msgstr "Mostra una regla de descobriment"
136
+
137
+ #: ../app/controllers/api/v2/discovery_rules_controller.rb:31
138
+ msgid "represents rule name shown to the users"
139
+ msgstr ""
140
+
141
+ #: ../app/controllers/api/v2/discovery_rules_controller.rb:32
142
+ msgid "query to match discovered hosts for the particular rule"
143
+ msgstr ""
144
+
145
+ #: ../app/controllers/api/v2/discovery_rules_controller.rb:33
146
+ msgid "the hostgroup that is used to auto provision a host"
147
+ msgstr ""
148
+
149
+ #: ../app/controllers/api/v2/discovery_rules_controller.rb:34
150
+ msgid "defines a pattern to assign human-readable hostnames to the matching hosts"
151
+ msgstr ""
152
+
153
+ #: ../app/controllers/api/v2/discovery_rules_controller.rb:35
154
+ msgid "enables to limit maximum amount of provisioned hosts per rule"
155
+ msgstr ""
156
+
157
+ #: ../app/controllers/api/v2/discovery_rules_controller.rb:36
158
+ msgid "puts the rules in order, low numbers go first. Must be greater then zero"
159
+ msgstr ""
160
+
161
+ #: ../app/controllers/api/v2/discovery_rules_controller.rb:37
162
+ msgid "flag is used for temporary shutdown of rules"
163
+ msgstr ""
164
+
165
+ #: ../app/controllers/api/v2/discovery_rules_controller.rb:41
166
+ msgid "Create a discovery rule"
167
+ msgstr "Crea una regla de descobriment"
168
+
169
+ #: ../app/controllers/api/v2/discovery_rules_controller.rb:49
170
+ msgid "Update a rule"
171
+ msgstr "Actualitza una regla"
172
+
173
+ #: ../app/controllers/api/v2/discovery_rules_controller.rb:57
174
+ msgid "Delete a rule"
175
+ msgstr "Suprimeix una regla"
176
+
177
+ #: ../app/controllers/concerns/foreman/controller/discovered_extensions.rb:6
178
+ msgid "Unable to find a discovery rule, no host provided (check permissions)"
179
+ msgstr ""
180
+
181
+ #: ../app/controllers/concerns/foreman/controller/discovered_extensions.rb:47
182
+ msgid "No hostgroup associated with rule '%s'"
183
+ msgstr ""
184
+
185
+ #: ../app/controllers/concerns/foreman/controller/discovered_extensions.rb:63
186
+ msgid "Errors during reboot: %s"
187
+ msgstr ""
188
+
189
+ #: ../app/controllers/concerns/foreman/controller/discovered_extensions.rb:81
190
+ msgid "No discovered hosts to reboot"
191
+ msgstr ""
192
+
193
+ #: ../app/controllers/discovered_hosts_controller.rb:73
194
+ msgid "Facts refreshed for %s"
195
+ msgstr "Els objectes d'interès que s'han refrescat per a %s"
196
+
197
+ #: ../app/controllers/discovered_hosts_controller.rb:75
198
+ msgid "Failed to refresh facts for %s"
199
+ msgstr "No s'ha pogut refrescar els objectes d'interès per a %s"
200
+
201
+ #: ../app/controllers/discovered_hosts_controller.rb:78
202
+ msgid "Failed to refresh facts for %{hostname} with error %{error_message}"
203
+ msgstr ""
204
+
205
+ #: ../app/controllers/discovered_hosts_controller.rb:85
206
+ msgid "Host of type %s can not be rebooted"
207
+ msgstr ""
208
+
209
+ #: ../app/controllers/discovered_hosts_controller.rb:89
210
+ msgid "Rebooting host %s"
211
+ msgstr "S'està reiniciant l'amfitrió %s"
212
+
213
+ #: ../app/controllers/discovered_hosts_controller.rb:91
214
+ msgid "Failed to reboot host %s"
215
+ msgstr ""
216
+
217
+ #: ../app/controllers/discovered_hosts_controller.rb:94
218
+ msgid "Failed to reboot host %{hostname} with error %{error_message}"
219
+ msgstr ""
220
+
221
+ #: ../app/controllers/discovered_hosts_controller.rb:108
222
+ msgid "Failed to reboot hosts with error %s"
223
+ msgstr ""
224
+
225
+ #: ../app/controllers/discovered_hosts_controller.rb:122
226
+ msgid "Destroyed selected hosts"
227
+ msgstr ""
228
+
229
+ #: ../app/controllers/discovered_hosts_controller.rb:124
230
+ msgid "The following hosts were not deleted: %s"
231
+ msgstr ""
232
+
233
+ #: ../app/controllers/discovered_hosts_controller.rb:151
234
+ msgid "Failed to auto provision host %s: %s"
235
+ msgstr ""
236
+
237
+ #: ../app/controllers/discovered_hosts_controller.rb:179
238
+ msgid "Discovered hosts are provisioning now"
239
+ msgstr ""
240
+
241
+ #: ../app/controllers/discovered_hosts_controller.rb:267
242
+ msgid "No hosts were found with that id or name"
243
+ msgstr ""
244
+
245
+ #: ../app/controllers/discovered_hosts_controller.rb:271
246
+ msgid "No hosts selected"
247
+ msgstr "Cap amfitrió seleccionat"
248
+
249
+ #: ../app/controllers/discovered_hosts_controller.rb:277
250
+ msgid "Something went wrong while selecting hosts - %s"
251
+ msgstr ""
252
+
253
+ #: ../app/controllers/discovery_rules_controller.rb:66
254
+ msgid "Rule disabled"
255
+ msgstr ""
256
+
257
+ #: ../app/controllers/discovery_rules_controller.rb:66
258
+ msgid "Rule enabled"
259
+ msgstr ""
260
+
261
+ #: ../app/helpers/discovered_hosts_helper.rb:11
262
+ msgid "%s ago"
263
+ msgstr "fa %s"
264
+
265
+ #: ../app/helpers/discovered_hosts_helper.rb:15 ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:42
266
+ msgid "Provision"
267
+ msgstr ""
268
+
269
+ #: ../app/helpers/discovered_hosts_helper.rb:16 ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:43
270
+ msgid "Auto Provision"
271
+ msgstr ""
272
+
273
+ #: ../app/helpers/discovered_hosts_helper.rb:17 ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:44
274
+ msgid "Refresh facts"
275
+ msgstr "Refresca els objectes d'interès"
276
+
277
+ #: ../app/helpers/discovered_hosts_helper.rb:18 ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:45
278
+ msgid "Reboot"
279
+ msgstr "Reinicia"
280
+
281
+ #: ../app/helpers/discovered_hosts_helper.rb:21
282
+ msgid "Back"
283
+ msgstr ""
284
+
285
+ #: ../app/helpers/discovered_hosts_helper.rb:23 ../app/helpers/discovered_hosts_helper.rb:46
286
+ msgid "Select Action"
287
+ msgstr "Selecciona l'acció"
288
+
289
+ #: ../app/helpers/discovered_hosts_helper.rb:30
290
+ msgid "Expand All"
291
+ msgstr ""
292
+
293
+ #: ../app/helpers/discovered_hosts_helper.rb:35
294
+ msgid "Delete"
295
+ msgstr "Suprimeix"
296
+
297
+ #: ../app/helpers/discovered_hosts_helper.rb:36
298
+ msgid "Are you sure?"
299
+ msgstr "Esteu segur?"
300
+
301
+ #: ../app/helpers/discovered_hosts_helper.rb:42
302
+ msgid "Delete hosts"
303
+ msgstr "Suprimeix els amfitrions"
304
+
305
+ #: ../app/helpers/discovered_hosts_helper.rb:43
306
+ msgid "Assign Organization"
307
+ msgstr "Assigna l'organització"
308
+
309
+ #: ../app/helpers/discovered_hosts_helper.rb:44
310
+ msgid "Assign Location"
311
+ msgstr "Assigna la ubicació"
312
+
313
+ #: ../app/helpers/discovered_hosts_helper.rb:48
314
+ msgid "%s - The following hosts are about to be changed"
315
+ msgstr "%s - Els següents amfitrions estan a punt de ser canviats"
316
+
317
+ #: ../app/helpers/discovered_hosts_helper.rb:57
318
+ msgid "N/A"
319
+ msgstr "N/D"
320
+
321
+ #: ../app/helpers/discovered_hosts_helper.rb:69
322
+ msgid "New in the last 24 hours"
323
+ msgstr "Nou en les últimes 24 hores"
324
+
325
+ #: ../app/helpers/discovered_hosts_helper.rb:73
326
+ msgid "Not reported in more than 7 days"
327
+ msgstr "No es va informar en més de 7 dies"
328
+
329
+ #: ../app/helpers/discovered_hosts_helper.rb:77
330
+ msgid "Reported in the last 7 days"
331
+ msgstr "Es va informar en els últims 7 dies"
332
+
333
+ #: ../app/helpers/discovery_rules_helper.rb:26
334
+ msgid "Discovered Hosts"
335
+ msgstr ""
336
+
337
+ #: ../app/helpers/discovery_rules_helper.rb:27
338
+ msgid "Associated Hosts"
339
+ msgstr ""
340
+
341
+ #: ../app/helpers/discovery_rules_helper.rb:29
342
+ msgid "Disable rule '%s'?"
343
+ msgstr ""
344
+
345
+ #: ../app/helpers/discovery_rules_helper.rb:29
346
+ msgid "Disable"
347
+ msgstr "Inhabilita"
348
+
349
+ #: ../app/helpers/discovery_rules_helper.rb:31
350
+ msgid "Enable"
351
+ msgstr "Habilita"
352
+
353
+ #: ../app/helpers/discovery_rules_helper.rb:31
354
+ msgid "Enable rule '%s'?"
355
+ msgstr ""
356
+
357
+ #: ../app/helpers/discovery_rules_helper.rb:33
358
+ msgid "Delete rule '%s'?"
359
+ msgstr ""
360
+
361
+ #: ../app/mailers/discovered_mailer.rb:4
362
+ msgid "Must specify a user with email enabled"
363
+ msgstr ""
364
+
365
+ #: ../app/mailers/discovered_mailer.rb:15
366
+ msgid "Discovered hosts summary"
367
+ msgstr ""
368
+
369
+ #: ../app/models/discovery_rule.rb:11
370
+ msgid "can't contain white spaces."
371
+ msgstr ""
372
+
373
+ #: ../app/models/discovery_rule.rb:13
374
+ msgid "must start with a letter or ERB."
375
+ msgstr ""
376
+
377
+ #: ../app/models/discovery_rule.rb:49
378
+ msgid "Host group organization %s must also be associated to the discovery rule"
379
+ msgid_plural "Host group organizations %s must also be associated to the discovery rule"
380
+ msgstr[0] ""
381
+ msgstr[1] ""
382
+
383
+ #: ../app/models/discovery_rule.rb:55
384
+ msgid "Host group location %s must also be associated to the discovery rule"
385
+ msgid_plural "Host group locations %s must also be associated to the discovery rule"
386
+ msgstr[0] ""
387
+ msgstr[1] ""
388
+
389
+ #: ../app/models/host/discovered.rb:34
390
+ msgid "Invalid facts, must be a Hash"
391
+ msgstr "Objectes d'interès no vàlids, han de tenir un Hash"
392
+
393
+ #: ../app/models/host/discovered.rb:39
394
+ msgid "Expected discovery_fact '%s' is missing, unable to detect primary interface and set hostname"
395
+ msgstr ""
396
+
397
+ #: ../app/models/host/discovered.rb:46
398
+ msgid "Invalid facts: hash does not contain a valid value for any of the facts in the discovery_hostname setting: %s"
399
+ msgstr ""
400
+
401
+ #: ../app/models/host/discovered.rb:107
402
+ msgid "Unable to assign subnet, primary interface is missing IP address"
403
+ msgstr ""
404
+
405
+ #: ../app/models/host/discovered.rb:149
406
+ msgid "Could not get facts from proxy %{url}: %{error}"
407
+ msgstr "No s'han pogut obtenir els objectes d'interès del servidor intermediari %{url}: %{error}"
408
+
409
+ #: ../app/models/host/discovered.rb:165
410
+ msgid "Unable to reboot %{name} via %{url}: %{msg}"
411
+ msgstr ""
412
+
413
+ #: ../app/models/host/discovered.rb:173
414
+ msgid "Unable to perform kexec on %{name} via %{url}: %{msg}"
415
+ msgstr ""
416
+
417
+ #: ../app/models/host/discovered.rb:192
418
+ msgid "Invalid hostname: Could not normalize the hostname"
419
+ msgstr ""
420
+
421
+ #: ../app/models/host/managed_extensions.rb:24
422
+ msgid "Reloading kernel on %s"
423
+ msgstr "S'està tornant a carregar el kernel a %s"
424
+
425
+ #: ../app/models/host/managed_extensions.rb:26
426
+ msgid "Rebooting %s"
427
+ msgstr "S'està reiniciant %s"
428
+
429
+ #: ../app/models/host/managed_extensions.rb:45
430
+ msgid "Operating system not set for host/hostgroup"
431
+ msgstr ""
432
+
433
+ #: ../app/models/host/managed_extensions.rb:47
434
+ msgid "Medium not set for host/hostgroup"
435
+ msgstr ""
436
+
437
+ #: ../app/models/host/managed_extensions.rb:54
438
+ msgid "Kexec template not associated with operating system"
439
+ msgstr ""
440
+
441
+ #: ../app/models/setting/discovered.rb:19
442
+ msgid "Fact name to use for primary interface detection"
443
+ msgstr ""
444
+
445
+ #: ../app/models/setting/discovered.rb:20
446
+ msgid "List of facts to use for the hostname (separated by comma, first wins)"
447
+ msgstr ""
448
+
449
+ #: ../app/models/setting/discovered.rb:21
450
+ msgid "Automatically provision newly discovered hosts, according to the provisioning rules"
451
+ msgstr ""
452
+
453
+ #: ../app/models/setting/discovered.rb:22
454
+ msgid "Automatically reboot discovered host during provisioning"
455
+ msgstr ""
456
+
457
+ #: ../app/models/setting/discovered.rb:28
458
+ msgid "The default prefix to use for the host name, must start with a letter"
459
+ msgstr ""
460
+
461
+ #: ../app/models/setting/discovered.rb:34
462
+ msgid "Extra facter columns to show in host lists (separate by comma)"
463
+ msgstr ""
464
+
465
+ #: ../app/models/setting/discovered.rb:41
466
+ msgid "The default location to place discovered hosts in"
467
+ msgstr ""
468
+
469
+ #: ../app/models/setting/discovered.rb:48
470
+ msgid "The default organization to place discovered hosts in"
471
+ msgstr ""
472
+
473
+ #: ../app/models/setting/discovered.rb:55
474
+ msgid "Regex to organize facts for highlights section"
475
+ msgstr ""
476
+
477
+ #: ../app/models/setting/discovered.rb:56
478
+ msgid "Regex to organize facts for storage section"
479
+ msgstr ""
480
+
481
+ #: ../app/models/setting/discovered.rb:57
482
+ msgid "Regex to organize facts for software section"
483
+ msgstr ""
484
+
485
+ #: ../app/models/setting/discovered.rb:58
486
+ msgid "Regex to organize facts for hardware section"
487
+ msgstr ""
488
+
489
+ #: ../app/models/setting/discovered.rb:59
490
+ msgid "Regex to organize facts for network section"
491
+ msgstr ""
492
+
493
+ #: ../app/models/setting/discovered.rb:60
494
+ msgid "Regex to organize facts for ipmi section"
495
+ msgstr ""
496
+
497
+ #: ../app/services/foreman_discovery/fact_parser.rb:9
498
+ msgid "Unable to detect primary interface using MAC '%{mac}' specified by discovery_fact '%{fact}'"
499
+ msgstr ""
500
+
501
+ #: ../app/services/foreman_discovery/node_api/node_resource.rb:75
502
+ msgid "Image API returned HTTP/%{code} with '%{body}"
503
+ msgstr ""
504
+
505
+ #: ../app/services/foreman_discovery/node_api/node_resource.rb:78
506
+ msgid "Image API processing error: %{msg} (HTTP/%{code}, body: %{body})"
507
+ msgstr ""
508
+
509
+ #: ../app/views/dashboard/_discovery_widget.html.erb:9
510
+ msgid "No discovered hosts available"
511
+ msgstr ""
512
+
513
+ #: ../app/views/dashboard/_discovery_widget_host_list.html.erb:3
514
+ msgid "Host"
515
+ msgstr "Amfitrió"
516
+
517
+ #: ../app/views/dashboard/_discovery_widget_host_list.html.erb:4 ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:7 ../app/views/discovered_hosts/_selected_hosts.html.erb:8 ../app/views/discovered_mailer/discovered_summary.html.erb:18 ../app/views/discovered_mailer/discovered_summary.text.erb:10
518
+ msgid "Model"
519
+ msgstr "Model"
520
+
521
+ #: ../app/views/dashboard/_discovery_widget_host_list.html.erb:5 ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:9 ../app/views/discovered_mailer/discovered_summary.html.erb:20 ../app/views/discovered_mailer/discovered_summary.text.erb:12
522
+ msgid "CPUs"
523
+ msgstr "Les CPU"
524
+
525
+ #: ../app/views/dashboard/_discovery_widget_host_list.html.erb:6 ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:10 ../app/views/discovered_mailer/discovered_summary.html.erb:21 ../app/views/discovered_mailer/discovered_summary.text.erb:13
526
+ msgid "Memory"
527
+ msgstr "Memòria"
528
+
529
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:2 ../lib/foreman_discovery/engine.rb:136
530
+ msgid "Discovered hosts"
531
+ msgstr "Amfitrions descoberts"
532
+
533
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:5
534
+ msgid "items selected. Uncheck to Clear"
535
+ msgstr "ítems seleccionats. Desmarca per netejar"
536
+
537
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:5
538
+ msgid "Select all items in this page"
539
+ msgstr "Selecciona tots els ítems en aquesta pàgina"
540
+
541
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:6 ../app/views/discovered_hosts/_selected_hosts.html.erb:7 ../app/views/discovered_mailer/discovered_summary.html.erb:17 ../app/views/discovered_mailer/discovered_summary.text.erb:9
542
+ msgid "Name"
543
+ msgstr "Nom"
544
+
545
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:8 ../app/views/discovered_mailer/discovered_summary.html.erb:19 ../app/views/discovered_mailer/discovered_summary.text.erb:11
546
+ msgid "IP Address"
547
+ msgstr "Adreça IP"
548
+
549
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:11 ../app/views/discovered_mailer/discovered_summary.html.erb:22 ../app/views/discovered_mailer/discovered_summary.text.erb:14
550
+ msgid "Disk count"
551
+ msgstr "Nombre de discs"
552
+
553
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:12 ../app/views/discovered_mailer/discovered_summary.html.erb:23 ../app/views/discovered_mailer/discovered_summary.text.erb:15
554
+ msgid "Disks size"
555
+ msgstr "Mida de disc"
556
+
557
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:17 ../app/views/discovered_hosts/_selected_hosts.html.erb:10
558
+ msgid "Location"
559
+ msgstr "Ubicació"
560
+
561
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:20 ../app/views/discovered_hosts/_selected_hosts.html.erb:13
562
+ msgid "Organization"
563
+ msgstr "Organització"
564
+
565
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:22
566
+ msgid "Subnet"
567
+ msgstr "Subxarxa"
568
+
569
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:23
570
+ msgid "Last facts upload"
571
+ msgstr "Última pujada dels objectes d'interès"
572
+
573
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:46
574
+ msgid "Delete %s?"
575
+ msgstr "Voleu suprimir %s?"
576
+
577
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:57
578
+ msgid "Please Confirm"
579
+ msgstr "Si us plau, confirmeu"
580
+
581
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:63
582
+ msgid "Cancel"
583
+ msgstr "Cancel·la"
584
+
585
+ #: ../app/views/discovered_hosts/_discovered_hosts_list.html.erb:64
586
+ msgid "Submit"
587
+ msgstr "Envia"
588
+
589
+ #: ../app/views/discovered_hosts/index.html.erb:2
590
+ msgid "Reboot All"
591
+ msgstr "Reinicia-ho tot"
592
+
593
+ #: ../app/views/discovered_hosts/index.html.erb:3
594
+ msgid "Auto Provision All"
595
+ msgstr ""
596
+
597
+ #: ../app/views/discovered_hosts/multiple_destroy.html.erb:4
598
+ msgid "Warning"
599
+ msgstr "Advertència"
600
+
601
+ #: ../app/views/discovered_hosts/multiple_destroy.html.erb:5
602
+ msgid "This might take a while, as all hosts, facts and reports will be destroyed as well"
603
+ msgstr ""
604
+
605
+ #: ../app/views/discovered_hosts/select_multiple_location.html.erb:5
606
+ msgid "Select location"
607
+ msgstr "Selecciona la ubicació"
608
+
609
+ #: ../app/views/discovered_hosts/select_multiple_organization.html.erb:5
610
+ msgid "Select organization"
611
+ msgstr "Selecciona l'organització"
612
+
613
+ #: ../app/views/discovered_hosts/show.html.erb:1
614
+ msgid "Discovered host: %s"
615
+ msgstr "Amfitrions descoberts: %s"
616
+
617
+ #: ../app/views/discovered_hosts/show.html.erb:32
618
+ msgid "Identifier"
619
+ msgstr ""
620
+
621
+ #: ../app/views/discovered_hosts/show.html.erb:33
622
+ msgid "MAC address"
623
+ msgstr ""
624
+
625
+ #: ../app/views/discovered_hosts/show.html.erb:34
626
+ msgid "IP address"
627
+ msgstr ""
628
+
629
+ #: ../app/views/discovered_mailer/discovered_summary.html.erb:6
630
+ msgid "Summary report for discovered hosts from Foreman"
631
+ msgstr ""
632
+
633
+ #: ../app/views/discovered_mailer/discovered_summary.html.erb:9
634
+ msgid "<b>Foreman</b> Discovered hosts summary"
635
+ msgstr ""
636
+
637
+ #: ../app/views/discovered_mailer/discovered_summary.html.erb:10 ../app/views/discovered_mailer/discovered_summary.text.erb:5
638
+ msgid "Summary from %{time} ago to %{now}"
639
+ msgstr ""
640
+
641
+ #: ../app/views/discovered_mailer/discovered_summary.html.erb:11 ../app/views/discovered_mailer/discovered_summary.text.erb:3
642
+ msgid "Discovered hosts from Foreman server at %{foreman_url}"
643
+ msgstr ""
644
+
645
+ #: ../app/views/discovered_mailer/discovered_summary.html.erb:31
646
+ msgid "No discovered hosts for the selected period"
647
+ msgstr ""
648
+
649
+ #: ../app/views/discovered_mailer/discovered_summary.text.erb:1
650
+ msgid "Foreman discovered hosts summary"
651
+ msgstr ""
652
+
653
+ #: ../app/views/discovered_mailer/discovered_summary.text.erb:21
654
+ msgid "No new discovered hosts for this period"
655
+ msgstr ""
656
+
657
+ #: ../app/views/discovery_rules/_form.html.erb:5
658
+ msgid "Primary"
659
+ msgstr "Primària"
660
+
661
+ #: ../app/views/discovery_rules/_form.html.erb:7
662
+ msgid "Locations"
663
+ msgstr "Ubicacions"
664
+
665
+ #: ../app/views/discovery_rules/_form.html.erb:10
666
+ msgid "Organizations"
667
+ msgstr "Organitzacions"
668
+
669
+ #: ../app/views/discovery_rules/_form.html.erb:22
670
+ msgid "Target host group for this rule with all properties set"
671
+ msgstr ""
672
+
673
+ #: ../app/views/discovery_rules/_form.html.erb:24
674
+ msgid "Template"
675
+ msgstr "Plantilla"
676
+
677
+ #: ../app/views/discovery_rules/_form.html.erb:26
678
+ msgid "Specify target hostname template pattern in the same syntax as in Provisioning Templates (ERB)."
679
+ msgstr ""
680
+
681
+ #: ../app/views/discovery_rules/_form.html.erb:29
682
+ msgid "Domain will be appended automatically. A hostname based on MAC address will be used when left blank. In addition to @host attribute function rand for random integers is available. Examples:"
683
+ msgstr ""
684
+
685
+ #: ../app/views/discovery_rules/_form.html.erb:42
686
+ msgid "When creating hostname patterns, make sure the resulting host names are unique. Hostnames must not start with numbers. A good approach is to use unique information provided by facter (MAC address, BIOS or serial ID)."
687
+ msgstr ""
688
+
689
+ #: ../app/views/discovery_rules/_form.html.erb:43
690
+ msgid "Hostname for provisioned hosts"
691
+ msgstr "Nom d'amfitrió per als amfitrions aprovisionats"
692
+
693
+ #: ../app/views/discovery_rules/_form.html.erb:44
694
+ msgid "Hosts limit"
695
+ msgstr ""
696
+
697
+ #: ../app/views/discovery_rules/_form.html.erb:44
698
+ msgid "Maximum hosts provisioned with this rule (0 = unlimited)"
699
+ msgstr ""
700
+
701
+ #: ../app/views/discovery_rules/_form.html.erb:45
702
+ msgid "Rule priority (lower integer means higher priority)"
703
+ msgstr ""
704
+
705
+ #: ../app/views/discovery_rules/edit.html.erb:1
706
+ msgid "Edit Discovery Rule"
707
+ msgstr "Edita la regla de descobriment"
708
+
709
+ #: ../app/views/discovery_rules/index.html.erb:1
710
+ msgid "Discovery Rules"
711
+ msgstr "Regles de descobriment"
712
+
713
+ #: ../app/views/discovery_rules/index.html.erb:2
714
+ msgid "New Rule"
715
+ msgstr "Nova regla"
716
+
717
+ #: ../app/views/discovery_rules/index.html.erb:6
718
+ msgid "DiscoveryRule|Name"
719
+ msgstr "Nom"
720
+
721
+ #: ../app/views/discovery_rules/index.html.erb:7
722
+ msgid "DiscoveryRule|Priority"
723
+ msgstr "Prioritat"
724
+
725
+ #: ../app/views/discovery_rules/index.html.erb:8
726
+ msgid "DiscoveryRule|Query"
727
+ msgstr "Consulta"
728
+
729
+ #: ../app/views/discovery_rules/index.html.erb:9
730
+ msgid "Host group"
731
+ msgstr "Grup d'amfitrions"
732
+
733
+ #: ../app/views/discovery_rules/index.html.erb:10
734
+ msgid "Hosts/limit"
735
+ msgstr "Amfitrions/límit"
736
+
737
+ #: ../app/views/discovery_rules/index.html.erb:11
738
+ msgid "DiscoveryRule|Enabled"
739
+ msgstr "Habilitada"
740
+
741
+ #: ../app/views/discovery_rules/new.html.erb:1
742
+ msgid "New Discovery Rule"
743
+ msgstr "Nova regla de descobriment"
744
+
745
+ #: ../db/seeds.d/70_discovery_mail_notification.rb:3
746
+ msgid "A summary of discovered hosts"
747
+ msgstr ""
748
+
749
+ #: ../lib/foreman_discovery/engine.rb:141
750
+ msgid "Discovery rules"
751
+ msgstr ""
752
+
753
+ #: ../lib/foreman_discovery/engine.rb:146
754
+ msgid "Discovery widget"
755
+ msgstr ""
756
+
757
+ #~ msgid "Disable rule?"
758
+ #~ msgstr "Voleu inhabilitar la regla?"
759
+
760
+ #~ msgid "Enable rule?"
761
+ #~ msgstr "Voleu habilitar la regla?"
762
+
763
+ #~ msgid "Fact"
764
+ #~ msgstr "Objecte d'interès"
765
+
766
+ #~ msgid "Fact name to use for primary interface detection and hostname"
767
+ #~ msgstr ""
768
+ #~ "Nom de l'objecte d'interès per utilitzar-ho per a la detecció de la interfície"
769
+ #~ " primària i el nom d'amfitrió"
770
+
771
+ #~ msgid "Facts discovered on this host"
772
+ #~ msgstr "Els objectes d'interès que s'han descobert en aquest amfitrió"
773
+
774
+ #~ msgid "Incompatible version of puppet fact parser"
775
+ #~ msgstr ""
776
+ #~ "Versió incompatible de l'analitzador sintàctic de l'objecte d'interès de puppe"
777
+ #~ "t"
778
+
779
+ #~ msgid "Value"
780
+ #~ msgstr "Valor"