foreman_puppet 1.0.3 → 2.0.0.alpha.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/foreman_puppet/extensions/api_hostgroups_controller.rb +14 -16
  3. data/app/controllers/concerns/foreman_puppet/{api/import_puppetclasses_common_controller.rb → extensions/api_smart_proxies_controller.rb} +9 -3
  4. data/app/controllers/concerns/foreman_puppet/extensions/api_template_combinations_controller.rb +23 -1
  5. data/app/controllers/concerns/foreman_puppet/extensions/api_v2_hosts_controller.rb +15 -17
  6. data/app/controllers/concerns/foreman_puppet/extensions/hostgroups_controller_extensions.rb +3 -1
  7. data/app/controllers/concerns/foreman_puppet/extensions/hosts_controller_extensions.rb +0 -1
  8. data/app/controllers/concerns/foreman_puppet/extensions/parameters_hostgroup.rb +2 -8
  9. data/app/controllers/foreman_puppet/api/v2/environments_controller.rb +0 -1
  10. data/app/controllers/foreman_puppet/puppetclasses_controller.rb +1 -1
  11. data/app/helpers/foreman_puppet/hosts_and_hostgroups_helper.rb +0 -5
  12. data/app/helpers/foreman_puppet/hosts_helper.rb +6 -10
  13. data/app/models/concerns/foreman_puppet/extensions/host.rb +2 -16
  14. data/app/models/concerns/foreman_puppet/extensions/hostgroup.rb +2 -7
  15. data/app/models/concerns/foreman_puppet/extensions/provisioning_template.rb +7 -12
  16. data/app/models/concerns/foreman_puppet/extensions/template_combination.rb +5 -10
  17. data/app/services/concerns/foreman_puppet/extensions/host_counter.rb +17 -0
  18. data/app/services/foreman_puppet/puppet_class_importer.rb +0 -6
  19. data/app/views/foreman_puppet/api/v2/host_puppet_facets/host_list.json.rabl +3 -0
  20. data/app/views/foreman_puppet/api/v2/hostgroup_puppet_facets/base.json.rabl +2 -0
  21. data/app/views/foreman_puppet/api/v2/hostgroup_puppet_facets/hostgroup_list.json.rabl +3 -0
  22. data/config/api_routes.rb +1 -9
  23. data/config/initializers/api_reroute.rb +73 -5
  24. data/db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb +1 -1
  25. data/db/migrate/20200803113803_migrate_environment_to_puppet_facet.foreman_puppet.rb +2 -0
  26. data/db/migrate/20210924103241_remove_katello_id_from_environments.foreman_puppet.rb +5 -0
  27. data/db/migrate_foreman/20090722141107_create_environments.rb +2 -2
  28. data/db/migrate_foreman/20090802062223_create_puppetclasses.rb +28 -0
  29. data/db/migrate_foreman/20090905150132_create_hostgroups_puppetclasses.rb +12 -0
  30. data/db/migrate_foreman/20110412103238_remove_unused_fields_from_puppet_classes.rb +9 -0
  31. data/db/migrate_foreman/20110712070522_create_host_class.rb +11 -0
  32. data/db/migrate_foreman/20120824142048_add_some_indexes.rb +14 -0
  33. data/db/migrate_foreman/20121018152459_create_hostgroup_classes.rb +11 -0
  34. data/db/migrate_foreman/20161205142618_delete_orphaned_smart_class_parameters.rb +1 -1
  35. data/db/migrate_foreman/20180816134832_cast_lookup_key_values.rb +1 -31
  36. data/db/migrate_foreman/20180831115634_add_uniqueness_to_puppetclass_name.rb +24 -0
  37. data/db/migrate_foreman/20181023112532_add_environment_puppetclass_id.rb +1 -1
  38. data/lib/foreman_puppet/engine.rb +6 -36
  39. data/lib/foreman_puppet/register.rb +16 -47
  40. data/lib/foreman_puppet/version.rb +1 -1
  41. data/lib/foreman_puppet.rb +1 -6
  42. data/locale/en/LC_MESSAGES/foreman_puppet.mo +0 -0
  43. data/locale/en/foreman_puppet.po +62 -8
  44. data/locale/foreman_puppet.pot +215 -133
  45. data/locale/gemspec.rb +1 -1
  46. data/package.json +8 -11
  47. data/test/controllers/foreman_puppet/api/v2/environments_controller_test.rb +0 -231
  48. data/test/controllers/foreman_puppet/api/v2/smart_proxies_controller_test.rb +255 -0
  49. data/test/controllers/foreman_puppet/environments_controller_test.rb +2 -2
  50. data/test/controllers/foreman_puppet/hosts_controller_test.rb +0 -1
  51. data/test/factories/foreman_puppet_factories.rb +0 -2
  52. data/test/integration/foreman_puppet/host_js_test.rb +0 -1
  53. data/test/integration/foreman_puppet/puppetclass_js_test.rb +1 -1
  54. data/test/models/foreman_puppet/host_test.rb +26 -0
  55. data/test/models/foreman_puppet/user_test.rb +1 -5
  56. data/test/services/foreman_puppet/host_counter_test.rb +17 -0
  57. data/test/unit/foreman_puppet/puppet_class_importer_test.rb +1 -1
  58. data/webpack/src/Components/Environments/Welcome.js +2 -2
  59. metadata +22 -7
@@ -7,11 +7,11 @@ import { foremanUrl, getManualURL } from 'foremanReact/common/helpers';
7
7
  export const WelcomeEnv = ({ canCreate }) => {
8
8
  const action = canCreate && {
9
9
  title: __('Create Puppet Environment'),
10
- url: foremanUrl('environments/new'),
10
+ url: foremanUrl('/foreman_puppet/environments/new'),
11
11
  };
12
12
 
13
13
  const content = __(`If you are planning to use Foreman as an external node classifier you should provide information about one or more environments.<br/>
14
- This information is commonly imported from a pre-existing Puppet configuration by the use of the <a href=${getManualURL(
14
+ This information is commonly imported from a pre-existing Puppet configuration by the use of the <a target="_blank" href=${getManualURL(
15
15
  '4.2.2Classes'
16
16
  )}>Puppet classes and environment importer.</a>`);
17
17
  return (
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 2.0.0.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr
@@ -9,9 +9,9 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-09-17 00:00:00.000000000 Z
12
+ date: 2021-10-14 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: Allow assigning Puppet environmets and classes to the Foreman Hosts.
14
+ description: Allow assigning Puppet environments and classes to the Foreman Hosts.
15
15
  email:
16
16
  - foreman-dev@googlegroups.com
17
17
  executables: []
@@ -22,10 +22,10 @@ files:
22
22
  - README.md
23
23
  - Rakefile
24
24
  - app/assets/stylesheets/foreman_puppet.scss
25
- - app/controllers/concerns/foreman_puppet/api/import_puppetclasses_common_controller.rb
26
25
  - app/controllers/concerns/foreman_puppet/environments_import.rb
27
26
  - app/controllers/concerns/foreman_puppet/extensions/api_base_controller.rb
28
27
  - app/controllers/concerns/foreman_puppet/extensions/api_hostgroups_controller.rb
28
+ - app/controllers/concerns/foreman_puppet/extensions/api_smart_proxies_controller.rb
29
29
  - app/controllers/concerns/foreman_puppet/extensions/api_template_combinations_controller.rb
30
30
  - app/controllers/concerns/foreman_puppet/extensions/api_v2_hosts_controller.rb
31
31
  - app/controllers/concerns/foreman_puppet/extensions/hostgroups_controller_extensions.rb
@@ -94,6 +94,7 @@ files:
94
94
  - app/models/foreman_puppet/puppetclass.rb
95
95
  - app/models/foreman_puppet/puppetclass_lookup_key.rb
96
96
  - app/prepend_views/api/v2/template_combinations/base.json.rabl
97
+ - app/services/concerns/foreman_puppet/extensions/host_counter.rb
97
98
  - app/services/foreman_puppet/host_info_providers/config_groups_info.rb
98
99
  - app/services/foreman_puppet/host_info_providers/puppet_info.rb
99
100
  - app/services/foreman_puppet/input_type/puppet_parameter_input.rb
@@ -112,9 +113,11 @@ files:
112
113
  - app/views/foreman_puppet/api/v2/environments/show.json.rabl
113
114
  - app/views/foreman_puppet/api/v2/environments/update.json.rabl
114
115
  - app/views/foreman_puppet/api/v2/host_puppet_facets/base.json.rabl
116
+ - app/views/foreman_puppet/api/v2/host_puppet_facets/host_list.json.rabl
115
117
  - app/views/foreman_puppet/api/v2/host_puppet_facets/host_single.json.rabl
116
118
  - app/views/foreman_puppet/api/v2/host_puppet_facets/show.json.rabl
117
119
  - app/views/foreman_puppet/api/v2/hostgroup_puppet_facets/base.json.rabl
120
+ - app/views/foreman_puppet/api/v2/hostgroup_puppet_facets/hostgroup_list.json.rabl
118
121
  - app/views/foreman_puppet/api/v2/hostgroup_puppet_facets/hostgroup_single.json.rabl
119
122
  - app/views/foreman_puppet/api/v2/hostgroup_puppet_facets/show.json.rabl
120
123
  - app/views/foreman_puppet/api/v2/import_puppetclasses/index.json.rabl
@@ -182,14 +185,22 @@ files:
182
185
  - db/migrate/20200803113803_migrate_environment_to_puppet_facet.foreman_puppet.rb
183
186
  - db/migrate/20200803113903_migrate_host_type_in_host_config_groups.foreman_puppet.rb
184
187
  - db/migrate/20201125113903_migrate_puppetclasses_to_facets.foreman_puppet.rb
188
+ - db/migrate/20210924103241_remove_katello_id_from_environments.foreman_puppet.rb
185
189
  - db/migrate_foreman/20090722141107_create_environments.rb
190
+ - db/migrate_foreman/20090802062223_create_puppetclasses.rb
191
+ - db/migrate_foreman/20090905150132_create_hostgroups_puppetclasses.rb
192
+ - db/migrate_foreman/20110412103238_remove_unused_fields_from_puppet_classes.rb
193
+ - db/migrate_foreman/20110712070522_create_host_class.rb
194
+ - db/migrate_foreman/20120824142048_add_some_indexes.rb
186
195
  - db/migrate_foreman/20120905095532_create_environment_classes.rb
196
+ - db/migrate_foreman/20121018152459_create_hostgroup_classes.rb
187
197
  - db/migrate_foreman/20140407161817_create_config_groups.rb
188
198
  - db/migrate_foreman/20140407162007_create_config_group_classes.rb
189
199
  - db/migrate_foreman/20140407162059_create_host_config_groups.rb
190
200
  - db/migrate_foreman/20161205142618_delete_orphaned_smart_class_parameters.rb
191
201
  - db/migrate_foreman/20170109115157_fix_lookup_key_auditable_type.rb
192
202
  - db/migrate_foreman/20180816134832_cast_lookup_key_values.rb
203
+ - db/migrate_foreman/20180831115634_add_uniqueness_to_puppetclass_name.rb
193
204
  - db/migrate_foreman/20181023112532_add_environment_puppetclass_id.rb
194
205
  - db/migrate_foreman/20181224174419_add_index_to_environment_class_by_lookup_key_and_puppetclass.rb
195
206
  - db/seeds.d/111_puppet_proxy_feature.rb
@@ -220,6 +231,7 @@ files:
220
231
  - test/controllers/foreman_puppet/api/v2/provisioning_templates_controller_test.rb
221
232
  - test/controllers/foreman_puppet/api/v2/puppetclasses_controller_test.rb
222
233
  - test/controllers/foreman_puppet/api/v2/smart_class_parameters_controller_test.rb
234
+ - test/controllers/foreman_puppet/api/v2/smart_proxies_controller_test.rb
223
235
  - test/controllers/foreman_puppet/api/v2/template_combinations_controller_test.rb
224
236
  - test/controllers/foreman_puppet/config_groups_controller_test.rb
225
237
  - test/controllers/foreman_puppet/environments_controller_test.rb
@@ -263,6 +275,7 @@ files:
263
275
  - test/models/foreman_puppet/report_test.rb
264
276
  - test/models/foreman_puppet/smart_proxy_test.rb
265
277
  - test/models/foreman_puppet/user_test.rb
278
+ - test/services/foreman_puppet/host_counter_test.rb
266
279
  - test/services/foreman_puppet/host_info_providers/config_groups_info_test.rb
267
280
  - test/services/foreman_puppet/host_info_providers/puppet_info_test.rb
268
281
  - test/services/foreman_puppet/input_type/puppet_parameter_input_test.rb
@@ -307,18 +320,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
307
320
  version: '0'
308
321
  required_rubygems_version: !ruby/object:Gem::Requirement
309
322
  requirements:
310
- - - ">="
323
+ - - ">"
311
324
  - !ruby/object:Gem::Version
312
- version: '0'
325
+ version: 1.3.1
313
326
  requirements: []
314
327
  rubygems_version: 3.1.6
315
328
  signing_key:
316
329
  specification_version: 4
317
- summary: Adds puppet ENC features
330
+ summary: Add Puppet features to Foreman
318
331
  test_files:
319
332
  - test/services/foreman_puppet/host_info_providers/config_groups_info_test.rb
320
333
  - test/services/foreman_puppet/host_info_providers/puppet_info_test.rb
321
334
  - test/services/foreman_puppet/input_type/puppet_parameter_input_test.rb
335
+ - test/services/foreman_puppet/host_counter_test.rb
322
336
  - test/integration/foreman_puppet/smartclass_parameter_js_test.rb
323
337
  - test/integration/foreman_puppet/puppetclass_js_test.rb
324
338
  - test/integration/foreman_puppet/hostgroup_js_test.rb
@@ -373,6 +387,7 @@ test_files:
373
387
  - test/controllers/foreman_puppet/api/v2/lookups_common_controller_test.rb
374
388
  - test/controllers/foreman_puppet/api/v2/host_classes_controller_test.rb
375
389
  - test/controllers/foreman_puppet/api/v2/provisioning_templates_controller_test.rb
390
+ - test/controllers/foreman_puppet/api/v2/smart_proxies_controller_test.rb
376
391
  - test/controllers/foreman_puppet/api/v2/puppetclasses_controller_test.rb
377
392
  - test/controllers/foreman_puppet/api/v2/hosts_controller_test.rb
378
393
  - test/controllers/foreman_puppet/puppetclasses_controller_test.rb