katello 3.17.0.rc1 → 3.17.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 (293) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/registry/registry_proxies_controller.rb +5 -3
  3. data/app/controllers/katello/api/rhsm/candlepin_dynflow_proxy_controller.rb +1 -1
  4. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +2 -2
  5. data/app/controllers/katello/api/v2/api_controller.rb +1 -1
  6. data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -1
  7. data/app/controllers/katello/api/v2/content_uploads_controller.rb +5 -5
  8. data/app/controllers/katello/api/v2/content_view_repositories_controller.rb +47 -0
  9. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +50 -19
  10. data/app/controllers/katello/api/v2/gpg_keys_controller.rb +1 -1
  11. data/app/controllers/katello/api/v2/host_tracer_controller.rb +0 -5
  12. data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +15 -0
  13. data/app/controllers/katello/api/v2/repositories_controller.rb +24 -14
  14. data/app/controllers/katello/api/v2/subscriptions_controller.rb +1 -1
  15. data/app/controllers/katello/concerns/api/v2/{associations_permission_check.rb → authorization.rb} +20 -2
  16. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +11 -5
  17. data/app/helpers/katello/content_view_helper.rb +1 -1
  18. data/app/lib/actions/candlepin/product/content_add.rb +1 -2
  19. data/app/lib/actions/katello/capsule_content/refresh_repos.rb +1 -1
  20. data/app/lib/actions/katello/capsule_content/sync.rb +2 -2
  21. data/app/lib/actions/katello/capsule_content/sync_capsule.rb +17 -3
  22. data/app/lib/actions/katello/content_view/capsule_sync.rb +1 -1
  23. data/app/lib/actions/katello/content_view/destroy.rb +2 -2
  24. data/app/lib/actions/katello/content_view/incremental_updates.rb +1 -1
  25. data/app/lib/actions/katello/content_view/promote_to_environment.rb +1 -0
  26. data/app/lib/actions/katello/content_view/publish.rb +12 -7
  27. data/app/lib/actions/katello/content_view_puppet_environment/clone.rb +1 -1
  28. data/app/lib/actions/katello/content_view_puppet_environment/create.rb +2 -2
  29. data/app/lib/actions/katello/content_view_version/incremental_update.rb +4 -4
  30. data/app/lib/actions/katello/organization/manifest_delete.rb +1 -0
  31. data/app/lib/actions/katello/organization/manifest_import.rb +1 -0
  32. data/app/lib/actions/katello/organization/manifest_refresh.rb +1 -0
  33. data/app/lib/actions/katello/product/content_create.rb +3 -3
  34. data/app/lib/actions/katello/product/destroy.rb +25 -4
  35. data/app/lib/actions/katello/repository/clone_contents.rb +3 -3
  36. data/app/lib/actions/katello/repository/clone_to_environment.rb +2 -2
  37. data/app/lib/actions/katello/repository/clone_to_version.rb +1 -1
  38. data/app/lib/actions/katello/repository/create.rb +1 -1
  39. data/app/lib/actions/katello/repository/destroy.rb +10 -4
  40. data/app/lib/actions/katello/repository/export.rb +3 -3
  41. data/app/lib/actions/katello/repository/finish_upload.rb +2 -2
  42. data/app/lib/actions/katello/repository/import_upload.rb +3 -3
  43. data/app/lib/actions/katello/repository/metadata_generate.rb +1 -1
  44. data/app/lib/actions/katello/repository/multi_clone_contents.rb +6 -10
  45. data/app/lib/actions/katello/repository/purge_empty_content.rb +1 -1
  46. data/app/lib/actions/katello/repository/remove_content.rb +1 -1
  47. data/app/lib/actions/katello/repository/sync.rb +35 -25
  48. data/app/lib/actions/katello/repository/update.rb +30 -19
  49. data/app/lib/actions/katello/repository/update_http_proxy_details.rb +1 -1
  50. data/app/lib/actions/katello/repository/update_metadata_sync.rb +1 -1
  51. data/app/lib/actions/katello/repository/upload_files.rb +2 -2
  52. data/app/lib/actions/katello/repository/verify_checksum.rb +28 -0
  53. data/app/lib/actions/pulp/content_view_puppet_environment/copy_contents.rb +1 -1
  54. data/app/lib/actions/pulp/orchestration/orphan_cleanup/remove_orphans.rb +1 -1
  55. data/app/lib/actions/pulp/orchestration/repository/sync.rb +2 -1
  56. data/app/lib/actions/pulp/repository/copy_all_units.rb +1 -1
  57. data/app/lib/actions/pulp/repository/copy_units.rb +1 -1
  58. data/app/lib/actions/pulp/repository/create.rb +1 -1
  59. data/app/lib/actions/pulp/repository/destroy.rb +1 -1
  60. data/app/lib/actions/pulp/repository/remove_units.rb +2 -2
  61. data/app/lib/actions/pulp/repository/sync.rb +3 -2
  62. data/app/lib/actions/pulp3/capsule_content/sync.rb +3 -1
  63. data/app/lib/actions/pulp3/content_guard/refresh_all_distributions.rb +19 -0
  64. data/app/lib/actions/pulp3/content_migration.rb +3 -3
  65. data/app/lib/actions/pulp3/content_view_version/create_exporter.rb +20 -0
  66. data/app/lib/actions/pulp3/content_view_version/destroy_exporter.rb +16 -0
  67. data/app/lib/actions/pulp3/content_view_version/export.rb +19 -0
  68. data/app/lib/actions/pulp3/import_migration.rb +3 -3
  69. data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +69 -0
  70. data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +1 -2
  71. data/app/lib/actions/pulp3/orchestration/repository/create.rb +1 -1
  72. data/app/lib/actions/pulp3/orchestration/repository/sync.rb +3 -1
  73. data/app/lib/actions/pulp3/orchestration/repository/trigger_update_repo_cert_guard.rb +22 -0
  74. data/app/lib/actions/pulp3/orchestration/repository/upload_content.rb +1 -1
  75. data/app/lib/actions/pulp3/repository/copy_content.rb +0 -1
  76. data/app/lib/actions/pulp3/repository/multi_copy_units.rb +2 -2
  77. data/app/lib/actions/pulp3/repository/presenters/repair_presenter.rb +85 -0
  78. data/app/lib/actions/pulp3/repository/refresh_distribution.rb +11 -5
  79. data/app/lib/actions/pulp3/repository/repair.rb +29 -0
  80. data/app/lib/actions/pulp3/repository/save_artifact.rb +1 -1
  81. data/app/lib/actions/pulp3/repository/save_distribution_references.rb +2 -2
  82. data/app/lib/actions/pulp3/repository/save_version.rb +20 -16
  83. data/app/lib/actions/pulp3/repository/save_versions.rb +1 -1
  84. data/app/lib/actions/pulp3/repository/sync.rb +1 -1
  85. data/app/lib/actions/pulp3/repository/update_cv_repository_cert_guard.rb +6 -2
  86. data/app/lib/actions/pulp3/repository/upload_file.rb +2 -2
  87. data/app/lib/katello/concerns/base_template_scope_extensions.rb +5 -3
  88. data/app/lib/katello/concerns/permission_extensions.rb +14 -0
  89. data/app/lib/katello/foreman.rb +1 -1
  90. data/app/lib/katello/resources/candlepin/product.rb +0 -11
  91. data/app/lib/katello/resources/registry.rb +3 -3
  92. data/app/models/katello/authorization/content_view_version_export_history.rb +11 -0
  93. data/app/models/katello/authorization/product.rb +4 -0
  94. data/app/models/katello/authorization/repository.rb +8 -0
  95. data/app/models/katello/concerns/content_facet_host_extensions.rb +2 -1
  96. data/app/models/katello/concerns/organization_extensions.rb +6 -1
  97. data/app/models/katello/concerns/pulp_database_unit.rb +2 -2
  98. data/app/models/katello/concerns/redhat_extensions.rb +4 -2
  99. data/app/models/katello/concerns/smart_proxy_extensions.rb +33 -16
  100. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +1 -1
  101. data/app/models/katello/content_view.rb +1 -1
  102. data/app/models/katello/content_view_package_filter.rb +1 -1
  103. data/app/models/katello/content_view_puppet_environment.rb +1 -1
  104. data/app/models/katello/content_view_version.rb +3 -1
  105. data/app/models/katello/content_view_version_export_history.rb +22 -0
  106. data/app/models/katello/docker_meta_tag.rb +1 -1
  107. data/app/models/katello/errata_status.rb +21 -12
  108. data/app/models/katello/erratum.rb +1 -1
  109. data/app/models/katello/glue/candlepin/owner.rb +4 -2
  110. data/app/models/katello/glue/pulp/repo.rb +3 -1
  111. data/app/models/katello/host/content_facet.rb +8 -0
  112. data/app/models/katello/kt_environment.rb +1 -1
  113. data/app/models/katello/package_group.rb +1 -1
  114. data/app/models/katello/ping.rb +8 -3
  115. data/app/models/katello/pulp3/content_guard.rb +1 -1
  116. data/app/models/katello/purpose_status.rb +2 -2
  117. data/app/models/katello/repository.rb +23 -15
  118. data/app/models/katello/rhsm_fact_parser.rb +1 -1
  119. data/app/models/katello/root_repository.rb +2 -15
  120. data/app/models/katello/sync_plan.rb +8 -0
  121. data/app/models/setting/content.rb +3 -1
  122. data/app/services/cert/certs.rb +10 -2
  123. data/app/services/katello/candlepin/event_handler.rb +1 -0
  124. data/app/services/katello/host_status_manager.rb +7 -0
  125. data/app/services/katello/pulp/content.rb +1 -1
  126. data/app/services/katello/pulp/repository.rb +7 -7
  127. data/app/services/katello/pulp/repository/deb.rb +2 -2
  128. data/app/services/katello/pulp/repository/docker.rb +5 -5
  129. data/app/services/katello/pulp/repository/file.rb +2 -2
  130. data/app/services/katello/pulp/repository/ostree.rb +2 -2
  131. data/app/services/katello/pulp/repository/puppet.rb +2 -2
  132. data/app/services/katello/pulp/repository/yum.rb +5 -6
  133. data/app/services/katello/pulp/smart_proxy_repository.rb +1 -1
  134. data/app/services/katello/pulp3/ansible_collection.rb +2 -2
  135. data/app/services/katello/pulp3/api/core.rb +16 -0
  136. data/app/services/katello/pulp3/content.rb +3 -3
  137. data/app/services/katello/pulp3/content_view_version/export.rb +71 -0
  138. data/app/services/katello/pulp3/distribution.rb +2 -2
  139. data/app/services/katello/pulp3/docker_blob.rb +2 -2
  140. data/app/services/katello/pulp3/docker_manifest.rb +2 -2
  141. data/app/services/katello/pulp3/docker_manifest_list.rb +2 -2
  142. data/app/services/katello/pulp3/docker_tag.rb +2 -2
  143. data/app/services/katello/pulp3/erratum.rb +2 -2
  144. data/app/services/katello/pulp3/file_unit.rb +2 -2
  145. data/app/services/katello/pulp3/migration.rb +139 -34
  146. data/app/services/katello/pulp3/migration_plan.rb +50 -14
  147. data/app/services/katello/pulp3/migration_switchover.rb +41 -9
  148. data/app/services/katello/pulp3/module_stream.rb +2 -2
  149. data/app/services/katello/pulp3/package_group.rb +2 -2
  150. data/app/services/katello/pulp3/repository.rb +9 -9
  151. data/app/services/katello/pulp3/repository/docker.rb +18 -10
  152. data/app/services/katello/pulp3/repository/yum.rb +25 -13
  153. data/app/services/katello/pulp3/repository_mirror.rb +2 -1
  154. data/app/services/katello/pulp3/rpm.rb +2 -2
  155. data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +2 -2
  156. data/app/services/katello/pulp3/smart_proxy_repository.rb +1 -1
  157. data/app/services/katello/pulp3/srpm.rb +2 -2
  158. data/app/services/katello/pulp3/task_group.rb +1 -1
  159. data/app/services/katello/pulp3/yum_metadata_file.rb +2 -2
  160. data/app/services/katello/registration_manager.rb +9 -3
  161. data/app/services/katello/repository_type.rb +1 -1
  162. data/app/services/katello/smart_proxy_helper.rb +14 -17
  163. data/app/views/foreman/job_templates/install_errata_-_katello_ansible_default.erb +10 -2
  164. data/app/views/katello/api/v2/content_view_repositories/show_all.json.rabl +8 -0
  165. data/app/views/katello/api/v2/content_view_version_export_histories/index.json.rabl +7 -0
  166. data/app/views/katello/api/v2/content_view_version_export_histories/show.json.rabl +13 -0
  167. data/app/views/katello/api/v2/package_groups/show.json.rabl +1 -1
  168. data/app/views/katello/api/v2/packages/show.json.rabl +1 -1
  169. data/app/views/katello/api/v2/repositories/base.json.rabl +2 -1
  170. data/app/views/katello/api/v2/srpms/show.json.rabl +1 -1
  171. data/app/views/katello/api/v2/sync_plans/show.json.rabl +2 -1
  172. data/config/routes/api/rhsm.rb +1 -0
  173. data/config/routes/api/v2.rb +8 -1
  174. data/db/migrate/20200818040551_add_content_view_version_export_history.rb +13 -0
  175. data/db/migrate/20200818192230_update_system_purpose_status.rb +12 -0
  176. data/db/migrate/20200820145217_add_download_concurrency_to_katello_root_repositories.rb +5 -0
  177. data/db/migrate/20200910140340_remove_distribution_uuid.rb +5 -0
  178. data/db/migrate/20200914200906_remove_auto_enabled.rb +5 -0
  179. data/engines/bastion/app/assets/javascripts/bastion/bastion.js +1 -0
  180. data/engines/bastion/app/assets/javascripts/bastion/routing.module.js +1 -1
  181. data/engines/bastion/vendor/assets/javascripts/bastion/angular-ui-router/stateEvents.js +300 -0
  182. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.controller.js +1 -1
  183. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-add-subscriptions.controller.js +1 -1
  184. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +1 -1
  185. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-subscriptions.controller.js +1 -1
  186. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-products.controller.js +1 -1
  187. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-repositories.controller.js +1 -1
  188. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +1 -1
  189. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-host-collections-modal.controller.js +1 -1
  190. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-module-streams-modal.controller.js +1 -1
  191. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js +1 -1
  192. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-subscriptions-modal.controller.js +1 -1
  193. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-traces-modal.controller.js +1 -1
  194. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js +1 -1
  195. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +1 -1
  196. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-installed.controller.js +1 -1
  197. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +1 -1
  198. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js +1 -1
  199. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js +1 -1
  200. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +1 -1
  201. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-traces.controller.js +1 -1
  202. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-host-collections.controller.js +1 -1
  203. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-subscriptions.controller.js +1 -1
  204. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +4 -2
  205. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-host-collections.controller.js +1 -1
  206. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-subscriptions.controller.js +1 -1
  207. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -2
  208. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.controller.js +1 -1
  209. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/content-view-composite-available-content-views.controller.js +1 -1
  210. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/content-view-composite-content-views-list.controller.js +1 -1
  211. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-docker-repositories.controller.js +1 -1
  212. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-ostree-repositories.controller.js +1 -1
  213. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-docker-repositories-list.controller.js +1 -1
  214. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-ostree-repositories-list.controller.js +1 -1
  215. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-versions.controller.js +1 -1
  216. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-errata-filter.controller.js +1 -1
  217. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-package-group-filter.controller.js +1 -1
  218. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-names.controller.js +1 -1
  219. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-versions.controller.js +1 -1
  220. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-modules.controller.js +1 -1
  221. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +1 -1
  222. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/debs.controller.js +1 -1
  223. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/deb-content-views.controller.js +1 -1
  224. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/deb-repositories.controller.js +1 -1
  225. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/environment-content.controller.js +1 -1
  226. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum-repositories.controller.js +1 -1
  227. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/file-content-views.controller.js +1 -1
  228. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/file-repositories.controller.js +1 -1
  229. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/files.controller.js +1 -1
  230. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/host-collections.controller.js +1 -1
  231. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +57 -12
  232. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +45 -8
  233. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +42 -5
  234. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +36 -0
  235. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +36 -0
  236. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +36 -0
  237. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +45 -8
  238. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +36 -0
  239. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +36 -0
  240. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +36 -0
  241. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +4 -4
  242. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +11 -2
  243. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/organization-selector.controller.js +5 -14
  244. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branch-repositories.controller.js +1 -1
  245. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/package-repositories.controller.js +1 -1
  246. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/packages.controller.js +1 -1
  247. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/product-bulk-action.factory.js +1 -0
  248. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-sync-plan-modal.controller.js +1 -1
  249. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js +1 -1
  250. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +1 -1
  251. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +6 -0
  252. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +7 -1
  253. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +0 -9
  254. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +1 -1
  255. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +0 -11
  256. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js +1 -0
  257. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +16 -1
  258. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/products.html +6 -0
  259. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-content-views.controller.js +1 -1
  260. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-repositories.controller.js +1 -1
  261. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.controller.js +1 -1
  262. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details-info.controller.js +4 -3
  263. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html +1 -1
  264. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.controller.js +1 -1
  265. data/lib/katello/engine.rb +2 -0
  266. data/lib/katello/permission_creator.rb +14 -9
  267. data/lib/katello/tasks/clean_published_repo_directories.rake +3 -3
  268. data/lib/katello/tasks/pulp3_content_switchover.rake +24 -6
  269. data/lib/katello/tasks/pulp3_migration.rake +4 -2
  270. data/lib/katello/tasks/pulp3_post_migration_check.rake +2 -2
  271. data/lib/katello/tasks/reimport.rake +1 -1
  272. data/lib/katello/tasks/repository.rake +15 -2
  273. data/lib/katello/tasks/unify_hosts.rake +1 -0
  274. data/lib/katello/tasks/upgrades/3.11/update_puppet_repos.rake +3 -3
  275. data/lib/katello/tasks/upgrades/3.12/remove_pulp2_notifier.rake +2 -2
  276. data/lib/katello/tasks/upgrades/3.8/clear_checksum_type.rake +2 -2
  277. data/lib/katello/version.rb +1 -1
  278. data/locale/action_names.rb +47 -47
  279. data/locale/katello.pot +160 -160
  280. data/webpack/containers/Application/config.js +4 -4
  281. data/webpack/redux/actions/RedHatRepositories/helpers.js +1 -1
  282. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +22 -32
  283. data/webpack/scenes/Subscriptions/Manifest/__tests__/SimpleContentAccess.test.js +0 -14
  284. data/webpack/scenes/Subscriptions/Manifest/index.js +2 -5
  285. data/webpack/scenes/Subscriptions/SubscriptionReducer.js +15 -6
  286. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +0 -1
  287. data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +3 -0
  288. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +24 -0
  289. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +114 -26
  290. metadata +67 -33
  291. data/app/lib/actions/candlepin/product/content_update_enablement.rb +0 -18
  292. data/app/lib/actions/katello/repository/content_update.rb +0 -41
  293. data/app/lib/actions/katello/repository/update_cv_repo_cert_guard.rb +0 -17
@@ -1,10 +1,10 @@
1
1
  module Actions
2
2
  module Pulp3
3
3
  class ContentMigration < Pulp3::AbstractAsyncTask
4
- def plan(smart_proxy = SmartProxy.pulp_master)
4
+ def plan(smart_proxy, options)
5
5
  sequence do
6
- plan_self(smart_proxy_id: smart_proxy.id)
7
- plan_action(Actions::Pulp3::ImportMigration)
6
+ action = plan_self(smart_proxy_id: smart_proxy.id)
7
+ plan_action(Actions::Pulp3::ImportMigration, options.merge(:dependency => action.output))
8
8
  end
9
9
  end
10
10
 
@@ -0,0 +1,20 @@
1
+ module Actions
2
+ module Pulp3
3
+ module ContentViewVersion
4
+ class CreateExporter < Pulp3::Abstract
5
+ input_format do
6
+ param :smart_proxy_id, Integer
7
+ param :content_view_version_id, Integer
8
+ param :destination_server, String
9
+ end
10
+
11
+ def run
12
+ cvv = ::Katello::ContentViewVersion.find(input[:content_view_version_id])
13
+ output[:exporter_data] = ::Katello::Pulp3::ContentViewVersion::Export.new(smart_proxy: smart_proxy,
14
+ content_view_version: cvv,
15
+ destination_server: input[:destination_server]).create_exporter
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,16 @@
1
+ module Actions
2
+ module Pulp3
3
+ module ContentViewVersion
4
+ class DestroyExporter < Pulp3::Abstract
5
+ input_format do
6
+ param :smart_proxy_id, Integer
7
+ param :exporter_data, Hash
8
+ end
9
+
10
+ def run
11
+ ::Katello::Pulp3::ContentViewVersion::Export.new(smart_proxy: smart_proxy).destroy_exporter(input[:exporter_data][:pulp_href])
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,19 @@
1
+ module Actions
2
+ module Pulp3
3
+ module ContentViewVersion
4
+ class Export < Pulp3::AbstractAsyncTask
5
+ input_format do
6
+ param :content_view_version_id, Integer
7
+ param :smart_proxy_id, Integer
8
+ param :exporter_data, Hash
9
+ end
10
+
11
+ def invoke_external_task
12
+ cvv = ::Katello::ContentViewVersion.find(input[:content_view_version_id])
13
+ ::Katello::Pulp3::ContentViewVersion::Export.new(smart_proxy: smart_proxy,
14
+ content_view_version: cvv).create_export(input[:exporter_data][:pulp_href])
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -1,12 +1,12 @@
1
1
  module Actions
2
2
  module Pulp3
3
3
  class ImportMigration < Pulp3::Abstract
4
- def plan
5
- plan_self
4
+ def plan(options)
5
+ plan_self(options)
6
6
  end
7
7
 
8
8
  def run
9
- migration_service = ::Katello::Pulp3::Migration.new(SmartProxy.pulp_master)
9
+ migration_service = ::Katello::Pulp3::Migration.new(SmartProxy.pulp_primary)
10
10
  migration_service.import_pulp3_content
11
11
  end
12
12
  end
@@ -0,0 +1,69 @@
1
+ module Actions
2
+ module Pulp3
3
+ module Orchestration
4
+ module ContentViewVersion
5
+ class Export < Actions::EntryAction
6
+ input_format do
7
+ param :smart_proxy_id, Integer
8
+ param :content_view_version_id, Integer
9
+ param :export_history_id, Integer
10
+ param :exporter_data, Hash
11
+ param :destination_server, String
12
+ end
13
+
14
+ output_format do
15
+ param :exported_file_name, String
16
+ param :exported_file_checksum, String
17
+ end
18
+
19
+ def plan(content_view_version, destination_server:)
20
+ action_subject(content_view_version)
21
+ unless File.directory?(Setting['pulpcore_export_destination'])
22
+ fail ::Foreman::Exception, N_("Unable to export. 'pulpcore_export_destination' setting is not set to a valid directory.")
23
+ end
24
+
25
+ sequence do
26
+ smart_proxy = SmartProxy.pulp_primary!
27
+ action_output = plan_action(::Actions::Pulp3::ContentViewVersion::CreateExporter,
28
+ content_view_version_id: content_view_version.id,
29
+ smart_proxy_id: smart_proxy.id,
30
+ destination_server: destination_server).output
31
+
32
+ plan_action(::Actions::Pulp3::ContentViewVersion::Export,
33
+ content_view_version_id: content_view_version.id,
34
+ smart_proxy_id: smart_proxy.id,
35
+ exporter_data: action_output[:exporter_data]
36
+ )
37
+
38
+ plan_self(exporter_data: action_output[:exporter_data], smart_proxy_id: smart_proxy.id,
39
+ destination_server: destination_server,
40
+ content_view_version_id: content_view_version.id)
41
+
42
+ plan_action(::Actions::Pulp3::ContentViewVersion::DestroyExporter,
43
+ smart_proxy_id: smart_proxy.id,
44
+ exporter_data: action_output[:exporter_data])
45
+ end
46
+ end
47
+
48
+ def run
49
+ smart_proxy = ::SmartProxy.find(input[:smart_proxy_id])
50
+ api = ::Katello::Pulp3::Api::Core.new(smart_proxy)
51
+ export_data = api.export_api.list(input[:exporter_data][:pulp_href]).results.first
52
+ output[:exported_file_name], output[:exported_file_checksum] = export_data.output_file_info.first
53
+ ::Katello::ContentViewVersionExportHistory.create!(content_view_version_id: input[:content_view_version_id],
54
+ destination_server: input[:destination_server],
55
+ path: File.dirname(output[:exported_file_name].to_s))
56
+ end
57
+
58
+ def humanized_name
59
+ _("Export")
60
+ end
61
+
62
+ def rescue_strategy
63
+ Dynflow::Action::Rescue::Skip
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -16,8 +16,7 @@ module Actions
16
16
  copy_action = plan_action(Actions::Pulp3::Repository::CopyContent, source_repositories.first, smart_proxy, target_repo,
17
17
  filter_ids: filter_ids, solve_dependencies: solve_dependencies,
18
18
  rpm_filenames: rpm_filenames)
19
- plan_action(Actions::Pulp3::Repository::SaveVersion, target_repo,
20
- repository_details: { latest_version_href: copy_action.output[:latest_version_href] }, tasks: copy_action.output[:pulp_tasks])
19
+ plan_action(Actions::Pulp3::Repository::SaveVersion, target_repo, tasks: copy_action.output[:pulp_tasks])
21
20
  else
22
21
  #if we are not filtering, copy the version to the cv repository, and the units for each additional repo
23
22
  action = plan_action(Actions::Pulp3::Repository::CopyVersion, source_repositories.first, smart_proxy, target_repo)
@@ -8,7 +8,7 @@ module Actions
8
8
  create_action = plan_action(Actions::Pulp3::Repository::Create, repository, smart_proxy)
9
9
  plan_action(Actions::Pulp3::Repository::SaveVersion, repository, repository_details: create_action.output[:response])
10
10
 
11
- if repository.content_view.default? || !smart_proxy.pulp_master?
11
+ if repository.content_view.default? || !smart_proxy.pulp_primary?
12
12
  plan_action(Actions::Pulp3::Repository::CreateRemote, repository, smart_proxy)
13
13
  end
14
14
  end
@@ -7,7 +7,9 @@ module Actions
7
7
  def plan(repository, smart_proxy, options)
8
8
  sequence do
9
9
  action_output = plan_action(Actions::Pulp3::Repository::Sync, repository, smart_proxy, options).output
10
- version_output = plan_action(Pulp3::Repository::SaveVersion, repository, tasks: action_output[:pulp_tasks]).output
10
+
11
+ force_fetch_version = true if options[:optimize] == false
12
+ version_output = plan_action(Pulp3::Repository::SaveVersion, repository, tasks: action_output[:pulp_tasks], :force_fetch_version => force_fetch_version).output
11
13
  plan_action(Pulp3::Orchestration::Repository::GenerateMetadata, repository, smart_proxy, :contents_changed => version_output[:contents_changed])
12
14
  plan_self(:subaction_output => version_output)
13
15
  end
@@ -0,0 +1,22 @@
1
+ module Actions
2
+ module Pulp3
3
+ module Orchestration
4
+ module Repository
5
+ class TriggerUpdateRepoCertGuard < Pulp3::Abstract
6
+ def plan(repository, smart_proxy)
7
+ plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id)
8
+ end
9
+
10
+ def run
11
+ repository = ::Katello::Repository.find(input[:repository_id])
12
+ ForemanTasks.async_task(::Actions::Pulp3::Repository::UpdateCVRepositoryCertGuard, repository, smart_proxy)
13
+ end
14
+
15
+ def humanized_name
16
+ _("Updating repository authentication configuration")
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -6,7 +6,7 @@ module Actions
6
6
  include Actions::Helpers::OutputPropagator
7
7
  def plan(repository, smart_proxy, file, unit_type_id)
8
8
  sequence do
9
- content_backend_service = SmartProxy.pulp_master.content_service(unit_type_id)
9
+ content_backend_service = SmartProxy.pulp_primary.content_service(unit_type_id)
10
10
  content_list = content_backend_service.content_api.list("sha256": Digest::SHA256.hexdigest(File.read(file[:path])))
11
11
  content_href = content_list&.results&.first&.pulp_href
12
12
 
@@ -11,7 +11,6 @@ module Actions
11
11
  def invoke_external_task
12
12
  source = ::Katello::Repository.find(input[:source_repository_id])
13
13
  target = ::Katello::Repository.find(input[:target_repository_id] || input[:target_repository])
14
- output[:latest_version_href] = target.backend_service(smart_proxy).read.latest_version_href
15
14
  output[:pulp_tasks] = target.backend_service(smart_proxy).copy_content_for_source(source, input)
16
15
  end
17
16
  end
@@ -14,7 +14,7 @@ module Actions
14
14
  unit_map: unit_map,
15
15
  dependency_solving: options[:dependency_solving],
16
16
  incremental_update: options[:incremental_update],
17
- smart_proxy_id: SmartProxy.pulp_master.id).output
17
+ smart_proxy_id: SmartProxy.pulp_primary.id).output
18
18
  plan_action(Pulp3::Repository::SaveVersions, repo_map.values.pluck(:dest_repo),
19
19
  tasks: action_output[:pulp_tasks]).output
20
20
  end
@@ -46,7 +46,7 @@ module Actions
46
46
 
47
47
  target_repo = ::Katello::Repository.find(repo_map.values.first[:dest_repo])
48
48
  unless unit_hrefs.flatten.empty?
49
- output[:pulp_tasks] = target_repo.backend_service(SmartProxy.pulp_master).multi_copy_units(repo_map, input[:dependency_solving])
49
+ output[:pulp_tasks] = target_repo.backend_service(SmartProxy.pulp_primary).multi_copy_units(repo_map, input[:dependency_solving])
50
50
  end
51
51
  end
52
52
  end
@@ -0,0 +1,85 @@
1
+ module Actions
2
+ module Pulp3
3
+ module Repository
4
+ module Presenters
5
+ class RepairPresenter < Helpers::Presenter::Base
6
+ def humanized_output
7
+ if action.external_task
8
+ humanized_details
9
+ end
10
+ end
11
+
12
+ def progress
13
+ total_units == 0 ? 0.1 : finished_units.to_f / total_units
14
+ end
15
+
16
+ private
17
+
18
+ def repair_task
19
+ tasks = action.external_task.select do |task|
20
+ if task.key? 'name'
21
+ task['name'].include?("repair_version")
22
+ end
23
+ end
24
+ tasks.first
25
+ end
26
+
27
+ def cancelled?
28
+ repair_task && repair_task['state'] == 'cancelled'
29
+ end
30
+
31
+ def task_result
32
+ repair_task['result']
33
+ end
34
+
35
+ def task_result_details
36
+ task_result && task_result['details']
37
+ end
38
+
39
+ def humanized_details
40
+ ret = []
41
+ ret << _("Cancelled.") if cancelled?
42
+ ret << _("Total steps: ") + "#{finished_units}/#{total_units}"
43
+ ret << "--------------------------------"
44
+ progress_reports = repair_task.try(:[], 'progress_reports') || []
45
+ progress_reports = progress_reports.sort_by { |pr| pr.try(:[], 'message') }
46
+ progress_reports.each do |pr|
47
+ done = pr.try(:[], 'done')
48
+ total = pr.try(:[], 'total') || pr.try(:[], 'done')
49
+ unless done.nil? || total.nil?
50
+ ret << _(pr.try(:[], 'message') + ": #{done}/#{total}")
51
+ end
52
+ end
53
+
54
+ ret.join("\n")
55
+ end
56
+
57
+ def total_units
58
+ total_unit = 0
59
+ progress_reports = repair_task.try(:[], 'progress_reports') || []
60
+ progress_reports.each do |pr|
61
+ total = pr.try(:[], 'total')
62
+ total = pr.try(:[], 'done') if total.nil?
63
+ unless total.nil?
64
+ total_unit += total.to_i
65
+ end
66
+ end
67
+ total_unit
68
+ end
69
+
70
+ def finished_units
71
+ finished_unit = 0
72
+ progress_reports = repair_task.try(:[], 'progress_reports') || []
73
+ progress_reports.each do |pr|
74
+ done = pr.try(:[], 'done')
75
+ unless done.nil?
76
+ finished_unit += done.to_i
77
+ end
78
+ end
79
+ finished_unit
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
85
+ end
@@ -6,11 +6,16 @@ module Actions
6
6
  middleware.use Actions::Middleware::ExecuteIfContentsChanged
7
7
 
8
8
  def plan(repository, smart_proxy, options = {})
9
+ smart_proxy = SmartProxy.find_by(id: smart_proxy) #support bulk actions
9
10
  sequence do
10
- options = {:repository_id => repository.id, :smart_proxy_id => smart_proxy.id}
11
- options[:contents_changed] if options.key?(:contents_changed)
12
- plan_action(::Actions::Pulp3::ContentGuard::Refresh, smart_proxy) unless repository.unprotected
13
- action = plan_self(options)
11
+ if !repository.unprotected && !options[:assume_content_guard_exists]
12
+ plan_action(::Actions::Pulp3::ContentGuard::Refresh, smart_proxy)
13
+ end
14
+
15
+ refresh_options = {:repository_id => repository.id, :smart_proxy_id => smart_proxy.id}
16
+ refresh_options[:contents_changed] if options.key?(:contents_changed)
17
+ action = plan_self(refresh_options)
18
+
14
19
  plan_action(SaveDistributionReferences, repository, smart_proxy,
15
20
  action.output, :contents_changed => options[:contents_changed])
16
21
  end
@@ -18,7 +23,8 @@ module Actions
18
23
 
19
24
  def invoke_external_task
20
25
  repo = ::Katello::Repository.find(input[:repository_id])
21
- output[:response] = repo.backend_service(smart_proxy).with_mirror_adapter.refresh_distributions
26
+ #used in switchover, need to assume pulp3
27
+ repo.backend_service(smart_proxy, true).with_mirror_adapter.refresh_distributions
22
28
  end
23
29
  end
24
30
  end
@@ -0,0 +1,29 @@
1
+ module Actions
2
+ module Pulp3
3
+ module Repository
4
+ class Repair < Pulp3::AbstractAsyncTask
5
+ include Helpers::Presenter
6
+ def plan(repository_id, smart_proxy)
7
+ plan_self(:repository_id => repository_id, :smart_proxy_id => smart_proxy.id)
8
+ end
9
+
10
+ def invoke_external_task
11
+ repo = ::Katello::Repository.find(input[:repository_id])
12
+ output[:response] = repo.backend_service(smart_proxy).repair(repo.version_href)
13
+ end
14
+
15
+ def run_progress
16
+ presenter.progress
17
+ end
18
+
19
+ def run_progress_weight
20
+ 10
21
+ end
22
+
23
+ def presenter
24
+ Presenters::RepairPresenter.new(self)
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -10,7 +10,7 @@ module Actions
10
10
  def invoke_external_task
11
11
  artifact_href = input[:tasks].last[:created_resources].first
12
12
  content_type = input[:unit_type_id]
13
- content_backend_service = SmartProxy.pulp_master.content_service(content_type)
13
+ content_backend_service = SmartProxy.pulp_primary.content_service(content_type)
14
14
  output[:pulp_tasks] = [content_backend_service.content_api.create(input[:options][:file_name], artifact: artifact_href)]
15
15
  end
16
16
  end
@@ -14,9 +14,9 @@ module Actions
14
14
  distribution_hrefs.compact!
15
15
  repo = ::Katello::Repository.find(input[:repository_id])
16
16
  if distribution_hrefs.any?
17
- repo.backend_service(smart_proxy).save_distribution_references(distribution_hrefs)
17
+ repo.backend_service(smart_proxy, true).save_distribution_references(distribution_hrefs)
18
18
  else
19
- repo.backend_service(smart_proxy).update_distribution
19
+ repo.backend_service(smart_proxy, true).update_distribution
20
20
  end
21
21
  end
22
22
  end
@@ -3,35 +3,39 @@ module Actions
3
3
  module Repository
4
4
  class SaveVersion < Pulp3::Abstract
5
5
  def plan(repository, options)
6
- plan_self(:repository_id => repository.id, :tasks => options[:tasks], :repository_details => options[:repository_details])
6
+ fail "Cannot accept tasks and repository_details into Save Version." if options[:tasks].present? && options[:repository_details].present?
7
+ plan_self(:repository_id => repository.id, :tasks => options[:tasks], :repository_details => options[:repository_details], :force_fetch_version => options.fetch(:force_fetch_version, false))
7
8
  end
8
9
 
9
10
  def run
10
11
  repo = ::Katello::Repository.find(input[:repository_id])
11
12
 
12
- if input[:tasks].present?
13
+ if input[:force_fetch_version]
14
+ version_href = fetch_version_href(repo)
15
+ elsif input[:repository_details].present?
16
+ version_href = input[:repository_details][:latest_version_href]
17
+ elsif input[:tasks].present?
13
18
  version_href = input[:tasks].last[:created_resources].first
14
- end
15
-
16
- unless version_href
17
- if input[:repository_details]
18
- version_href = input[:repository_details][:latest_version_href]
19
- elsif repo.version_href.nil?
20
- # Fetch latest Pulp 3 repo version
21
- repo_backend_service = repo.backend_service(SmartProxy.pulp_master)
22
- version_href ||= repo_backend_service.api.
23
- repositories_api.read(repo_backend_service.
24
- repository_reference.repository_href).latest_version_href
25
- end
19
+ else
20
+ version_href = fetch_version_href(repo)
26
21
  end
27
22
 
28
23
  if version_href
29
- repo.update(:version_href => version_href)
30
- output[:contents_changed] = true
24
+ if repo.version_href != version_href || input[:force_fetch_version]
25
+ output[:contents_changed] = true
26
+ repo.update(:version_href => version_href)
27
+ end
31
28
  else
32
29
  output[:contents_changed] = false
33
30
  end
34
31
  end
32
+
33
+ def fetch_version_href(repo)
34
+ # Fetch latest Pulp 3 repo version
35
+ repo_backend_service = repo.backend_service(SmartProxy.pulp_primary)
36
+ repo_href = repo_backend_service.repository_reference.repository_href
37
+ repo_backend_service.api.repositories_api.read(repo_href).latest_version_href
38
+ end
35
39
  end
36
40
  end
37
41
  end