foreman_puppet 6.3.0 → 6.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/foreman_puppet/extensions/api_v2_registration_controller_extensions.rb +21 -0
  3. data/app/models/concerns/foreman_puppet/extensions/host_common.rb +1 -2
  4. data/lib/foreman_puppet/engine.rb +1 -0
  5. data/lib/foreman_puppet/version.rb +1 -1
  6. data/locale/en/foreman_puppet.edit.po +0 -1146
  7. data/test/models/foreman_puppet/host_test.rb +12 -0
  8. data/test/models/foreman_puppet/hostgroup_test.rb +12 -0
  9. data/webpack/src/foreman_class_edit.js +2 -2
  10. data/webpack/src/foreman_puppet_host_form.js +1 -1
  11. data/webpack/src/foreman_puppet_host_form.test.js +3 -4
  12. metadata +63 -99
  13. data/locale/ca/foreman_puppet.edit.po +0 -1150
  14. data/locale/ca/foreman_puppet.po.time_stamp +0 -0
  15. data/locale/cs_CZ/foreman_puppet.edit.po +0 -1155
  16. data/locale/cs_CZ/foreman_puppet.po.time_stamp +0 -0
  17. data/locale/de/foreman_puppet.edit.po +0 -1177
  18. data/locale/de/foreman_puppet.po.time_stamp +0 -0
  19. data/locale/en/foreman_puppet.po.time_stamp +0 -0
  20. data/locale/en_GB/foreman_puppet.edit.po +0 -1152
  21. data/locale/en_GB/foreman_puppet.po.time_stamp +0 -0
  22. data/locale/es/foreman_puppet.edit.po +0 -1161
  23. data/locale/es/foreman_puppet.po.time_stamp +0 -0
  24. data/locale/fr/foreman_puppet.edit.po +0 -1170
  25. data/locale/fr/foreman_puppet.po.time_stamp +0 -0
  26. data/locale/gl/foreman_puppet.edit.po +0 -1150
  27. data/locale/gl/foreman_puppet.po.time_stamp +0 -0
  28. data/locale/it/foreman_puppet.edit.po +0 -1155
  29. data/locale/it/foreman_puppet.po.time_stamp +0 -0
  30. data/locale/ja/foreman_puppet.edit.po +0 -1162
  31. data/locale/ja/foreman_puppet.po.time_stamp +0 -0
  32. data/locale/ka/foreman_puppet.edit.po +0 -1160
  33. data/locale/ka/foreman_puppet.po.time_stamp +0 -0
  34. data/locale/ko/foreman_puppet.edit.po +0 -1151
  35. data/locale/ko/foreman_puppet.po.time_stamp +0 -0
  36. data/locale/nl_NL/foreman_puppet.edit.po +0 -1155
  37. data/locale/nl_NL/foreman_puppet.po.time_stamp +0 -0
  38. data/locale/pl/foreman_puppet.edit.po +0 -1154
  39. data/locale/pl/foreman_puppet.po.time_stamp +0 -0
  40. data/locale/pt_BR/foreman_puppet.edit.po +0 -1159
  41. data/locale/pt_BR/foreman_puppet.po.time_stamp +0 -0
  42. data/locale/ru/foreman_puppet.edit.po +0 -1159
  43. data/locale/ru/foreman_puppet.po.time_stamp +0 -0
  44. data/locale/sv_SE/foreman_puppet.edit.po +0 -1154
  45. data/locale/sv_SE/foreman_puppet.po.time_stamp +0 -0
  46. data/locale/zh_CN/foreman_puppet.edit.po +0 -1163
  47. data/locale/zh_CN/foreman_puppet.po.time_stamp +0 -0
  48. data/locale/zh_TW/foreman_puppet.edit.po +0 -1153
  49. data/locale/zh_TW/foreman_puppet.po.time_stamp +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e161b4802d6cc5f5acb6f97ebb65ef7e556cc898310783255bbd1fc78c17bfaa
4
- data.tar.gz: 722849bb0bbdf4c4f88ab744cc33a6215f8b120f476f346f01bae6a7ff9a96c7
3
+ metadata.gz: d63691d998c91ff4d8b69d038ac37c63e5bdc657e895d97ae88f6832417b9434
4
+ data.tar.gz: 530b34760965f3d259f63546b952d97952b7a1277d6b38b6bc5a3b0065f7ab15
5
5
  SHA512:
6
- metadata.gz: 00fa6c3ff30a19e61af94d4e453bf21617a9bd8a238666ffdbbaf6ec4c950e630ae24b3beed89a9293b80d3c712a96d4800e485205e3db1084d0e97a4230e450
7
- data.tar.gz: eb581821d2ac896d0c4e4492cb46c62fa9de9c1ce0d40c37f1e0e5e3cb70d7adb918842f605ddfee901f9651adb072698a7b6396e6ac64c4ed7c0944346d8a08
6
+ metadata.gz: 18b306ec3e92e0579f7671b9194a37c90f28c1293a16b51ce7feb9ba3402a13fdfe384c616e8371446195140a2524343ef6d03336691f4aa92844298bcf01cd6
7
+ data.tar.gz: 92863444989b2a6f74e9bd49fbd6c6bee13db7f660ddc4dd744e45e9d91249cd2636c8e1f2498ba3b9fb73c4da3d32b959b4e87bc7b2b231e05ab3d89389b26a
@@ -0,0 +1,21 @@
1
+ module ForemanPuppet
2
+ module Extensions
3
+ module ApiV2RegistrationControllerExtensions
4
+ extend ActiveSupport::Concern
5
+
6
+ def host_setup_extension
7
+ if @host.hostgroup.present?
8
+ @host.puppet_proxy_id = @host.hostgroup.puppet_proxy_id if @host.puppet_proxy_id.nil? && @host.hostgroup.puppet_proxy_id.present?
9
+ @host.puppet_ca_proxy_id = @host.hostgroup.puppet_ca_proxy_id if @host.puppet_ca_proxy_id.nil? && @host.hostgroup.puppet_ca_proxy_id.present?
10
+
11
+ if @host.puppet.nil? && @host.hostgroup.puppet&.environment.present?
12
+ puppet = @host.puppet || @host.build_puppet
13
+ puppet.environment = @host.hostgroup.puppet&.environment
14
+ end
15
+ end
16
+
17
+ super
18
+ end
19
+ end
20
+ end
21
+ end
@@ -9,8 +9,7 @@ module ForemanPuppet
9
9
  end
10
10
 
11
11
  def puppetclasses
12
- return ForemanPuppet::Puppetclass.none unless puppet
13
- puppet.puppetclasses
12
+ (puppet || build_puppet).puppetclasses
14
13
  end
15
14
  end
16
15
  end
@@ -54,6 +54,7 @@ module ForemanPuppet
54
54
 
55
55
  ::Api::V2::BaseController.include ForemanPuppet::Extensions::ApiBaseController
56
56
  ::Api::V2::HostsController.include ForemanPuppet::Extensions::ApiV2HostsController
57
+ ::Api::V2::RegistrationController.prepend ForemanPuppet::Extensions::ApiV2RegistrationControllerExtensions
57
58
  ::Api::V2::HostgroupsController.include ForemanPuppet::Extensions::ApiHostgroupsController
58
59
  ::Api::V2::TemplateCombinationsController.include ForemanPuppet::Extensions::ApiTemplateCombinationsController
59
60
  ::Api::V2::HostsController.include ForemanPuppet::Extensions::ParametersHost
@@ -1,3 +1,3 @@
1
1
  module ForemanPuppet
2
- VERSION = '6.3.0'.freeze
2
+ VERSION = '6.4.0'.freeze
3
3
  end