katello 4.10.0 → 4.11.0.rc2

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 (498) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/katello/locale/bn/katello.js +254 -215
  3. data/app/assets/javascripts/katello/locale/bn_IN/katello.js +254 -215
  4. data/app/assets/javascripts/katello/locale/ca/katello.js +254 -215
  5. data/app/assets/javascripts/katello/locale/cs/katello.js +254 -215
  6. data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +254 -215
  7. data/app/assets/javascripts/katello/locale/de/katello.js +260 -245
  8. data/app/assets/javascripts/katello/locale/de_AT/katello.js +254 -215
  9. data/app/assets/javascripts/katello/locale/de_DE/katello.js +254 -215
  10. data/app/assets/javascripts/katello/locale/el/katello.js +254 -215
  11. data/app/assets/javascripts/katello/locale/en/katello.js +254 -215
  12. data/app/assets/javascripts/katello/locale/en_GB/katello.js +254 -215
  13. data/app/assets/javascripts/katello/locale/en_US/katello.js +254 -215
  14. data/app/assets/javascripts/katello/locale/es/katello.js +257 -233
  15. data/app/assets/javascripts/katello/locale/et_EE/katello.js +254 -215
  16. data/app/assets/javascripts/katello/locale/fr/katello.js +268 -268
  17. data/app/assets/javascripts/katello/locale/gl/katello.js +254 -215
  18. data/app/assets/javascripts/katello/locale/gu/katello.js +254 -215
  19. data/app/assets/javascripts/katello/locale/he_IL/katello.js +254 -215
  20. data/app/assets/javascripts/katello/locale/hi/katello.js +254 -215
  21. data/app/assets/javascripts/katello/locale/id/katello.js +254 -215
  22. data/app/assets/javascripts/katello/locale/it/katello.js +254 -221
  23. data/app/assets/javascripts/katello/locale/ja/katello.js +268 -268
  24. data/app/assets/javascripts/katello/locale/ka/katello.js +261 -231
  25. data/app/assets/javascripts/katello/locale/kn/katello.js +254 -215
  26. data/app/assets/javascripts/katello/locale/ko/katello.js +255 -222
  27. data/app/assets/javascripts/katello/locale/locale/katello.js +1049 -1012
  28. data/app/assets/javascripts/katello/locale/ml_IN/katello.js +254 -215
  29. data/app/assets/javascripts/katello/locale/mr/katello.js +254 -215
  30. data/app/assets/javascripts/katello/locale/nl_NL/katello.js +254 -215
  31. data/app/assets/javascripts/katello/locale/or/katello.js +254 -215
  32. data/app/assets/javascripts/katello/locale/pa/katello.js +254 -215
  33. data/app/assets/javascripts/katello/locale/pl/katello.js +254 -215
  34. data/app/assets/javascripts/katello/locale/pl_PL/katello.js +254 -215
  35. data/app/assets/javascripts/katello/locale/pt/katello.js +254 -215
  36. data/app/assets/javascripts/katello/locale/pt_BR/katello.js +257 -233
  37. data/app/assets/javascripts/katello/locale/ro/katello.js +254 -215
  38. data/app/assets/javascripts/katello/locale/ro_RO/katello.js +254 -215
  39. data/app/assets/javascripts/katello/locale/ru/katello.js +255 -222
  40. data/app/assets/javascripts/katello/locale/sl/katello.js +254 -215
  41. data/app/assets/javascripts/katello/locale/sv_SE/katello.js +254 -215
  42. data/app/assets/javascripts/katello/locale/ta/katello.js +254 -215
  43. data/app/assets/javascripts/katello/locale/ta_IN/katello.js +254 -215
  44. data/app/assets/javascripts/katello/locale/te/katello.js +254 -215
  45. data/app/assets/javascripts/katello/locale/tr/katello.js +254 -215
  46. data/app/assets/javascripts/katello/locale/vi/katello.js +254 -215
  47. data/app/assets/javascripts/katello/locale/vi_VN/katello.js +254 -215
  48. data/app/assets/javascripts/katello/locale/zh/katello.js +254 -215
  49. data/app/assets/javascripts/katello/locale/zh_CN/katello.js +268 -268
  50. data/app/assets/javascripts/katello/locale/zh_TW/katello.js +255 -222
  51. data/app/controllers/katello/api/registry/registry_proxies_controller.rb +15 -2
  52. data/app/controllers/katello/api/v2/capsule_content_controller.rb +21 -4
  53. data/app/controllers/katello/api/v2/capsules_controller.rb +11 -1
  54. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +1 -1
  55. data/app/controllers/katello/api/v2/docker_tags_controller.rb +2 -0
  56. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +2 -1
  57. data/app/controllers/katello/api/v2/organizations_controller.rb +2 -2
  58. data/app/controllers/katello/api/v2/repositories_controller.rb +1 -0
  59. data/app/controllers/katello/api/v2/simple_content_access_controller.rb +5 -5
  60. data/app/controllers/katello/api/v2/sync_plans_controller.rb +11 -3
  61. data/app/controllers/katello/concerns/api/api_controller.rb +6 -0
  62. data/app/controllers/katello/concerns/api/v2/hosts_bulk_actions_controller_extensions.rb +23 -0
  63. data/app/controllers/katello/concerns/filtered_auto_complete_search.rb +1 -1
  64. data/app/controllers/katello/concerns/organizations_controller_extensions.rb +2 -0
  65. data/app/controllers/katello/remote_execution_controller.rb +1 -1
  66. data/app/jobs/create_host_lifecycle_expire_soon_notifications.rb +11 -0
  67. data/app/lib/actions/katello/applicability/hosts/bulk_generate.rb +10 -0
  68. data/app/lib/actions/katello/capsule_content/refresh_repos.rb +8 -2
  69. data/app/lib/actions/katello/capsule_content/sync.rb +30 -10
  70. data/app/lib/actions/katello/capsule_content/sync_capsule.rb +13 -0
  71. data/app/lib/actions/katello/capsule_content/update_content_counts.rb +24 -0
  72. data/app/lib/actions/katello/content_view/promote.rb +9 -0
  73. data/app/lib/actions/katello/content_view/publish.rb +9 -0
  74. data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +8 -0
  75. data/app/lib/actions/katello/repository/sync.rb +11 -0
  76. data/app/lib/actions/pulp3/capsule_content/reclaim_space.rb +5 -0
  77. data/app/lib/actions/pulp3/content_view_version/create_export_history.rb +6 -1
  78. data/app/lib/actions/pulp3/content_view_version/export.rb +8 -0
  79. data/app/lib/actions/pulp3/orchestration/content_view_version/export_repository.rb +1 -1
  80. data/app/lib/katello/concerns/base_template_scope_extensions.rb +14 -1
  81. data/app/lib/katello/errors.rb +1 -0
  82. data/app/lib/katello/repo_discovery.rb +2 -2
  83. data/app/lib/katello/validators/content_view_environment_coherent_default_validator.rb +22 -0
  84. data/app/lib/katello/validators/content_view_environment_validator.rb +1 -0
  85. data/app/mailers/katello/task_mailer.rb +54 -0
  86. data/app/models/katello/concerns/host_managed_extensions.rb +41 -1
  87. data/app/models/katello/concerns/organization_extensions.rb +1 -1
  88. data/app/models/katello/concerns/smart_proxy_extensions.rb +75 -3
  89. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +6 -0
  90. data/app/models/katello/content_view.rb +21 -0
  91. data/app/models/katello/content_view_environment.rb +6 -1
  92. data/app/models/katello/docker_meta_tag.rb +1 -1
  93. data/app/models/katello/docker_tag.rb +1 -1
  94. data/app/models/katello/erratum.rb +1 -1
  95. data/app/models/katello/host/content_facet.rb +10 -7
  96. data/app/models/katello/product.rb +8 -0
  97. data/app/models/katello/repository.rb +31 -6
  98. data/app/models/katello/rhel_lifecycle_status.rb +214 -0
  99. data/app/models/katello/sync_plan.rb +19 -1
  100. data/app/models/katello/yum_metadata_file.rb +1 -1
  101. data/app/services/katello/applicability/applicable_content_helper.rb +1 -1
  102. data/app/services/katello/event_queue.rb +10 -2
  103. data/app/services/katello/host_status_manager.rb +1 -0
  104. data/app/services/katello/product_content_importer.rb +45 -3
  105. data/app/services/katello/pulp3/ansible_collection.rb +1 -0
  106. data/app/services/katello/pulp3/api/core.rb +1 -1
  107. data/app/services/katello/pulp3/deb.rb +1 -0
  108. data/app/services/katello/pulp3/docker_manifest.rb +1 -0
  109. data/app/services/katello/pulp3/docker_manifest_list.rb +9 -4
  110. data/app/services/katello/pulp3/docker_tag.rb +1 -0
  111. data/app/services/katello/pulp3/erratum.rb +1 -0
  112. data/app/services/katello/pulp3/file_unit.rb +1 -0
  113. data/app/services/katello/pulp3/module_stream.rb +1 -0
  114. data/app/services/katello/pulp3/package_group.rb +1 -0
  115. data/app/services/katello/pulp3/pulp_content_unit.rb +39 -0
  116. data/app/services/katello/pulp3/repository_mirror.rb +21 -2
  117. data/app/services/katello/pulp3/rpm.rb +1 -0
  118. data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +1 -1
  119. data/app/services/katello/pulp3/srpm.rb +3 -2
  120. data/app/services/katello/registration_manager.rb +6 -3
  121. data/app/services/katello/repository_type.rb +2 -1
  122. data/app/services/katello/ui_notifications/hosts/lifecycle_expire_soon.rb +58 -0
  123. data/app/views/foreman/job_templates/resolve_traces.erb +1 -1
  124. data/app/views/foreman/smart_proxies/_content_tab.html.erb +1 -3
  125. data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +39 -1
  126. data/app/views/katello/api/v2/content_export_incrementals/repository.json.rabl +13 -0
  127. data/app/views/katello/api/v2/content_facet/show.json.rabl +4 -0
  128. data/app/views/katello/api/v2/content_views/base.json.rabl +1 -1
  129. data/app/views/katello/api/v2/docker_tags/_base.json.rabl +28 -6
  130. data/app/views/katello/hosts/_errata_counts.html.erb +2 -2
  131. data/app/views/katello/task_mailer/cv_promote_failure.html.erb +31 -0
  132. data/app/views/katello/task_mailer/cv_promote_failure.text.erb +13 -0
  133. data/app/views/katello/task_mailer/cv_publish_failure.html.erb +31 -0
  134. data/app/views/katello/task_mailer/cv_publish_failure.text.erb +13 -0
  135. data/app/views/katello/task_mailer/proxy_sync_failure.html.erb +45 -0
  136. data/app/views/katello/task_mailer/proxy_sync_failure.text.erb +25 -0
  137. data/app/views/katello/task_mailer/repo_sync_failure.html.erb +35 -0
  138. data/app/views/katello/task_mailer/repo_sync_failure.text.erb +15 -0
  139. data/app/views/overrides/organizations/_edit_override.html.erb +4 -0
  140. data/config/routes/api/v2.rb +2 -0
  141. data/db/migrate/20230825180856_add_content_counts_to_smart_proxy.rb +7 -0
  142. data/db/migrate/20231020153017_create_indexes_for_nvra_and_epoch.rb +6 -0
  143. data/db/seeds.d/106-mail_notifications.rb +32 -0
  144. data/db/seeds.d/109-katello-notification-blueprints.rb +6 -0
  145. data/engines/bastion/app/assets/javascripts/bastion/components/views/bst-alert.html +1 -1
  146. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.controller.js +4 -0
  147. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-add-host-collections.controller.js +3 -0
  148. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-add-subscriptions.controller.js +3 -0
  149. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +4 -0
  150. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-copy.controller.js +7 -2
  151. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-host-collections.controller.js +3 -0
  152. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +3 -0
  153. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-subscriptions.controller.js +3 -0
  154. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/new-activation-key.controller.js +6 -2
  155. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js +16 -1
  156. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/rhel-lifecycle-notice.html +5 -0
  157. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/content-credentials.controller.js +7 -2
  158. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-acs.controller.js +7 -2
  159. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-products.controller.js +7 -2
  160. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-repositories.controller.js +7 -2
  161. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/new/new-content-credential.controller.js +3 -0
  162. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +5 -1
  163. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-actions.controller.js +5 -1
  164. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-applicable.controller.js +3 -0
  165. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-installed.controller.js +3 -0
  166. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +4 -0
  167. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js +3 -0
  168. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js +3 -0
  169. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +3 -0
  170. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js +3 -0
  171. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-traces.controller.js +4 -0
  172. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-debs-actions.html +1 -1
  173. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-debs-applicable.html +1 -1
  174. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-debs-installed.html +1 -1
  175. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +3 -3
  176. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-module-streams.html +1 -1
  177. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +1 -1
  178. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +1 -1
  179. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +1 -1
  180. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-traces.html +3 -3
  181. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +5 -0
  182. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js +1 -1
  183. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-host-collections.controller.js +4 -1
  184. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-subscriptions.controller.js +3 -0
  185. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-host-collections.controller.js +4 -1
  186. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-repository-sets.controller.js +3 -0
  187. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-subscriptions.controller.js +3 -0
  188. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-add-subscriptions.html +1 -1
  189. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +4 -3
  190. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-host-collections.html +1 -1
  191. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +3 -3
  192. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-provisioning-info.html +2 -2
  193. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions-list.html +1 -1
  194. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions.html +1 -1
  195. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +3 -3
  196. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/debs.controller.js +7 -0
  197. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/deb-content-views.controller.js +8 -1
  198. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/deb-repositories.controller.js +10 -2
  199. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/docker-tag-environments.controller.js +5 -2
  200. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/docker-tag-repositories.controller.js +6 -2
  201. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/docker-tags.controller.js +6 -3
  202. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/environment-content.controller.js +13 -0
  203. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/environment.controller.js +6 -0
  204. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/new-environment.controller.js +8 -2
  205. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +4 -0
  206. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum-content-hosts.controller.js +7 -2
  207. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum-repositories.controller.js +7 -2
  208. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum.controller.js +6 -2
  209. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-info.html +2 -2
  210. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.controller.js +5 -0
  211. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html +1 -1
  212. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/file-content-views.controller.js +10 -2
  213. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/file-repositories.controller.js +8 -1
  214. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/files.controller.js +9 -2
  215. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-add-hosts.controller.js +3 -0
  216. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-copy.controller.js +7 -2
  217. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-hosts.controller.js +3 -0
  218. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/host-collections.controller.js +4 -0
  219. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/new/new-host-collection.controller.js +6 -2
  220. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js +4 -0
  221. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +166 -43
  222. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +4 -0
  223. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +1 -1
  224. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/packages.controller.js +7 -0
  225. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js +5 -0
  226. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js +6 -2
  227. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +11 -0
  228. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +3 -0
  229. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +2 -2
  230. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/discovery-create.controller.js +3 -0
  231. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/discovery.controller.js +3 -0
  232. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/new/product-form.controller.js +6 -2
  233. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +4 -0
  234. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +1 -1
  235. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-add-products.controller.js +5 -1
  236. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-products.controller.js +4 -0
  237. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/new/new-sync-plan.controller.js +3 -0
  238. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.controller.js +4 -0
  239. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task-details.controller.js +6 -2
  240. data/lib/katello/engine.rb +2 -3
  241. data/lib/katello/permission_creator.rb +2 -2
  242. data/lib/katello/plugin.rb +4 -0
  243. data/lib/katello/repository_types/ostree.rb +1 -0
  244. data/lib/katello/repository_types/python.rb +1 -0
  245. data/lib/katello/scheduled_jobs.rb +1 -1
  246. data/lib/katello/version.rb +1 -1
  247. data/locale/action_names.rb +1 -3
  248. data/locale/bn/LC_MESSAGES/katello.mo +0 -0
  249. data/locale/bn/katello.po +236 -197
  250. data/locale/bn/katello.po.time_stamp +0 -0
  251. data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
  252. data/locale/bn_IN/katello.po +236 -197
  253. data/locale/bn_IN/katello.po.time_stamp +0 -0
  254. data/locale/ca/LC_MESSAGES/katello.mo +0 -0
  255. data/locale/ca/katello.po +236 -197
  256. data/locale/ca/katello.po.time_stamp +0 -0
  257. data/locale/cs/LC_MESSAGES/katello.mo +0 -0
  258. data/locale/cs/katello.po +236 -206
  259. data/locale/cs/katello.po.time_stamp +0 -0
  260. data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
  261. data/locale/cs_CZ/katello.po +236 -197
  262. data/locale/cs_CZ/katello.po.time_stamp +0 -0
  263. data/locale/de/LC_MESSAGES/katello.mo +0 -0
  264. data/locale/de/katello.po +241 -202
  265. data/locale/de/katello.po.time_stamp +0 -0
  266. data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
  267. data/locale/de_AT/katello.po +236 -197
  268. data/locale/de_AT/katello.po.time_stamp +0 -0
  269. data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
  270. data/locale/de_DE/katello.po +236 -197
  271. data/locale/de_DE/katello.po.time_stamp +0 -0
  272. data/locale/el/LC_MESSAGES/katello.mo +0 -0
  273. data/locale/el/katello.po +236 -197
  274. data/locale/el/katello.po.time_stamp +0 -0
  275. data/locale/en/LC_MESSAGES/katello.mo +0 -0
  276. data/locale/en/katello.po +236 -197
  277. data/locale/en/katello.po.time_stamp +0 -0
  278. data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
  279. data/locale/en_GB/katello.po +236 -197
  280. data/locale/en_GB/katello.po.time_stamp +0 -0
  281. data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
  282. data/locale/en_US/katello.po +236 -197
  283. data/locale/en_US/katello.po.time_stamp +0 -0
  284. data/locale/es/LC_MESSAGES/katello.mo +0 -0
  285. data/locale/es/katello.po +238 -199
  286. data/locale/es/katello.po.time_stamp +0 -0
  287. data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
  288. data/locale/et_EE/katello.po +236 -197
  289. data/locale/et_EE/katello.po.time_stamp +0 -0
  290. data/locale/fr/LC_MESSAGES/katello.mo +0 -0
  291. data/locale/fr/katello.po +247 -208
  292. data/locale/fr/katello.po.time_stamp +0 -0
  293. data/locale/gl/LC_MESSAGES/katello.mo +0 -0
  294. data/locale/gl/katello.po +236 -197
  295. data/locale/gl/katello.po.time_stamp +0 -0
  296. data/locale/gu/LC_MESSAGES/katello.mo +0 -0
  297. data/locale/gu/katello.po +236 -197
  298. data/locale/gu/katello.po.time_stamp +0 -0
  299. data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
  300. data/locale/he_IL/katello.po +236 -197
  301. data/locale/he_IL/katello.po.time_stamp +0 -0
  302. data/locale/hi/LC_MESSAGES/katello.mo +0 -0
  303. data/locale/hi/katello.po +236 -197
  304. data/locale/hi/katello.po.time_stamp +0 -0
  305. data/locale/id/LC_MESSAGES/katello.mo +0 -0
  306. data/locale/id/katello.po +236 -197
  307. data/locale/id/katello.po.time_stamp +0 -0
  308. data/locale/it/LC_MESSAGES/katello.mo +0 -0
  309. data/locale/it/katello.po +236 -197
  310. data/locale/it/katello.po.time_stamp +0 -0
  311. data/locale/ja/LC_MESSAGES/katello.mo +0 -0
  312. data/locale/ja/katello.po +247 -208
  313. data/locale/ja/katello.po.time_stamp +0 -0
  314. data/locale/ka/LC_MESSAGES/katello.mo +0 -0
  315. data/locale/ka/katello.po +241 -202
  316. data/locale/ka/katello.po.time_stamp +0 -0
  317. data/locale/katello.pot +1427 -1296
  318. data/locale/kn/LC_MESSAGES/katello.mo +0 -0
  319. data/locale/kn/katello.po +236 -197
  320. data/locale/kn/katello.po.time_stamp +0 -0
  321. data/locale/ko/LC_MESSAGES/katello.mo +0 -0
  322. data/locale/ko/katello.po +236 -197
  323. data/locale/ko/katello.po.time_stamp +0 -0
  324. data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
  325. data/locale/ml_IN/katello.po +236 -197
  326. data/locale/ml_IN/katello.po.time_stamp +0 -0
  327. data/locale/mr/LC_MESSAGES/katello.mo +0 -0
  328. data/locale/mr/katello.po +236 -197
  329. data/locale/mr/katello.po.time_stamp +0 -0
  330. data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
  331. data/locale/nl_NL/katello.po +236 -197
  332. data/locale/nl_NL/katello.po.time_stamp +0 -0
  333. data/locale/or/LC_MESSAGES/katello.mo +0 -0
  334. data/locale/or/katello.po +236 -197
  335. data/locale/or/katello.po.time_stamp +0 -0
  336. data/locale/pa/LC_MESSAGES/katello.mo +0 -0
  337. data/locale/pa/katello.po +236 -197
  338. data/locale/pa/katello.po.time_stamp +0 -0
  339. data/locale/pl/LC_MESSAGES/katello.mo +0 -0
  340. data/locale/pl/katello.po +236 -197
  341. data/locale/pl/katello.po.time_stamp +0 -0
  342. data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
  343. data/locale/pl_PL/katello.po +236 -197
  344. data/locale/pl_PL/katello.po.time_stamp +0 -0
  345. data/locale/pt/LC_MESSAGES/katello.mo +0 -0
  346. data/locale/pt/katello.po +236 -197
  347. data/locale/pt/katello.po.time_stamp +0 -0
  348. data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
  349. data/locale/pt_BR/katello.po +238 -199
  350. data/locale/pt_BR/katello.po.time_stamp +0 -0
  351. data/locale/ro/LC_MESSAGES/katello.mo +0 -0
  352. data/locale/ro/katello.po +236 -197
  353. data/locale/ro/katello.po.time_stamp +0 -0
  354. data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
  355. data/locale/ro_RO/katello.po +236 -197
  356. data/locale/ro_RO/katello.po.time_stamp +0 -0
  357. data/locale/ru/LC_MESSAGES/katello.mo +0 -0
  358. data/locale/ru/katello.po +236 -197
  359. data/locale/ru/katello.po.time_stamp +0 -0
  360. data/locale/sl/LC_MESSAGES/katello.mo +0 -0
  361. data/locale/sl/katello.po +236 -197
  362. data/locale/sl/katello.po.time_stamp +0 -0
  363. data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
  364. data/locale/sv_SE/katello.po +236 -197
  365. data/locale/sv_SE/katello.po.time_stamp +0 -0
  366. data/locale/ta/LC_MESSAGES/katello.mo +0 -0
  367. data/locale/ta/katello.po +236 -197
  368. data/locale/ta/katello.po.time_stamp +0 -0
  369. data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
  370. data/locale/ta_IN/katello.po +236 -197
  371. data/locale/ta_IN/katello.po.time_stamp +0 -0
  372. data/locale/te/LC_MESSAGES/katello.mo +0 -0
  373. data/locale/te/katello.po +236 -197
  374. data/locale/te/katello.po.time_stamp +0 -0
  375. data/locale/tr/LC_MESSAGES/katello.mo +0 -0
  376. data/locale/tr/katello.po +236 -197
  377. data/locale/tr/katello.po.time_stamp +0 -0
  378. data/locale/vi/LC_MESSAGES/katello.mo +0 -0
  379. data/locale/vi/katello.po +236 -197
  380. data/locale/vi/katello.po.time_stamp +0 -0
  381. data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
  382. data/locale/vi_VN/katello.po +236 -197
  383. data/locale/vi_VN/katello.po.time_stamp +0 -0
  384. data/locale/zh/LC_MESSAGES/katello.mo +0 -0
  385. data/locale/zh/katello.po +236 -197
  386. data/locale/zh/katello.po.time_stamp +0 -0
  387. data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
  388. data/locale/zh_CN/katello.po +247 -208
  389. data/locale/zh_CN/katello.po.time_stamp +0 -0
  390. data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
  391. data/locale/zh_TW/katello.po +236 -197
  392. data/locale/zh_TW/katello.po.time_stamp +0 -0
  393. data/webpack/components/Table/EmptyStateMessage.js +7 -4
  394. data/webpack/components/Table/MainTable.scss +18 -17
  395. data/webpack/components/Table/TableWrapper.js +4 -1
  396. data/webpack/components/extensions/HostDetails/ActionsBar/index.js +45 -4
  397. data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.scss +9 -7
  398. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsCard.js +1 -1
  399. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +1 -1
  400. data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeActions.js +29 -7
  401. data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeCard.js +106 -66
  402. data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeCard.scss +6 -0
  403. data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeConstants.js +2 -0
  404. data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeEditModal.js +53 -29
  405. data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeSelectors.js +7 -6
  406. data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/__tests__/SystemPurposeCard.test.js +24 -5
  407. data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/__tests__/SystemPurposeEditModal.test.js +137 -7
  408. data/webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js +11 -10
  409. data/webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js +8 -2
  410. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +27 -10
  411. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/HostErrataActions.js +3 -22
  412. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/HostErrataConstants.js +0 -1
  413. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +3 -2
  414. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +2 -2
  415. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +48 -12
  416. data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +22 -10
  417. data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionHooks.js +1 -1
  418. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +2 -2
  419. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/EnableTracerModal.js +71 -5
  420. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/EnableTracerModal.scss +16 -0
  421. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesEnabler.js +4 -1
  422. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js +6 -2
  423. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +2 -1
  424. data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +25 -0
  425. data/webpack/components/extensions/Hosts/ActionsBar/index.js +36 -0
  426. data/webpack/components/extensions/Hosts/constants.js +2 -0
  427. data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js +13 -7
  428. data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/ActivationKeys.test.js.snap +9 -1
  429. data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +87 -22
  430. data/webpack/components/extensions/RegistrationCommands/index.js +17 -41
  431. data/webpack/global_index.js +11 -2
  432. data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +4 -0
  433. data/webpack/redux/reducers/RedHatRepositories/enabled.js +1 -0
  434. data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.js +10 -1
  435. data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.scss +33 -31
  436. data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +3 -1
  437. data/webpack/scenes/Content/ContentConfig.js +3 -0
  438. data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +6 -4
  439. data/webpack/scenes/ContentViews/Create/CreateContentViewForm.scss +8 -6
  440. data/webpack/scenes/ContentViews/Delete/ContentViewDeleteWizard.js +1 -0
  441. data/webpack/scenes/ContentViews/Delete/Steps/CVEnvironmentSelectionForm.scss +4 -2
  442. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +3 -4
  443. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewBulkAddModal.js +2 -2
  444. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +5 -5
  445. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/compositeCVDetails.fixtures.json +393 -0
  446. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +30 -4
  447. data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +3 -1
  448. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +3 -3
  449. data/webpack/scenes/ContentViews/Details/Repositories/RepoIcon.js +2 -1
  450. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareTable.js +1 -1
  451. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +1 -1
  452. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveCVVersionWizard.js +1 -1
  453. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsTable.js +1 -1
  454. data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +24 -1
  455. data/webpack/scenes/ContentViews/Publish/PublishContentViewWizard.js +1 -0
  456. data/webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js +42 -0
  457. data/webpack/scenes/ContentViews/Publish/cvPublishForm.scss +13 -11
  458. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +2 -1
  459. data/webpack/scenes/ContentViews/__tests__/mockDetails.fixtures.json +2 -1
  460. data/webpack/scenes/Hosts/ChangeContentSource/index.js +4 -3
  461. data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetails.js +1 -2
  462. data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetails.test.js.snap +1 -1
  463. data/webpack/scenes/RedHatRepositories/RedHatRepositoriesPage.js +2 -1
  464. data/webpack/scenes/RedHatRepositories/__tests__/__snapshots__/RedHatRepositoriesPage.test.js.snap +6 -0
  465. data/webpack/scenes/RedHatRepositories/components/EnabledRepository/EnabledRepository.js +4 -1
  466. data/webpack/scenes/RedHatRepositories/components/EnabledRepository/EnabledRepositoryContent.js +13 -4
  467. data/webpack/scenes/RedHatRepositories/components/EnabledRepository/__tests__/EnabledRepositoryContent.test.js +1 -0
  468. data/webpack/scenes/RedHatRepositories/components/EnabledRepository/__tests__/__snapshots__/EnabledRepository.test.js.snap +1 -0
  469. data/webpack/scenes/RedHatRepositories/components/EnabledRepository/__tests__/__snapshots__/EnabledRepositoryContent.test.js.snap +3 -2
  470. data/webpack/scenes/SmartProxy/AdditionalCapsuleContent.js +93 -0
  471. data/webpack/scenes/SmartProxy/Content.js +12 -4
  472. data/webpack/scenes/SmartProxy/ExpandableCvDetails.js +107 -0
  473. data/webpack/scenes/SmartProxy/ExpandedSmartProxyRepositories.js +139 -0
  474. data/webpack/scenes/SmartProxy/SmartProxyContentActions.js +17 -4
  475. data/webpack/scenes/SmartProxy/SmartProxyContentConstants.js +1 -0
  476. data/webpack/scenes/SmartProxy/SmartProxyExpandableTable.js +150 -0
  477. data/webpack/scenes/SmartProxy/__tests__/SmartProxyContentTest.fixtures.json +799 -0
  478. data/webpack/scenes/SmartProxy/__tests__/SmartProxyContentTest.js +29 -17
  479. data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +16 -19
  480. data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.scss +12 -8
  481. data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +21 -18
  482. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnConfigurationForm.scss +4 -2
  483. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.scss +38 -19
  484. data/webpack/scenes/Subscriptions/Manifest/index.js +0 -2
  485. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +38 -12
  486. data/webpack/scenes/Subscriptions/SubscriptionsPage.scss +38 -36
  487. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +16 -13
  488. data/webpack/utils/helpers.js +0 -1
  489. metadata +148 -33
  490. data/app/controllers/katello/concerns/api/v2/bulk_hosts_extensions.rb +0 -47
  491. data/webpack/components/Table/TableHooks.js +0 -315
  492. data/webpack/components/Table/__test__/useBulkSelect.test.js +0 -99
  493. data/webpack/components/extensions/RegistrationCommands/__tests__/LifeCycleEnvironment.test.js +0 -11
  494. data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/LifeCycleEnvironment.test.js.snap +0 -29
  495. data/webpack/components/extensions/RegistrationCommands/fields/LifecycleEnvironment.js +0 -57
  496. data/webpack/scenes/SmartProxy/SmartProxyContentTable.js +0 -164
  497. data/webpack/scenes/SmartProxy/__tests__/SmartProxyContentResult.fixtures.json +0 -140
  498. data/webpack/scenes/Subscriptions/Manifest/Manifest.scss +0 -16
@@ -0,0 +1,214 @@
1
+ module Katello
2
+ class RhelLifecycleStatus < HostStatus::Status
3
+ UNKNOWN = 0
4
+ FULL_SUPPORT = 1
5
+ MAINTENANCE_SUPPORT = 2
6
+ APPROACHING_END_OF_MAINTENANCE = 3
7
+ EXTENDED_SUPPORT = 4
8
+ APPROACHING_END_OF_SUPPORT = 5
9
+ SUPPORT_ENDED = 6
10
+
11
+ def self.end_of_day(date)
12
+ DateTime.parse(date.to_s).end_of_day.utc
13
+ end
14
+
15
+ RHEL_EOS_SCHEDULE = { # dates that each support category ends
16
+ 'RHEL9' => {
17
+ 'full_support' => end_of_day('2027-05-31'),
18
+ 'maintenance_support' => end_of_day('2032-05-31'),
19
+ 'extended_support' => end_of_day('2035-05-31')
20
+ },
21
+ 'RHEL8' => {
22
+ 'full_support' => end_of_day('2024-05-31'),
23
+ 'maintenance_support' => end_of_day('2029-05-31'),
24
+ 'extended_support' => end_of_day('2032-05-31')
25
+ },
26
+ 'RHEL7' => {
27
+ 'full_support' => end_of_day('2019-08-06'),
28
+ 'maintenance_support' => end_of_day('2024-06-30'),
29
+ 'extended_support' => end_of_day('2028-06-30')
30
+ },
31
+ 'RHEL7 (System z (Structure A))' => {
32
+ 'full_support' => end_of_day('2019-08-06'),
33
+ 'maintenance_support' => end_of_day('2021-05-31')
34
+ },
35
+ 'RHEL7 (ARM)' => {
36
+ 'full_support' => end_of_day('2019-08-06'),
37
+ 'maintenance_support' => end_of_day('2020-11-30')
38
+ },
39
+ 'RHEL7 (POWER9)' => {
40
+ 'full_support' => end_of_day('2019-08-06'),
41
+ 'maintenance_support' => end_of_day('2021-05-31')
42
+ },
43
+ 'RHEL6' => {
44
+ 'full_support' => end_of_day('2016-05-10'),
45
+ 'maintenance_support' => end_of_day('2020-11-30'),
46
+ 'extended_support' => end_of_day('2024-06-30')
47
+ },
48
+ 'RHEL5' => {
49
+ 'full_support' => end_of_day('2013-01-08'),
50
+ 'maintenance_support' => end_of_day('2017-03-31'),
51
+ 'extended_support' => end_of_day('2020-11-30')
52
+ }
53
+ }.freeze
54
+
55
+ EOS_WARNING_THRESHOLD = 1.year
56
+
57
+ def self.status_map
58
+ map = {
59
+ full_support: FULL_SUPPORT,
60
+ maintenance_support: MAINTENANCE_SUPPORT,
61
+ approaching_end_of_maintenance: APPROACHING_END_OF_MAINTENANCE,
62
+ extended_support: EXTENDED_SUPPORT,
63
+ approaching_end_of_support: APPROACHING_END_OF_SUPPORT,
64
+ support_ended: SUPPORT_ENDED
65
+ }
66
+
67
+ map.default = UNKNOWN
68
+ map
69
+ end
70
+
71
+ def self.approaching_end_of_category(eos_schedule_index:)
72
+ lifecycles_expire_soon[eos_schedule_index]
73
+ end
74
+
75
+ def self.lifecycles_expire_soon
76
+ expiring = RHEL_EOS_SCHEDULE.collect do |index, schedules|
77
+ expire_soon = schedules.except("full_support").select { |_k, v| (Time.now.utc..Time.now.utc + EOS_WARNING_THRESHOLD).cover?(v) }
78
+ {index => expire_soon} if expire_soon.present?
79
+ end
80
+ expiring.compact.reduce(:update) || {}
81
+ end
82
+
83
+ def self.to_status(rhel_eos_schedule_index: nil)
84
+ release = rhel_eos_schedule_index
85
+ return UNKNOWN unless release.present? && RHEL_EOS_SCHEDULE.key?(release)
86
+ approach = approaching_end_of_category(eos_schedule_index: release)
87
+ if approach.present?
88
+ case approach.keys.first
89
+ when last_support_category(eos_schedule_index: release)
90
+ return APPROACHING_END_OF_SUPPORT
91
+ when 'maintenance_support'
92
+ return APPROACHING_END_OF_MAINTENANCE
93
+ end
94
+ end
95
+
96
+ full_support_end_date = RHEL_EOS_SCHEDULE[release]['full_support']
97
+ maintenance_support_end_date = RHEL_EOS_SCHEDULE[release]['maintenance_support']
98
+ extended_support_end_date = RHEL_EOS_SCHEDULE[release]['extended_support']
99
+
100
+ case
101
+ when Date.today <= full_support_end_date
102
+ return FULL_SUPPORT
103
+ when Date.today <= maintenance_support_end_date
104
+ return MAINTENANCE_SUPPORT
105
+ when extended_support_end_date.present? && Date.today <= extended_support_end_date
106
+ return EXTENDED_SUPPORT
107
+ else
108
+ return SUPPORT_ENDED
109
+ end
110
+ end
111
+
112
+ def self.status_name
113
+ N_('RHEL lifecycle')
114
+ end
115
+
116
+ def self.humanized_name
117
+ 'rhel_lifecycle'
118
+ end
119
+
120
+ # {"RHEL9"=>2035-05-31 23:59:59.999999999 UTC,
121
+ # "RHEL8"=>2032-05-31 23:59:59.999999999 UTC, ... }
122
+ def self.schedule_slice(support_category)
123
+ {}.merge(*RHEL_EOS_SCHEDULE.keys.map do |release|
124
+ { release => RHEL_EOS_SCHEDULE[release]&.[](support_category) }
125
+ end)
126
+ end
127
+
128
+ def self.full_support_end_dates
129
+ schedule_slice('full_support')
130
+ end
131
+
132
+ def self.maintenance_support_end_dates
133
+ schedule_slice('maintenance_support')
134
+ end
135
+
136
+ def self.extended_support_end_dates
137
+ schedule_slice('extended_support')
138
+ end
139
+
140
+ def self.last_support_category(eos_schedule_index:)
141
+ RHEL_EOS_SCHEDULE[eos_schedule_index].keys.last
142
+ end
143
+
144
+ def self.eos_date(eos_schedule_index: nil)
145
+ return nil unless eos_schedule_index
146
+ RHEL_EOS_SCHEDULE[eos_schedule_index]&.[]('extended_support') ||
147
+ RHEL_EOS_SCHEDULE[eos_schedule_index]&.[]('maintenance_support')
148
+ end
149
+
150
+ def self.to_label(status, eos_date: nil, maintenance_support_end_date: nil)
151
+ case status
152
+ when FULL_SUPPORT
153
+ N_('Full support')
154
+ when MAINTENANCE_SUPPORT
155
+ N_('Maintenance support')
156
+ when APPROACHING_END_OF_MAINTENANCE
157
+ if maintenance_support_end_date.present?
158
+ N_('Approaching end of maintenance support (%s)') % maintenance_support_end_date.strftime('%Y-%m-%d')
159
+ else
160
+ N_('Approaching end of maintenance support')
161
+ end
162
+ when EXTENDED_SUPPORT
163
+ N_('Extended support')
164
+ when APPROACHING_END_OF_SUPPORT
165
+ if eos_date.present?
166
+ N_('Approaching end of support (%s)') % eos_date.strftime('%Y-%m-%d')
167
+ else
168
+ N_('Approaching end of support')
169
+ end
170
+ when SUPPORT_ENDED
171
+ N_('Support ended')
172
+ else
173
+ N_('Unknown')
174
+ end
175
+ end
176
+
177
+ def to_label(_options = {})
178
+ self.class.to_label(status, eos_date: eos_date, maintenance_support_end_date: maintenance_support_end_date)
179
+ end
180
+
181
+ def eos_date
182
+ self.class.eos_date(eos_schedule_index: rhel_eos_schedule_index)
183
+ end
184
+
185
+ def maintenance_support_end_date
186
+ self.class.maintenance_support_end_dates[rhel_eos_schedule_index]
187
+ end
188
+
189
+ def rhel_eos_schedule_index
190
+ host&.rhel_eos_schedule_index
191
+ end
192
+
193
+ def to_global(_options = {})
194
+ if [FULL_SUPPORT, MAINTENANCE_SUPPORT, EXTENDED_SUPPORT].include?(status)
195
+ ::HostStatus::Global::OK
196
+ elsif [APPROACHING_END_OF_SUPPORT, APPROACHING_END_OF_MAINTENANCE].include?(status)
197
+ ::HostStatus::Global::WARN
198
+ elsif [SUPPORT_ENDED].include?(status)
199
+ ::HostStatus::Global::ERROR
200
+ else
201
+ ::HostStatus::Global::OK
202
+ end
203
+ end
204
+
205
+ def to_status
206
+ self.class.to_status(rhel_eos_schedule_index: self.host&.rhel_eos_schedule_index)
207
+ end
208
+
209
+ # this status is only relevant for RHEL
210
+ def relevant?(_options = {})
211
+ host&.rhel_eos_schedule_index.present?
212
+ end
213
+ end
214
+ end
@@ -24,6 +24,7 @@ module Katello
24
24
  validate :validate_sync_date
25
25
  validate :product_enabled
26
26
  validate :custom_cron_interval_expression
27
+ validates_associated :products
27
28
  validates_with Validators::KatelloNameFormatValidator, :attributes => :name
28
29
 
29
30
  before_destroy :cancel_recurring_logic
@@ -55,7 +56,7 @@ module Katello
55
56
 
56
57
  def product_enabled
57
58
  products.each do |product|
58
- errors.add :base, _("Cannot add product %s because it is disabled.") % product.name unless product.enabled?
59
+ errors.add :base, _("Cannot add product %s because it is disabled.") % product.name if (product.redhat? && !product.enabled?)
59
60
  end
60
61
  end
61
62
 
@@ -174,5 +175,22 @@ module Katello
174
175
  def cron_status_mismatch?
175
176
  self.interval != CUSTOM_CRON && !(self.cron_expression.nil? || self.cron_expression.eql?(''))
176
177
  end
178
+
179
+ def validate_and_update_products(force_update: false)
180
+ sync_plan_products = Product.where(id: self.product_ids).select { |p| p.enabled? }
181
+ return if sync_plan_products.length == self.product_ids.length
182
+ sync_plan_product_ids = sync_plan_products.pluck(:id)
183
+ if sync_plan_product_ids.length < self.product_ids.length
184
+ missing_ids = self.product_ids - sync_plan_product_ids
185
+ Rails.logger.warn "Sync plan products with following ids are either disabled or don't exist: #{missing_ids}"
186
+ if force_update
187
+ Rails.logger.info "Updating sync plan with valid and enabled product ids: #{sync_plan_product_ids}"
188
+ self.product_ids = sync_plan_product_ids
189
+ self.save!
190
+ else
191
+ Rails.logger.warn "Some sync plan products are invalid/disabled. Please run validate_and_update_products(force_update: true) on the sync_plan from `foreman-rake console`"
192
+ end
193
+ end
194
+ end
177
195
  end
178
196
  end
@@ -15,7 +15,7 @@ module Katello
15
15
  [repository]
16
16
  end
17
17
 
18
- def self.completer_scope_options
18
+ def self.completer_scope_options(_search)
19
19
  {"#{Katello::Repository.table_name}" => lambda { |repo_class| repo_class.yum_type } }
20
20
  end
21
21
  end
@@ -69,7 +69,7 @@ module Katello
69
69
  deb_version_compare = Arel::Nodes::NamedFunction.new('deb_version_cmp', [deb[:version], installed_deb[:version]]).gt(0)
70
70
 
71
71
  content = deb.join(repo_deb).on(repo_deb[:deb_id].eq(deb[:id]))
72
- .join(installed_deb).on(installed_deb[:name].eq(deb[:name]))
72
+ .join(installed_deb).on(installed_deb[:name].eq(deb[:name]), installed_deb[:architecture].eq(deb[:architecture]))
73
73
  .join(host_installed_deb).on(host_installed_deb[:installed_deb_id].eq(installed_deb[:id]))
74
74
  .where(deb_version_compare)
75
75
  .where(host_installed_deb[:host_id].eq(self.content_facet.host.id))
@@ -34,8 +34,16 @@ module Katello
34
34
  end
35
35
 
36
36
  def self.mark_in_progress(event)
37
- ::Katello::Event.where(:in_progress => false, :object_id => event.object_id, :event_type => event.event_type).
38
- update_all(:in_progress => true)
37
+ query = ::Katello::Event.where(
38
+ in_progress: false,
39
+ object_id: event.object_id,
40
+ event_type: event.event_type
41
+ )
42
+
43
+ # Don't mark future events as in progress!
44
+ query = query.where('process_after <= ?', event.process_after) if event.process_after
45
+
46
+ query.update_all(in_progress: true)
39
47
  end
40
48
 
41
49
  def self.reset_in_progress
@@ -8,6 +8,7 @@ module Katello
8
8
  Katello::PurposeUsageStatus,
9
9
  Katello::PurposeAddonsStatus,
10
10
  Katello::PurposeStatus,
11
+ Katello::RhelLifecycleStatus,
11
12
  Katello::TraceStatus].freeze
12
13
 
13
14
  PURPOSE_STATUS = [
@@ -20,6 +20,47 @@ module Katello
20
20
  # },
21
21
  # "enabled":false
22
22
  # }
23
+ #
24
+ #Example cp_products json structure (key:values where values are arrays and productContent is an array of contents inside value array)
25
+ # {
26
+ # "230"=>
27
+ # [{"id"=>"230",
28
+ # "productContent"=>
29
+ # [{"content"=>
30
+ # {"created"=>"2023-11-01T18:02:54+0000",
31
+ # "updated"=>"2023-11-01T18:02:54+0000",
32
+ # "uuid"=>"ff8080818b715841018b8c0d76d90190",
33
+ # "id"=>"3996",
34
+ # "type"=>"yum",
35
+ # "label"=>"rhel-7-server-rt-htb-rpms",
36
+ # "name"=>"Red Hat Enterprise Linux for Real Time HTB (RHEL 7 Server) (RPMs)",
37
+ # "vendor"=>"Red Hat",
38
+ # "contentUrl"=>"/content/htb/rhel/server/7/$basearch/rt/os",
39
+ # "requiredTags"=>"rhel-7-server",
40
+ # "releaseVer"=>nil,
41
+ # "gpgUrl"=>"file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release",
42
+ # "modifiedProductIds"=>[],
43
+ # "arches"=>nil,
44
+ # "metadataExpire"=>1},
45
+ # "enabled"=>false},
46
+ # {"content"=>
47
+ # {"created"=>"2023-11-01T18:02:54+0000",
48
+ # "updated"=>"2023-11-01T18:02:54+0000",
49
+ # "uuid"=>"ff8080818b715841018b8c0d76d90181",
50
+ # "id"=>"2165",
51
+ # "type"=>"yum",
52
+ # "label"=>"rhel-7-server-optional-htb-debug-rpms",
53
+ # "name"=>"Red Hat Enterprise Linux 7 Server - Optional HTB (Debug RPMs)",
54
+ # "vendor"=>"Red Hat",
55
+ # "contentUrl"=>"/content/htb/rhel/server/7/$basearch/optional/debug",
56
+ # "requiredTags"=>"rhel-7-server",
57
+ # "releaseVer"=>nil,
58
+ # "gpgUrl"=>"file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release",
59
+ # "modifiedProductIds"=>[],
60
+ # "arches"=>nil,
61
+ # "metadataExpire"=>1},
62
+ # "enabled"=>false}]}]
63
+ # }
23
64
  attr_reader :content_url_updated
24
65
 
25
66
  def initialize(cp_products = [])
@@ -35,12 +76,13 @@ module Katello
35
76
  end
36
77
 
37
78
  def find_product_for_content(content_id)
38
- prod = @cp_products.find do |prod_json|
39
- prod_json['productContent'].any? do |product_content_json|
79
+ #Hash.find converts hash into enumerable iterating over each key,value pair which we can capture based on find result
80
+ cp_product_id, __cp_product_value = @cp_products.find do |prod_json|
81
+ prod_json&.last&.first&.[]('productContent')&.any? do |product_content_json|
40
82
  product_content_json["content"]["id"] == content_id
41
83
  end
42
84
  end
43
- ::Katello::Product.find_by(cp_id: prod["id"]) if prod
85
+ ::Katello::Product.find_by(cp_id: cp_product_id)
44
86
  end
45
87
 
46
88
  def fetch_product_contents_to_move(product, prod_contents_json)
@@ -2,6 +2,7 @@ module Katello
2
2
  module Pulp3
3
3
  class AnsibleCollection < PulpContentUnit
4
4
  include LazyAccessor
5
+ PULPCORE_CONTENT_TYPE = "ansible.collection_version".freeze
5
6
 
6
7
  def self.content_api
7
8
  PulpAnsibleClient::ContentCollectionVersionsApi.new(Katello::Pulp3::Api::AnsibleCollection.new(SmartProxy.pulp_primary!).api_client)
@@ -224,7 +224,7 @@ module Katello
224
224
  remotes_api.list(args).results
225
225
  end
226
226
 
227
- def remotes_list_all(_smart_proxy, options)
227
+ def remotes_list_all(_smart_proxy, options = {})
228
228
  self.class.fetch_from_list do |page_opts|
229
229
  remotes_api.list(page_opts.merge(options))
230
230
  end
@@ -3,6 +3,7 @@ module Katello
3
3
  class Deb < PulpContentUnit
4
4
  include LazyAccessor
5
5
  CONTENT_TYPE = "deb".freeze
6
+ PULPCORE_CONTENT_TYPE = "deb.package".freeze
6
7
 
7
8
  def self.content_api
8
9
  PulpDebClient::ContentPackagesApi.new(Katello::Pulp3::Api::Apt.new(SmartProxy.pulp_primary!).api_client)
@@ -3,6 +3,7 @@ module Katello
3
3
  class DockerManifest < PulpContentUnit
4
4
  include LazyAccessor
5
5
  CONTENT_TYPE = "docker_manifest".freeze
6
+ PULPCORE_CONTENT_TYPE = "container.manifest".freeze
6
7
 
7
8
  def self.content_api
8
9
  PulpContainerClient::ContentManifestsApi.new(Katello::Pulp3::Api::Docker.new(SmartProxy.pulp_primary!).api_client)
@@ -2,9 +2,10 @@ module Katello
2
2
  module Pulp3
3
3
  class DockerManifestList < PulpContentUnit
4
4
  include LazyAccessor
5
+ PULPCORE_CONTENT_TYPE = "container.manifest".freeze
5
6
 
6
- def self.content_api
7
- PulpContainerClient::ContentManifestsApi.new(Katello::Pulp3::Api::Docker.new(SmartProxy.pulp_primary!).api_client)
7
+ def self.content_api(smart_proxy = SmartProxy.pulp_primary!)
8
+ PulpContainerClient::ContentManifestsApi.new(Katello::Pulp3::Api::Docker.new(smart_proxy).api_client)
8
9
  end
9
10
 
10
11
  def self.ids_for_repository(repo_id)
@@ -13,10 +14,14 @@ module Katello
13
14
  repo_content_list.map { |content| content.try(:pulp_href) }
14
15
  end
15
16
 
16
- def self.content_unit_list(page_opts)
17
+ def self.page_options(page_opts = {})
17
18
  page_opts[:media_type] = ['application/vnd.docker.distribution.manifest.list.v2+json',
18
19
  'application/vnd.oci.image.index.v1+json']
19
- self.content_api.list(page_opts)
20
+ page_opts
21
+ end
22
+
23
+ def self.content_unit_list(page_opts = {})
24
+ self.content_api.list(self.page_options(page_opts))
20
25
  end
21
26
 
22
27
  def self.generate_model_row(unit)
@@ -3,6 +3,7 @@ module Katello
3
3
  class DockerTag < PulpContentUnit
4
4
  include LazyAccessor
5
5
  CONTENT_TYPE = "docker_tag".freeze
6
+ PULPCORE_CONTENT_TYPE = "container.tag".freeze
6
7
 
7
8
  def self.content_api
8
9
  PulpContainerClient::ContentTagsApi.new(Katello::Pulp3::Api::Docker.new(SmartProxy.pulp_primary!).api_client)
@@ -2,6 +2,7 @@ module Katello
2
2
  module Pulp3
3
3
  class Erratum < PulpContentUnit
4
4
  include LazyAccessor
5
+ PULPCORE_CONTENT_TYPE = "rpm.advisory".freeze
5
6
 
6
7
  def self.content_api
7
8
  PulpRpmClient::ContentAdvisoriesApi.new(Katello::Pulp3::Api::Yum.new(SmartProxy.pulp_primary!).api_client)
@@ -3,6 +3,7 @@ module Katello
3
3
  class FileUnit < PulpContentUnit
4
4
  include LazyAccessor
5
5
  CONTENT_TYPE = "file".freeze
6
+ PULPCORE_CONTENT_TYPE = "file.file".freeze
6
7
 
7
8
  def self.content_api
8
9
  PulpFileClient::ContentFilesApi.new(Katello::Pulp3::Api::File.new(SmartProxy.pulp_primary!).api_client)
@@ -2,6 +2,7 @@ module Katello
2
2
  module Pulp3
3
3
  class ModuleStream < PulpContentUnit
4
4
  include LazyAccessor
5
+ PULPCORE_CONTENT_TYPE = "rpm.modulemd".freeze
5
6
 
6
7
  def self.content_api
7
8
  PulpRpmClient::ContentModulemdsApi.new(Katello::Pulp3::Api::Yum.new(SmartProxy.pulp_primary!).api_client)
@@ -2,6 +2,7 @@ module Katello
2
2
  module Pulp3
3
3
  class PackageGroup < PulpContentUnit
4
4
  include LazyAccessor
5
+ PULPCORE_CONTENT_TYPE = "rpm.packagegroup".freeze
5
6
 
6
7
  lazy_accessor :optional_package_names, :mandatory_package_names,
7
8
  :conditional_package_names, :default_package_names, :_id,
@@ -7,6 +7,45 @@ module Katello
7
7
  # Any class that extends this class should define:
8
8
  # Class#update_model
9
9
 
10
+ # rubocop:disable Metrics/MethodLength
11
+ def self.katello_name_from_pulpcore_name(pulpcore_name, repo)
12
+ # Counts shouldn't be needed for more than the default generic content unit type.
13
+ if repo.generic?
14
+ generic_unit = repo.repository_type.default_managed_content_type
15
+ if pulpcore_name == generic_unit.pulpcore_name
16
+ return generic_unit.content_type
17
+ end
18
+ end
19
+
20
+ case pulpcore_name
21
+ when ::Katello::Pulp3::Rpm::PULPCORE_CONTENT_TYPE
22
+ ::Katello::Rpm::CONTENT_TYPE
23
+ when ::Katello::Pulp3::Srpm::PULPCORE_CONTENT_TYPE
24
+ ::Katello::Srpm::CONTENT_TYPE
25
+ when ::Katello::Pulp3::PackageGroup::PULPCORE_CONTENT_TYPE
26
+ ::Katello::PackageGroup::CONTENT_TYPE
27
+ when ::Katello::Pulp3::Erratum::PULPCORE_CONTENT_TYPE
28
+ ::Katello::Erratum::CONTENT_TYPE
29
+ when ::Katello::Pulp3::ModuleStream::PULPCORE_CONTENT_TYPE
30
+ 'module_stream'
31
+ when ::Katello::Pulp3::DockerTag::PULPCORE_CONTENT_TYPE
32
+ ::Katello::DockerTag::CONTENT_TYPE
33
+ when ::Katello::Pulp3::DockerManifest::PULPCORE_CONTENT_TYPE
34
+ ::Katello::DockerManifest::CONTENT_TYPE
35
+ when ::Katello::Pulp3::DockerManifestList::PULPCORE_CONTENT_TYPE
36
+ ::Katello::DockerManifestList::CONTENT_TYPE
37
+ when ::Katello::Pulp3::FileUnit::PULPCORE_CONTENT_TYPE
38
+ ::Katello::FileUnit::CONTENT_TYPE
39
+ when ::Katello::Pulp3::Deb::PULPCORE_CONTENT_TYPE
40
+ ::Katello::Deb::CONTENT_TYPE
41
+ when ::Katello::Pulp3::AnsibleCollection::PULPCORE_CONTENT_TYPE
42
+ ::Katello::AnsibleCollection::CONTENT_TYPE
43
+ else
44
+ pulpcore_name
45
+ end
46
+ end
47
+ # rubocop:enable Metrics/MethodLength
48
+
10
49
  def self.content_api
11
50
  fail NotImplementedError
12
51
  end
@@ -75,7 +75,7 @@ module Katello
75
75
  end
76
76
 
77
77
  def version_href
78
- fetch_repository.latest_version_href
78
+ fetch_repository&.latest_version_href
79
79
  end
80
80
 
81
81
  def publication_href
@@ -144,7 +144,12 @@ module Katello
144
144
 
145
145
  def common_remote_options
146
146
  remote_options = {
147
- name: backend_object_name
147
+ name: backend_object_name,
148
+ total_timeout: Setting[:sync_total_timeout],
149
+ connect_timeout: Setting[:sync_connect_timeout_v2],
150
+ sock_connect_timeout: Setting[:sync_sock_connect_timeout],
151
+ sock_read_timeout: Setting[:sync_sock_read_timeout],
152
+ rate_limit: Setting[:download_rate_limit]
148
153
  }
149
154
  remote_options.merge!({download_concurrency: repo.download_concurrency}) if repo.download_concurrency
150
155
  remote_options.merge!(ssl_remote_options)
@@ -211,6 +216,20 @@ module Katello
211
216
  end
212
217
  end
213
218
 
219
+ def count_by_pulpcore_type(service_class)
220
+ # Currently only supports SRPMs and Docker Manifest Lists
221
+ fail NotImplementedError unless [::Katello::Pulp3::Srpm, ::Katello::Pulp3::DockerManifestList].include?(service_class)
222
+ count = service_class.content_api(smart_proxy).list(service_class.page_options(limit: 1, fields: ['count'], repository_version: version_href)).count
223
+ return 0 if count.nil?
224
+ count
225
+ end
226
+
227
+ def latest_content_counts
228
+ version_pulp_href = version_href
229
+ return unless version_pulp_href
230
+ api.repository_versions_api.read(version_pulp_href)&.content_summary&.present
231
+ end
232
+
214
233
  def pulp3_enabled_repo_types
215
234
  Katello::RepositoryTypeManager.enabled_repository_types.values.select do |repository_type|
216
235
  smart_proxy.pulp3_repository_type_support?(repository_type)
@@ -3,6 +3,7 @@ module Katello
3
3
  class Rpm < PulpContentUnit
4
4
  include LazyAccessor
5
5
  CONTENT_TYPE = "rpm".freeze
6
+ PULPCORE_CONTENT_TYPE = "rpm.package".freeze
6
7
 
7
8
  PULP_INDEXED_FIELDS = %w(pulp_href name version release arch epoch summary is_modular rpm_sourcerpm location_href pkgId).freeze
8
9
 
@@ -102,7 +102,7 @@ module Katello
102
102
  acs_remotes = Katello::SmartProxyAlternateContentSource.pluck(:remote_href)
103
103
  pulp3_enabled_repo_types.each do |repo_type|
104
104
  api = repo_type.pulp3_api(smart_proxy)
105
- remotes = api.remotes_list
105
+ remotes = api.remotes_list_all(smart_proxy)
106
106
 
107
107
  remotes.each do |remote|
108
108
  if !repo_names.include?(remote.name) && !acs_remotes.include?(remote.pulp_href)
@@ -2,6 +2,7 @@ module Katello
2
2
  module Pulp3
3
3
  class Srpm < PulpContentUnit
4
4
  include LazyAccessor
5
+ PULPCORE_CONTENT_TYPE = "rpm.package".freeze
5
6
 
6
7
  CONTENT_TYPE = "srpm".freeze
7
8
 
@@ -13,8 +14,8 @@ module Katello
13
14
  :changelog, :group, :size, :url, :build_time, :group,
14
15
  :initializer => :pulp_facts
15
16
 
16
- def self.content_api
17
- PulpRpmClient::ContentPackagesApi.new(Katello::Pulp3::Api::Yum.new(SmartProxy.pulp_primary!).api_client)
17
+ def self.content_api(smart_proxy = SmartProxy.pulp_primary!)
18
+ PulpRpmClient::ContentPackagesApi.new(Katello::Pulp3::Api::Yum.new(smart_proxy).api_client)
18
19
  end
19
20
 
20
21
  def self.page_options(page_opts = {})
@@ -241,9 +241,11 @@ module Katello
241
241
  host.subscription_facet.update_from_consumer_attributes(host.subscription_facet.candlepin_consumer.
242
242
  consumer_attributes.except(:guestIds, :facts))
243
243
  host.subscription_facet.save!
244
- host.subscription_facet.update_subscription_status
245
- host.content_facet.update_errata_status
246
- host.refresh_global_status!
244
+ host.refresh_statuses([
245
+ ::Katello::ErrataStatus,
246
+ ::Katello::SubscriptionStatus,
247
+ ::Katello::RhelLifecycleStatus
248
+ ])
247
249
  end
248
250
 
249
251
  def set_host_collections(host, activation_keys)
@@ -304,6 +306,7 @@ module Katello
304
306
  host.content_facet.applicable_errata = []
305
307
  host.content_facet.uuid = nil
306
308
  host.content_facet.content_view_environments = []
309
+ host.content_facet.content_source = ::SmartProxy.pulp_primary
307
310
  host.content_facet.save!
308
311
  Rails.logger.debug "remove_host_artifacts: marking CVEs unchanged to prevent backend update"
309
312
  host.content_facet.mark_cves_unchanged
@@ -181,7 +181,7 @@ module Katello
181
181
 
182
182
  class GenericContentType < ContentType
183
183
  attr_accessor :pulp3_api, :pulp3_model, :filename_key, :duplicates_allowed, :pluralized_name,
184
- :model_name, :model_version, :model_filename, :model_additional_metadata
184
+ :model_name, :model_version, :model_filename, :model_additional_metadata, :pulpcore_name
185
185
 
186
186
  def initialize(options)
187
187
  super
@@ -195,6 +195,7 @@ module Katello
195
195
  self.model_version = options[:model_version]
196
196
  self.model_filename = options[:model_filename]
197
197
  self.model_additional_metadata = options[:model_additional_metadata]
198
+ self.pulpcore_name = options[:pulpcore_name]
198
199
  end
199
200
 
200
201
  def label