foreman_discovery 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 876b21259147ee28a7fb842a77509e67a86bfe9e
4
- data.tar.gz: 727967204c0d3e9832a5f9e2255b39c480ff5d6a
3
+ metadata.gz: 66b0655f5a5cb3205a263ba723b51a9e41fb0b8d
4
+ data.tar.gz: 6f16041f72c20dd65b33756326d41176a0e570e8
5
5
  SHA512:
6
- metadata.gz: 5ea541c20e74fa17810b9ecd2a849bb90dcc3029ca3808ac01b4b89bbf756ad76000fc78d7e5842ea0510a20757d364ac5d78aee81c15adfa306a4fd9e665e02
7
- data.tar.gz: 913c4b70355675861a44da328f573202a49211d8e2acb476ef9c9070160bca2545174a21d62f6fc27ad032e43f349fbf0faa530e3d5d62e9fc7e9f0ae57094f8
6
+ metadata.gz: fdb6a81be087dce7ec317f8379506ed5af697fa727cd24551b649c95647638c2e8135749b33093174b7582611e17bcd2e73d2e2fdfef6a2257d94e16e54daf31
7
+ data.tar.gz: 2159e5c80640c6a7badc42511f054235e93b2b2c858961a4fbac5592bfe91b35d062b6eb03da3ecfc52f848f4376dfaa809540dbb6bced266293df086ffa781a
@@ -76,18 +76,12 @@ module Api
76
76
  end
77
77
 
78
78
  def update
79
- @host = @discovered_host.becomes(::Host::Managed)
80
- @host.type = 'Host::Managed'
81
- @host.managed = true
82
- @host.build = true
83
- forward_request_url
84
- update_response = @host.update_attributes(params[:discovered_host])
85
79
  Host.transaction do
86
- if update_response
87
- delete_discovery_attribute_set(@host.id)
88
- end
80
+ @host = ::ForemanDiscovery::HostConverter.to_managed(@discovered_host)
81
+ forward_request_url
82
+ update_response = @host.update_attributes(params[:discovered_host])
83
+ process_response update_response
89
84
  end
90
- process_response update_response
91
85
  end
92
86
 
93
87
  api :DELETE, "/discovered_hosts/:id/", N_("Delete a discovered host")
@@ -28,13 +28,13 @@ module Api
28
28
 
29
29
  def_param_group :discovery_rule do
30
30
  param :discovery_rule, Hash, :action_aware => true do
31
- param :name, String, :required => true
32
- param :search, String, :required => true
33
- param :hostgroup_id, Integer, :required => true
34
- param :hostname, String, :required => true
35
- param :max_count, Integer
36
- param :priority, Integer
37
- param :enabled, :bool
31
+ param :name, String, :required => true, :desc => N_("represents rule name shown to the users")
32
+ param :search, String, :required => true, :desc => N_("query to match discovered hosts for the particular rule")
33
+ param :hostgroup_id, Integer, :required => true, :desc => N_("the hostgroup that is used to auto provision a host")
34
+ param :hostname, String, :desc => N_("defines a pattern to assign human-readable hostnames to the matching hosts")
35
+ param :max_count, Integer, :desc => N_("enables to limit maximum amount of provisioned hosts per rule")
36
+ param :priority, Integer, :desc => N_("puts the rules in order, low numbers go first. Must be greater then zero")
37
+ param :enabled, :bool, :desc => N_("flag is used for temporary shutdown of rules")
38
38
  end
39
39
  end
40
40
 
@@ -48,15 +48,7 @@ module Api
48
48
 
49
49
  api :PUT, "/discovery_rules/:id/", N_("Update a rule")
50
50
  param :id, :identifier, :required => true
51
- param :discovery_rule, Hash, :action_aware => true do
52
- param :name, String, :required => true
53
- param :search, String, :required => true
54
- param :hostgroup_id, Integer, :required => true
55
- param :hostname, String, :required => true
56
- param :max_count, Integer
57
- param :priority, Integer
58
- param :enabled, :bool
59
- end
51
+ param_group :discovery_rule, :as => :update
60
52
 
61
53
  def update
62
54
  process_response @discovery_rule.update_attributes(params[:discovery_rule])
@@ -28,32 +28,21 @@ module Foreman::Controller::DiscoveredExtensions
28
28
  end
29
29
 
30
30
  # trigger the provisioning
31
- def perform_auto_provision host, rule
32
- host = host.becomes(::Host::Managed)
33
- host.type = 'Host::Managed'
34
- host.managed = true
35
- host.build = true
36
- host.hostgroup_id = rule.hostgroup_id
37
- host.comment = "Auto-discovered and provisioned via rule '#{rule.name}'"
38
- host.discovery_rule = rule
39
- # render hostname only when all other fields are set
40
- original_name = host.name
41
- host.name = host.render_template(rule.hostname) unless rule.hostname.empty?
42
- # fallback to the original if template did not expand
43
- host.name = original_name if host.name.empty?
31
+ def perform_auto_provision original_host, rule
44
32
  Host.transaction do
45
- if host.save #save! does not work here
46
- delete_discovery_attribute_set(host.id)
47
- end
33
+ host = ::ForemanDiscovery::HostConverter.to_managed(original_host)
34
+ host.hostgroup_id = rule.hostgroup_id
35
+ host.comment = "Auto-discovered and provisioned via rule '#{rule.name}'"
36
+ host.discovery_rule = rule
37
+ # render hostname only when all other fields are set
38
+ original_name = host.name
39
+ host.name = host.render_template(rule.hostname) unless rule.hostname.empty?
40
+ # fallback to the original if template did not expand
41
+ host.name = original_name if host.name.empty?
42
+ # save! does not work here
43
+ host.save
48
44
  end
49
45
  end
50
46
 
51
- # discovery_attribute_set should be deleted only after a host has been successfully provisioned
52
- # (after discovered host becomes managed host)
53
- # after this happens the host is a manged host so non of the callbacks in discovered hosts are relevant anymore
54
- # for this reason the orphaned discovery_attribute_set needs to be searched for and deleted
55
- def delete_discovery_attribute_set(host_id)
56
- DiscoveryAttributeSet.delete_all(:host_id => host_id)
57
- end
58
47
 
59
48
  end
@@ -59,24 +59,18 @@ class DiscoveredHostsController < ::ApplicationController
59
59
  end
60
60
 
61
61
  def edit
62
- unless @host.nil?
63
- @host = @host.becomes(::Host::Managed)
64
- @host.type = 'Host::Managed'
65
- @host.managed = true
66
- @host.build = true
62
+ Host.transaction do
63
+ @host = ::ForemanDiscovery::HostConverter.to_managed(@host) unless @host.nil?
64
+ render :template => 'hosts/edit'
67
65
  end
68
-
69
- render :template => 'hosts/edit'
70
66
  end
71
67
 
72
68
  def update
73
- @host = @host.becomes(::Host::Managed)
74
- @host.type = 'Host::Managed'
75
- forward_url_options
76
- Taxonomy.no_taxonomy_scope do
77
- Host.transaction do
69
+ Host.transaction do
70
+ @host = ::ForemanDiscovery::HostConverter.to_managed(@host, false, false)
71
+ forward_url_options
72
+ Taxonomy.no_taxonomy_scope do
78
73
  if @host.update_attributes(params[:host])
79
- delete_discovery_attribute_set(@host.id)
80
74
  process_success :success_redirect => host_path(@host), :redirect_xhr => request.xhr?
81
75
  else
82
76
  taxonomy_scope
@@ -146,7 +140,7 @@ class DiscoveredHostsController < ::ApplicationController
146
140
  @host.transaction do
147
141
  if rule = find_discovery_rule(@host)
148
142
  if perform_auto_provision(@host, rule)
149
- process_success :success_msg => _("Host %s was provisioned with rule %s") % [@host.name, rule.name], :success_redirect => :back
143
+ process_success :success_msg => _("Host %{host} was provisioned with rule %{rule}") % {:host => @host.name, :rule => rule.name}, :success_redirect => discovered_hosts_path
150
144
  else
151
145
  errors = @host.errors.full_messages.join(' ')
152
146
  logger.warn "Failed to auto provision host %s: %s" % [@host.name, errors]
@@ -15,6 +15,7 @@ class DiscoveryRule < ActiveRecord::Base
15
15
  validates :max_count, :numericality => { :only_integer => true, :greater_than_or_equal_to => 0 }
16
16
  validates :priority, :presence => true, :numericality => { :only_integer => true, :greater_than_or_equal_to => 0 }
17
17
  validates_lengths_from_database
18
+ before_validation :default_int_attributes
18
19
 
19
20
  belongs_to :hostgroup
20
21
  has_many :hosts
@@ -23,4 +24,10 @@ class DiscoveryRule < ActiveRecord::Base
23
24
  scoped_search :on => :priority
24
25
  scoped_search :on => :search
25
26
  scoped_search :on => :enabled
27
+ scoped_search :in => :hostgroup, :on => :name, :complete_value => true, :rename => :hostgroup
28
+
29
+ def default_int_attributes
30
+ self.max_count ||= 0
31
+ self.priority ||= 0
32
+ end
26
33
  end
@@ -0,0 +1,30 @@
1
+ class ForemanDiscovery::HostConverter
2
+
3
+ # must be called from SQL transaction
4
+ def self.to_managed(original_host, set_managed = true, set_build = true)
5
+ if ActiveRecord::Base.connection.open_transactions <= 0
6
+ raise "This method must be executed with explicit transaction"
7
+ end
8
+ host = original_host.becomes(::Host::Managed)
9
+ host.type = 'Host::Managed'
10
+ # the following flags can be skipped when parameters are set to false
11
+ if set_managed
12
+ host.managed = set_managed
13
+ host.managed = set_managed
14
+ end
15
+ host.build = set_build if set_build
16
+ # this gets rolled back when anything in the transaction fails
17
+ delete_discovery_attribute_set(host.id)
18
+ host
19
+ end
20
+
21
+ private
22
+
23
+ # discovery_attribute_set should be deleted only after a host has been successfully provisioned
24
+ # (after discovered host becomes managed host)
25
+ # after this happens the host is a manged host so non of the callbacks in discovered hosts are relevant anymore
26
+ # for this reason the orphaned discovery_attribute_set needs to be searched for and deleted
27
+ def self.delete_discovery_attribute_set(host_id)
28
+ DiscoveryAttributeSet.destroy_all(:host_id => host_id)
29
+ end
30
+ end
@@ -2,4 +2,9 @@ object @discovery_rule
2
2
 
3
3
  extends "api/v2/discovery_rules/base"
4
4
 
5
- attributes :name, :enabled, :hostgroup_id, :hostname, :max_count, :priority, :search
5
+ attributes :name, :enabled, :hostgroup_id, :hostgroup_name, :hostname, :priority, :search
6
+ attribute :max_count => :hosts_limit
7
+
8
+ child :hosts do
9
+ extends "api/v2/discovered_hosts/base"
10
+ end
@@ -0,0 +1,8 @@
1
+ class RemoveDuplicateTokensFromHosts < ActiveRecord::Migration
2
+ def up
3
+ Token.where('id not in (?)', Host::Managed.all.map(&:token).compact).delete_all
4
+ end
5
+
6
+ def down
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ class RemoveDiscoveryAttributeSetsFromManagedHosts < ActiveRecord::Migration
2
+ def up
3
+ DiscoveryAttributeSet.where(:id => DiscoveryAttributeSet.joins(:host).where(:'hosts.managed' => true).pluck(:id)).delete_all
4
+ end
5
+
6
+ def down
7
+ end
8
+ end
@@ -7,10 +7,11 @@ module ForemanDiscovery
7
7
  #Thus, inherits from ::Rails::Engine and not from Rails::Engine
8
8
  class Engine < ::Rails::Engine
9
9
 
10
- # support for concerns for pre-4 Rails versions
10
+ # support pre-4 Rails versions
11
11
  config.autoload_paths += Dir["#{config.root}/app/controllers/concerns"]
12
12
  config.autoload_paths += Dir["#{config.root}/app/helpers/concerns"]
13
13
  config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
14
+ config.autoload_paths += Dir["#{config.root}/app/services"]
14
15
 
15
16
  # Load this before the Foreman config initializers, so that the Setting.descendants
16
17
  # list includes the plugin STI setting class
@@ -1,3 +1,3 @@
1
1
  module ForemanDiscovery
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -2,6 +2,13 @@ require 'test_helper'
2
2
 
3
3
  class Api::V2::DiscoveredHostsControllerTest < ActionController::TestCase
4
4
 
5
+ def switch_controller(klass)
6
+ old_controller = @controller
7
+ @controller = klass.new
8
+ yield
9
+ @controller = old_controller
10
+ end
11
+
5
12
  setup do
6
13
  User.current = User.find_by_login "admin"
7
14
  @request.env['HTTP_REFERER'] = '/discovery_rules'
@@ -34,6 +41,12 @@ class Api::V2::DiscoveredHostsControllerTest < ActionController::TestCase
34
41
  assert_equal "Empty Organization", show_response["organization_name"]
35
42
  end
36
43
 
44
+ def test_delete_discovered_host
45
+ host = Host::Discovered.import_host_and_facts(@facts).first
46
+ delete :destroy, { :id => host.id }
47
+ assert_response :success
48
+ end
49
+
37
50
  def test_auto_provision_success_via_upload
38
51
  disable_orchestration
39
52
  facts = @facts.merge({"somefact" => "abc"})
@@ -52,6 +65,20 @@ class Api::V2::DiscoveredHostsControllerTest < ActionController::TestCase
52
65
  assert_response :success
53
66
  end
54
67
 
68
+ def test_auto_provision_success_and_delete
69
+ disable_orchestration
70
+ facts = @facts.merge({"somefact" => "abc"})
71
+ host = Host::Discovered.import_host_and_facts(facts).first
72
+ FactoryGirl.create(:discovery_rule, :priority => 1, :search => "facts.somefact = abc", :hostgroup => hostgroups(:common))
73
+ post :auto_provision, { :id => host.id }
74
+ assert_response :success
75
+ # test deletion of a managed host
76
+ switch_controller(::Api::V2::HostsController) do
77
+ delete :destroy, { :id => host.id }
78
+ assert_response :success
79
+ end
80
+ end
81
+
55
82
  def test_auto_provision_no_rule_success
56
83
  disable_orchestration
57
84
  facts = @facts.merge({"somefact" => "abc"})
@@ -29,6 +29,18 @@ class DiscoveredHostsControllerTest < ActionController::TestCase
29
29
  assert_response :success
30
30
  end
31
31
 
32
+ def test_edit_form
33
+ skip "until foreman 1.8"
34
+ host = Host::Discovered.import_host_and_facts(@facts).first
35
+ get :edit, {:id => host.id}, set_session_user
36
+ assert_select "select" do |elements|
37
+ elements.each do |element|
38
+ assert_match(/^host_/, element.attributes['id'])
39
+ assert_match(/^host\[/, element.attributes['name'])
40
+ end
41
+ end
42
+ end
43
+
32
44
  def test_index_json
33
45
  get :index, {:format => "json"}, set_session_user
34
46
  assert_response :success
@@ -0,0 +1,20 @@
1
+ require 'test_helper'
2
+
3
+ class DiscoveryRuleTest < ActiveSupport::TestCase
4
+
5
+ test "should be able to create a rule without entering hosts limit" do
6
+ rule = DiscoveryRule.new :name => "myrule", :search => "cpu_count > 1", :priority => "1", :hostgroup_id => "1"
7
+ assert_valid rule
8
+ end
9
+
10
+ test "should be able to create a rule without entering priority" do
11
+ rule = DiscoveryRule.new :name => "myrule", :search => "cpu_count > 1", :max_count => "1", :hostgroup_id => "1"
12
+ assert_valid rule
13
+ end
14
+
15
+ test "should not be able to create a rule without a hostgroup" do
16
+ rule = DiscoveryRule.new :name => "myrule", :search => "cpu_count > 1"
17
+ refute_valid rule
18
+ end
19
+
20
+ end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_discovery
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Sutcliffe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-09 00:00:00.000000000 Z
11
+ date: 2015-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - <
17
+ - - "<"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.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: '1.0'
27
27
  description: 'MaaS Discovery Plugin engine for Foreman '
@@ -32,112 +32,116 @@ extra_rdoc_files:
32
32
  - LICENSE
33
33
  - README.md
34
34
  files:
35
- - app/controllers/discovery_rules_controller.rb
36
- - app/controllers/discovered_hosts_controller.rb
37
- - app/controllers/concerns/foreman/controller/discovered_extensions.rb
38
- - app/controllers/api/v2/discovery_rules_controller.rb
35
+ - LICENSE
36
+ - README.md
39
37
  - app/controllers/api/v2/discovered_hosts_controller.rb
40
- - app/lib/puppet_fact_parser_extensions.rb
41
- - app/helpers/discovery_rules_helper.rb
38
+ - app/controllers/api/v2/discovery_rules_controller.rb
39
+ - app/controllers/concerns/foreman/controller/discovered_extensions.rb
40
+ - app/controllers/discovered_hosts_controller.rb
41
+ - app/controllers/discovery_rules_controller.rb
42
42
  - app/helpers/discovered_hosts_helper.rb
43
- - app/overrides/subnet_form_with_discovery_proxy.rb
44
- - app/models/setting/discovered.rb
45
- - app/models/hostgroup_extensions.rb
46
- - app/models/host/discovered.rb
47
- - app/models/host/managed_extensions.rb
48
- - app/models/discovery_rule.rb
43
+ - app/helpers/discovery_rules_helper.rb
44
+ - app/lib/puppet_fact_parser_extensions.rb
49
45
  - app/models/concerns/discovery_subnet.rb
50
46
  - app/models/discovery_attribute_set.rb
51
- - app/views/dashboard/_discovery_widget_host_list.html.erb
47
+ - app/models/discovery_rule.rb
48
+ - app/models/host/discovered.rb
49
+ - app/models/host/managed_extensions.rb
50
+ - app/models/hostgroup_extensions.rb
51
+ - app/models/setting/discovered.rb
52
+ - app/overrides/subnet_form_with_discovery_proxy.rb
53
+ - app/services/host_converter.rb
54
+ - app/views/api/v2/discovered_hosts/auto_provision.json.rabl
55
+ - app/views/api/v2/discovered_hosts/auto_provision_all.json.rabl
56
+ - app/views/api/v2/discovered_hosts/base.json.rabl
57
+ - app/views/api/v2/discovered_hosts/index.json.rabl
58
+ - app/views/api/v2/discovered_hosts/main.json.rabl
59
+ - app/views/api/v2/discovered_hosts/show.json.rabl
60
+ - app/views/api/v2/discovered_hosts/update.json.rabl
61
+ - app/views/api/v2/discovery_rules/base.json.rabl
62
+ - app/views/api/v2/discovery_rules/index.json.rabl
63
+ - app/views/api/v2/discovery_rules/main.json.rabl
64
+ - app/views/api/v2/discovery_rules/show.json.rabl
52
65
  - app/views/dashboard/_discovery_widget.html.erb
53
- - app/views/discovery_rules/new.html.erb
54
- - app/views/discovery_rules/edit.html.erb
55
- - app/views/discovery_rules/index.html.erb
56
- - app/views/discovery_rules/_form.html.erb
66
+ - app/views/dashboard/_discovery_widget_host_list.html.erb
57
67
  - app/views/discovered_hosts/_discovered_host.html.erb
68
+ - app/views/discovered_hosts/_discovered_hosts_list.html.erb
58
69
  - app/views/discovered_hosts/_selected_hosts.html.erb
59
- - app/views/discovered_hosts/multiple_destroy.html.erb
60
70
  - app/views/discovered_hosts/index.html.erb
71
+ - app/views/discovered_hosts/multiple_destroy.html.erb
72
+ - app/views/discovered_hosts/select_multiple_location.html.erb
61
73
  - app/views/discovered_hosts/select_multiple_organization.html.erb
62
- - app/views/discovered_hosts/_discovered_hosts_list.html.erb
63
74
  - app/views/discovered_hosts/show.html.erb
64
- - app/views/discovered_hosts/select_multiple_location.html.erb
65
- - app/views/api/v2/discovery_rules/index.json.rabl
66
- - app/views/api/v2/discovery_rules/base.json.rabl
67
- - app/views/api/v2/discovery_rules/main.json.rabl
68
- - app/views/api/v2/discovery_rules/show.json.rabl
69
- - app/views/api/v2/discovered_hosts/index.json.rabl
70
- - app/views/api/v2/discovered_hosts/update.json.rabl
71
- - app/views/api/v2/discovered_hosts/auto_provision_all.json.rabl
72
- - app/views/api/v2/discovered_hosts/base.json.rabl
73
- - app/views/api/v2/discovered_hosts/main.json.rabl
74
- - app/views/api/v2/discovered_hosts/auto_provision.json.rabl
75
- - app/views/api/v2/discovered_hosts/show.json.rabl
76
- - extra/build_iso.sh
77
- - extra/wait_for_network.sh
78
- - extra/disk_facts.rb
79
- - extra/discover_host
80
- - extra/foreman_startup.rb
81
- - extra/discovery_init.sh.example
82
- - extra/ovirt-node-build/build_image.sh
83
- - extra/ovirt-node-build/Vagrantfile
84
- - config/routes.rb
75
+ - app/views/discovery_rules/_form.html.erb
76
+ - app/views/discovery_rules/edit.html.erb
77
+ - app/views/discovery_rules/index.html.erb
78
+ - app/views/discovery_rules/new.html.erb
85
79
  - config/initializers/discovery_setup.rb
80
+ - config/routes.rb
86
81
  - db/migrate/20141107091416_create_discovery_rules.rb
87
82
  - db/migrate/20141107091417_add_discovery_rule_to_host.rb
88
83
  - db/migrate/20141126165451_add_discovery_id_to_subnet.rb
89
84
  - db/migrate/20141223101707_create_discovery_attribute_sets.rb
90
85
  - db/migrate/20141223142759_fill_discovery_attribute_sets_for_existing_hosts.rb
86
+ - db/migrate/20150302112545_remove_duplicate_tokens_from_hosts.rb
87
+ - db/migrate/20150310153859_remove_discovery_attribute_sets_from_managed_hosts.rb
91
88
  - db/seeds.d/60_discovery_proxy_feature.rb
89
+ - extra/build_iso.sh
90
+ - extra/discover_host
91
+ - extra/discovery_init.sh.example
92
+ - extra/disk_facts.rb
93
+ - extra/foreman_startup.rb
94
+ - extra/ovirt-node-build/Vagrantfile
95
+ - extra/ovirt-node-build/build_image.sh
96
+ - extra/wait_for_network.sh
92
97
  - lib/discovery.rake
93
98
  - lib/foreman_discovery.rb
99
+ - lib/foreman_discovery/engine.rb
94
100
  - lib/foreman_discovery/proxy_operations.rb
95
101
  - lib/foreman_discovery/version.rb
96
- - lib/foreman_discovery/engine.rb
97
- - locale/foreman_discovery.pot
98
102
  - locale/Makefile
99
- - locale/ru/foreman_discovery.po
100
- - locale/ru/LC_MESSAGES/foreman_discovery.mo
101
- - locale/de/foreman_discovery.po
102
103
  - locale/de/LC_MESSAGES/foreman_discovery.mo
103
- - locale/pt_BR/foreman_discovery.po
104
- - locale/pt_BR/LC_MESSAGES/foreman_discovery.mo
105
- - locale/en_GB/foreman_discovery.po
104
+ - locale/de/foreman_discovery.po
106
105
  - locale/en_GB/LC_MESSAGES/foreman_discovery.mo
107
- - locale/zh_TW/foreman_discovery.po
108
- - locale/zh_TW/LC_MESSAGES/foreman_discovery.mo
109
- - locale/es/foreman_discovery.po
106
+ - locale/en_GB/foreman_discovery.po
110
107
  - locale/es/LC_MESSAGES/foreman_discovery.mo
111
- - locale/fr/foreman_discovery.po
108
+ - locale/es/foreman_discovery.po
109
+ - locale/foreman_discovery.pot
112
110
  - locale/fr/LC_MESSAGES/foreman_discovery.mo
113
- - locale/it/foreman_discovery.po
111
+ - locale/fr/foreman_discovery.po
112
+ - locale/gl/LC_MESSAGES/foreman_discovery.mo
113
+ - locale/gl/foreman_discovery.po
114
114
  - locale/it/LC_MESSAGES/foreman_discovery.mo
115
- - locale/ja/foreman_discovery.po
115
+ - locale/it/foreman_discovery.po
116
116
  - locale/ja/LC_MESSAGES/foreman_discovery.mo
117
- - locale/ko/foreman_discovery.po
117
+ - locale/ja/foreman_discovery.po
118
118
  - locale/ko/LC_MESSAGES/foreman_discovery.mo
119
- - locale/zh_CN/foreman_discovery.po
120
- - locale/zh_CN/LC_MESSAGES/foreman_discovery.mo
121
- - locale/zanata.xml
122
- - locale/gl/foreman_discovery.po
123
- - locale/gl/LC_MESSAGES/foreman_discovery.mo
124
- - locale/sv_SE/foreman_discovery.po
119
+ - locale/ko/foreman_discovery.po
120
+ - locale/pt_BR/LC_MESSAGES/foreman_discovery.mo
121
+ - locale/pt_BR/foreman_discovery.po
122
+ - locale/ru/LC_MESSAGES/foreman_discovery.mo
123
+ - locale/ru/foreman_discovery.po
125
124
  - locale/sv_SE/LC_MESSAGES/foreman_discovery.mo
126
- - LICENSE
127
- - README.md
128
- - test/functional/discovery_rules_controller_test.rb
129
- - test/functional/api/v2/discovery_rules_controller_test.rb
125
+ - locale/sv_SE/foreman_discovery.po
126
+ - locale/zanata.xml
127
+ - locale/zh_CN/LC_MESSAGES/foreman_discovery.mo
128
+ - locale/zh_CN/foreman_discovery.po
129
+ - locale/zh_TW/LC_MESSAGES/foreman_discovery.mo
130
+ - locale/zh_TW/foreman_discovery.po
131
+ - test/factories/discovery_rule_related.rb
130
132
  - test/functional/api/v2/discovered_hosts_controller_test.rb
133
+ - test/functional/api/v2/discovery_rules_controller_test.rb
131
134
  - test/functional/discovered_hosts_controller_test.rb
132
- - test/factories/discovery_rule_related.rb
135
+ - test/functional/discovery_rules_controller_test.rb
136
+ - test/test_helper.rb
137
+ - test/test_plugin_helper.rb
133
138
  - test/unit/discovered_extensions_test.rb
134
139
  - test/unit/discovery_attribute_set_test.rb
135
- - test/unit/setting_discovered_test.rb
140
+ - test/unit/discovery_rule_test.rb
136
141
  - test/unit/facts.json
137
- - test/unit/puppet_fact_parser_extensions_test.rb
138
142
  - test/unit/host_discovered_test.rb
139
- - test/test_plugin_helper.rb
140
- - test/test_helper.rb
143
+ - test/unit/puppet_fact_parser_extensions_test.rb
144
+ - test/unit/setting_discovered_test.rb
141
145
  homepage: http://github.com/theforeman/foreman_discovery
142
146
  licenses:
143
147
  - GPL-3
@@ -148,17 +152,17 @@ require_paths:
148
152
  - lib
149
153
  required_ruby_version: !ruby/object:Gem::Requirement
150
154
  requirements:
151
- - - '>='
155
+ - - ">="
152
156
  - !ruby/object:Gem::Version
153
157
  version: '0'
154
158
  required_rubygems_version: !ruby/object:Gem::Requirement
155
159
  requirements:
156
- - - '>='
160
+ - - ">="
157
161
  - !ruby/object:Gem::Version
158
162
  version: '0'
159
163
  requirements: []
160
164
  rubyforge_project:
161
- rubygems_version: 2.0.3
165
+ rubygems_version: 2.2.0
162
166
  signing_key:
163
167
  specification_version: 4
164
168
  summary: MaaS Discovery Plugin for Foreman
@@ -173,6 +177,7 @@ test_files:
173
177
  - test/unit/setting_discovered_test.rb
174
178
  - test/unit/facts.json
175
179
  - test/unit/puppet_fact_parser_extensions_test.rb
180
+ - test/unit/discovery_rule_test.rb
176
181
  - test/unit/host_discovered_test.rb
177
182
  - test/test_plugin_helper.rb
178
183
  - test/test_helper.rb