foreman_discovery 1.3.0.rc2 → 1.3.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +13 -5
  2. data/README.md +4 -1
  3. data/app/controllers/api/v2/discovered_hosts_controller.rb +108 -0
  4. data/app/controllers/{discovers_controller.rb → discovered_hosts_controller.rb} +5 -5
  5. data/app/helpers/{discovers_helper.rb → discovered_hosts_helper.rb} +9 -9
  6. data/app/models/host/discovered.rb +4 -1
  7. data/app/overrides/add_dashboard_table.rb +1 -1
  8. data/app/views/api/v2/discovered_hosts/base.json.rabl +3 -0
  9. data/app/views/api/v2/discovered_hosts/index.json.rabl +3 -0
  10. data/app/views/api/v2/discovered_hosts/main.json.rabl +13 -0
  11. data/app/views/api/v2/discovered_hosts/show.json.rabl +5 -0
  12. data/app/views/api/v2/discovered_hosts/update.json.rabl +11 -0
  13. data/app/views/{discovers/_discovers_list.html.erb → discovered_hosts/_discovered_hosts_list.html.erb} +4 -4
  14. data/app/views/{discovers → discovered_hosts}/_selected_hosts.html.erb +0 -0
  15. data/app/views/discovered_hosts/index.html.erb +2 -0
  16. data/app/views/{discovers → discovered_hosts}/multiple_destroy.html.erb +1 -1
  17. data/app/views/{discovers → discovered_hosts}/select_multiple_location.html.erb +1 -1
  18. data/app/views/{discovers → discovered_hosts}/select_multiple_organization.html.erb +1 -1
  19. data/app/views/{discovers → discovered_hosts}/show.html.erb +1 -1
  20. data/config/routes.rb +15 -4
  21. data/lib/foreman_discovery/engine.rb +6 -6
  22. data/lib/foreman_discovery/version.rb +1 -1
  23. data/locale/de/foreman_discovery.po +175 -0
  24. data/locale/en_GB/LC_MESSAGES/{foreman_discovery.mo → discovery.mo} +0 -0
  25. data/locale/en_GB/{discovery.po → foreman_discovery.po} +14 -8
  26. data/locale/es/LC_MESSAGES/{foreman_discovery.mo → discovery.mo} +0 -0
  27. data/locale/es/{discovery.po → foreman_discovery.po} +15 -9
  28. data/locale/fr/LC_MESSAGES/{foreman_discovery.mo → discovery.mo} +0 -0
  29. data/locale/fr/{discovery.po → foreman_discovery.po} +14 -8
  30. data/locale/sv_SE/LC_MESSAGES/{foreman_discovery.mo → discovery.mo} +0 -0
  31. data/locale/sv_SE/{discovery.po → foreman_discovery.po} +14 -8
  32. data/locale/zanata.xml +28 -0
  33. data/test/functional/{discovers_controller_test.rb → discovered_hosts_controller_test.rb} +2 -2
  34. data/test/unit/host_discovered_test.rb +3 -2
  35. metadata +42 -36
  36. data/app/views/discovers/index.html.erb +0 -2
  37. data/locale/Makefile +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6952b2ff6d66e4260db8ac41e046e529d5c7df4a
4
- data.tar.gz: 285b3d9adc29ff2825e41a8a8c92c056dc253515
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MzViYmEyMTdiZmM5Y2IzNDE1MDM0YWI2YmVjYmYwYTc1OWYwOGJhZg==
5
+ data.tar.gz: !binary |-
6
+ NGE0ZDQ5YjNkZWU2OWQ5ZjU0MWMwODhlMjJlM2UzNTZkNGZlNWMxYw==
5
7
  SHA512:
6
- metadata.gz: 8640a6d2c569e1912d5a38c7f3d857a1e72c5cd7d02a129391947d31fb75cfbd028d846ac559dac5285c54aa13d28281bfde6073ded7514bc1b91b9ff0b16619
7
- data.tar.gz: 3374b3b275d4492dd15c6e3513658d8f18a131cbefda49d3f7c8a9cf082dad781c4b4d6a789e08be3340171ff2e94c7af0c7e8f3cd4db87784c0da23d8bf9094
8
+ metadata.gz: !binary |-
9
+ OWJhZGY4NGM0NThjN2U2MGE5Y2IxN2Q5MGNjMzUwMDc2ZDU1OWE2YzYyYjQ1
10
+ NmFhYTJhZTViMTUxNDBhYzNhMjA4ZDQ0NTg5MjAwNDQ4ZDZiNTZjZDM3NmZm
11
+ OTFlYzM4ZjY3NjkxM2ZlOGIyODU0M2ViMDMxMDkwMDU2NDZiMmU=
12
+ data.tar.gz: !binary |-
13
+ MDcwMGU3NGUzNzQyNTZmYzc1MjAyNWMwMTUyYTc1YWFiZjlkYTk5MTVjYmRh
14
+ Zjk2NjNjMTg4ZmE2MTlkNzU1ZDhhZGIzYzRkMDFiYWY4YzVkMmRlYjBkZWI3
15
+ MTgyNTcwZThjZDEzMjlmMzNmZTI4YzM3OThhZjczZGVkZDQ4ZWE=
data/README.md CHANGED
@@ -80,11 +80,14 @@ The plugin will create a Role called `Discovery` when first started. You can ass
80
80
  this role to non-admins to allow them to use the discovery plugin. Alternatively
81
81
  assign the `:perform_discovery` permission to an existing Role.
82
82
 
83
+ # API
84
+
85
+ see the [API README](README.api.md)
86
+
83
87
  # TODO
84
88
 
85
89
  * Support for downloading shell script for oVirt Node image
86
90
  * Add more Tests
87
- * Add API
88
91
  * Add proper Location/Organization handling (via a Wizard maybe?)
89
92
  * Add per-subnet discovery
90
93
  * Rake Task for ISO build
@@ -0,0 +1,108 @@
1
+ module Api
2
+ module V2
3
+ class DiscoveredHostsController < ::Api::V2::BaseController
4
+
5
+ before_filter :find_resource, :except => %w{index create facts}
6
+ skip_before_filter :authorize, :only => :facts
7
+
8
+ api :GET, "/discovered_hosts/", "List all discovered hosts"
9
+ param :search, String, :desc => "Filter results"
10
+ param :order, String, :desc => "Sort results"
11
+ param :page, String, :desc => "paginate results"
12
+ param :per_page, String, :desc => "number of entries per request"
13
+
14
+ def index
15
+ @discovered_hosts = resource_scope.search_for(*search_options).paginate(paginate_options)
16
+ end
17
+
18
+ api :GET, "/discovered_hosts/:id/", "Show a discovered host"
19
+ param :id, :identifier_dottable, :required => true
20
+
21
+ def show
22
+ end
23
+
24
+ def_param_group :discovered_host do
25
+ param :discovered_host, Hash, :action_aware => true do
26
+ param :name, String, :required => true
27
+ param :ip, String, :required => true
28
+ param :mac, String, :required => true
29
+ end
30
+ end
31
+
32
+ api :POST, "/discovered_hosts/", "Create a discovered host"
33
+ param_group :discovered_host, :as => :create
34
+
35
+ def create
36
+ @discovered_host = Host::Discovered.new(params[:discovered_host])
37
+ process_response @discovered_host.save
38
+ end
39
+
40
+ api :PUT, "/discovered_hosts/:id/", "Provision a discovered host"
41
+ param :id, :identifier, :required => true
42
+ param :discovered_host, Hash, :action_aware => true do
43
+ param :name, String
44
+ param :environment_id, String
45
+ param :ip, String, :desc => "not required if using a subnet with dhcp proxy"
46
+ param :mac, String, :desc => "not required if its a virtual machine"
47
+ param :architecture_id, :number
48
+ param :domain_id, :number
49
+ param :puppet_proxy_id, :number
50
+ param :puppet_class_ids, Array
51
+ param :operatingsystem_id, String
52
+ param :medium_id, :number
53
+ param :ptable_id, :number
54
+ param :subnet_id, :number
55
+ param :sp_subnet_id, :number
56
+ param :model_id, :number
57
+ param :hostgroup_id, :number
58
+ param :owner_id, :number
59
+ param :puppet_ca_proxy_id, :number
60
+ param :image_id, :number
61
+ param :host_parameters_attributes, Array
62
+ param :build, :bool
63
+ param :enabled, :bool
64
+ param :provision_method, String
65
+ param :managed, :bool
66
+ param :progress_report_id, String, :desc => 'UUID to track orchestration tasks status, GET /api/orchestration/:UUID/tasks'
67
+ param :capabilities, String
68
+ end
69
+
70
+ def update
71
+ @host = @discovered_host.becomes(::Host::Managed)
72
+ @host.type = 'Host::Managed'
73
+ @host.managed = true
74
+ @host.build = true
75
+ forward_request_url
76
+ process_response @host.update_attributes(params[:discovered_host])
77
+ end
78
+
79
+ api :DELETE, "/discovered_hosts/:id/", "Delete a discovered host"
80
+ param :id, :identifier, :required => true
81
+
82
+ def destroy
83
+ process_response @discovered_host.destroy
84
+ end
85
+
86
+ api :POST, "/discovered_hosts/facts", "Upload facts for a host, creating the host if required."
87
+ param :facts, Hash, :required => true, :desc => "hash containing the facts for the host"
88
+
89
+ def facts
90
+ @discovered_host, state = Host::Discovered.import_host_and_facts(params[:facts])
91
+ process_response state
92
+ rescue ::Foreman::Exception => e
93
+ render :json => {'message'=>e.to_s}, :status => :unprocessable_entity
94
+ end
95
+
96
+ private
97
+
98
+ def resource_class
99
+ Host::Discovered
100
+ end
101
+
102
+ def forward_request_url
103
+ @discovered_host.request_url = request.host_with_port if @discovered_host.respond_to?(:request_url)
104
+ end
105
+
106
+ end
107
+ end
108
+ end
@@ -1,4 +1,4 @@
1
- class DiscoversController < ::ApplicationController
1
+ class DiscoveredHostsController < ::ApplicationController
2
2
  include Foreman::Controller::AutoCompleteSearch
3
3
  include Foreman::Controller::TaxonomyMultiple
4
4
  unloadable
@@ -101,7 +101,7 @@ class DiscoversController < ::ApplicationController
101
101
  else
102
102
  error _("The following hosts were not deleted: %s") % missed_hosts
103
103
  end
104
- redirect_to(discovers_path)
104
+ redirect_to(discovered_hosts_path)
105
105
  end
106
106
 
107
107
  def auto_complete_search
@@ -178,17 +178,17 @@ class DiscoversController < ::ApplicationController
178
178
  @hosts = Host::Discovered.where("id IN (?) or name IN (?)", params[:host_ids], params[:host_names] )
179
179
  if @hosts.empty?
180
180
  error _('No hosts were found with that id or name')
181
- redirect_to(discovers_path) and return false
181
+ redirect_to(discovered_hosts_path) and return false
182
182
  end
183
183
  else
184
184
  error _('No hosts selected')
185
- redirect_to(discovers_path) and return false
185
+ redirect_to(discovered_hosts_path) and return false
186
186
  end
187
187
 
188
188
  return @hosts
189
189
  rescue => e
190
190
  error _("Something went wrong while selecting hosts - %s") % e
191
- redirect_to discovers_path
191
+ redirect_to discovered_hosts_path
192
192
  end
193
193
 
194
194
  def get_ip_from_env
@@ -1,28 +1,28 @@
1
- module DiscoversHelper
1
+ module DiscoveredHostsHelper
2
2
 
3
3
  def disc_report_column(record)
4
4
  record.last_report? ? (_("%s ago") % time_ago_in_words(record.last_report.getlocal)) : ""
5
5
  end
6
6
 
7
- def discovers_title_actions(host)
7
+ def discovered_hosts_title_actions(host)
8
8
  title_actions(
9
9
  button_group(
10
- link_to(_("Provision"), hash_for_edit_discover_path(:id => host), :class => 'btn-primary')
10
+ link_to(_("Provision"), hash_for_edit_discovered_host_path(:id => host), :class => 'btn-primary')
11
11
  ),
12
12
  button_group(
13
- link_to(_("Refresh facts"), hash_for_refresh_facts_discover_path(:id => host))
13
+ link_to(_("Refresh facts"), hash_for_refresh_facts_discovered_host_path(:id => host))
14
14
  ),
15
15
  button_group(
16
- link_to(_("Delete"), hash_for_discover_path(:id => host),
16
+ link_to(_("Delete"), hash_for_discovered_host_path(:id => host),
17
17
  :class => "btn btn-danger", :confirm => _('Are you sure?'), :method => :delete)
18
18
  )
19
19
  )
20
20
  end
21
21
 
22
- def multiple_discovers_actions_select
23
- actions = [[_('Delete hosts'), multiple_destroy_discovers_path]]
24
- actions << [_('Assign Organization'), select_multiple_organization_discovers_path] if SETTINGS[:organizations_enabled]
25
- actions << [_('Assign Location'), select_multiple_location_discovers_path] if SETTINGS[:locations_enabled]
22
+ def multiple_discovered_hosts_actions_select
23
+ actions = [[_('Delete hosts'), multiple_destroy_discovered_hosts_path]]
24
+ actions << [_('Assign Organization'), select_multiple_organization_discovered_hosts_path] if SETTINGS[:organizations_enabled]
25
+ actions << [_('Assign Location'), select_multiple_location_discovered_hosts_path] if SETTINGS[:locations_enabled]
26
26
 
27
27
  select_action_button( _("Select Action"), {:id => 'submit_multiple'},
28
28
  actions.map do |action|
@@ -6,6 +6,9 @@ class Host::Discovered < ::Host::Base
6
6
  belongs_to :organization
7
7
  belongs_to :subnet
8
8
 
9
+ validates :mac, :uniqueness => true, :format => {:with => Net::Validations::MAC_REGEXP}, :presence => true
10
+ validates :ip, :format => {:with => Net::Validations::IP_REGEXP}, :uniqueness => true
11
+
9
12
  scoped_search :on => :name, :complete_value => true, :default_order => true
10
13
  scoped_search :on => :last_report, :complete_value => true
11
14
  scoped_search :on => :ip, :complete_value => true
@@ -24,7 +27,7 @@ class Host::Discovered < ::Host::Base
24
27
  def self.import_host_and_facts facts
25
28
  raise(::Foreman::Exception.new(N_("Invalid facts, must be a Hash"))) unless facts.is_a?(Hash)
26
29
  fact_name = Setting[:discovery_fact] || 'macaddress'
27
- hostname = facts[fact_name].try(:downcase).try(:gsub,/:/,'')
30
+ hostname = facts[fact_name].try(:downcase).try(:gsub,/:/,'').try(:sub,/^/,'mac')
28
31
  raise(::Foreman::Exception.new(N_("Invalid facts: hash does not contain the required fact '%s'"), fact_name)) unless hostname
29
32
 
30
33
  # filter facts
@@ -5,7 +5,7 @@ Deface::Override.new(:virtual_path => "dashboard/_status_table",
5
5
  <h4 class='header'><%= _('Host Pool') %></h4>
6
6
  <ul>
7
7
  <li>
8
- <%= link_to(_('Unassigned hosts'), discovers_path, :class=>'dashboard-links' ) %>
8
+ <%= link_to(_('Unassigned hosts'), discovered_hosts_path, :class=>'dashboard-links' ) %>
9
9
  <h4><%= Host::Discovered.count %></h4>
10
10
  </li>
11
11
  </ul>"))
@@ -0,0 +1,3 @@
1
+ object @discovered_host
2
+
3
+ attributes :name, :id
@@ -0,0 +1,3 @@
1
+ collection @discovered_hosts
2
+
3
+ extends "api/v2/discovered_hosts/main"
@@ -0,0 +1,13 @@
1
+ object @discovered_host
2
+
3
+ extends "api/v2/discovered_hosts/base"
4
+
5
+ attributes :ip, :mac, :last_report, :subnet_id, :subnet_name
6
+
7
+ if SETTINGS[:organizations_enabled]
8
+ attributes :organization_id, :organization_name
9
+ end
10
+
11
+ if SETTINGS[:locations_enabled]
12
+ attributes :location_id, :location_name
13
+ end
@@ -0,0 +1,5 @@
1
+ object @discovered_host
2
+
3
+ extends "api/v2/discovered_hosts/main"
4
+
5
+ attributes :facts_hash
@@ -0,0 +1,11 @@
1
+ object @discovered_host
2
+
3
+ extends "api/v2/discovered_hosts/main"
4
+
5
+ attributes :environment_id, :environment_name, :sp_mac, :sp_ip, :sp_name, :domain_id, :domain_name,
6
+ :architecture_id, :architecture_name, :operatingsystem_id, :operatingsystem_name,
7
+ :sp_subnet_id, :ptable_id, :ptable_name, :medium_id, :medium_name, :build, :comment, :disk,
8
+ :installed_at, :model_id, :model_name, :hostgroup_id, :hostgroup_name, :owner_id, :owner_type,
9
+ :enabled, :puppet_ca_proxy_id, :managed, :uuid, :capabilities, :provision_method,
10
+ :puppet_proxy_id, :certname, :image_id, :image_name, :created_at, :updated_at,
11
+ :last_compile, :last_freshcheck, :serial, :source_file_id
@@ -20,7 +20,7 @@
20
20
  <td class="ca">
21
21
  <%= check_box_tag "host_ids[]", nil, false, :id => "host_ids_#{host.id}", :disabled => !authorized?, :class => 'host_select_boxes', :onclick => 'hostChecked(this)' -%>
22
22
  </td>
23
- <td><%= link_to("#{host}", discover_path(host) ) %> </td>
23
+ <td><%= link_to("#{host}", discovered_host_path(host) ) %> </td>
24
24
  <td class="hidden-tablet hidden-xs"><%= model_name host %></td>
25
25
  <% if SETTINGS[:locations_enabled] -%>
26
26
  <td class="hidden-tablet hidden-xs"><%= host.location.try(:name) %></td>
@@ -32,9 +32,9 @@
32
32
  <td class="hidden-tablet hidden-xs"><%= disc_report_column(host) %></td>
33
33
  <td>
34
34
  <%= action_buttons(
35
- link_to(_("Provision"), hash_for_edit_discover_path(:id => host)),
36
- link_to(_("Refresh facts"), hash_for_refresh_facts_discover_path(:id => host)),
37
- display_delete_if_authorized(hash_for_discover_path(:id => host), :confirm => _("Delete %s?") % host.name, :action => :destroy))%>
35
+ link_to(_("Provision"), hash_for_edit_discovered_host_path(:id => host)),
36
+ link_to(_("Refresh facts"), hash_for_refresh_facts_discovered_host_path(:id => host)),
37
+ display_delete_if_authorized(hash_for_discovered_host_path(:id => host), :confirm => _("Delete %s?") % host.name, :action => :destroy))%>
38
38
  </td>
39
39
  </tr>
40
40
  <% end -%>
@@ -0,0 +1,2 @@
1
+ <% title_actions multiple_discovered_hosts_actions_select -%>
2
+ <%= render 'discovered_hosts_list' %>
@@ -1,6 +1,6 @@
1
1
  <%= render 'selected_hosts', :hosts => @hosts %>
2
2
 
3
- <%= form_tag submit_multiple_destroy_discovers_path(:host_ids => params[:host_ids]), :onsubmit => "resetSelection()" do -%>
3
+ <%= form_tag submit_multiple_destroy_discovered_hosts_path(:host_ids => params[:host_ids]), :onsubmit => "resetSelection()" do -%>
4
4
  <span class="label label-warning"><%= _('Warning') -%></span>
5
5
  <%= _('This might take a while, as all hosts, facts and reports will be destroyed as well') %>
6
6
  <% end %>
@@ -1,7 +1,7 @@
1
1
  <%= render 'selected_hosts', :hosts => @hosts %>
2
2
  <div class="row">
3
3
  <div class="col-md-8">
4
- <%= form_for :location, :url => update_multiple_location_discovers_path(:host_ids => params[:host_ids]) do |f| %>
4
+ <%= form_for :location, :url => update_multiple_location_discovered_hosts_path(:host_ids => params[:host_ids]) do |f| %>
5
5
  <%= f.select :id, Location.all.map{|e| [e.name, e.id]},{:include_blank => _("Select location")},
6
6
  :onchange => "toggle_multiple_ok_button(this)" %>
7
7
  <%= f.hidden_field :optimistic_import, :value => "yes" %>
@@ -1,7 +1,7 @@
1
1
  <%= render 'selected_hosts', :hosts => @hosts %>
2
2
  <div class="row">
3
3
  <div class="col-md-8">
4
- <%= form_for :organization, :url => update_multiple_organization_discovers_path(:host_ids => params[:host_ids]) do |f| %>
4
+ <%= form_for :organization, :url => update_multiple_organization_discovered_hosts_path(:host_ids => params[:host_ids]) do |f| %>
5
5
  <%= f.select :id, Organization.all.map{|e| [e.name, e.id]},{:include_blank => _("Select organization")},
6
6
  :onchange => "toggle_multiple_ok_button(this)" %>
7
7
  <%= f.hidden_field :optimistic_import, :value => "yes" %>
@@ -1,6 +1,6 @@
1
1
  <% title(_("Discovered host: %s") % @host.to_label) %>
2
2
 
3
- <%= discovers_title_actions(@host) %>
3
+ <%= discovered_hosts_title_actions(@host) %>
4
4
 
5
5
  <h3><%= _('Facts discovered on this host') -%></h3>
6
6
  <table class="table table-bordered table-striped table-condensed">
data/config/routes.rb CHANGED
@@ -2,12 +2,12 @@
2
2
  Rails.application.routes.draw do
3
3
 
4
4
  # Needed to make the hosts/edit form render
5
- match 'architecture_selected_discovers' => 'hosts#architecture_selected'
6
- match 'os_selected_discovers' => 'hosts#os_selected'
7
- match 'medium_selected_discovers' => 'hosts#medium_selected'
5
+ match 'architecture_selected_discovered_hosts' => 'hosts#architecture_selected'
6
+ match 'os_selected_discovered_hosts' => 'hosts#os_selected'
7
+ match 'medium_selected_discovered_hosts' => 'hosts#medium_selected'
8
8
 
9
9
  constraints(:id => /[^\/]+/) do
10
- resources :discovers do
10
+ resources :discovered_hosts do
11
11
  member do
12
12
  get 'refresh_facts'
13
13
  end
@@ -23,4 +23,15 @@ Rails.application.routes.draw do
23
23
  end
24
24
  end
25
25
 
26
+ ## API
27
+ namespace :api, :defaults => {:format => 'json'} do
28
+ scope "(:apiv)", :module => :v2, :defaults => {:apiv => 'v2'}, :apiv => /v1|v2/, :constraints => ApiConstraints.new(:version => 2) do
29
+ resources :discovered_hosts do
30
+ collection do
31
+ post 'facts'
32
+ end
33
+ end
34
+ end
35
+ end
36
+
26
37
  end
@@ -14,7 +14,7 @@ module ForemanDiscovery
14
14
  end
15
15
 
16
16
  initializer 'foreman_discovery.helper' do |app|
17
- ActionView::Base.send :include, DiscoversHelper
17
+ ActionView::Base.send :include, DiscoveredHostsHelper
18
18
  end
19
19
 
20
20
  initializer 'foreman_discovery.register_gettext', :after => :load_config_initializers do |app|
@@ -30,13 +30,13 @@ module ForemanDiscovery
30
30
 
31
31
  # Add permissions
32
32
  security_block :discovery do
33
- permission :view_discovered_hosts, {:discovers => [:index, :show, :auto_complete_search, :refresh_facts] }, :resource_type => 'Host'
34
- permission :provision_discovered_hosts, {:discovers => [:new, :create] }, :resource_type => 'Host'
35
- permission :edit_discovered_hosts, {:discovers => [:edit, :update, :update_multiple_location,
33
+ permission :view_discovered_hosts, {:discovered_hosts => [:index, :show, :auto_complete_search, :refresh_facts] }, :resource_type => 'Host'
34
+ permission :provision_discovered_hosts, {:discovered_hosts => [:new, :create] }, :resource_type => 'Host'
35
+ permission :edit_discovered_hosts, {:discovered_hosts => [:edit, :update, :update_multiple_location,
36
36
  :select_multiple_organization,
37
37
  :update_multiple_organization,
38
38
  :select_multiple_location] }, :resource_type => 'Host'
39
- permission :destroy_discovered_hosts, {:discovers => [:destroy, :submit_multiple_destroy, :multiple_destroy] }, :resource_type => 'Host'
39
+ permission :destroy_discovered_hosts, {:discovered_hosts => [:destroy, :submit_multiple_destroy, :multiple_destroy] }, :resource_type => 'Host'
40
40
 
41
41
  end
42
42
 
@@ -44,7 +44,7 @@ module ForemanDiscovery
44
44
  role "Discovery", [:view_discovered_hosts, :provision_discovered_hosts, :edit_discovered_hosts, :destroy_discovered_hosts]
45
45
 
46
46
  #add menu entry
47
- menu :top_menu, :discovery, :url_hash => {:controller=> :discovers, :action=>:index},
47
+ menu :top_menu, :discovery, :url_hash => {:controller=> :discovered_hosts, :action=>:index},
48
48
  :caption=> N_('Discovered hosts'),
49
49
  :parent => :hosts_menu,
50
50
  :after=>:hosts
@@ -1,3 +1,3 @@
1
1
  module ForemanDiscovery
2
- VERSION = "1.3.0.rc2"
2
+ VERSION = "1.3.0.rc3"
3
3
  end
@@ -0,0 +1,175 @@
1
+ # Template file for strings which can be localized in the Foreman Application.
2
+ #
3
+ # This file is distributed under the same license as the Foreman.
4
+ #
5
+ #
6
+ # Translators:
7
+ # bechtoldt <mail@arnoldbechtoldt.com>, 2014
8
+ msgid ""
9
+ msgstr ""
10
+ "Project-Id-Version: Foreman\n"
11
+ "Report-Msgid-Bugs-To: \n"
12
+ "POT-Creation-Date: 2014-04-08 15:59+0200\n"
13
+ "PO-Revision-Date: 2014-04-09 10:00+0000\n"
14
+ "Last-Translator: Lukáš Zapletal\n"
15
+ "Language-Team: German (http://www.transifex.com/projects/p/foreman/language/de/)\n"
16
+ "MIME-Version: 1.0\n"
17
+ "Content-Type: text/plain; charset=UTF-8\n"
18
+ "Content-Transfer-Encoding: 8bit\n"
19
+ "Language: de\n"
20
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
21
+
22
+ msgid "%s - The following hosts are about to be changed"
23
+ msgstr "%s - Die folgenden Hosts werden gerade geändert"
24
+
25
+ msgid "%s ago"
26
+ msgstr "vor %s"
27
+
28
+ msgid "Are you sure?"
29
+ msgstr "Sind Sie sicher?"
30
+
31
+ msgid "Assign Location"
32
+ msgstr "Standort zuweisen"
33
+
34
+ msgid "Assign Organization"
35
+ msgstr "Organisation zuweisen"
36
+
37
+ msgid "Cancel"
38
+ msgstr "Abbrechen"
39
+
40
+ msgid "Could not get facts from proxy: %s"
41
+ msgstr "Konnte keine Fakten vom Proxy empfangen: %s"
42
+
43
+ msgid "Delete"
44
+ msgstr "Löschen"
45
+
46
+ msgid "Delete %s?"
47
+ msgstr "Löschen %s?"
48
+
49
+ msgid "Delete hosts"
50
+ msgstr "Lösche Hosts"
51
+
52
+ msgid "Destroyed selected hosts"
53
+ msgstr "ausgewählte gelöschte Systeme"
54
+
55
+ msgid "Discovered host: %s"
56
+ msgstr "Entdeckte Hosts: %s"
57
+
58
+ msgid "Discovered hosts"
59
+ msgstr "Entdeckte Hosts"
60
+
61
+ msgid "Fact"
62
+ msgstr "Fakt"
63
+
64
+ msgid "Facts discovered on this host"
65
+ msgstr "Auf diesem Host entdeckte Fakten:"
66
+
67
+ msgid "Facts refreshed for %s"
68
+ msgstr "Fakten erneuert für %s"
69
+
70
+ msgid "Failed to import facts for Host::Discovered"
71
+ msgstr "Fakten für Host::Discovered konnten nicht importiert werden"
72
+
73
+ msgid "Failed to import facts for Host::Discovered: %s"
74
+ msgstr "Fakten für Host::Discovered konnten nicht importiert werden: %s"
75
+
76
+ msgid "Failed to reboot: %s"
77
+ msgstr "Neustart fehlgeschlagen: %s"
78
+
79
+ msgid "Failed to refresh facts for %s"
80
+ msgstr "Konnte für %s keine Fakten erneuern"
81
+
82
+ msgid "Host Pool"
83
+ msgstr "Host-Pool"
84
+
85
+ msgid "Imported Host::Discovered"
86
+ msgstr "Host::Discovered wurde importiert"
87
+
88
+ msgid "Invalid facts, must be a Hash"
89
+ msgstr ""
90
+
91
+ msgid "Invalid facts: hash does not contain the required fact '%s'"
92
+ msgstr ""
93
+
94
+ msgid "Last facts upload"
95
+ msgstr "Letzter Fakten-Upload"
96
+
97
+ msgid "Location"
98
+ msgstr "Lokation"
99
+
100
+ msgid "Model"
101
+ msgstr "Modell"
102
+
103
+ msgid "Name"
104
+ msgstr "Name"
105
+
106
+ msgid "No hosts selected"
107
+ msgstr "Keine Systeme ausgewählt"
108
+
109
+ msgid "No hosts were found with that id or name"
110
+ msgstr "es wurden keine Systeme mit dieser ID oder Namen gefunden"
111
+
112
+ msgid "Organization"
113
+ msgstr "Organisation"
114
+
115
+ msgid "Please Confirm"
116
+ msgstr "bitte bestätigen"
117
+
118
+ msgid "Provision"
119
+ msgstr "Bereitstellen"
120
+
121
+ msgid "Rebooting %s"
122
+ msgstr "Starte %s neu"
123
+
124
+ msgid "Refresh facts"
125
+ msgstr "Fakten erneuern"
126
+
127
+ msgid "Select Action"
128
+ msgstr "Aktion auswählen"
129
+
130
+ msgid "Select all items in this page"
131
+ msgstr "Alle Elemente auf dieser Seite auswählen"
132
+
133
+ msgid "Select location"
134
+ msgstr "Lokation auswählen"
135
+
136
+ msgid "Select organization"
137
+ msgstr "Organisation auswählen"
138
+
139
+ msgid "Something went wrong while selecting hosts - %s"
140
+ msgstr "Bei der Systemauswahl von %s ist ein Fehler aufgetreten"
141
+
142
+ msgid "Submit"
143
+ msgstr "Absenden"
144
+
145
+ msgid "Subnet"
146
+ msgstr "Subnetz"
147
+
148
+ msgid "The default fact name to use for the MAC of the system"
149
+ msgstr "Der Standard-Faktenname zum Verwenden für die MAC des Systems"
150
+
151
+ msgid "The default location to place discovered hosts in"
152
+ msgstr "Standard-Lokation zum Platzieren entdeckter Hosts"
153
+
154
+ msgid "The default organization to place discovered hosts in"
155
+ msgstr "Standard-Organisation zum Platzieren entdeckter Hosts"
156
+
157
+ msgid "The following hosts were not deleted: %s"
158
+ msgstr "Die folgende Systeme wurden nicht gelöscht: %s"
159
+
160
+ msgid ""
161
+ "This might take a while, as all hosts, facts and reports will be destroyed "
162
+ "as well"
163
+ msgstr "Dies kann eine Weile dauern, weil alle Systeme, Fakten und Reporte auch gelöscht werden"
164
+
165
+ msgid "Unassigned hosts"
166
+ msgstr "Unzugeordnete Hosts"
167
+
168
+ msgid "Value"
169
+ msgstr "Wert"
170
+
171
+ msgid "Warning"
172
+ msgstr "Warnung"
173
+
174
+ msgid "items selected. Uncheck to Clear"
175
+ msgstr "Elemente ausgewählt. Abwählen um zu Leeren"
@@ -9,9 +9,9 @@ msgid ""
9
9
  msgstr ""
10
10
  "Project-Id-Version: Foreman\n"
11
11
  "Report-Msgid-Bugs-To: \n"
12
- "POT-Creation-Date: 2013-11-20 17:47+0100\n"
13
- "PO-Revision-Date: 2013-11-22 09:30+0000\n"
14
- "Last-Translator: domcleal <dcleal@redhat.com>\n"
12
+ "POT-Creation-Date: 2014-04-08 15:59+0200\n"
13
+ "PO-Revision-Date: 2014-04-09 09:46+0000\n"
14
+ "Last-Translator: Lukáš Zapletal\n"
15
15
  "Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/foreman/language/en_GB/)\n"
16
16
  "MIME-Version: 1.0\n"
17
17
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -52,9 +52,6 @@ msgstr "Delete hosts"
52
52
  msgid "Destroyed selected hosts"
53
53
  msgstr "Destroyed selected hosts"
54
54
 
55
- msgid "Discovered Hosts"
56
- msgstr "Discovered Hosts"
57
-
58
55
  msgid "Discovered host: %s"
59
56
  msgstr "Discovered host: %s"
60
57
 
@@ -88,6 +85,12 @@ msgstr "Host Pool"
88
85
  msgid "Imported Host::Discovered"
89
86
  msgstr "Imported Host::Discovered"
90
87
 
88
+ msgid "Invalid facts, must be a Hash"
89
+ msgstr ""
90
+
91
+ msgid "Invalid facts: hash does not contain the required fact '%s'"
92
+ msgstr ""
93
+
91
94
  msgid "Last facts upload"
92
95
  msgstr "Last facts upload"
93
96
 
@@ -121,8 +124,8 @@ msgstr "Rebooting %s"
121
124
  msgid "Refresh facts"
122
125
  msgstr "Refresh facts"
123
126
 
124
- msgid "Select action"
125
- msgstr "Select action"
127
+ msgid "Select Action"
128
+ msgstr ""
126
129
 
127
130
  msgid "Select all items in this page"
128
131
  msgstr "Select all items in this page"
@@ -142,6 +145,9 @@ msgstr "Submit"
142
145
  msgid "Subnet"
143
146
  msgstr "Subnet"
144
147
 
148
+ msgid "The default fact name to use for the MAC of the system"
149
+ msgstr ""
150
+
145
151
  msgid "The default location to place discovered hosts in"
146
152
  msgstr "The default location to place discovered hosts in"
147
153
 
@@ -4,14 +4,14 @@
4
4
  #
5
5
  #
6
6
  # Translators:
7
- # francisvm <hackgo@gmail.com>, 2013
7
+ # francisvm <hackgo@gmail.com>, 2013-2014
8
8
  msgid ""
9
9
  msgstr ""
10
10
  "Project-Id-Version: Foreman\n"
11
11
  "Report-Msgid-Bugs-To: \n"
12
- "POT-Creation-Date: 2013-11-20 17:47+0100\n"
13
- "PO-Revision-Date: 2013-11-22 15:40+0000\n"
14
- "Last-Translator: francisvm <hackgo@gmail.com>\n"
12
+ "POT-Creation-Date: 2014-04-08 15:59+0200\n"
13
+ "PO-Revision-Date: 2014-04-09 10:00+0000\n"
14
+ "Last-Translator: Lukáš Zapletal\n"
15
15
  "Language-Team: Spanish (http://www.transifex.com/projects/p/foreman/language/es/)\n"
16
16
  "MIME-Version: 1.0\n"
17
17
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -52,9 +52,6 @@ msgstr "Borrar Equipos"
52
52
  msgid "Destroyed selected hosts"
53
53
  msgstr "Eliminados equipos seleccionados"
54
54
 
55
- msgid "Discovered Hosts"
56
- msgstr "Equipos descubiertos"
57
-
58
55
  msgid "Discovered host: %s"
59
56
  msgstr "Equipo descubierto: %s"
60
57
 
@@ -88,6 +85,12 @@ msgstr "Conjunto de equipos"
88
85
  msgid "Imported Host::Discovered"
89
86
  msgstr "Importado Host::Descubierto"
90
87
 
88
+ msgid "Invalid facts, must be a Hash"
89
+ msgstr ""
90
+
91
+ msgid "Invalid facts: hash does not contain the required fact '%s'"
92
+ msgstr ""
93
+
91
94
  msgid "Last facts upload"
92
95
  msgstr "Últimos datos subidos"
93
96
 
@@ -121,8 +124,8 @@ msgstr "Reiniciando %s"
121
124
  msgid "Refresh facts"
122
125
  msgstr "Refrescar datos"
123
126
 
124
- msgid "Select action"
125
- msgstr "Seleccionar acción"
127
+ msgid "Select Action"
128
+ msgstr "Seleccione una Acción"
126
129
 
127
130
  msgid "Select all items in this page"
128
131
  msgstr "Seleccionar todos los objetos de esta página"
@@ -142,6 +145,9 @@ msgstr "Introducir"
142
145
  msgid "Subnet"
143
146
  msgstr "Subred"
144
147
 
148
+ msgid "The default fact name to use for the MAC of the system"
149
+ msgstr "El nombre de dato por defecto a usar para la MAC del sistema"
150
+
145
151
  msgid "The default location to place discovered hosts in"
146
152
  msgstr "La ubicación predeterminada para colocar hosts descubiertos "
147
153
 
@@ -4,14 +4,14 @@
4
4
  #
5
5
  #
6
6
  # Translators:
7
- # Claer <transiblu@claer.hammock.fr>, 2013
7
+ # Claer <transiblu@claer.hammock.fr>, 2013-2014
8
8
  msgid ""
9
9
  msgstr ""
10
10
  "Project-Id-Version: Foreman\n"
11
11
  "Report-Msgid-Bugs-To: \n"
12
- "POT-Creation-Date: 2013-11-20 17:47+0100\n"
13
- "PO-Revision-Date: 2013-11-27 14:30+0000\n"
14
- "Last-Translator: Claer <transiblu@claer.hammock.fr>\n"
12
+ "POT-Creation-Date: 2014-04-08 15:59+0200\n"
13
+ "PO-Revision-Date: 2014-04-09 10:00+0000\n"
14
+ "Last-Translator: Lukáš Zapletal\n"
15
15
  "Language-Team: French (http://www.transifex.com/projects/p/foreman/language/fr/)\n"
16
16
  "MIME-Version: 1.0\n"
17
17
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -52,9 +52,6 @@ msgstr "Supprimer ces Hôtes"
52
52
  msgid "Destroyed selected hosts"
53
53
  msgstr "Hôtes sélectionnés détruits"
54
54
 
55
- msgid "Discovered Hosts"
56
- msgstr "Hôtes détectés"
57
-
58
55
  msgid "Discovered host: %s"
59
56
  msgstr "Hôtes détectés : %s"
60
57
 
@@ -88,6 +85,12 @@ msgstr "Regrouppement d'hôtes"
88
85
  msgid "Imported Host::Discovered"
89
86
  msgstr "Host::Discovered importé"
90
87
 
88
+ msgid "Invalid facts, must be a Hash"
89
+ msgstr ""
90
+
91
+ msgid "Invalid facts: hash does not contain the required fact '%s'"
92
+ msgstr ""
93
+
91
94
  msgid "Last facts upload"
92
95
  msgstr "Derniers facts téléchargés"
93
96
 
@@ -121,7 +124,7 @@ msgstr "Redémarrage %s"
121
124
  msgid "Refresh facts"
122
125
  msgstr "Rafraichir les facts"
123
126
 
124
- msgid "Select action"
127
+ msgid "Select Action"
125
128
  msgstr "Choisir l'action"
126
129
 
127
130
  msgid "Select all items in this page"
@@ -142,6 +145,9 @@ msgstr "Soumettre"
142
145
  msgid "Subnet"
143
146
  msgstr "Sous-Réseau"
144
147
 
148
+ msgid "The default fact name to use for the MAC of the system"
149
+ msgstr "Le nom du fact par défaut pour obtenir l'adresse MAC du système"
150
+
145
151
  msgid "The default location to place discovered hosts in"
146
152
  msgstr "Attribution de la localisation par défaut pour les hôtes détectés"
147
153
 
@@ -9,9 +9,9 @@ msgid ""
9
9
  msgstr ""
10
10
  "Project-Id-Version: Foreman\n"
11
11
  "Report-Msgid-Bugs-To: \n"
12
- "POT-Creation-Date: 2013-11-20 17:47+0100\n"
13
- "PO-Revision-Date: 2014-01-14 14:34+0000\n"
14
- "Last-Translator: johnny Westerlund <johnny.westerlund@gmail.com>\n"
12
+ "POT-Creation-Date: 2014-04-08 15:59+0200\n"
13
+ "PO-Revision-Date: 2014-04-09 10:00+0000\n"
14
+ "Last-Translator: Lukáš Zapletal\n"
15
15
  "Language-Team: Swedish (Sweden) (http://www.transifex.com/projects/p/foreman/language/sv_SE/)\n"
16
16
  "MIME-Version: 1.0\n"
17
17
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -52,9 +52,6 @@ msgstr "Radera värdar"
52
52
  msgid "Destroyed selected hosts"
53
53
  msgstr "Förstör markerade värdar"
54
54
 
55
- msgid "Discovered Hosts"
56
- msgstr "Hittade värdar"
57
-
58
55
  msgid "Discovered host: %s"
59
56
  msgstr "Hittade värdar: %s"
60
57
 
@@ -88,6 +85,12 @@ msgstr "Värdpool"
88
85
  msgid "Imported Host::Discovered"
89
86
  msgstr "Importerade Host::Discovered"
90
87
 
88
+ msgid "Invalid facts, must be a Hash"
89
+ msgstr ""
90
+
91
+ msgid "Invalid facts: hash does not contain the required fact '%s'"
92
+ msgstr ""
93
+
91
94
  msgid "Last facts upload"
92
95
  msgstr "Sista faktauppladdning"
93
96
 
@@ -121,8 +124,8 @@ msgstr "Startar om %s"
121
124
  msgid "Refresh facts"
122
125
  msgstr "Uppdatera fakta"
123
126
 
124
- msgid "Select action"
125
- msgstr "Välj åtgärd"
127
+ msgid "Select Action"
128
+ msgstr "Välj Åtgärd"
126
129
 
127
130
  msgid "Select all items in this page"
128
131
  msgstr "Markera alla valbara på denna sida"
@@ -142,6 +145,9 @@ msgstr "Sänd"
142
145
  msgid "Subnet"
143
146
  msgstr "Subnät"
144
147
 
148
+ msgid "The default fact name to use for the MAC of the system"
149
+ msgstr "Fördefinierat faktanamn att använda för MAC för systemet"
150
+
145
151
  msgid "The default location to place discovered hosts in"
146
152
  msgstr "Standardplatsen att placera värdar i"
147
153
 
data/locale/zanata.xml ADDED
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <config xmlns="http://zanata.org/namespace/config/">
3
+ <url>https://translate.zanata.org/zanata/</url>
4
+ <project>satellite6-foreman-discovery</project>
5
+ <project-version>6.0</project-version>
6
+ <project-type>podir</project-type>
7
+ <locales>
8
+ <locale>fr</locale>
9
+ <locale>it</locale>
10
+ <locale>ja</locale>
11
+ <locale>ko</locale>
12
+ <locale>gu</locale>
13
+ <locale>hi</locale>
14
+ <locale>mr</locale>
15
+ <locale>or</locale>
16
+ <locale>ru</locale>
17
+ <locale>te</locale>
18
+ <locale>pa</locale>
19
+ <locale>kn</locale>
20
+ <locale map-from="de">de-DE</locale>
21
+ <locale map-from="es">es-ES</locale>
22
+ <locale map-from="pt_BR">pt-BR</locale>
23
+ <locale map-from="bn">bn-IN</locale>
24
+ <locale map-from="ta">ta-IN</locale>
25
+ <locale map-from="zh_CN">zh-Hans-CN</locale>
26
+ <locale map-from="zh_TW">zh-Hant-TW</locale>
27
+ </locales>
28
+ </config>
@@ -1,6 +1,6 @@
1
1
  require 'test_plugin_helper'
2
2
 
3
- class DiscoversControllerTest < ActionController::TestCase
3
+ class DiscoveredHostsControllerTest < ActionController::TestCase
4
4
  setup :initialize_host
5
5
 
6
6
  def test_index
@@ -17,7 +17,7 @@ class DiscoversControllerTest < ActionController::TestCase
17
17
  def test_add_entry_to_nav_menu
18
18
  get :index, {}, set_session_user
19
19
  assert_tag :tag => 'a',
20
- :attributes => {:href => '/discovers'}
20
+ :attributes => {:href => '/discovered_hosts'}
21
21
  end
22
22
 
23
23
  private
@@ -16,14 +16,15 @@ class HostDiscoveredTest < ActiveSupport::TestCase
16
16
 
17
17
  test "should import facts from yaml as Host::Discovered" do
18
18
  raw = parse_json_fixture('/facts.json')
19
- assert Host::Discovered.importHostAndFacts(raw['facts'])
19
+ assert Host::Discovered.import_host_and_facts(raw['facts'])
20
+ assert Host::Discovered.find_by_name('mace41f13cc3658')
20
21
  end
21
22
 
22
23
  test "should raise when fact_name setting isn't present" do
23
24
  raw = parse_json_fixture('/facts.json')
24
25
  Setting[:discovery_fact] = 'macaddress_foo'
25
26
  assert_raises Foreman::Exception do
26
- Host::Discovered.importHostAndFacts(raw['facts'])
27
+ Host::Discovered.import_host_and_facts(raw['facts'])
27
28
  end
28
29
  end
29
30
 
metadata CHANGED
@@ -1,58 +1,58 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_discovery
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0.rc2
4
+ version: 1.3.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Sutcliffe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-18 00:00:00.000000000 Z
11
+ date: 2014-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: open4
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ftools
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: deface
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: 'MaaS Discovery Plugin engine for Foreman '
55
+ description: ! 'MaaS Discovery Plugin engine for Foreman '
56
56
  email: gsutclif@redhat.com
57
57
  executables: []
58
58
  extensions: []
@@ -63,19 +63,25 @@ files:
63
63
  - LICENSE
64
64
  - README.md
65
65
  - Rakefile
66
- - app/controllers/discovers_controller.rb
67
- - app/helpers/discovers_helper.rb
66
+ - app/controllers/api/v2/discovered_hosts_controller.rb
67
+ - app/controllers/discovered_hosts_controller.rb
68
+ - app/helpers/discovered_hosts_helper.rb
68
69
  - app/models/host/discovered.rb
69
70
  - app/models/host/managed_extensions.rb
70
71
  - app/models/setting/discovered.rb
71
72
  - app/overrides/add_dashboard_table.rb
72
- - app/views/discovers/_discovers_list.html.erb
73
- - app/views/discovers/_selected_hosts.html.erb
74
- - app/views/discovers/index.html.erb
75
- - app/views/discovers/multiple_destroy.html.erb
76
- - app/views/discovers/select_multiple_location.html.erb
77
- - app/views/discovers/select_multiple_organization.html.erb
78
- - app/views/discovers/show.html.erb
73
+ - app/views/api/v2/discovered_hosts/base.json.rabl
74
+ - app/views/api/v2/discovered_hosts/index.json.rabl
75
+ - app/views/api/v2/discovered_hosts/main.json.rabl
76
+ - app/views/api/v2/discovered_hosts/show.json.rabl
77
+ - app/views/api/v2/discovered_hosts/update.json.rabl
78
+ - app/views/discovered_hosts/_discovered_hosts_list.html.erb
79
+ - app/views/discovered_hosts/_selected_hosts.html.erb
80
+ - app/views/discovered_hosts/index.html.erb
81
+ - app/views/discovered_hosts/multiple_destroy.html.erb
82
+ - app/views/discovered_hosts/select_multiple_location.html.erb
83
+ - app/views/discovered_hosts/select_multiple_organization.html.erb
84
+ - app/views/discovered_hosts/show.html.erb
79
85
  - config/initializers/discovery_setup.rb
80
86
  - config/routes.rb
81
87
  - extra/build_iso.sh
@@ -108,17 +114,18 @@ files:
108
114
  - lib/foreman_discovery/engine.rb
109
115
  - lib/foreman_discovery/facts.rb
110
116
  - lib/foreman_discovery/version.rb
111
- - locale/Makefile
112
- - locale/en_GB/LC_MESSAGES/foreman_discovery.mo
113
- - locale/en_GB/discovery.po
114
- - locale/es/LC_MESSAGES/foreman_discovery.mo
115
- - locale/es/discovery.po
117
+ - locale/de/foreman_discovery.po
118
+ - locale/en_GB/LC_MESSAGES/discovery.mo
119
+ - locale/en_GB/foreman_discovery.po
120
+ - locale/es/LC_MESSAGES/discovery.mo
121
+ - locale/es/foreman_discovery.po
116
122
  - locale/foreman_discovery.pot
117
- - locale/fr/LC_MESSAGES/foreman_discovery.mo
118
- - locale/fr/discovery.po
119
- - locale/sv_SE/LC_MESSAGES/foreman_discovery.mo
120
- - locale/sv_SE/discovery.po
121
- - test/functional/discovers_controller_test.rb
123
+ - locale/fr/LC_MESSAGES/discovery.mo
124
+ - locale/fr/foreman_discovery.po
125
+ - locale/sv_SE/LC_MESSAGES/discovery.mo
126
+ - locale/sv_SE/foreman_discovery.po
127
+ - locale/zanata.xml
128
+ - test/functional/discovered_hosts_controller_test.rb
122
129
  - test/test_helper.rb
123
130
  - test/test_plugin_helper.rb
124
131
  - test/unit/facts.json
@@ -134,25 +141,24 @@ require_paths:
134
141
  - lib
135
142
  required_ruby_version: !ruby/object:Gem::Requirement
136
143
  requirements:
137
- - - ">="
144
+ - - ! '>='
138
145
  - !ruby/object:Gem::Version
139
146
  version: '0'
140
147
  required_rubygems_version: !ruby/object:Gem::Requirement
141
148
  requirements:
142
- - - ">"
149
+ - - ! '>'
143
150
  - !ruby/object:Gem::Version
144
151
  version: 1.3.1
145
152
  requirements: []
146
153
  rubyforge_project:
147
- rubygems_version: 2.2.0
154
+ rubygems_version: 2.2.1
148
155
  signing_key:
149
156
  specification_version: 4
150
157
  summary: MaaS Discovery Plugin for Foreman
151
158
  test_files:
152
- - test/functional/discovers_controller_test.rb
153
- - test/unit/setting_discovered_test.rb
154
- - test/unit/facts.json
155
- - test/unit/host_discovered_test.rb
156
159
  - test/test_plugin_helper.rb
160
+ - test/functional/discovered_hosts_controller_test.rb
157
161
  - test/test_helper.rb
158
- has_rdoc:
162
+ - test/unit/facts.json
163
+ - test/unit/setting_discovered_test.rb
164
+ - test/unit/host_discovered_test.rb
@@ -1,2 +0,0 @@
1
- <% title_actions multiple_discovers_actions_select -%>
2
- <%= render 'discovers_list' %>
data/locale/Makefile DELETED
@@ -1,6 +0,0 @@
1
- #
2
- # Makefile for PO merging and MO generation. For more info see
3
- # locale/README in the Foreman Core.
4
- #
5
- include ../.foreman_app/locale/Makefile
6
- DOMAIN = discovery