katello 4.13.0 → 4.14.0.rc1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of katello might be problematic. Click here for more details.

Files changed (341) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/katello/hosts/host_and_hostgroup_edit.js +12 -8
  3. data/app/assets/javascripts/katello/locale/bn/katello.js +274 -22
  4. data/app/assets/javascripts/katello/locale/bn_IN/katello.js +274 -22
  5. data/app/assets/javascripts/katello/locale/ca/katello.js +274 -22
  6. data/app/assets/javascripts/katello/locale/cs/katello.js +274 -22
  7. data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +275 -23
  8. data/app/assets/javascripts/katello/locale/de/katello.js +280 -28
  9. data/app/assets/javascripts/katello/locale/de_AT/katello.js +274 -22
  10. data/app/assets/javascripts/katello/locale/de_DE/katello.js +274 -22
  11. data/app/assets/javascripts/katello/locale/el/katello.js +274 -22
  12. data/app/assets/javascripts/katello/locale/en/katello.js +274 -22
  13. data/app/assets/javascripts/katello/locale/en_GB/katello.js +274 -22
  14. data/app/assets/javascripts/katello/locale/en_US/katello.js +274 -22
  15. data/app/assets/javascripts/katello/locale/es/katello.js +276 -24
  16. data/app/assets/javascripts/katello/locale/et_EE/katello.js +274 -22
  17. data/app/assets/javascripts/katello/locale/fr/katello.js +283 -31
  18. data/app/assets/javascripts/katello/locale/gl/katello.js +274 -22
  19. data/app/assets/javascripts/katello/locale/gu/katello.js +274 -22
  20. data/app/assets/javascripts/katello/locale/he_IL/katello.js +274 -22
  21. data/app/assets/javascripts/katello/locale/hi/katello.js +274 -22
  22. data/app/assets/javascripts/katello/locale/id/katello.js +274 -22
  23. data/app/assets/javascripts/katello/locale/it/katello.js +274 -22
  24. data/app/assets/javascripts/katello/locale/ja/katello.js +283 -31
  25. data/app/assets/javascripts/katello/locale/ka/katello.js +280 -28
  26. data/app/assets/javascripts/katello/locale/kn/katello.js +274 -22
  27. data/app/assets/javascripts/katello/locale/ko/katello.js +274 -22
  28. data/app/assets/javascripts/katello/locale/ml_IN/katello.js +274 -22
  29. data/app/assets/javascripts/katello/locale/mr/katello.js +274 -22
  30. data/app/assets/javascripts/katello/locale/nl_NL/katello.js +274 -22
  31. data/app/assets/javascripts/katello/locale/or/katello.js +274 -22
  32. data/app/assets/javascripts/katello/locale/pa/katello.js +274 -22
  33. data/app/assets/javascripts/katello/locale/pl/katello.js +274 -22
  34. data/app/assets/javascripts/katello/locale/pl_PL/katello.js +274 -22
  35. data/app/assets/javascripts/katello/locale/pt/katello.js +274 -22
  36. data/app/assets/javascripts/katello/locale/pt_BR/katello.js +276 -24
  37. data/app/assets/javascripts/katello/locale/ro/katello.js +274 -22
  38. data/app/assets/javascripts/katello/locale/ro_RO/katello.js +274 -22
  39. data/app/assets/javascripts/katello/locale/ru/katello.js +274 -22
  40. data/app/assets/javascripts/katello/locale/sl/katello.js +274 -22
  41. data/app/assets/javascripts/katello/locale/sv_SE/katello.js +274 -22
  42. data/app/assets/javascripts/katello/locale/ta/katello.js +274 -22
  43. data/app/assets/javascripts/katello/locale/ta_IN/katello.js +274 -22
  44. data/app/assets/javascripts/katello/locale/te/katello.js +274 -22
  45. data/app/assets/javascripts/katello/locale/tr/katello.js +274 -22
  46. data/app/assets/javascripts/katello/locale/vi/katello.js +274 -22
  47. data/app/assets/javascripts/katello/locale/vi_VN/katello.js +274 -22
  48. data/app/assets/javascripts/katello/locale/zh/katello.js +274 -22
  49. data/app/assets/javascripts/katello/locale/zh_CN/katello.js +283 -31
  50. data/app/assets/javascripts/katello/locale/zh_TW/katello.js +274 -22
  51. data/app/controllers/katello/api/registry/registry_proxies_controller.rb +118 -74
  52. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +15 -2
  53. data/app/controllers/katello/api/v2/activation_keys_controller.rb +1 -1
  54. data/app/controllers/katello/api/v2/api_controller.rb +7 -0
  55. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +4 -4
  56. data/app/controllers/katello/api/v2/debs_controller.rb +3 -2
  57. data/app/controllers/katello/api/v2/environments_controller.rb +2 -4
  58. data/app/controllers/katello/api/v2/host_contents_controller.rb +8 -3
  59. data/app/controllers/katello/api/v2/host_errata_controller.rb +4 -4
  60. data/app/controllers/katello/api/v2/host_packages_controller.rb +2 -2
  61. data/app/controllers/katello/api/v2/organizations_controller.rb +1 -1
  62. data/app/controllers/katello/api/v2/packages_controller.rb +13 -3
  63. data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +6 -2
  64. data/app/controllers/katello/api/v2/repositories_controller.rb +3 -4
  65. data/app/controllers/katello/api/v2/repository_sets_controller.rb +13 -14
  66. data/app/controllers/katello/api/v2/subscriptions_controller.rb +15 -9
  67. data/app/controllers/katello/api/v2/sync_controller.rb +2 -2
  68. data/app/controllers/katello/application_controller.rb +1 -1
  69. data/app/controllers/katello/concerns/api/v2/authorization.rb +3 -2
  70. data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +28 -0
  71. data/app/controllers/katello/concerns/api/v2/registration_commands_controller_extensions.rb +1 -1
  72. data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +4 -3
  73. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +2 -4
  74. data/app/controllers/katello/remote_execution_controller.rb +53 -58
  75. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +19 -2
  76. data/app/helpers/katello/katello_urls_helper.rb +1 -1
  77. data/app/lib/actions/katello/alternate_content_source/alternate_content_source_common.rb +1 -1
  78. data/app/lib/actions/katello/alternate_content_source/update.rb +2 -1
  79. data/app/lib/actions/katello/capsule_content/verify_checksum.rb +1 -2
  80. data/app/lib/actions/katello/content_view/publish.rb +1 -0
  81. data/app/lib/actions/katello/content_view_version/create_repos.rb +1 -0
  82. data/app/lib/actions/katello/content_view_version/incremental_update.rb +3 -2
  83. data/app/lib/actions/katello/environment/{publish_repositories.rb → publish_container_repositories.rb} +10 -8
  84. data/app/lib/actions/katello/foreman/content_update.rb +4 -6
  85. data/app/lib/actions/katello/host/hypervisors_update.rb +6 -4
  86. data/app/lib/actions/katello/repository/create.rb +4 -4
  87. data/app/lib/actions/katello/repository/discover.rb +11 -4
  88. data/app/lib/actions/katello/repository/import_upload.rb +4 -6
  89. data/app/lib/actions/katello/repository/metadata_generate.rb +1 -0
  90. data/app/lib/actions/katello/repository/update.rb +3 -3
  91. data/app/lib/actions/katello/repository_set/enable_repository.rb +5 -6
  92. data/app/lib/actions/middleware/backend_services_check.rb +3 -2
  93. data/app/lib/actions/pulp3/abstract_async_task.rb +2 -4
  94. data/app/lib/actions/pulp3/capsule_content/verify_checksum.rb +1 -2
  95. data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +5 -1
  96. data/app/lib/actions/pulp3/orchestration/repository/delete.rb +5 -2
  97. data/app/lib/actions/pulp3/repository/create_publication.rb +4 -0
  98. data/app/lib/actions/pulp3/repository/save_version.rb +3 -5
  99. data/app/lib/katello/concerns/base_template_scope_extensions.rb +5 -9
  100. data/app/lib/katello/errors.rb +1 -0
  101. data/app/lib/katello/http_resource.rb +1 -0
  102. data/app/lib/katello/lazy_accessor.rb +1 -1
  103. data/app/lib/katello/repo_discovery.rb +4 -190
  104. data/app/lib/katello/resources/candlepin/candlepin_ping.rb +0 -5
  105. data/app/lib/katello/resources/candlepin/owner.rb +1 -1
  106. data/app/lib/katello/resources/candlepin/pool.rb +1 -2
  107. data/app/lib/katello/resources/candlepin/upstream_job.rb +1 -1
  108. data/app/lib/katello/resources/cdn.rb +3 -2
  109. data/app/lib/katello/resources/discovery/container.rb +127 -0
  110. data/app/lib/katello/resources/discovery/yum.rb +95 -0
  111. data/app/lib/katello/util/cdn_var_substitutor.rb +5 -3
  112. data/app/lib/katello/util/data.rb +3 -2
  113. data/app/lib/katello/util/errata.rb +4 -3
  114. data/app/lib/katello/util/package.rb +3 -3
  115. data/app/lib/katello/util/path_with_substitutions.rb +1 -1
  116. data/app/lib/katello/util/report_table.rb +3 -2
  117. data/app/lib/katello/util/url_matcher.rb +1 -1
  118. data/app/lib/katello/validators/alternate_content_source_path_validator.rb +4 -3
  119. data/app/lib/katello/validators/alternate_content_source_products_validator.rb +5 -7
  120. data/app/lib/katello/validators/container_image_name_validator.rb +1 -1
  121. data/app/lib/katello/validators/katello_name_format_validator.rb +2 -2
  122. data/app/lib/katello/validators/no_trailing_space_validator.rb +2 -2
  123. data/app/lib/katello/validators/prior_validator.rb +2 -2
  124. data/app/lib/katello/validators/product_unique_attribute_validator.rb +2 -4
  125. data/app/models/katello/activation_key.rb +4 -6
  126. data/app/models/katello/alternate_content_source.rb +1 -1
  127. data/app/models/katello/authorization/host_tracer.rb +1 -2
  128. data/app/models/katello/candlepin/repository_mapper.rb +2 -2
  129. data/app/models/katello/concerns/host_managed_extensions.rb +41 -10
  130. data/app/models/katello/concerns/hostgroup_extensions.rb +2 -4
  131. data/app/models/katello/concerns/location_extensions.rb +2 -4
  132. data/app/models/katello/concerns/operatingsystem_extensions.rb +84 -16
  133. data/app/models/katello/concerns/smart_proxy_extensions.rb +4 -4
  134. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +2 -0
  135. data/app/models/katello/content_view.rb +5 -1
  136. data/app/models/katello/content_view_environment.rb +19 -4
  137. data/app/models/katello/content_view_environment_content_facet.rb +11 -0
  138. data/app/models/katello/erratum.rb +1 -1
  139. data/app/models/katello/event.rb +1 -1
  140. data/app/models/katello/glue/provider.rb +1 -2
  141. data/app/models/katello/hash_util.rb +1 -1
  142. data/app/models/katello/host/content_facet.rb +16 -3
  143. data/app/models/katello/host/subscription_facet.rb +27 -4
  144. data/app/models/katello/host_collection.rb +12 -8
  145. data/app/models/katello/pool.rb +5 -1
  146. data/app/models/katello/product.rb +7 -4
  147. data/app/models/katello/provider.rb +1 -2
  148. data/app/models/katello/repository.rb +18 -4
  149. data/app/models/katello/root_repository.rb +29 -0
  150. data/app/models/katello/rpm.rb +2 -2
  151. data/app/models/katello/subscription_facet_pool.rb +1 -1
  152. data/app/models/katello/sync_plan.rb +5 -4
  153. data/app/models/katello/task_status.rb +18 -18
  154. data/app/presenters/katello/product_host_count_presenter.rb +10 -0
  155. data/app/services/katello/candlepin/consumer.rb +11 -11
  156. data/app/services/katello/candlepin/message_handler.rb +3 -2
  157. data/app/services/katello/content_unit_indexer.rb +6 -0
  158. data/app/services/katello/pulp3/alternate_content_source.rb +1 -3
  159. data/app/services/katello/pulp3/api/core.rb +1 -1
  160. data/app/services/katello/pulp3/api/docker.rb +10 -0
  161. data/app/services/katello/pulp3/content_view_version/export.rb +1 -0
  162. data/app/services/katello/pulp3/content_view_version/import.rb +6 -4
  163. data/app/services/katello/pulp3/content_view_version/importable_products.rb +1 -3
  164. data/app/services/katello/pulp3/repository/apt.rb +4 -16
  165. data/app/services/katello/pulp3/repository/yum.rb +9 -5
  166. data/app/services/katello/pulp3/repository.rb +2 -2
  167. data/app/services/katello/pulp3/repository_mirror.rb +2 -9
  168. data/app/services/katello/pulp3/task.rb +4 -2
  169. data/app/services/katello/registration_manager.rb +13 -3
  170. data/app/services/katello/repository_type.rb +1 -1
  171. data/app/services/katello/smart_proxy_helper.rb +1 -0
  172. data/app/views/dashboard/_host_collection_widget.html.erb +5 -4
  173. data/app/views/foreman/job_templates/install_errata.erb +2 -0
  174. data/app/views/foreman/job_templates/install_errata_-_katello_ansible_default.erb +2 -0
  175. data/app/views/foreman/job_templates/install_errata_by_search_query.erb +2 -0
  176. data/app/views/foreman/job_templates/install_errata_by_search_query_-_katello_ansible_default.erb +3 -1
  177. data/app/views/foreman/job_templates/install_packages_by_search_query_-_katello_ansible_default.erb +1 -1
  178. data/app/views/foreman/job_templates/remove_packages_by_search_query_-_katello_ansible_default.erb +2 -2
  179. data/app/views/foreman/job_templates/resolve_traces.erb +5 -1
  180. data/app/views/foreman/job_templates/update_packages_by_search_query_-_katello_ansible_default.erb +1 -1
  181. data/app/views/foreman/job_templates/upload_profile.erb +2 -0
  182. data/app/views/foreman/smart_proxies/_reclaim_space.html.erb +7 -5
  183. data/app/views/katello/api/v2/content_facet/base.json.rabl +18 -2
  184. data/app/views/katello/api/v2/packages/thindex.json.rabl +6 -0
  185. data/app/views/katello/api/v2/repositories/show.json.rabl +8 -8
  186. data/app/views/katello/api/v2/repository_sets/show.json.rabl +1 -1
  187. data/app/views/katello/api/v2/subscription_facet/base.json.rabl +1 -1
  188. data/app/views/katello/api/v2/subscriptions/index.json.rabl +1 -0
  189. data/app/views/katello/api/v2/subscriptions/show.json.rabl +1 -0
  190. data/app/views/overrides/activation_keys/_host_environment_select.html.erb +14 -11
  191. data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +4 -4
  192. data/config/initializers/monkeys.rb +0 -1
  193. data/config/routes/api/v2.rb +3 -1
  194. data/config/routes.rb +1 -3
  195. data/db/migrate/20160114200145_add_mirror_on_sync_to_repositories.rb +1 -0
  196. data/db/migrate/20160131182301_add_download_policy_to_katello_repositories.rb +1 -0
  197. data/db/migrate/20210119162528_delete_puppet_and_ostree_repos.rb +3 -0
  198. data/db/migrate/20240522165308_add_priority_to_content_view_environment_content_facet.rb +5 -0
  199. data/db/migrate/20240621121212_katello_repository_debs_id_bigint.rb +6 -0
  200. data/db/migrate/20240729192228_add_convert2rhel_to_host_facets.rb +9 -0
  201. data/db/seeds.d/102-organizations.rb +5 -7
  202. data/db/seeds.d/150-module_job_templates.rb +7 -9
  203. data/db/seeds.d/75-job_templates.rb +9 -16
  204. data/engines/bastion_katello/README.md +3 -0
  205. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +3 -3
  206. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb-info.html +6 -6
  207. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-content-hosts.html +2 -2
  208. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +4 -4
  209. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/package-info.html +6 -6
  210. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +31 -27
  211. data/engines/bastion_katello/lib/bastion_katello/engine.rb +2 -2
  212. data/lib/katello/engine.rb +1 -8
  213. data/lib/katello/permission_creator.rb +3 -2
  214. data/lib/katello/plugin.rb +31 -27
  215. data/lib/katello/repository_types/docker.rb +1 -0
  216. data/lib/katello/repository_types/yum.rb +1 -0
  217. data/lib/katello/tasks/clean_old_file_repos.rake +2 -4
  218. data/lib/katello/tasks/reset.rake +3 -4
  219. data/lib/katello/version.rb +1 -1
  220. data/lib/katello.rb +0 -4
  221. data/lib/monkeys/ar_postgres_evr_t.rb +2 -0
  222. data/locale/action_names.rb +1 -1
  223. data/locale/bn/LC_MESSAGES/katello.mo +0 -0
  224. data/locale/bn/katello.po +274 -22
  225. data/locale/bn_IN/katello.po +274 -22
  226. data/locale/ca/katello.po +274 -22
  227. data/locale/cs/katello.po +274 -22
  228. data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
  229. data/locale/cs_CZ/katello.po +275 -23
  230. data/locale/de/LC_MESSAGES/katello.mo +0 -0
  231. data/locale/de/katello.po +280 -28
  232. data/locale/de_AT/katello.po +274 -22
  233. data/locale/de_DE/katello.po +274 -22
  234. data/locale/el/katello.po +274 -22
  235. data/locale/en/katello.po +274 -22
  236. data/locale/en_GB/katello.po +274 -22
  237. data/locale/en_US/katello.po +274 -22
  238. data/locale/es/LC_MESSAGES/katello.mo +0 -0
  239. data/locale/es/katello.po +276 -24
  240. data/locale/et_EE/katello.po +274 -22
  241. data/locale/fr/LC_MESSAGES/katello.mo +0 -0
  242. data/locale/fr/katello.po +283 -31
  243. data/locale/gl/katello.po +274 -22
  244. data/locale/gu/katello.po +274 -22
  245. data/locale/he_IL/katello.po +274 -22
  246. data/locale/hi/katello.po +274 -22
  247. data/locale/id/katello.po +274 -22
  248. data/locale/it/LC_MESSAGES/katello.mo +0 -0
  249. data/locale/it/katello.po +274 -22
  250. data/locale/ja/LC_MESSAGES/katello.mo +0 -0
  251. data/locale/ja/katello.po +283 -31
  252. data/locale/ka/LC_MESSAGES/katello.mo +0 -0
  253. data/locale/ka/katello.po +280 -28
  254. data/locale/katello.pot +1001 -527
  255. data/locale/kn/katello.po +274 -22
  256. data/locale/ko/LC_MESSAGES/katello.mo +0 -0
  257. data/locale/ko/katello.po +274 -22
  258. data/locale/ml_IN/katello.po +274 -22
  259. data/locale/mr/katello.po +274 -22
  260. data/locale/nl_NL/katello.po +274 -22
  261. data/locale/or/katello.po +274 -22
  262. data/locale/pa/katello.po +274 -22
  263. data/locale/pl/katello.po +274 -22
  264. data/locale/pl_PL/katello.po +274 -22
  265. data/locale/pt/katello.po +274 -22
  266. data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
  267. data/locale/pt_BR/katello.po +276 -24
  268. data/locale/ro/katello.po +274 -22
  269. data/locale/ro_RO/katello.po +274 -22
  270. data/locale/ru/LC_MESSAGES/katello.mo +0 -0
  271. data/locale/ru/katello.po +274 -22
  272. data/locale/sl/katello.po +274 -22
  273. data/locale/sv_SE/katello.po +274 -22
  274. data/locale/ta/LC_MESSAGES/katello.mo +0 -0
  275. data/locale/ta/katello.po +274 -22
  276. data/locale/ta_IN/katello.po +274 -22
  277. data/locale/te/katello.po +274 -22
  278. data/locale/tr/katello.po +274 -22
  279. data/locale/vi/katello.po +274 -22
  280. data/locale/vi_VN/katello.po +274 -22
  281. data/locale/zh/katello.po +274 -22
  282. data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
  283. data/locale/zh_CN/katello.po +283 -31
  284. data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
  285. data/locale/zh_TW/katello.po +274 -22
  286. data/webpack/ForemanColumnExtensions/index.js +44 -1
  287. data/webpack/components/Table/TableWrapper.js +6 -0
  288. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.js +24 -3
  289. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +124 -56
  290. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/HostContentViewActions.js +2 -3
  291. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/contentViewDetailsCard.test.js +44 -10
  292. data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +75 -31
  293. data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionConstants.js +1 -0
  294. data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionHooks.js +1 -1
  295. data/webpack/components/extensions/HostDetails/Tabs/customizedRexUrlHelpers.js +22 -7
  296. data/webpack/components/extensions/Hosts/ActionsBar/ActionsBar.scss +14 -0
  297. data/webpack/components/extensions/Hosts/ActionsBar/index.js +82 -23
  298. data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCVModal/index.js +5 -2
  299. data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/02_BulkErrataTable.js +171 -0
  300. data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/04_Review.js +160 -0
  301. data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/04_ReviewFooter.js +99 -0
  302. data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/BulkErrataWizard.js +157 -0
  303. data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/index.js +24 -0
  304. data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/02_BulkPackagesTable.js +157 -0
  305. data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/04_Review.js +168 -0
  306. data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/04_ReviewFooter.js +141 -0
  307. data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/BulkPackagesWizard.js +252 -0
  308. data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/index.js +24 -0
  309. data/webpack/components/extensions/Hosts/BulkActions/HostReview.js +176 -0
  310. data/webpack/components/extensions/Hosts/TableRowActions/index.js +17 -0
  311. data/webpack/global_index.js +11 -3
  312. data/webpack/redux/actions/RedHatRepositories/repositorySetRepositories.js +5 -6
  313. data/webpack/redux/reducers/RedHatRepositories/__tests__/repositorySetRepositories.test.js +1 -1
  314. data/webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.js +1 -1
  315. data/webpack/scenes/ContentViews/Copy/CopyContentViewModal.js +2 -1
  316. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +2 -1
  317. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewBulkAddModal.js +2 -1
  318. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +2 -1
  319. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +2 -1
  320. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +2 -2
  321. data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +2 -1
  322. data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +3 -2
  323. data/webpack/scenes/ContentViews/Publish/PublishContentViewWizard.js +2 -1
  324. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +2 -1
  325. data/webpack/scenes/ContentViews/components/CVBreadCrumb.js +2 -1
  326. data/webpack/scenes/ContentViews/components/ContentViewSelect/ContentViewSelectOption.js +2 -2
  327. data/webpack/scenes/Subscriptions/Details/SubscriptionAttributes.js +1 -0
  328. data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailInfo.test.js.snap +10 -0
  329. data/webpack/scenes/Subscriptions/SubscriptionConstants.js +6 -0
  330. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +2 -0
  331. data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +14 -0
  332. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +1 -0
  333. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +10 -0
  334. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.fixtures.js +1 -0
  335. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/__snapshots__/SubscriptionsToolbar.test.js.snap +10 -0
  336. data/webpack/scenes/Tasks/helpers.js +1 -1
  337. metadata +49 -29
  338. data/app/assets/javascripts/katello/containers/container.js +0 -304
  339. data/db/migrate/20240531193030_remove_sha1_repository_checksum_type.rb +0 -10
  340. data/lib/monkeys/anemone.rb +0 -33
  341. data/webpack/utils/useKatelloDocUrl.js +0 -18
@@ -136,26 +136,26 @@ module Katello
136
136
  def self.distribution_to_puppet_os(name)
137
137
  return ::Operatingsystem::REDHAT_ATOMIC_HOST_OS if name == ::Operatingsystem::REDHAT_ATOMIC_HOST_DISTRO_NAME
138
138
 
139
- name = name.downcase
140
- if name =~ /red\s*hat/
139
+ case name.downcase
140
+ when /red\s*hat/
141
141
  'RedHat'
142
- elsif name =~ /centos/
142
+ when /centos/
143
143
  'CentOS'
144
- elsif name =~ /fedora/
144
+ when /fedora/
145
145
  'Fedora'
146
- elsif name =~ /sles/ || name =~ /suse.*enterprise.*/
146
+ when /sles/, /suse.*enterprise.*/
147
147
  'SLES'
148
- elsif name =~ /debian/
148
+ when /debian/
149
149
  'Debian'
150
- elsif name =~ /ubuntu/
150
+ when /ubuntu/
151
151
  'Ubuntu'
152
- elsif name =~ /oracle/
152
+ when /oracle/
153
153
  'OracleLinux'
154
- elsif name =~ /almalinux/
154
+ when /almalinux/
155
155
  'AlmaLinux'
156
- elsif name =~ /rocky/
156
+ when /rocky/
157
157
  'Rocky'
158
- elsif name =~ /amazon/
158
+ when /amazon/
159
159
  'Amazon'
160
160
  else
161
161
  'Unknown'
@@ -43,9 +43,10 @@ module Katello
43
43
  end
44
44
 
45
45
  def pool_id
46
- if subject == 'pool.created' || subject == 'pool.deleted'
46
+ case subject
47
+ when 'pool.created', 'pool.deleted'
47
48
  content['entityId']
48
- elsif subject == 'entitlement.created' || subject == 'entitlement.deleted'
49
+ when 'entitlement.created', 'entitlement.deleted'
49
50
  content['referenceId']
50
51
  end
51
52
  end
@@ -38,6 +38,12 @@ module Katello
38
38
  end
39
39
  end
40
40
 
41
+ # Even after this bug (https://github.com/pulp/pulp_rpm/issues/2821) is fixed,
42
+ # it is possible to have duplicate errata asosociated to a repo.
43
+ if @content_type.label == 'erratum'
44
+ to_insert.uniq! { |row| row["pulp_id"] || row[:pulp_id] }
45
+ end
46
+
41
47
  next if to_insert.empty?
42
48
  insert_timestamps(to_insert)
43
49
  if @content_type.mutable
@@ -3,9 +3,7 @@ module Katello
3
3
  module Pulp3
4
4
  class AlternateContentSource
5
5
  include Katello::Pulp3::ServiceCommon
6
- attr_accessor :acs
7
- attr_accessor :smart_proxy
8
- attr_accessor :repository
6
+ attr_accessor :acs, :smart_proxy, :repository
9
7
 
10
8
  def initialize(acs, smart_proxy, repository = nil)
11
9
  @acs = acs
@@ -264,7 +264,7 @@ module Katello
264
264
  (response.count && (page_opts['offset'] < response.count)) ||
265
265
  page_opts["offset"] == 0)
266
266
  response = yield page_opts
267
- results = results.concat(response.results)
267
+ results.concat(response.results)
268
268
  page_opts[:offset] += page_size
269
269
  end
270
270
 
@@ -19,6 +19,16 @@ module Katello
19
19
  def container_push_api
20
20
  PulpContainerClient::RepositoriesContainerPushApi.new(api_client)
21
21
  end
22
+
23
+ def container_push_repo_for_name(name)
24
+ # There should be only one repository in Pulp with the requested name
25
+ container_push_api.list(name: name)&.results&.first
26
+ end
27
+
28
+ def container_push_distribution_for_repository(repository_href)
29
+ # There should be only one repository in Pulp with the requested repository_href
30
+ distributions_api.list(repository: repository_href)&.results&.first
31
+ end
22
32
  end
23
33
  end
24
34
  end
@@ -8,6 +8,7 @@ module Katello
8
8
  FORMATS = [SYNCABLE, IMPORTABLE].freeze
9
9
 
10
10
  attr_reader :smart_proxy, :content_view_version, :destination_server, :from_content_view_version, :repository, :base_path
11
+
11
12
  def self.create(options)
12
13
  if options.delete(:format) == SYNCABLE
13
14
  SyncableFormatExport.new(**options)
@@ -107,9 +107,10 @@ module Katello
107
107
  end
108
108
 
109
109
  def import_cv_name_from_export(name:, generated_for:)
110
- if generated_for == :library_import
110
+ case generated_for
111
+ when :library_import
111
112
  ::Katello::ContentView::IMPORT_LIBRARY
112
- elsif generated_for == :repository_import
113
+ when :repository_import
113
114
  name.gsub(/^Export/, 'Import')
114
115
  else
115
116
  name
@@ -138,9 +139,10 @@ module Katello
138
139
  }
139
140
  end
140
141
 
141
- if generated_for == :library_export
142
+ case generated_for
143
+ when :library_export
142
144
  generated_for = :library_import
143
- elsif generated_for == :repository_export
145
+ when :repository_export
144
146
  generated_for = :repository_import
145
147
  end
146
148
 
@@ -54,12 +54,10 @@ module Katello
54
54
  end
55
55
 
56
56
  def update_params(metadata_product)
57
- params = {
57
+ {
58
58
  gpg_key_id: gpg_key_id(metadata_product),
59
59
  description: metadata_product.description
60
60
  }
61
-
62
- params
63
61
  end
64
62
 
65
63
  def gpg_key_id(metadata_product)
@@ -51,16 +51,6 @@ module Katello
51
51
  popts
52
52
  end
53
53
 
54
- def mirror_publication_options
55
- {
56
- # Since we are synchronizing the "default" distribution from the simple publisher on the server,
57
- # it will be included in the structured publish. Therefore, we MUST NOT use the simple publisher
58
- # on the proxy, since this would collide!
59
- #simple: true,
60
- structured: true # publish real suites (e.g. 'stable')
61
- }
62
- end
63
-
64
54
  def distribution_options(path)
65
55
  {
66
56
  base_path: path,
@@ -87,12 +77,10 @@ module Katello
87
77
  # Not needed during incremental update due to dest_base_version
88
78
  # -> Unless incrementally updating a CV repo that is a soft copy of its library instance.
89
79
  # -> I.e. no filters and not an incremental version.
90
- unless dest_repo_id_map[:base_version]
91
- # Don't perform extra content actions if the repo is a soft copy of its library instance.
92
- # Taken care of by the IncrementalUpdate action.
93
- unless dest_repo.soft_copy_of_library?
94
- tasks << remove_all_content_from_repo(dest_repo_href)
95
- end
80
+ # Don't perform extra content actions if the repo is a soft copy of its library instance.
81
+ # Taken care of by the IncrementalUpdate action.
82
+ if !dest_repo_id_map[:base_version] && !dest_repo.soft_copy_of_library?
83
+ tasks << remove_all_content_from_repo(dest_repo_href)
96
84
  end
97
85
  source_repo_ids.each do |source_repo_id|
98
86
  source_repo_version = ::Katello::Repository.find(source_repo_id).version_href
@@ -22,7 +22,13 @@ module Katello
22
22
 
23
23
  def publication_options(repository_version)
24
24
  options = super(repository_version)
25
- options.merge(checksum_type: root.checksum_type)
25
+ # To work around https://projects.theforeman.org/issues/37715
26
+ checksum_type = if root.checksum_type.nil?
27
+ 'sha256'
28
+ else
29
+ root.checksum_type
30
+ end
31
+ options.merge(checksum_type: checksum_type)
26
32
  end
27
33
 
28
34
  def specific_create_options
@@ -57,10 +63,8 @@ module Katello
57
63
  :distribution_family => distribution.results.first.release_name,
58
64
  :distribution_bootable => self.class.distribution_bootable?(distribution)
59
65
  )
60
- unless distribution.results.first.variants.empty?
61
- unless distribution.results.first.variants.first.name.nil?
62
- repo.update!(:distribution_variant => distribution.results.first.variants.map(&:name).join(','))
63
- end
66
+ if !distribution.results.first.variants.empty? && !distribution.results.first.variants.first.name.nil?
67
+ repo.update!(:distribution_variant => distribution.results.first.variants.map(&:name).join(','))
64
68
  end
65
69
  end
66
70
  end
@@ -5,8 +5,8 @@ module Katello
5
5
  class Repository
6
6
  include Katello::Util::HttpProxy
7
7
  include Katello::Pulp3::ServiceCommon
8
- attr_accessor :repo
9
- attr_accessor :smart_proxy
8
+ attr_accessor :repo, :smart_proxy
9
+
10
10
  delegate :root, to: :repo
11
11
  delegate :pulp3_api, to: :smart_proxy
12
12
 
@@ -2,6 +2,7 @@ module Katello
2
2
  module Pulp3
3
3
  class RepositoryMirror
4
4
  attr_accessor :repo_service
5
+
5
6
  delegate :repo, to: :repo_service
6
7
  delegate :smart_proxy, to: :repo_service
7
8
 
@@ -166,21 +167,13 @@ module Katello
166
167
  uri.to_s
167
168
  end
168
169
 
169
- def publication_options(repository_version)
170
- popts = {repository_version: repository_version}
171
- if (type_specific_options = repo_service.try(:mirror_publication_options))
172
- popts.merge!(type_specific_options)
173
- end
174
- popts
175
- end
176
-
177
170
  def create_publication
178
171
  if (href = version_href)
179
172
  if repo_service.repo.content_type == "deb"
180
173
  publication_data = api.publication_verbatim_class.new({repository_version: href})
181
174
  api.publications_verbatim_api.create(publication_data)
182
175
  else
183
- publication_data = api.publication_class.new(publication_options(href))
176
+ publication_data = api.publication_class.new(repository_version: href)
184
177
  api.publications_api.create(publication_data)
185
178
  end
186
179
  end
@@ -39,6 +39,7 @@ module Katello
39
39
  #needed for serialization in dynflow
40
40
 
41
41
  attr_reader :pulp_data
42
+
42
43
  delegate :[], :key?, :dig, :to_hash, :to => :task_data
43
44
 
44
45
  def initialize(smart_proxy, data)
@@ -105,9 +106,10 @@ module Katello
105
106
  end
106
107
 
107
108
  def error
108
- if task_data[:state] == CANCELED
109
+ case task_data[:state]
110
+ when CANCELED
109
111
  _("Task canceled")
110
- elsif task_data[:state] == FAILED
112
+ when FAILED
111
113
  if task_data[:error][:description].blank?
112
114
  _("Pulp task error")
113
115
  else
@@ -125,9 +125,11 @@ module Katello
125
125
  # * organization_destroy: destroy some data associated with host, but
126
126
  # leave items alone that will be removed later as part of org destroy
127
127
  # * unregistering: unregister the host but don't destroy it
128
+ # * keep_kickstart_repository: ensure the KS repo ID is not set to nil
128
129
  def unregister_host(host, options = {})
129
130
  organization_destroy = options.fetch(:organization_destroy, false)
130
131
  unregistering = options.fetch(:unregistering, false)
132
+ keep_kickstart_repository = options.fetch(:keep_kickstart_repository, false)
131
133
 
132
134
  # if the first operation fails, just raise the error since there's nothing to clean up yet.
133
135
  candlepin_consumer_destroy(host.subscription_facet.uuid) if !organization_destroy && host.subscription_facet.try(:uuid)
@@ -138,7 +140,11 @@ module Katello
138
140
  host.subscription_facet.try(:destroy!)
139
141
 
140
142
  if unregistering
141
- remove_host_artifacts(host)
143
+ if keep_kickstart_repository
144
+ remove_host_artifacts(host, kickstart_repository_id: host&.content_facet&.kickstart_repository_id)
145
+ else
146
+ remove_host_artifacts(host)
147
+ end
142
148
  elsif organization_destroy
143
149
  host.content_facet.try(:destroy!)
144
150
  remove_host_artifacts(host, clear_content_facet: false)
@@ -152,7 +158,9 @@ module Katello
152
158
  new_host = host.new_record?
153
159
  unless new_host
154
160
  host.save!
155
- unregister_host(host, :unregistering => true)
161
+ # Keep the kickstart repository ID so the host's Medium isn't unset
162
+ # Important for registering a host during provisioning
163
+ unregister_host(host, :unregistering => true, :keep_kickstart_repository => true)
156
164
  host.reload
157
165
  end
158
166
 
@@ -294,13 +302,15 @@ module Katello
294
302
  subscription_facet
295
303
  end
296
304
 
297
- def remove_host_artifacts(host, clear_content_facet: true)
305
+ def remove_host_artifacts(host, clear_content_facet: true, kickstart_repository_id: nil)
306
+ Rails.logger.debug "Host ID: #{host.id}, clear_content_facet: #{clear_content_facet}, kickstart_repository_id: #{kickstart_repository_id}"
298
307
  if host.content_facet && clear_content_facet
299
308
  host.content_facet.bound_repositories = []
300
309
  host.content_facet.applicable_errata = []
301
310
  host.content_facet.uuid = nil
302
311
  host.content_facet.content_view_environments = []
303
312
  host.content_facet.content_source = ::SmartProxy.pulp_primary
313
+ host.content_facet.kickstart_repository_id = kickstart_repository_id
304
314
  host.content_facet.save!
305
315
  Rails.logger.debug "remove_host_artifacts: marking CVEs unchanged to prevent backend update"
306
316
  host.content_facet.mark_cves_unchanged
@@ -17,7 +17,7 @@ module Katello
17
17
  :repositories_api_class, :api_class, :remotes_api_class, :repository_versions_api_class,
18
18
  :distributions_api_class, :remote_class, :repo_sync_url_class, :client_module_class,
19
19
  :distribution_class, :publication_class, :publications_api_class, :url_description,
20
- :test_url, :test_url_root_options
20
+ :test_url, :test_url_root_options, :repo_discovery_class
21
21
 
22
22
  attr_accessor :metadata_publish_matching_check, :index_additional_data_proc
23
23
  attr_reader :id, :unique_content_per_repo
@@ -1,6 +1,7 @@
1
1
  module Katello
2
2
  class SmartProxyHelper
3
3
  attr_accessor :smart_proxy
4
+
4
5
  def initialize(smart_proxy)
5
6
  @smart_proxy = smart_proxy
6
7
  end
@@ -18,13 +18,14 @@
18
18
  </tr>
19
19
  </thead>
20
20
  <tbody>
21
+ <% installable_only = Setting['errata_status_installable'] %>
21
22
  <% host_collections.each do |host_collection| %>
22
23
  <tr>
23
24
  <td>
24
- <% if host_collection.security_updates? %>
25
- <a href="/host_collections/<%= host_collection.id %>" style="text-align: center"><i class="label label-danger">&nbsp;</i></a>
26
- <% elsif host_collection.bugzilla_updates? || host_collection.enhancement_updates? %>
27
- <a href="/host_collections/<%= host_collection.id %>" style="text-align: center"><i class="label label-warning">&nbsp;</i></a>
25
+ <% if host_collection.security_updates?(installable_only: installable_only) %>
26
+ <a href="/host_collections/<%= host_collection.id %>" style="text-align: center" title="<%= installable_only ? _('Installable security errata') : _('Applicable security errata') %>"><i class="label label-danger">&nbsp;</i></a>
27
+ <% elsif host_collection.bugzilla_updates?(installable_only: installable_only) || host_collection.enhancement_updates?(installable_only: installable_only) %>
28
+ <a href="/host_collections/<%= host_collection.id %>" style="text-align: center" title="<%= installable_only ? _('Installable bugfix/enhancement errata') : _('Applicable bugfix/enhancement errata') %>"><i class="label label-warning">&nbsp;</i></a>
28
29
  <% else %>
29
30
  <a href="/host_collections/<%= host_collection.id %>" style="text-align: center"><i class="label label-success">&nbsp;</i></a>
30
31
  <% end %>
@@ -14,6 +14,7 @@ foreign_input_sets:
14
14
  - template: Package Action - Script Default
15
15
  exclude: action,package
16
16
  %>
17
+ <%= snippet_if_exists(template_name + " custom pre") %>
17
18
  <% if @host.operatingsystem.family == 'Suse' -%>
18
19
  <% advisories = input(:errata).split(',').join(' ') -%>
19
20
  <%= render_template('Package Action - Script Default', :action => 'install -n -t patch', :package => advisories) %>
@@ -21,3 +22,4 @@ foreign_input_sets:
21
22
  <% advisories = input(:errata).split(',').map { |e| "--advisory=#{e}" }.join(' ') -%>
22
23
  <%= render_template('Package Action - Script Default', :action => 'update-minimal', :package => advisories) %>
23
24
  <% end -%>
25
+ <%= snippet_if_exists(template_name + " custom post") %>
@@ -14,6 +14,7 @@ provider_type: Ansible
14
14
  kind: job_template
15
15
  %>
16
16
 
17
+ <%= snippet_if_exists(template_name + " custom pre") %>
17
18
  <% if @host.operatingsystem.family == 'Suse' -%>
18
19
  <% advisories = input(:errata).split(',').join(' ') -%>
19
20
  <%= render_template('Run Command - Ansible Default', :command => "zypper -n install -t patch #{advisories}") %>
@@ -21,3 +22,4 @@ kind: job_template
21
22
  <% advisories = input(:errata).split(',').map { |e| "--advisory=#{e}" }.join(' ') -%>
22
23
  <%= render_template('Run Command - Ansible Default', :command => "yum -y update-minimal #{advisories}") %>
23
24
  <% end -%>
25
+ <%= snippet_if_exists(template_name + " custom post") %>
@@ -19,9 +19,11 @@ foreign_input_sets:
19
19
  <% render_error(N_("No errata matching given search query")) if !input("Errata search query").blank? && advisory_ids.blank? -%>
20
20
  # RESOLVED_ERRATA_IDS=<%= advisory_ids.join(',') %>
21
21
 
22
+ <%= snippet_if_exists(template_name + " custom pre") %>
22
23
  <% if @host.operatingsystem.family == 'Suse' -%>
23
24
  <%= render_template('Package Action - Script Default', :action => 'install -n -t patch', :package => advisory_ids.join(' ')) %>
24
25
  <% else -%>
25
26
  <% advisories = advisory_ids.map { |e| "--advisory=#{e}" }.join(' ') -%>
26
27
  <%= render_template('Package Action - Script Default', :action => 'update-minimal', :package => advisories) %>
27
28
  <% end -%>
29
+ <%= snippet_if_exists(template_name + " custom post") %>
@@ -1,7 +1,7 @@
1
1
  <%#
2
2
  kind: job_template
3
3
  name: Install errata by search query - Katello Ansible Default
4
- job_category: Katello
4
+ job_category: Katello via Ansible
5
5
  description_format: 'Install errata %{Errata search query}'
6
6
  feature: katello_errata_install_by_search
7
7
  provider_type: Ansible
@@ -16,9 +16,11 @@ template_inputs:
16
16
  <% render_error(N_("No errata matching given search query")) if !input("Errata search query").blank? && advisory_ids.blank? -%>
17
17
  # RESOLVED_ERRATA_IDS=<%= advisory_ids.join(',') %>
18
18
 
19
+ <%= snippet_if_exists(template_name + " custom pre") %>
19
20
  <% if @host.operatingsystem.family == 'Suse' -%>
20
21
  <%= render_template('Run Command - Ansible Default', :command => "zypper -n install -t patch #{advisory_ids.join(' ')}") %>
21
22
  <% else -%>
22
23
  <% advisories = advisory_ids.map { |e| "--advisory=#{e}" }.join(' ') -%>
23
24
  <%= render_template('Run Command - Ansible Default', :command => "yum -y update-minimal #{advisories}") %>
24
25
  <% end -%>
26
+ <%= snippet_if_exists(template_name + " custom post") %>
@@ -1,7 +1,7 @@
1
1
  <%#
2
2
  kind: job_template
3
3
  name: Install packages by search query - Katello Ansible Default
4
- job_category: Katello
4
+ job_category: Katello via Ansible
5
5
  description_format: 'Install package(s) %{Package search query}'
6
6
  feature: katello_package_install_by_search
7
7
  provider_type: Ansible
@@ -1,7 +1,7 @@
1
1
  <%#
2
2
  kind: job_template
3
3
  name: Remove packages by search query - Katello Ansible Default
4
- job_category: Katello
4
+ job_category: Katello via Ansible
5
5
  description_format: 'Remove package(s) %{Packages search query}'
6
6
  feature: katello_package_remove_by_search
7
7
  provider_type: Ansible
@@ -19,7 +19,7 @@ template_inputs:
19
19
  - hosts: all
20
20
  tasks:
21
21
  - package:
22
- name:
22
+ name:
23
23
  <% package_names.each do |package_name| -%>
24
24
  - <%= package_name %>
25
25
  <% end -%>
@@ -20,5 +20,9 @@ reboot = commands.delete('reboot')
20
20
  shutdown -r +1
21
21
  <% else -%>
22
22
  <%= commands.join("\n") %>
23
- sudo katello-tracer-upload
23
+ RUN_TRACER_CMD='katello-tracer-upload'
24
+ if [ "$(id -u)" -ne 0 ]; then
25
+ RUN_TRACER_CMD='sudo katello-tracer-upload'
26
+ fi
27
+ $RUN_TRACER_CMD
24
28
  <% end %>
@@ -1,7 +1,7 @@
1
1
  <%#
2
2
  kind: job_template
3
3
  name: Update packages by search query - Katello Ansible Default
4
- job_category: Katello
4
+ job_category: Katello via Ansible
5
5
  description_format: 'Update package(s) %{Packages search query}'
6
6
  feature: katello_package_update_by_search
7
7
  provider_type: Ansible
@@ -10,6 +10,8 @@ feature: katello_upload_profile
10
10
  #!/bin/sh
11
11
  <% if @host.operatingsystem.family == 'Redhat' -%>
12
12
  dnf uploadprofile --force-upload
13
+ <% elsif @host.operatingsystem.family == 'Suse' -%>
14
+ katello-package-upload --force
13
15
  <% else -%>
14
16
  package-profile-upload --force-upload
15
17
  <% end -%>
@@ -1,10 +1,12 @@
1
1
  <div>
2
2
  <h3><%= _('Reclaim Space') %></h3>
3
- <p translate>
4
- <strong>Warning</strong>: reclaiming space will delete all cached content units in "On Demand" repositories on this Smart Proxy.<br>
5
- Take precaution when cleaning custom repositories whose upstream parents don't keep old package versions.
6
- Storage used by deleted repositories will be reclaimed during the next orphan cleanup run.
7
- </p>
3
+ <% unless Setting[:hide_reclaim_space_warning] %>
4
+ <p translate>
5
+ <strong>Warning</strong>: reclaiming space will delete all cached content units in "On Demand" repositories on this Smart Proxy.<br>
6
+ Take precaution when cleaning custom repositories whose upstream parents don't keep old package versions.
7
+ Storage used by deleted repositories will be reclaimed during the next orphan cleanup run.
8
+ </p>
9
+ <% end %>
8
10
  <div class="button">
9
11
  <button class="btn btn-default" type="button" id="reclaimSpaceButton" ng-click="reclaimSpace()" translate>
10
12
  Reclaim Space
@@ -10,13 +10,29 @@ attributes :applicable_module_stream_count, :upgradable_module_stream_count
10
10
 
11
11
  child :content_view_environments => :content_view_environments do
12
12
  node :content_view do |cve|
13
- { id: cve.content_view.id, name: cve.content_view.name, composite: cve.content_view.composite }
13
+ {
14
+ id: cve.content_view&.id,
15
+ name: cve.content_view&.name,
16
+ composite: cve.content_view&.composite,
17
+ content_view_version: cve.content_view_version&.version,
18
+ content_view_version_id: cve.content_view_version&.id,
19
+ content_view_version_latest: cve.content_view_version&.latest?,
20
+ content_view_default: cve.content_view&.default?
21
+ }
14
22
  end
15
23
  node :lifecycle_environment do |cve|
16
- { id: cve.lifecycle_environment.id, name: cve.lifecycle_environment.name }
24
+ {
25
+ id: cve.lifecycle_environment&.id,
26
+ name: cve.lifecycle_environment&.name,
27
+ lifecycle_environment_library: cve.lifecycle_environment&.library?
28
+ }
29
+ end
30
+ node :candlepin_name do |cve|
31
+ cve.candlepin_name
17
32
  end
18
33
  end
19
34
 
35
+ # single cv/lce for backward compatibility
20
36
  node :content_view do |content_facet|
21
37
  content_view = content_facet.single_content_view
22
38
  if content_view.present?
@@ -0,0 +1,6 @@
1
+ object false
2
+
3
+ extends "katello/api/v2/common/metadata"
4
+ child @collection[:results] => :results do |_results|
5
+ attributes :name, :id
6
+ end
@@ -28,6 +28,8 @@ glue(@resource.root) do
28
28
  attributes :http_proxy_name
29
29
  attributes :retain_package_versions_count
30
30
  attributes :metadata_expire
31
+ attributes :allow_updates? => :allow_updates
32
+ attributes :is_container_push? => :is_container_push
31
33
 
32
34
  node :http_proxy do
33
35
  attributes :id => @resource.root&.http_proxy&.id, :name => @resource.root&.http_proxy&.name, :policy => @resource.root&.http_proxy_policy
@@ -58,14 +60,12 @@ attributes :promoted? => :promoted
58
60
  attributes :content_view_version_id, :library_instance_id
59
61
  attributes :last_contents_changed
60
62
 
61
- if @resource.is_a?(Katello::Repository)
62
- if @resource.distribution_version || @resource.distribution_arch || @resource.distribution_family || @resource.distribution_variant
63
- attributes :distribution_version
64
- attributes :distribution_arch
65
- attributes :distribution_bootable? => :distribution_bootable
66
- attributes :distribution_family
67
- attributes :distribution_variant
68
- end
63
+ if @resource.is_a?(Katello::Repository) && (@resource.distribution_version || @resource.distribution_arch || @resource.distribution_family || @resource.distribution_variant)
64
+ attributes :distribution_version
65
+ attributes :distribution_arch
66
+ attributes :distribution_bootable? => :distribution_bootable
67
+ attributes :distribution_family
68
+ attributes :distribution_variant
69
69
  end
70
70
 
71
71
  node :permissions do |repo|
@@ -65,7 +65,7 @@ node :enabled_content_override do |pc|
65
65
  end
66
66
 
67
67
  node :redhat do |pc|
68
- if pc&.product&.respond_to? :redhat?
68
+ if pc&.product.respond_to? :redhat?
69
69
  pc.product.redhat?
70
70
  end
71
71
  end
@@ -1,4 +1,4 @@
1
- attributes :id, :uuid, :last_checkin, :service_level, :release_version, :autoheal, :registered_at, :registered_through, :purpose_role, :purpose_usage, :hypervisor
1
+ attributes :id, :uuid, :last_checkin, :service_level, :release_version, :autoheal, :registered_at, :registered_through, :purpose_role, :purpose_usage, :hypervisor, :convert2rhel_through_foreman
2
2
 
3
3
  child :user => :user do
4
4
  attributes :id, :login
@@ -6,5 +6,6 @@ extends 'katello/api/v2/subscriptions/permissions'
6
6
 
7
7
  child @collection[:results] => :results do
8
8
  attributes :quantity_attached
9
+ attributes :product_host_count
9
10
  extends "katello/api/v2/subscriptions/base"
10
11
  end
@@ -6,6 +6,7 @@ attributes :arch
6
6
  attributes :description
7
7
  attributes :support_type
8
8
  attributes :roles, :usage, :addons
9
+ attributes :product_host_count
9
10
 
10
11
  node(:host_count) do |subscription|
11
12
  subscription.hosts.count