foreman_discovery 24.0.2 → 25.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,13 +8,6 @@ module ForemanDiscovery
8
8
  class Engine < ::Rails::Engine
9
9
  engine_name 'foreman_discovery'
10
10
 
11
- # support pre-4 Rails versions
12
- config.autoload_paths += Dir["#{config.root}/app/controllers/foreman_discovery/concerns"]
13
- config.autoload_paths += Dir["#{config.root}/app/controllers/concerns"]
14
- config.autoload_paths += Dir["#{config.root}/app/helpers/concerns"]
15
- config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
16
- config.autoload_paths += Dir["#{config.root}/app/services"]
17
-
18
11
  initializer "foreman_discovery.add_rabl_view_path" do |app|
19
12
  Rabl.configure do |config|
20
13
  config.view_paths << ForemanDiscovery::Engine.root.join('app', 'views')
@@ -29,310 +22,312 @@ module ForemanDiscovery
29
22
  end
30
23
 
31
24
  initializer 'foreman_discovery.register_plugin', :before => :finisher_hook do |app|
32
- Foreman::Plugin.register :foreman_discovery do
33
- requires_foreman '>= 3.10'
34
- register_gettext
35
-
36
- # settings
37
- settings do
38
- category :discovery, N_("Discovery") do
39
- snippets = Proc.new {
40
- Hash[ProvisioningTemplate.where(:template_kind => TemplateKind.find_by_name(:snippet)).map{|template| [template[:name], template[:name]]}]
41
- }
42
-
43
- setting "discovery_location",
44
- type: :string,
45
- collection: Proc.new { Hash[[['', '']].concat Location.all.map{|loc| [loc[:title], loc[:title]]}] },
46
- default: "",
47
- full_name: N_("Discovery location"),
48
- description: N_("The default location to place discovered hosts in")
49
-
50
- setting "discovery_organization",
51
- type: :string,
52
- collection: Proc.new { Hash[[['', '']].concat Organization.all.map{|org| [org[:title], org[:title]]}] },
53
- default: "",
54
- full_name: N_("Discovery organization"),
55
- description: N_("The default organization to place discovered hosts in")
56
-
57
- setting "discovery_fact",
58
- type: :string,
59
- default: "discovery_bootif",
60
- full_name: N_("Interface fact"),
61
- description: N_("Fact name to use for primary interface detection")
62
-
63
- setting "discovery_auto_bond",
64
- type: :boolean,
65
- default: false,
66
- full_name: N_("Create bond interfaces"),
67
- description: N_("Automatic bond interface (if another interface is detected on the same VLAN via LLDP)")
68
-
69
- setting "discovery_clean_facts",
70
- type: :boolean,
71
- default: false,
72
- full_name: N_("Clean all facts"),
73
- description: N_("Clean all reported facts during provisioning (except discovery facts)")
74
-
75
- setting "discovery_hostname",
76
- type: :array,
77
- default: ["discovery_bootif"],
78
- validate: { presence: true },
79
- full_name: N_("Hostname facts"),
80
- description: N_("List of facts to use for the hostname (first wins)")
81
-
82
- setting "discovery_auto",
83
- type: :boolean,
84
- default: false,
85
- full_name: N_("Auto provisioning"),
86
- description: N_("Automatically provision newly discovered hosts, according to the provisioning rules")
87
-
88
- setting "discovery_reboot",
89
- type: :boolean,
90
- default: true,
91
- full_name: N_("Reboot"),
92
- description: N_("Automatically reboot or kexec discovered host during provisioning")
93
-
94
- setting "discovery_prefix",
95
- type: :string,
96
- default: "mac",
97
- validate: { presence: true },
98
- full_name: N_("Hostname prefix"),
99
- description: N_("The default prefix to use for the host name, must start with a letter")
100
-
101
- setting "discovery_fact_column",
102
- type: :array,
103
- default: [],
104
- full_name: N_("Fact columns"),
105
- description: N_("Extra facter columns to show in host lists")
106
-
107
- setting "discovery_facts_highlights",
108
- type: :string,
109
- default: "",
110
- full_name: N_("Highlighted facts"),
111
- description: N_("Regex to organize facts for highlights section - e.g. ^(abc|cde)$")
112
-
113
- setting "discovery_facts_storage",
114
- type: :string,
115
- default: "",
116
- full_name: N_("Storage facts"),
117
- description: N_("Regex to organize facts for storage section")
118
-
119
- setting "discovery_facts_software",
120
- type: :string,
121
- default: "",
122
- full_name: N_("Software facts"),
123
- description: N_("Regex to organize facts for software section")
124
-
125
- setting "discovery_facts_hardware",
126
- type: :string,
127
- default: "",
128
- full_name: N_("Hardware facts"),
129
- description: N_("Regex to organize facts for hardware section")
130
-
131
- setting "discovery_facts_network",
132
- type: :string,
133
- default: "",
134
- full_name: N_("Network facts"),
135
- description: N_("Regex to organize facts for network section")
136
-
137
- setting "discovery_facts_ipmi",
138
- type: :string,
139
- default: "",
140
- full_name: N_("IPMI facts"),
141
- description: N_("Regex to organize facts for ipmi section")
142
-
143
- setting "discovery_lock",
144
- type: :boolean,
145
- default: false,
146
- full_name: N_("Lock PXE"),
147
- description: N_("Automatically generate PXE configuration to pin a newly discovered host to discovery")
148
-
149
- setting "discovery_pxelinux_lock_template",
150
- type: :string,
151
- collection: snippets,
152
- default: "pxelinux_discovery",
153
- full_name: N_("Locked PXELinux template name"),
154
- description: N_("PXELinux template to be used when pinning a host to discovery")
155
-
156
- setting "discovery_pxegrub_lock_template",
157
- type: :string,
158
- collection: snippets,
159
- default: "pxegrub_discovery",
160
- full_name: N_("Locked PXEGrub template name"),
161
- description: N_("PXEGrub template to be used when pinning a host to discovery")
162
-
163
- setting "discovery_pxegrub2_lock_template",
164
- type: :string,
165
- collection: snippets,
166
- default: "pxegrub2_discovery",
167
- full_name: N_("Locked PXEGrub2 template name"),
168
- description: N_("PXEGrub2 template to be used when pinning a host to discovery")
169
-
170
- setting "discovery_always_rebuild_dns",
171
- type: :boolean,
172
- default: true,
173
- full_name: N_("Force DNS"),
174
- description: N_("Force DNS entries creation when provisioning discovered host")
175
-
176
- setting "discovery_error_on_existing",
177
- type: :boolean,
178
- default: false,
179
- full_name: N_("Error on existing NIC"),
180
- description: N_("Do not allow to discover existing managed host matching MAC of a provisioning NIC (errors out early)")
181
-
182
- setting "discovery_naming",
183
- type: :string,
184
- collection: Proc.new { ::Host::Discovered::NAMING_PATTERNS },
185
- default: "Fact",
186
- full_name: N_("Type of name generator"),
187
- description: N_("Discovery hostname naming pattern")
188
-
189
- setting "discovery_prefer_ipv6",
190
- type: :boolean,
191
- default: false,
192
- full_name: N_("Prefer IPv6"),
193
- description: N_("Prefer IPv6 to IPv4 when calling discovered nodes")
25
+ app.reloader.to_prepare do
26
+ Foreman::Plugin.register :foreman_discovery do
27
+ requires_foreman '>= 3.13'
28
+ register_gettext
29
+
30
+ # settings
31
+ settings do
32
+ category :discovery, N_("Discovery") do
33
+ snippets = Proc.new {
34
+ Hash[ProvisioningTemplate.where(:template_kind => TemplateKind.find_by_name(:snippet)).map{|template| [template[:name], template[:name]]}]
35
+ }
36
+
37
+ setting "discovery_location",
38
+ type: :string,
39
+ collection: Proc.new { Hash[[['', '']].concat Location.all.map{|loc| [loc[:title], loc[:title]]}] },
40
+ default: "",
41
+ full_name: N_("Discovery location"),
42
+ description: N_("The default location to place discovered hosts in")
43
+
44
+ setting "discovery_organization",
45
+ type: :string,
46
+ collection: Proc.new { Hash[[['', '']].concat Organization.all.map{|org| [org[:title], org[:title]]}] },
47
+ default: "",
48
+ full_name: N_("Discovery organization"),
49
+ description: N_("The default organization to place discovered hosts in")
50
+
51
+ setting "discovery_fact",
52
+ type: :string,
53
+ default: "discovery_bootif",
54
+ full_name: N_("Interface fact"),
55
+ description: N_("Fact name to use for primary interface detection")
56
+
57
+ setting "discovery_auto_bond",
58
+ type: :boolean,
59
+ default: false,
60
+ full_name: N_("Create bond interfaces"),
61
+ description: N_("Automatic bond interface (if another interface is detected on the same VLAN via LLDP)")
62
+
63
+ setting "discovery_clean_facts",
64
+ type: :boolean,
65
+ default: false,
66
+ full_name: N_("Clean all facts"),
67
+ description: N_("Clean all reported facts during provisioning (except discovery facts)")
68
+
69
+ setting "discovery_hostname",
70
+ type: :array,
71
+ default: ["discovery_bootif"],
72
+ validate: { presence: true },
73
+ full_name: N_("Hostname facts"),
74
+ description: N_("List of facts to use for the hostname (first wins)")
75
+
76
+ setting "discovery_auto",
77
+ type: :boolean,
78
+ default: false,
79
+ full_name: N_("Auto provisioning"),
80
+ description: N_("Automatically provision newly discovered hosts, according to the provisioning rules")
81
+
82
+ setting "discovery_reboot",
83
+ type: :boolean,
84
+ default: true,
85
+ full_name: N_("Reboot"),
86
+ description: N_("Automatically reboot or kexec discovered host during provisioning")
87
+
88
+ setting "discovery_prefix",
89
+ type: :string,
90
+ default: "mac",
91
+ validate: { presence: true },
92
+ full_name: N_("Hostname prefix"),
93
+ description: N_("The default prefix to use for the host name, must start with a letter")
94
+
95
+ setting "discovery_fact_column",
96
+ type: :array,
97
+ default: [],
98
+ full_name: N_("Fact columns"),
99
+ description: N_("Extra facter columns to show in host lists")
100
+
101
+ setting "discovery_facts_highlights",
102
+ type: :string,
103
+ default: "",
104
+ full_name: N_("Highlighted facts"),
105
+ description: N_("Regex to organize facts for highlights section - e.g. ^(abc|cde)$")
106
+
107
+ setting "discovery_facts_storage",
108
+ type: :string,
109
+ default: "",
110
+ full_name: N_("Storage facts"),
111
+ description: N_("Regex to organize facts for storage section")
112
+
113
+ setting "discovery_facts_software",
114
+ type: :string,
115
+ default: "",
116
+ full_name: N_("Software facts"),
117
+ description: N_("Regex to organize facts for software section")
118
+
119
+ setting "discovery_facts_hardware",
120
+ type: :string,
121
+ default: "",
122
+ full_name: N_("Hardware facts"),
123
+ description: N_("Regex to organize facts for hardware section")
124
+
125
+ setting "discovery_facts_network",
126
+ type: :string,
127
+ default: "",
128
+ full_name: N_("Network facts"),
129
+ description: N_("Regex to organize facts for network section")
130
+
131
+ setting "discovery_facts_ipmi",
132
+ type: :string,
133
+ default: "",
134
+ full_name: N_("IPMI facts"),
135
+ description: N_("Regex to organize facts for ipmi section")
136
+
137
+ setting "discovery_lock",
138
+ type: :boolean,
139
+ default: false,
140
+ full_name: N_("Lock PXE"),
141
+ description: N_("Automatically generate PXE configuration to pin a newly discovered host to discovery")
142
+
143
+ setting "discovery_pxelinux_lock_template",
144
+ type: :string,
145
+ collection: snippets,
146
+ default: "pxelinux_discovery",
147
+ full_name: N_("Locked PXELinux template name"),
148
+ description: N_("PXELinux template to be used when pinning a host to discovery")
149
+
150
+ setting "discovery_pxegrub_lock_template",
151
+ type: :string,
152
+ collection: snippets,
153
+ default: "pxegrub_discovery",
154
+ full_name: N_("Locked PXEGrub template name"),
155
+ description: N_("PXEGrub template to be used when pinning a host to discovery")
156
+
157
+ setting "discovery_pxegrub2_lock_template",
158
+ type: :string,
159
+ collection: snippets,
160
+ default: "pxegrub2_discovery",
161
+ full_name: N_("Locked PXEGrub2 template name"),
162
+ description: N_("PXEGrub2 template to be used when pinning a host to discovery")
163
+
164
+ setting "discovery_always_rebuild_dns",
165
+ type: :boolean,
166
+ default: true,
167
+ full_name: N_("Force DNS"),
168
+ description: N_("Force DNS entries creation when provisioning discovered host")
169
+
170
+ setting "discovery_error_on_existing",
171
+ type: :boolean,
172
+ default: false,
173
+ full_name: N_("Error on existing NIC"),
174
+ description: N_("Do not allow to discover existing managed host matching MAC of a provisioning NIC (errors out early)")
175
+
176
+ setting "discovery_naming",
177
+ type: :string,
178
+ collection: Proc.new { ::Host::Discovered::NAMING_PATTERNS },
179
+ default: "Fact",
180
+ full_name: N_("Type of name generator"),
181
+ description: N_("Discovery hostname naming pattern")
182
+
183
+ setting "discovery_prefer_ipv6",
184
+ type: :boolean,
185
+ default: false,
186
+ full_name: N_("Prefer IPv6"),
187
+ description: N_("Prefer IPv6 to IPv4 when calling discovered nodes")
188
+ end
194
189
  end
195
- end
196
190
 
197
- # discovered hosts permissions
198
- security_block :discovery do
199
- permission :view_discovered_hosts, {
200
- :discovered_hosts => [:index, :show, :auto_complete_search, :welcome],
201
- :"api/v2/discovered_hosts" => [:index, :show],
202
- :'discovered_hosts/react' => [:index]
203
- }, :resource_type => 'Host'
204
- permission :submit_discovered_hosts, {
205
- :"api/v2/discovered_hosts" => [:facts, :create]
206
- }, :resource_type => 'Host'
207
- permission :auto_provision_discovered_hosts, {
208
- :discovered_hosts => [:auto_provision,
209
- :multiple_auto_provision,
210
- :submit_multiple_auto_provision],
211
- :"api/v2/discovered_hosts" => [:auto_provision, :auto_provision_all]
212
- }, :resource_type => 'Host'
213
- permission :provision_discovered_hosts, {
214
- :discovered_hosts => [:edit, :update],
215
- :"api/v2/discovered_hosts" => [:update]
216
- }, :resource_type => 'Host'
217
- permission :edit_discovered_hosts, {
218
- :discovered_hosts => [:update_multiple_location,
219
- :select_multiple_organization,
220
- :update_multiple_organization,
221
- :select_multiple_location,
222
- :refresh_facts,
223
- :reboot,
224
- :multiple_reboot,
225
- :submit_multiple_reboot],
226
- :hosts => [:process_hostgroup],
227
- :"api/v2/discovered_hosts" => [:refresh_facts, :reboot, :reboot_all]
191
+ # discovered hosts permissions
192
+ security_block :discovery do
193
+ permission :view_discovered_hosts, {
194
+ :discovered_hosts => [:index, :show, :auto_complete_search, :welcome],
195
+ :"api/v2/discovered_hosts" => [:index, :show],
196
+ :'discovered_hosts/react' => [:index]
197
+ }, :resource_type => 'Host'
198
+ permission :submit_discovered_hosts, {
199
+ :"api/v2/discovered_hosts" => [:facts, :create]
200
+ }, :resource_type => 'Host'
201
+ permission :auto_provision_discovered_hosts, {
202
+ :discovered_hosts => [:auto_provision,
203
+ :multiple_auto_provision,
204
+ :submit_multiple_auto_provision],
205
+ :"api/v2/discovered_hosts" => [:auto_provision, :auto_provision_all]
206
+ }, :resource_type => 'Host'
207
+ permission :provision_discovered_hosts, {
208
+ :discovered_hosts => [:edit, :update],
209
+ :"api/v2/discovered_hosts" => [:update]
210
+ }, :resource_type => 'Host'
211
+ permission :edit_discovered_hosts, {
212
+ :discovered_hosts => [:update_multiple_location,
213
+ :select_multiple_organization,
214
+ :update_multiple_organization,
215
+ :select_multiple_location,
216
+ :refresh_facts,
217
+ :reboot,
218
+ :multiple_reboot,
219
+ :submit_multiple_reboot],
220
+ :hosts => [:process_hostgroup],
221
+ :"api/v2/discovered_hosts" => [:refresh_facts, :reboot, :reboot_all]
222
+ }, :resource_type => 'Host'
223
+ permission :destroy_discovered_hosts, {
224
+ :discovered_hosts => [:destroy, :submit_multiple_destroy, :multiple_destroy],
225
+ :"api/v2/discovered_hosts" => [:destroy]
228
226
  }, :resource_type => 'Host'
229
- permission :destroy_discovered_hosts, {
230
- :discovered_hosts => [:destroy, :submit_multiple_destroy, :multiple_destroy],
231
- :"api/v2/discovered_hosts" => [:destroy]
232
- }, :resource_type => 'Host'
233
- end
227
+ end
234
228
 
235
- # discovery rules permissions
236
- security_block :discovery_rules do
237
- permission :view_discovery_rules, {
238
- :discovery_rules => [:index, :show, :auto_complete_search, :welcome],
239
- :"api/v2/discovery_rules" => [:index, :show]
240
- }, :resource_type => 'DiscoveryRule'
241
- permission :create_discovery_rules, {
242
- :discovery_rules => [:new, :create, :clone],
243
- :"api/v2/discovery_rules" => [:create]
244
- }, :resource_type => 'DiscoveryRule'
245
- permission :edit_discovery_rules, {
246
- :discovery_rules => [:edit, :update, :enable, :disable],
247
- :"api/v2/discovery_rules" => [:create, :update]
248
- }, :resource_type => 'DiscoveryRule'
249
- permission :execute_discovery_rules, {
250
- :discovery_rules => [:auto_provision, :auto_provision_all],
251
- :"api/v2/discovery_rules" => [:auto_provision, :auto_provision_all]
252
- }, :resource_type => 'DiscoveryRule'
253
- permission :destroy_discovery_rules, {
254
- :discovery_rules => [:destroy],
255
- :"api/v2/discovery_rules" => [:destroy]
256
- }, :resource_type => 'DiscoveryRule'
257
- end
229
+ # discovery rules permissions
230
+ security_block :discovery_rules do
231
+ permission :view_discovery_rules, {
232
+ :discovery_rules => [:index, :show, :auto_complete_search, :welcome],
233
+ :"api/v2/discovery_rules" => [:index, :show]
234
+ }, :resource_type => 'DiscoveryRule'
235
+ permission :create_discovery_rules, {
236
+ :discovery_rules => [:new, :create, :clone],
237
+ :"api/v2/discovery_rules" => [:create]
238
+ }, :resource_type => 'DiscoveryRule'
239
+ permission :edit_discovery_rules, {
240
+ :discovery_rules => [:edit, :update, :enable, :disable],
241
+ :"api/v2/discovery_rules" => [:create, :update]
242
+ }, :resource_type => 'DiscoveryRule'
243
+ permission :execute_discovery_rules, {
244
+ :discovery_rules => [:auto_provision, :auto_provision_all],
245
+ :"api/v2/discovery_rules" => [:auto_provision, :auto_provision_all]
246
+ }, :resource_type => 'DiscoveryRule'
247
+ permission :destroy_discovery_rules, {
248
+ :discovery_rules => [:destroy],
249
+ :"api/v2/discovery_rules" => [:destroy]
250
+ }, :resource_type => 'DiscoveryRule'
251
+ end
258
252
 
259
- READER = [
260
- # core permissions
261
- :view_organizations,
262
- :view_locations,
263
- :view_hosts,
264
- # discovered_hosts
265
- :view_discovered_hosts,
266
- # discovered_rules
267
- :view_discovery_rules,
268
- ]
269
- MANAGER = READER + [
270
- # core permissions
271
- :create_hosts,
272
- :edit_hosts,
273
- :build_hosts,
274
- :assign_organizations,
275
- :assign_locations,
276
- :view_architectures,
277
- :view_domains,
278
- :view_hostgroups,
279
- :view_media,
280
- :view_models,
281
- :view_operatingsystems,
282
- :view_provisioning_templates,
283
- :view_ptables,
284
- :view_realms,
285
- :view_smart_proxies,
286
- :view_subnets,
287
- # discovered_hosts
288
- :submit_discovered_hosts,
289
- :provision_discovered_hosts,
290
- :auto_provision_discovered_hosts,
291
- :edit_discovered_hosts,
292
- :destroy_discovered_hosts,
293
- # discovered_rules
294
- :create_discovery_rules,
295
- :execute_discovery_rules,
296
- :edit_discovery_rules,
297
- :destroy_discovery_rules,
298
- ]
299
- if defined?(ForemanPuppet::Engine)
300
- MANAGER += [ :view_environments, :view_puppetclasses ]
253
+ READER = [
254
+ # core permissions
255
+ :view_organizations,
256
+ :view_locations,
257
+ :view_hosts,
258
+ # discovered_hosts
259
+ :view_discovered_hosts,
260
+ # discovered_rules
261
+ :view_discovery_rules,
262
+ ]
263
+ MANAGER = READER + [
264
+ # core permissions
265
+ :create_hosts,
266
+ :edit_hosts,
267
+ :build_hosts,
268
+ :assign_organizations,
269
+ :assign_locations,
270
+ :view_architectures,
271
+ :view_domains,
272
+ :view_hostgroups,
273
+ :view_media,
274
+ :view_models,
275
+ :view_operatingsystems,
276
+ :view_provisioning_templates,
277
+ :view_ptables,
278
+ :view_realms,
279
+ :view_smart_proxies,
280
+ :view_subnets,
281
+ # discovered_hosts
282
+ :submit_discovered_hosts,
283
+ :provision_discovered_hosts,
284
+ :auto_provision_discovered_hosts,
285
+ :edit_discovered_hosts,
286
+ :destroy_discovered_hosts,
287
+ # discovered_rules
288
+ :create_discovery_rules,
289
+ :execute_discovery_rules,
290
+ :edit_discovery_rules,
291
+ :destroy_discovery_rules,
292
+ ]
293
+ if defined?(ForemanPuppet::Engine)
294
+ MANAGER += [ :view_environments, :view_puppetclasses ]
295
+ end
296
+ role "Discovery Reader", READER, "Role granting permissions to view discovered hosts"
297
+ role "Discovery Manager", MANAGER, "Role granting permissions to perform provisioning of discovered hosts"
298
+
299
+ add_all_permissions_to_default_roles
300
+
301
+ # menu entries
302
+ menu :top_menu, :discovered_hosts, :url_hash => {:controller => :discovered_hosts, :action => :index},
303
+ :caption=> N_('Discovered Hosts'),
304
+ :parent => :hosts_menu,
305
+ :after=>:hosts
306
+
307
+ menu :top_menu, :discovery_rules, :url_hash => {:controller => :discovery_rules, :action => :index},
308
+ :caption => N_('Discovery Rules'),
309
+ :parent => :configure_menu,
310
+ :after=> :hostgroups
311
+
312
+ # strong parameters
313
+ parameter_filter Subnet, :discovery_id
314
+ parameter_filter Host::Managed, :discovery_rule_id
315
+ parameter_filter Hostgroup, :type, :discovery_rules => [], :discovery_rule_ids => [], :discovery_rule_names => []
316
+
317
+ # add dashboard widget
318
+ widget 'discovery_widget', :name=>N_('Discovered Hosts'), :sizex => 6, :sizey =>1
319
+
320
+ # apipie API documentation
321
+ # Only available in 1.8, otherwise it has to be in the initializer below
322
+ apipie_documented_controllers ["#{ForemanDiscovery::Engine.root}/app/controllers/api/v2/*.rb"]
323
+
324
+ # add discovery smart proxy to subnet
325
+ smart_proxy_for Subnet, :discovery,
326
+ :feature => 'Discovery',
327
+ :label => N_('Discovery Proxy'),
328
+ :description => N_('Discovery Proxy to use within this subnet for managing connection to discovered hosts'),
329
+ :api_description => N_('ID of Discovery Proxy to use within this subnet for managing connection to discovered hosts')
301
330
  end
302
- role "Discovery Reader", READER, "Role granting permissions to view discovered hosts"
303
- role "Discovery Manager", MANAGER, "Role granting permissions to perform provisioning of discovered hosts"
304
-
305
- add_all_permissions_to_default_roles
306
-
307
- # menu entries
308
- menu :top_menu, :discovered_hosts, :url_hash => {:controller => :discovered_hosts, :action => :index},
309
- :caption=> N_('Discovered Hosts'),
310
- :parent => :hosts_menu,
311
- :after=>:hosts
312
-
313
- menu :top_menu, :discovery_rules, :url_hash => {:controller => :discovery_rules, :action => :index},
314
- :caption => N_('Discovery Rules'),
315
- :parent => :configure_menu,
316
- :after=> :hostgroups
317
-
318
- # strong parameters
319
- parameter_filter Subnet, :discovery_id
320
- parameter_filter Host::Managed, :discovery_rule_id
321
- parameter_filter Hostgroup, :type, :discovery_rules => [], :discovery_rule_ids => [], :discovery_rule_names => []
322
-
323
- # add dashboard widget
324
- widget 'discovery_widget', :name=>N_('Discovered Hosts'), :sizex => 6, :sizey =>1
325
-
326
- # apipie API documentation
327
- # Only available in 1.8, otherwise it has to be in the initializer below
328
- apipie_documented_controllers ["#{ForemanDiscovery::Engine.root}/app/controllers/api/v2/*.rb"]
329
-
330
- # add discovery smart proxy to subnet
331
- smart_proxy_for Subnet, :discovery,
332
- :feature => 'Discovery',
333
- :label => N_('Discovery Proxy'),
334
- :description => N_('Discovery Proxy to use within this subnet for managing connection to discovered hosts'),
335
- :api_description => N_('ID of Discovery Proxy to use within this subnet for managing connection to discovered hosts')
336
331
  end
337
332
  end
338
333
 
@@ -1,3 +1,3 @@
1
1
  module ForemanDiscovery
2
- VERSION = "24.0.2"
2
+ VERSION = "25.0.0"
3
3
  end