katello 4.0.0.rc1 → 4.1.0.rc1

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

Potentially problematic release.


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

Files changed (619) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/katello/hosts/host_and_hostgroup_edit.js +0 -33
  3. data/app/assets/stylesheets/katello/contents.scss +1 -1
  4. data/app/assets/stylesheets/katello/katello.scss +0 -72
  5. data/app/controllers/katello/api/registry/registry_proxies_controller.rb +12 -20
  6. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +2 -9
  7. data/app/controllers/katello/api/v2/activation_keys_controller.rb +10 -24
  8. data/app/controllers/katello/api/v2/api_controller.rb +15 -3
  9. data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -1
  10. data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +1 -8
  11. data/app/controllers/katello/api/v2/content_exports_controller.rb +1 -14
  12. data/app/controllers/katello/api/v2/content_imports_controller.rb +38 -15
  13. data/app/controllers/katello/api/v2/content_uploads_controller.rb +1 -1
  14. data/app/controllers/katello/api/v2/content_view_components_controller.rb +22 -1
  15. data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +6 -1
  16. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +2 -59
  17. data/app/controllers/katello/api/v2/content_views_controller.rb +3 -58
  18. data/app/controllers/katello/api/v2/errata_controller.rb +1 -1
  19. data/app/controllers/katello/api/v2/host_errata_controller.rb +9 -8
  20. data/app/controllers/katello/api/v2/host_packages_controller.rb +10 -10
  21. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +18 -22
  22. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +17 -17
  23. data/app/controllers/katello/api/v2/organizations_controller.rb +2 -2
  24. data/app/controllers/katello/api/v2/package_groups_controller.rb +4 -0
  25. data/app/controllers/katello/api/v2/repositories_controller.rb +17 -15
  26. data/app/controllers/katello/api/v2/repository_sets_controller.rb +50 -4
  27. data/app/controllers/katello/api/v2/subscriptions_controller.rb +7 -1
  28. data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +1 -1
  29. data/app/controllers/katello/concerns/api/api_controller.rb +10 -0
  30. data/app/controllers/katello/concerns/api/v2/authorization.rb +14 -1
  31. data/app/controllers/katello/concerns/api/v2/registration_commands_controller_extensions.rb +46 -0
  32. data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +8 -0
  33. data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +31 -22
  34. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +0 -8
  35. data/app/controllers/katello/concerns/organizations_controller_extensions.rb +1 -1
  36. data/app/controllers/katello/concerns/registration_commands_controller_extensions.rb +34 -0
  37. data/app/controllers/katello/concerns/smart_proxies_controller_extensions.rb +1 -2
  38. data/app/helpers/katello/concerns/smart_proxy_helper_extensions.rb +15 -20
  39. data/app/helpers/katello/katello_urls_helper.rb +25 -2
  40. data/app/lib/actions/candlepin/owner/import.rb +10 -3
  41. data/app/lib/actions/candlepin/product/content_update.rb +1 -1
  42. data/app/lib/actions/foreman/environment/destroy.rb +2 -2
  43. data/app/lib/actions/katello/agent/dispatch_history_presenter.rb +64 -0
  44. data/app/lib/actions/katello/agent_action.rb +111 -0
  45. data/app/lib/actions/katello/bulk_agent_action.rb +34 -0
  46. data/app/lib/actions/katello/capsule_content/refresh_repos.rb +0 -7
  47. data/app/lib/actions/katello/capsule_content/sync_capsule.rb +45 -8
  48. data/app/lib/actions/katello/content_view/add_to_environment.rb +9 -7
  49. data/app/lib/actions/katello/content_view/incremental_updates.rb +3 -10
  50. data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +2 -3
  51. data/app/lib/actions/katello/content_view/promote.rb +25 -0
  52. data/app/lib/actions/katello/content_view/promote_to_environment.rb +1 -4
  53. data/app/lib/actions/katello/content_view/publish.rb +42 -23
  54. data/app/lib/actions/katello/content_view_environment/destroy.rb +0 -5
  55. data/app/lib/actions/katello/content_view_version/auto_create_products.rb +22 -0
  56. data/app/lib/actions/katello/content_view_version/auto_create_repositories.rb +22 -0
  57. data/app/lib/actions/katello/content_view_version/destroy.rb +0 -10
  58. data/app/lib/actions/katello/content_view_version/export.rb +20 -22
  59. data/app/lib/actions/katello/content_view_version/import.rb +27 -13
  60. data/app/lib/actions/katello/content_view_version/import_library.rb +4 -2
  61. data/app/lib/actions/katello/content_view_version/incremental_update.rb +4 -57
  62. data/app/lib/actions/katello/content_view_version/republish_repositories.rb +0 -4
  63. data/app/lib/actions/katello/content_view_version/reset_content_view_repositories_from_metadata.rb +11 -0
  64. data/app/lib/actions/katello/foreman/content_update.rb +0 -3
  65. data/app/lib/actions/katello/host/auto_attach_subscriptions.rb +0 -4
  66. data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +1 -1
  67. data/app/lib/actions/katello/host/erratum/install.rb +8 -26
  68. data/app/lib/actions/katello/host/package/install.rb +8 -21
  69. data/app/lib/actions/katello/host/package/remove.rb +8 -20
  70. data/app/lib/actions/katello/host/package/update.rb +9 -22
  71. data/app/lib/actions/katello/host/package_group/install.rb +8 -21
  72. data/app/lib/actions/katello/host/package_group/remove.rb +8 -20
  73. data/app/lib/actions/katello/jail_concern/content_view.rb +30 -0
  74. data/app/lib/actions/katello/jail_concern/organization.rb +30 -0
  75. data/app/lib/actions/katello/organization/manifest_import.rb +7 -1
  76. data/app/lib/actions/katello/organization/manifest_refresh.rb +28 -7
  77. data/app/lib/actions/katello/product/create.rb +0 -1
  78. data/app/lib/actions/katello/repository/destroy.rb +1 -1
  79. data/app/lib/actions/katello/repository/discover.rb +1 -1
  80. data/app/lib/actions/katello/repository/filtered_index_content.rb +1 -4
  81. data/app/lib/actions/katello/repository/import_upload.rb +0 -1
  82. data/app/lib/actions/katello/repository/sync.rb +59 -0
  83. data/app/lib/actions/katello/repository/update.rb +0 -1
  84. data/app/lib/actions/middleware/record_smart_proxy_sync_history.rb +0 -5
  85. data/app/lib/actions/pulp/consumer.rb +0 -11
  86. data/app/lib/actions/pulp/repository/create.rb +1 -7
  87. data/app/lib/actions/pulp/repository/distributor_publish.rb +2 -10
  88. data/app/lib/actions/pulp/repository/sync.rb +1 -3
  89. data/app/lib/actions/pulp3/content_view_version/create_export_history.rb +57 -0
  90. data/app/lib/actions/pulp3/content_view_version/create_import_history.rb +34 -0
  91. data/app/lib/actions/pulp3/orchestration/content_view_version/copy_version_units_to_library.rb +2 -3
  92. data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +34 -51
  93. data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +2 -2
  94. data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +13 -1
  95. data/app/lib/actions/pulp3/orchestration/repository/sync.rb +1 -0
  96. data/app/lib/actions/pulp3/repository/refresh_remote.rb +17 -0
  97. data/app/lib/katello/agent/base_message.rb +38 -0
  98. data/app/lib/katello/agent/client_message_handler.rb +61 -0
  99. data/app/lib/katello/agent/connection.rb +38 -0
  100. data/app/lib/katello/agent/install_errata_message.rb +25 -0
  101. data/app/lib/katello/agent/install_package_group_message.rb +25 -0
  102. data/app/lib/katello/agent/install_package_message.rb +28 -0
  103. data/app/lib/katello/agent/remove_package_group_message.rb +25 -0
  104. data/app/lib/katello/agent/remove_package_message.rb +28 -0
  105. data/app/lib/katello/agent/update_package_message.rb +25 -0
  106. data/app/lib/katello/concerns/base_template_scope_extensions.rb +120 -5
  107. data/app/lib/katello/errors.rb +5 -10
  108. data/app/lib/katello/event_daemon/runner.rb +2 -2
  109. data/app/lib/katello/event_daemon/services/agent_event_receiver.rb +63 -0
  110. data/app/lib/katello/http_resource.rb +1 -6
  111. data/app/lib/katello/logging.rb +11 -6
  112. data/app/lib/katello/messaging/received_message.rb +1 -1
  113. data/app/lib/katello/qpid/connection.rb +147 -0
  114. data/app/lib/katello/repo_discovery.rb +15 -1
  115. data/app/lib/katello/resources/candlepin.rb +10 -0
  116. data/app/lib/katello/resources/candlepin/owner.rb +3 -2
  117. data/app/lib/katello/resources/candlepin/pool.rb +6 -2
  118. data/app/lib/katello/util/package.rb +1 -1
  119. data/app/lib/katello/util/pulpcore_content_filters.rb +1 -1
  120. data/app/lib/katello/validators/hostgroup_kickstart_repository_validator.rb +0 -6
  121. data/app/models/katello/agent/dispatch_history.rb +19 -0
  122. data/app/models/katello/authorization/content_view.rb +20 -0
  123. data/app/models/katello/authorization/content_view_version_import_history.rb +11 -0
  124. data/app/models/katello/authorization/repository.rb +18 -0
  125. data/app/models/katello/concerns/content_facet_host_extensions.rb +1 -1
  126. data/app/models/katello/concerns/content_view_filter_rule_common.rb +2 -2
  127. data/app/models/katello/concerns/host_managed_extensions.rb +3 -18
  128. data/app/models/katello/concerns/hostgroup_extensions.rb +0 -5
  129. data/app/models/katello/concerns/http_proxy_extensions.rb +2 -4
  130. data/app/models/katello/concerns/location_extensions.rb +2 -25
  131. data/app/models/katello/concerns/operatingsystem_extensions.rb +0 -2
  132. data/app/models/katello/concerns/organization_extensions.rb +4 -18
  133. data/app/models/katello/concerns/redhat_extensions.rb +5 -8
  134. data/app/models/katello/concerns/smart_proxy_extensions.rb +45 -19
  135. data/app/models/katello/content_view.rb +30 -120
  136. data/app/models/katello/content_view_component.rb +5 -0
  137. data/app/models/katello/content_view_docker_filter_rule.rb +1 -0
  138. data/app/models/katello/content_view_package_filter_rule.rb +4 -0
  139. data/app/models/katello/content_view_package_group_filter.rb +1 -0
  140. data/app/models/katello/content_view_repository.rb +4 -5
  141. data/app/models/katello/content_view_version.rb +9 -33
  142. data/app/models/katello/content_view_version_export_history.rb +25 -10
  143. data/app/models/katello/content_view_version_import_history.rb +42 -0
  144. data/app/models/katello/erratum.rb +1 -1
  145. data/app/models/katello/events/delete_host_agent_queue.rb +19 -0
  146. data/app/models/katello/events/delete_pool.rb +19 -0
  147. data/app/models/katello/glue/candlepin/environment.rb +7 -0
  148. data/app/models/katello/glue/candlepin/owner.rb +12 -1
  149. data/app/models/katello/glue/candlepin/pool.rb +42 -25
  150. data/app/models/katello/glue/provider.rb +3 -6
  151. data/app/models/katello/glue/pulp/repo.rb +6 -21
  152. data/app/models/katello/host/content_facet.rb +10 -31
  153. data/app/models/katello/host/info_provider.rb +0 -2
  154. data/app/models/katello/host/subscription_facet.rb +3 -1
  155. data/app/models/katello/kt_environment.rb +0 -6
  156. data/app/models/katello/package_group.rb +4 -0
  157. data/app/models/katello/ping.rb +51 -19
  158. data/app/models/katello/pool.rb +9 -0
  159. data/app/models/katello/product.rb +0 -6
  160. data/app/models/katello/product_content.rb +3 -1
  161. data/app/models/katello/pulp_sync_status.rb +0 -10
  162. data/app/models/katello/repository.rb +22 -23
  163. data/app/models/katello/root_repository.rb +1 -6
  164. data/app/models/katello/subscription.rb +10 -0
  165. data/app/models/katello/sync_plan.rb +7 -0
  166. data/app/models/setting/content.rb +7 -10
  167. data/app/presenters/katello/content_view_version_compare_presenter.rb +2 -6
  168. data/app/presenters/katello/product_content_presenter.rb +3 -5
  169. data/app/services/cert/certs.rb +3 -3
  170. data/app/services/katello/agent/dispatcher.rb +60 -0
  171. data/app/services/katello/applicability/applicable_content_helper.rb +8 -6
  172. data/app/services/katello/candlepin/event_handler.rb +22 -22
  173. data/app/services/katello/candlepin/message_handler.rb +24 -15
  174. data/app/services/katello/candlepin_event_listener.rb +1 -0
  175. data/app/services/katello/content_view_manager.rb +24 -0
  176. data/app/services/katello/event_monitor/poller_thread.rb +26 -20
  177. data/app/services/katello/managed_content_medium_provider.rb +8 -4
  178. data/app/services/katello/organization_creator.rb +120 -0
  179. data/app/services/katello/product_content_finder.rb +5 -1
  180. data/app/services/katello/pulp/pulp_content_unit.rb +6 -6
  181. data/app/services/katello/pulp/repository/yum.rb +1 -1
  182. data/app/services/katello/pulp/smart_proxy_repository.rb +2 -17
  183. data/app/services/katello/pulp3/api/ansible_collection.rb +14 -2
  184. data/app/services/katello/pulp3/api/apt.rb +1 -1
  185. data/app/services/katello/pulp3/api/content_guard.rb +1 -1
  186. data/app/services/katello/pulp3/api/core.rb +27 -2
  187. data/app/services/katello/pulp3/api/docker.rb +1 -1
  188. data/app/services/katello/pulp3/api/file.rb +5 -1
  189. data/app/services/katello/pulp3/api/yum.rb +9 -1
  190. data/app/services/katello/pulp3/content_view_version/export.rb +18 -40
  191. data/app/services/katello/pulp3/content_view_version/import.rb +75 -30
  192. data/app/services/katello/pulp3/content_view_version/import_gpg_keys.rb +32 -0
  193. data/app/services/katello/pulp3/content_view_version/import_validator.rb +53 -21
  194. data/app/services/katello/pulp3/content_view_version/importable_products.rb +47 -0
  195. data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +52 -0
  196. data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +99 -0
  197. data/app/services/katello/pulp3/erratum.rb +2 -1
  198. data/app/services/katello/pulp3/pulp_content_unit.rb +1 -1
  199. data/app/services/katello/pulp3/repository.rb +54 -10
  200. data/app/services/katello/pulp3/repository/ansible_collection.rb +5 -1
  201. data/app/services/katello/pulp3/repository/yum.rb +2 -18
  202. data/app/services/katello/pulp3/rpm.rb +5 -1
  203. data/app/services/katello/pulp3/task.rb +12 -5
  204. data/app/services/katello/pulp3/task_group.rb +13 -5
  205. data/app/services/katello/registration_manager.rb +10 -0
  206. data/app/services/katello/smart_proxy_helper.rb +1 -8
  207. data/app/services/katello/ui_notifications/pulp/proxy_disk_space.rb +2 -5
  208. data/app/services/katello/ui_notifications/system_error.rb +25 -0
  209. data/app/views/katello/api/v2/content_view_components/show.json.rabl +1 -1
  210. data/app/views/katello/api/v2/content_view_filters/show.json.rabl +0 -1
  211. data/app/views/katello/api/v2/{puppet_modules → content_view_version_import_histories}/index.json.rabl +1 -1
  212. data/app/views/katello/api/v2/content_view_version_import_histories/show.json.rabl +14 -0
  213. data/app/views/katello/api/v2/content_view_versions/base.json.rabl +2 -2
  214. data/app/views/katello/api/v2/content_view_versions/show.json.rabl +0 -7
  215. data/app/views/katello/api/v2/content_views/base.json.rabl +20 -9
  216. data/app/views/katello/api/v2/environments/show.json.rabl +0 -1
  217. data/app/views/katello/api/v2/package_groups/index.json.rabl +4 -0
  218. data/app/views/katello/api/v2/repositories/base.json.rabl +0 -1
  219. data/app/views/katello/api/v2/repositories/show.json.rabl +1 -1
  220. data/app/views/katello/api/v2/repository_sets/index.json.rabl +4 -1
  221. data/app/views/katello/api/v2/repository_sets/show.json.rabl +22 -0
  222. data/app/views/katello/api/v2/subscriptions/show.json.rabl +1 -1
  223. data/app/views/katello/sync_management/_products.html.erb +1 -1
  224. data/app/views/overrides/activation_keys/_host_media_type_select.html.erb +1 -1
  225. data/app/views/smart_proxies/_disk_usage.html.erb +6 -4
  226. data/config/initializers/monkeys.rb +0 -1
  227. data/config/katello.yaml.example +0 -1
  228. data/config/routes/api/v2.rb +9 -21
  229. data/config/routes/overrides.rb +1 -2
  230. data/db/migrate/20140422000001_update_products_add_organization.rb +3 -2
  231. data/db/migrate/20160701180402_add_sortable_version_to_puppet_modules.rb +2 -0
  232. data/db/migrate/20210119162528_delete_puppet_and_ostree_repos.rb +9 -2
  233. data/db/migrate/20210122200618_create_katello_agent_dispatch_history.rb +11 -0
  234. data/db/migrate/20210125161911_delete_erratum_install_batch_size_setting.rb +5 -0
  235. data/db/migrate/20210208213920_add_available_module_stream_context.rb +8 -0
  236. data/db/migrate/20210218214048_change_default_content_view_version_export_history.rb +5 -0
  237. data/db/migrate/20210224160921_remove_disabled_products_from_sync_plans.rb +6 -0
  238. data/db/migrate/20210302165636_remove_katello_puppet_modules.rb +62 -0
  239. data/db/migrate/20210309160925_create_katello_content_view_version_import_histories.rb +13 -0
  240. data/db/migrate/20210318204533_add_import_type_to_import_histories.rb +8 -0
  241. data/db/migrate/20210319123300_add_foreign_keys_to_import_export_histories.rb +6 -0
  242. data/db/migrate/20210322142311_add_auth_url_token_to_root_repositories.rb +6 -0
  243. data/db/migrate/20210331180353_katello_pool_organization_id_not_nullable.rb +16 -0
  244. data/db/migrate/20210409033915_add_created_in_katello_to_taxonomy.rb +9 -0
  245. data/db/seeds.d/101-locations.rb +0 -3
  246. data/db/seeds.d/102-organizations.rb +1 -5
  247. data/db/seeds.d/109-katello-notification-blueprints.rb +12 -0
  248. data/db/seeds.d/111-upgrade_tasks.rb +3 -14
  249. data/engines/bastion/app/assets/javascripts/bastion/auth/authorization.service.js +1 -1
  250. data/engines/bastion/vendor/assets/javascripts/bastion/angular-animate/angular-animate.js +3 -3
  251. data/engines/bastion/vendor/assets/javascripts/bastion/angular-resource/angular-resource.js +3 -3
  252. data/engines/bastion/vendor/assets/javascripts/bastion/angular-route/angular-route.js +3 -3
  253. data/engines/bastion/vendor/assets/javascripts/bastion/angular-sanitize/angular-sanitize.js +21 -43
  254. data/engines/bastion/vendor/assets/javascripts/bastion/angular/angular.js +325 -156
  255. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +9 -10
  256. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-repository-sets.html +2 -9
  257. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +0 -1
  258. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +0 -3
  259. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +2 -0
  260. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +2 -0
  261. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +11 -4
  262. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +18 -11
  263. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html +10 -4
  264. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js +0 -14
  265. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +2 -0
  266. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-actions.controller.js +5 -1
  267. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js +7 -2
  268. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +7 -2
  269. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +6 -6
  270. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +7 -7
  271. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +14 -6
  272. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +5 -5
  273. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-repository-sets.controller.js +9 -11
  274. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -2
  275. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-repository-sets.html +2 -8
  276. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +3 -6
  277. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register.html +5 -0
  278. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-view.factory.js +0 -6
  279. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +0 -56
  280. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-available-content-views.html +0 -5
  281. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-content-views-list.html +0 -5
  282. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +2 -9
  283. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-info.html +0 -12
  284. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +0 -3
  285. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +2 -6
  286. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +0 -1
  287. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +0 -7
  288. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/content.service.js +0 -5
  289. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +0 -1
  290. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js +0 -11
  291. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/environments.html +0 -3
  292. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +21 -6
  293. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +9 -0
  294. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +71 -311
  295. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +0 -10
  296. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +0 -1
  297. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-advanced-sync-modal.html +2 -2
  298. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +2 -4
  299. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +13 -15
  300. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +24 -11
  301. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repositories.routes.js +0 -9
  302. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +0 -6
  303. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscription-start-date.directive.js +21 -0
  304. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscription-type.directive.js +16 -0
  305. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-start-date.html +2 -0
  306. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-type.html +18 -0
  307. data/engines/bastion_katello/lib/bastion_katello/engine.rb +3 -3
  308. data/lib/katello/engine.rb +35 -24
  309. data/lib/katello/middleware/organization_created_enforcer.rb +22 -0
  310. data/lib/katello/permission_creator.rb +12 -28
  311. data/lib/katello/permissions/host_permissions.rb +3 -2
  312. data/lib/katello/plugin.rb +13 -22
  313. data/lib/katello/repository_types/ansible_collection.rb +1 -1
  314. data/lib/katello/repository_types/deb.rb +1 -1
  315. data/lib/katello/repository_types/docker.rb +1 -1
  316. data/lib/katello/repository_types/file.rb +1 -1
  317. data/lib/katello/repository_types/yum.rb +1 -1
  318. data/lib/katello/tasks/jenkins.rake +6 -0
  319. data/lib/katello/tasks/receptor/extract_orgs.rake +1 -3
  320. data/lib/katello/tasks/reimport.rake +0 -1
  321. data/lib/katello/tasks/repository.rake +0 -30
  322. data/lib/katello/tasks/reset.rake +0 -15
  323. data/lib/katello/tasks/update_subscription_facet_backend_data.rake +3 -3
  324. data/lib/katello/tasks/upgrades/4.1/fix_invalid_pools.rake +62 -0
  325. data/lib/katello/tasks/upgrades/4.1/sync_noarch_content.rake +15 -0
  326. data/lib/katello/version.rb +1 -1
  327. data/lib/proxy_api/container_gateway.rb +22 -11
  328. data/locale/action_names.rb +67 -69
  329. data/locale/bn/katello.edit.po +8293 -0
  330. data/locale/bn/katello.po +586 -829
  331. data/locale/bn/katello.po.time_stamp +0 -0
  332. data/locale/cs/katello.edit.po +8570 -0
  333. data/locale/cs/katello.po +429 -304
  334. data/locale/cs/katello.po.time_stamp +0 -0
  335. data/locale/de/katello.edit.po +8329 -0
  336. data/locale/de/katello.po +709 -709
  337. data/locale/de/katello.po.time_stamp +0 -0
  338. data/locale/en/katello.edit.po +8289 -0
  339. data/locale/en/katello.po +426 -298
  340. data/locale/en/katello.po.time_stamp +0 -0
  341. data/locale/es/katello.edit.po +8353 -0
  342. data/locale/es/katello.po +1511 -1475
  343. data/locale/es/katello.po.time_stamp +0 -0
  344. data/locale/fr/katello.edit.po +8441 -0
  345. data/locale/fr/katello.po +1793 -1803
  346. data/locale/fr/katello.po.time_stamp +0 -0
  347. data/locale/gu/katello.edit.po +8293 -0
  348. data/locale/gu/katello.po +773 -1018
  349. data/locale/gu/katello.po.time_stamp +0 -0
  350. data/locale/hi/katello.edit.po +8293 -0
  351. data/locale/hi/katello.po +772 -1014
  352. data/locale/hi/katello.po.time_stamp +0 -0
  353. data/locale/it/katello.edit.po +8313 -0
  354. data/locale/it/katello.po +528 -493
  355. data/locale/it/katello.po.time_stamp +0 -0
  356. data/locale/ja/katello.edit.po +8417 -0
  357. data/locale/ja/katello.po +1736 -1717
  358. data/locale/ja/katello.po.time_stamp +0 -0
  359. data/locale/katello.pot +1764 -1559
  360. data/locale/kn/katello.edit.po +8293 -0
  361. data/locale/kn/katello.po +774 -1017
  362. data/locale/kn/katello.po.time_stamp +0 -0
  363. data/locale/ko/katello.edit.po +8311 -0
  364. data/locale/ko/katello.po +675 -638
  365. data/locale/ko/katello.po.time_stamp +0 -0
  366. data/locale/mr/katello.edit.po +8293 -0
  367. data/locale/mr/katello.po +772 -979
  368. data/locale/mr/katello.po.time_stamp +0 -0
  369. data/locale/or/katello.edit.po +8293 -0
  370. data/locale/or/katello.po +773 -1016
  371. data/locale/or/katello.po.time_stamp +0 -0
  372. data/locale/pa/katello.edit.po +8294 -0
  373. data/locale/pa/katello.po +768 -996
  374. data/locale/pa/katello.po.time_stamp +0 -0
  375. data/locale/pt/katello.edit.po +8293 -0
  376. data/locale/pt/katello.po +522 -482
  377. data/locale/pt/katello.po.time_stamp +0 -0
  378. data/locale/pt_BR/katello.edit.po +8351 -0
  379. data/locale/pt_BR/katello.po +1538 -1487
  380. data/locale/pt_BR/katello.po.time_stamp +0 -0
  381. data/locale/ru/katello.edit.po +8319 -0
  382. data/locale/ru/katello.po +824 -799
  383. data/locale/ru/katello.po.time_stamp +0 -0
  384. data/locale/ta/katello.edit.po +8293 -0
  385. data/locale/ta/katello.po +586 -827
  386. data/locale/ta/katello.po.time_stamp +0 -0
  387. data/locale/te/katello.edit.po +8293 -0
  388. data/locale/te/katello.po +773 -1014
  389. data/locale/te/katello.po.time_stamp +0 -0
  390. data/locale/zh_CN/katello.edit.po +8417 -0
  391. data/locale/zh_CN/katello.po +2145 -2092
  392. data/locale/zh_CN/katello.po.time_stamp +0 -0
  393. data/locale/zh_TW/katello.edit.po +8329 -0
  394. data/locale/zh_TW/katello.po +768 -860
  395. data/locale/zh_TW/katello.po.time_stamp +0 -0
  396. data/package.json +2 -2
  397. data/webpack/{scenes/ContentViews/Details/Repositories/RepoAddedStatus.js → components/AddedStatusLabel.js} +5 -5
  398. data/webpack/components/RoutedTabs/RoutedTabs.js +91 -0
  399. data/webpack/components/RoutedTabs/__tests__/RoutedTabs.test.js +32 -0
  400. data/webpack/components/RoutedTabs/index.js +4 -0
  401. data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageConstants.js +2 -0
  402. data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js +21 -0
  403. data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageSelectors.js +21 -0
  404. data/webpack/components/extensions/RegistrationCommands/__tests__/ActivationKeys.test.js +18 -0
  405. data/webpack/components/extensions/RegistrationCommands/__tests__/Force.test.js +9 -0
  406. data/webpack/components/extensions/RegistrationCommands/__tests__/IgnoreSubmanErrors.test.js +9 -0
  407. data/webpack/components/extensions/RegistrationCommands/__tests__/LifeCycleEnvironment.test.js +11 -0
  408. data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/ActivationKeys.test.js.snap +58 -0
  409. data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/Force.test.js.snap +25 -0
  410. data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/IgnoreSubmanErrors.test.js.snap +25 -0
  411. data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/LifeCycleEnvironment.test.js.snap +27 -0
  412. data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +99 -0
  413. data/webpack/components/extensions/RegistrationCommands/fields/Force.js +38 -0
  414. data/webpack/components/extensions/RegistrationCommands/fields/IgnoreSubmanErrors.js +38 -0
  415. data/webpack/components/extensions/RegistrationCommands/fields/LifecycleEnvironment.js +56 -0
  416. data/webpack/components/extensions/RegistrationCommands/index.js +81 -0
  417. data/webpack/components/pf3Table/formatters/EntitlementsInlineEditFormatter.js +23 -24
  418. data/webpack/components/pf3Table/formatters/__tests__/__snapshots__/EntitlementsInlineEditFormatter.test.js.snap +3 -1
  419. data/webpack/components/pf3Table/formatters/entitlementsValueFormatter.js +16 -0
  420. data/webpack/containers/Application/overrides.scss +3 -0
  421. data/webpack/fills_index.js +3 -0
  422. data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +0 -2
  423. data/webpack/scenes/ContentViews/ContentViewsConstants.js +8 -1
  424. data/webpack/scenes/ContentViews/Copy/__tests__/contentViewCopyResult.fixtures.json +1 -3
  425. data/webpack/scenes/ContentViews/Create/__tests__/contentViewCreateResult.fixtures.json +1 -3
  426. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentEnvironments.js +28 -0
  427. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentVersion.js +45 -0
  428. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +124 -0
  429. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.fixtures.json +161 -0
  430. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +163 -0
  431. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/unpublishedCVComponents.fixtures.json +64 -0
  432. data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +67 -7
  433. data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +61 -4
  434. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +34 -11
  435. data/webpack/scenes/ContentViews/Details/Filters/CVFilterDetailType.js +33 -0
  436. data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +117 -0
  437. data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +115 -0
  438. data/webpack/scenes/ContentViews/Details/Filters/ContentType.js +7 -10
  439. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetails.js +49 -0
  440. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +56 -0
  441. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +3 -17
  442. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +116 -0
  443. data/webpack/scenes/ContentViews/Details/Filters/__tests__/allFilterPackageGroups.fixtures.json +69 -0
  444. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetail.fixtures.json +103 -0
  445. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +116 -0
  446. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterDetail.fixtures.json +147 -0
  447. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterRules.fixtures.json +30 -0
  448. data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +136 -0
  449. data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.fixtures.json +370 -0
  450. data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +94 -0
  451. data/webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js +0 -1
  452. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +106 -13
  453. data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +11 -5
  454. data/webpack/scenes/ContentViews/Details/Repositories/RepoIcon.js +5 -1
  455. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +138 -0
  456. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +2 -4
  457. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.test.js +1 -1
  458. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewRepoAdd.fixture.json +57 -0
  459. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +73 -0
  460. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionEnvironments.js +31 -0
  461. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.js +64 -0
  462. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.scss +8 -0
  463. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionPackages.js +0 -0
  464. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +105 -0
  465. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +728 -0
  466. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +154 -0
  467. data/webpack/scenes/ContentViews/Details/Versions/__tests__/emptyCVVersion.fixtures.json +13 -0
  468. data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +3 -1
  469. data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetails.fixtures.json +0 -2
  470. data/webpack/scenes/ContentViews/Table/ContentViewVersionCell.js +33 -0
  471. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +17 -22
  472. data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +51 -102
  473. data/webpack/scenes/ContentViews/__tests__/basicContentViews.fixtures.js +5 -3
  474. data/webpack/scenes/ContentViews/__tests__/contentViewList.fixtures.json +30 -5
  475. data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +95 -0
  476. data/webpack/scenes/ContentViews/components/ContentViewIcon.js +11 -5
  477. data/webpack/scenes/ContentViews/components/EnvironmentLabels.js +16 -0
  478. data/webpack/scenes/ContentViews/components/IconWithCount.js +1 -1
  479. data/webpack/scenes/ContentViews/components/InactiveText.js +15 -0
  480. data/webpack/scenes/ContentViews/expansions/DetailsExpansion.js +19 -1
  481. data/webpack/scenes/Subscriptions/Details/SubscriptionPurposeAttributes.js +1 -1
  482. data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailInfo.test.js.snap +1 -1
  483. data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +3 -3
  484. data/webpack/scenes/Subscriptions/Details/__tests__/subscriptionDetails.fixtures.js +1 -1
  485. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +7 -2
  486. data/webpack/scenes/Subscriptions/Manifest/index.js +1 -0
  487. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +17 -0
  488. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +2 -1
  489. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +1 -1
  490. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +144 -0
  491. data/webpack/scenes/Tasks/helpers.js +2 -2
  492. data/webpack/test-utils/react-testing-lib-wrapper.js +11 -3
  493. data/webpack/utils/__tests__/useParamsWithHash.test.js +22 -0
  494. data/webpack/utils/helpers.js +2 -0
  495. data/webpack/utils/paramsFromHash.js +16 -0
  496. data/webpack/utils/useUrlParams.js +14 -0
  497. metadata +186 -187
  498. data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +0 -82
  499. data/app/controllers/katello/api/v2/puppet_modules_controller.rb +0 -19
  500. data/app/controllers/katello/concerns/registration_controller_extensions.rb +0 -16
  501. data/app/helpers/katello/concerns/hosts_and_hostgroups_helper_extensions.rb +0 -20
  502. data/app/lib/actions/candlepin/owner/create.rb +0 -16
  503. data/app/lib/actions/katello/content_view_puppet_environment/clear.rb +0 -11
  504. data/app/lib/actions/katello/content_view_puppet_environment/clone.rb +0 -78
  505. data/app/lib/actions/katello/content_view_puppet_environment/clone_content_for_version.rb +0 -20
  506. data/app/lib/actions/katello/content_view_puppet_environment/create.rb +0 -34
  507. data/app/lib/actions/katello/content_view_puppet_environment/create_for_version.rb +0 -23
  508. data/app/lib/actions/katello/content_view_puppet_environment/destroy.rb +0 -28
  509. data/app/lib/actions/katello/content_view_puppet_module/destroy.rb +0 -46
  510. data/app/lib/actions/katello/environment/library_create.rb +0 -35
  511. data/app/lib/actions/katello/organization/create.rb +0 -38
  512. data/app/lib/actions/pulp/consumer/abstract_content_action.rb +0 -71
  513. data/app/lib/actions/pulp/consumer/content_install.rb +0 -43
  514. data/app/lib/actions/pulp/consumer/content_uninstall.rb +0 -26
  515. data/app/lib/actions/pulp/consumer/content_update.rb +0 -32
  516. data/app/lib/actions/pulp/content_view_puppet_environment/copy_contents.rb +0 -36
  517. data/app/lib/actions/pulp/content_view_puppet_environment/index_content.rb +0 -19
  518. data/app/lib/actions/pulp/repository/presenters/puppet_presenter.rb +0 -54
  519. data/app/lib/actions/pulp3/content_migration.rb +0 -31
  520. data/app/lib/actions/pulp3/content_migration_presenter.rb +0 -59
  521. data/app/lib/katello/foreman.rb +0 -32
  522. data/app/lib/katello/mapping.rb +0 -31
  523. data/app/lib/katello/validators/content_view_puppet_module_validator.rb +0 -32
  524. data/app/models/katello/concerns/environment_extensions.rb +0 -74
  525. data/app/models/katello/content_view_puppet_environment.rb +0 -116
  526. data/app/models/katello/content_view_puppet_environment_puppet_module.rb +0 -11
  527. data/app/models/katello/content_view_puppet_module.rb +0 -63
  528. data/app/models/katello/puppet_module.rb +0 -77
  529. data/app/models/katello/repository_puppet_module.rb +0 -7
  530. data/app/services/katello/pulp/puppet_module.rb +0 -21
  531. data/app/services/katello/pulp/repository/puppet.rb +0 -68
  532. data/app/services/katello/pulp3/migration.rb +0 -291
  533. data/app/services/katello/pulp3/migration_plan.rb +0 -137
  534. data/app/services/katello/pulp3/migration_switchover.rb +0 -126
  535. data/app/services/katello/puppet_class_importer_extensions.rb +0 -32
  536. data/app/views/foreman/hosts/_registration.html.erb +0 -12
  537. data/app/views/katello/api/v2/activation_keys/product_content.json.rabl +0 -30
  538. data/app/views/katello/api/v2/content_view_puppet_modules/create.json.rabl +0 -3
  539. data/app/views/katello/api/v2/content_view_puppet_modules/index.json.rabl +0 -7
  540. data/app/views/katello/api/v2/content_view_puppet_modules/show.json.rabl +0 -9
  541. data/app/views/katello/api/v2/content_views/puppet_modules.json.rabl +0 -7
  542. data/app/views/katello/api/v2/host_subscriptions/content_override.json.rabl +0 -3
  543. data/app/views/katello/api/v2/host_subscriptions/product_content.json.rabl +0 -29
  544. data/app/views/katello/api/v2/puppet_modules/backend.json.rabl +0 -7
  545. data/app/views/katello/api/v2/puppet_modules/base.json.rabl +0 -9
  546. data/app/views/katello/api/v2/puppet_modules/compare.json.rabl +0 -10
  547. data/app/views/katello/api/v2/puppet_modules/name.json.rabl +0 -3
  548. data/app/views/katello/api/v2/puppet_modules/names.json.rabl +0 -7
  549. data/app/views/katello/api/v2/puppet_modules/show.json.rabl +0 -4
  550. data/db/functions/empty_v01.sql +0 -7
  551. data/db/functions/evr_trigger_v01.sql +0 -9
  552. data/db/functions/isalpha_v01.sql +0 -11
  553. data/db/functions/isalphanum_v01.sql +0 -12
  554. data/db/functions/isdigit_v01.sql +0 -10
  555. data/db/functions/rpmver_array_v01.sql +0 -60
  556. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register-client.directive.js +0 -6
  557. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register-os-client.directive.js +0 -17
  558. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register.controller.js +0 -44
  559. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html +0 -28
  560. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-deb-client.html +0 -38
  561. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-oracle-client.html +0 -5
  562. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-sles-client.html +0 -28
  563. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-puppet-modules.controller.js +0 -9
  564. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-names.controller.js +0 -45
  565. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-versions.controller.js +0 -61
  566. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module.factory.js +0 -23
  567. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-modules.controller.js +0 -74
  568. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-names.html +0 -57
  569. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-versions.html +0 -64
  570. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-modules.html +0 -54
  571. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-puppet-modules.html +0 -19
  572. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-puppet-modules.html +0 -25
  573. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +0 -6903
  574. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +0 -7094
  575. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +0 -7303
  576. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +0 -6895
  577. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +0 -6865
  578. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +0 -6720
  579. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +0 -7077
  580. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +0 -6832
  581. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +0 -6766
  582. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +0 -6703
  583. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-puppet-modules.html +0 -66
  584. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-content-views.controller.js +0 -44
  585. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-repositories.controller.js +0 -36
  586. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module.controller.js +0 -34
  587. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-content-views.html +0 -41
  588. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-info.html +0 -32
  589. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-repositories.html +0 -52
  590. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module.html +0 -37
  591. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-module.factory.js +0 -28
  592. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.controller.js +0 -35
  593. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.module.js +0 -20
  594. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.routes.js +0 -71
  595. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/views/puppet-modules.html +0 -47
  596. data/lib/katello/repository_types/puppet.rb +0 -5
  597. data/lib/katello/tasks/pulp3_content_switchover.rake +0 -32
  598. data/lib/katello/tasks/pulp3_migration.rake +0 -37
  599. data/lib/katello/tasks/pulp3_migration_abort.rake +0 -22
  600. data/lib/katello/tasks/pulp3_migration_stats.rake +0 -41
  601. data/lib/katello/tasks/pulp3_post_migration_check.rake +0 -51
  602. data/lib/katello/tasks/upgrades/3.10/clear_invalid_repo_credentials.rake +0 -27
  603. data/lib/katello/tasks/upgrades/3.11/import_yum_metadata_file.rake +0 -12
  604. data/lib/katello/tasks/upgrades/3.11/update_puppet_repos.rake +0 -29
  605. data/lib/katello/tasks/upgrades/3.12/remove_pulp2_notifier.rake +0 -13
  606. data/lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake +0 -22
  607. data/lib/katello/tasks/upgrades/3.15/reindex_rpm_modular.rake +0 -23
  608. data/lib/katello/tasks/upgrades/3.15/set_sub_facet_dmi_uuid.rake +0 -16
  609. data/lib/katello/tasks/upgrades/3.16/update_applicable_el8_hosts.rake +0 -29
  610. data/lib/katello/tasks/upgrades/3.18/add_cvv_export_history_metadata.rb +0 -18
  611. data/lib/katello/tasks/upgrades/3.8/clear_checksum_type.rake +0 -41
  612. data/lib/monkeys/passenger_tee_input.rb +0 -20
  613. data/webpack/components/TabWrapper/TabWrapper.js +0 -26
  614. data/webpack/components/TabWrapper/index.js +0 -3
  615. data/webpack/components/TabbedView/TabbedView.js +0 -38
  616. data/webpack/components/TabbedView/TabbedView.scss +0 -3
  617. data/webpack/components/TabbedView/index.js +0 -3
  618. data/webpack/scenes/ContentViews/expansions/EnvironmentsExpansion.js +0 -19
  619. data/webpack/scenes/ContentViews/expansions/VersionsExpansion.js +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3942a71eb36eb3e5c9e6adcf139e30a2443a038eea11c417e55c6b590580465f
4
- data.tar.gz: f59fa795ac9c2298450020e4c8f90409691374acc1f09e1c49a88e661d06cdd6
3
+ metadata.gz: cc20921c082e7725e89028befc8b8e9469b5088304795b5cbeb4cfc9bc343866
4
+ data.tar.gz: aee4945d14f0e66a96d516eb3e47ee0e93fc02d9bb7384e28f5d360646a73a88
5
5
  SHA512:
6
- metadata.gz: ff801d6c4540553020d70162d030def3a7782771f58fe8e85a81def49dd1abdb4abeab3b039ce56a2741636e745bba0887e0713ae534809e952ab0fc0482ba23
7
- data.tar.gz: 4920f4ab7232331cc2d79a56f05625811a71f334e8909bab61a7d74cbbb8fbf345a9394a888bf44ca94dac9ae17dd4f53a069f6a7fd822926377dd8b9dc1c6ed
6
+ metadata.gz: b868b400fb3a0be4e7db0755700b45b5388e4c433a447dfe335c7bc156f40b5dc557fce7553aa79fa2eaa61bb83e0ceae3c27cbb7deb2458efb15f7ac890df22
7
+ data.tar.gz: 550c55ae8bec58857cfa5b75d33579f9c9de56013a58f273487fdccdf9378890f2d47ac257fdf8b2b29a89fd648cdd8e668725358b169dcf35f0277d7758e0a3
@@ -9,12 +9,6 @@ $(document).on('ContentLoad', function(){
9
9
  $("#hostgroup_lifecycle_environment_id").change(KT.hosts.environmentChanged);
10
10
  $("#host_lifecycle_environment_id").change(KT.hosts.environmentChanged);
11
11
 
12
- $("#hostgroup_content_view_id").change(KT.hosts.contentViewSelected);
13
- $("#host_content_view_id").change(KT.hosts.contentViewSelected);
14
- $("#reset_puppet_environment").click(function() {
15
- KT.hosts.getPuppetEnvironmentSelect().data('content_puppet_match', 'true');
16
- KT.hosts.setDefaultPuppetEnvironment(KT.hosts.getSelectedContentView(), KT.hosts.getSelectedEnvironment());
17
- });
18
12
  KT.hosts.update_media_enablement();
19
13
  KT.hosts.set_media_selection_bindings();
20
14
  });
@@ -68,33 +62,6 @@ KT.hosts.signalContentViewFetch = function(fetching) {
68
62
  }
69
63
  };
70
64
 
71
-
72
- KT.hosts.contentViewSelected = function() {
73
- if (KT.hosts.getPuppetEnvironmentSelect().data('content_puppet_match')) {
74
- KT.hosts.setDefaultPuppetEnvironment(KT.hosts.getSelectedContentView(), KT.hosts.getSelectedEnvironment());
75
- }
76
- };
77
-
78
- KT.hosts.setDefaultPuppetEnvironment = function(view_id, env_id) {
79
- if (view_id && env_id) {
80
- $.get('/hosts/puppet_environment_for_content_view', {content_view_id: view_id, lifecycle_environment_id: env_id}, function (data) {
81
- var select = KT.hosts.getPuppetEnvironmentSelect();
82
- if (data !== null) {
83
- select.val(data.id);
84
- select.trigger('change');
85
- }
86
- })
87
- }
88
- };
89
-
90
- KT.hosts.getPuppetEnvironmentSelect = function() {
91
- var select = $("#host_environment_id").first();
92
- if(select.length === 0) {
93
- select = $("#hostgroup_environment_id").first();
94
- }
95
- return select;
96
- };
97
-
98
65
  KT.hosts.getContentViewSelect2 = function() {
99
66
  var select = $("#s2id_host_content_view_id").first();
100
67
  if(select.length === 0) {
@@ -322,7 +322,7 @@ $container_width: ($static_width/2) - 36;
322
322
  position: relative;
323
323
  text-align: left;
324
324
  bottom: 18px;
325
- left: 30px;
325
+ left: 10px;
326
326
  }
327
327
  .progress {
328
328
  display: inline-block;
@@ -163,78 +163,6 @@ input:focus {
163
163
  @extend .status_exclamation_icon;
164
164
  }
165
165
 
166
- /* BUTTONS */
167
- input[type='submit'], button, .button {
168
- font-size: 10px;
169
- display: inline-block;
170
- vertical-align: bottom;
171
- background: -moz-linear-gradient(top, #f9f9f9, #f0f0f0, #e5e5e5, #e9e9e9);
172
- background: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), color-stop(0.9, #e5e5e5), to(#e9e9e9));
173
- box-shadow: none;
174
- border: 1px solid darken($stroke_color, 20%);
175
- color: #221e1f;
176
- cursor: pointer;
177
- padding: 4px 8px;
178
- border-radius: 5px;
179
- text-shadow: 0 1px 0 rgba($white_color, 1);
180
- min-height: 14px;
181
- .nomargin {
182
- margin: 0;
183
- }
184
- &:hover {
185
- background: -moz-linear-gradient(top, $white_color, $white_color, #cfcfcf);
186
- background: -webkit-gradient(linear, left top, left bottom, from($white_color), color-stop(0.6, $white_color), to(#cfcfcf));
187
- box-shadow: 0 1px 2px rgba(0,0,0,0.5);
188
- text-decoration: none;
189
- color: black;
190
- }
191
- &:active {
192
- background: -moz-linear-gradient(top, #c2c3c0, #e4e5e4);
193
- background: -webkit-gradient(linear, left top, left bottom, from(#c2c3c0), to(#e4e5e4));
194
- box-shadow: none;
195
- text-decoration: none;
196
- }
197
- &:focus {
198
- text-decoration: none;
199
- color: #000;
200
- border-width: 2px;
201
- }
202
- &.dialogbutton {
203
- float: right;
204
- margin-left: 3px;
205
- margin: 40px 4px 4px;
206
- }
207
- &.formbutton {
208
- display: inline-block;
209
- margin-left: 3px;
210
- margin: 40px 4px 4px;
211
- }
212
- &.actionlink {
213
- margin: 40px 0 0;
214
- }
215
- &.disabled, &[disabled] {
216
- cursor: default;
217
- background: transparent;
218
- opacity: 0.4;
219
-
220
- &:hover {
221
- background: transparent;
222
- box-shadow: none;
223
- }
224
- }
225
- &.iconbutton {
226
- display: inline-block;
227
- }
228
- &.tiny {
229
- padding: 4px;
230
- margin: 0;
231
- &:active, &:focus {
232
- margin: 0;
233
- padding: 3px;
234
- }
235
- }
236
- }
237
-
238
166
  table {
239
167
  border-collapse: collapse;
240
168
  border: 1px solid $stroke_color;
@@ -93,27 +93,21 @@ module Katello
93
93
  true
94
94
  end
95
95
 
96
- # Reduce visible repos to include lifecycle env permissions
97
- # http://projects.theforeman.org/issues/22914
98
- # Also include repositories in lifecycle environments with registry_unauthenticated_pull=true
99
- def readable_repositories
100
- table_name = Repository.table_name
101
- in_unauth_environments = Repository.joins(:environment).where("#{Katello::KTEnvironment.table_name}.registry_unauthenticated_pull" => true).select(:id)
102
- Repository.readable.or(Repository.joins(:root).where("#{table_name}.id in (?)", in_unauth_environments))
103
- end
104
-
105
96
  def find_readable_repository
106
97
  return nil unless params[:repository]
107
98
  repository = Repository.docker_type.find_by(container_repository_name: params[:repository])
108
99
  if require_user_authorization?(repository)
109
- repository = readable_repositories.docker_type.find_by(container_repository_name: params[:repository])
100
+ repository = Repository.readable_docker_catalog.find_by(container_repository_name: params[:repository])
110
101
  end
111
102
  repository
112
103
  end
113
104
 
114
105
  def require_user_authorization?(repository = @repository)
115
106
  !(params['action'] == 'token' && params['scope'].blank? && params['account'].blank?) &&
116
- (!repository || (!repository.environment.registry_unauthenticated_pull && !ssl_client_authorized?(repository.organization.label)))
107
+ (!repository ||
108
+ (!repository.archive? &&
109
+ !repository.environment.registry_unauthenticated_pull &&
110
+ !ssl_client_authorized?(repository.organization.label)))
117
111
  end
118
112
 
119
113
  def ssl_client_authorized?(org_label)
@@ -167,11 +161,9 @@ module Katello
167
161
  end
168
162
 
169
163
  if (manifest_response = redirect_client { Resources::Registry::Proxy.get(@_request.fullpath, headers) })
170
- #when pulp 2 is removed, this should no longer be needed, and all clients should be redirected
171
- logger.debug filter_sensitive_data(manifest_response)
164
+ #for some requests, we get a redirect, but for others we get the actual manifest in response
172
165
  results = JSON.parse(manifest_response)
173
-
174
- response.header['Docker-Content-Digest'] = "sha256:#{Digest::SHA256.hexdigest(manifest_response)}"
166
+ response.header['Docker-Content-Digest'] = manifest_response.headers[:docker_content_digest]
175
167
  # https://docs.docker.com/registry/spec/manifest-v2-2/
176
168
  # If its v2 schema 2 only the mediaType attribute will be present in the manifest
177
169
  media_type = results['mediaType']
@@ -184,8 +176,8 @@ module Katello
184
176
  'application/vnd.docker.distribution.manifest.v1+prettyjws'
185
177
  end
186
178
  end
187
-
188
- render json: manifest_response, content_type: media_type
179
+ response.headers['Content-Type'] = media_type
180
+ render json: manifest_response
189
181
  end
190
182
  end
191
183
 
@@ -333,7 +325,7 @@ module Katello
333
325
  params[:per_page] = params[:n] || 25
334
326
  params[:search] = params[:q]
335
327
 
336
- search_results = scoped_search(readable_repositories.docker_type.distinct,
328
+ search_results = scoped_search(Repository.readable_docker_catalog.distinct,
337
329
  :container_repository_name, :asc, options)
338
330
 
339
331
  results = {
@@ -347,7 +339,7 @@ module Katello
347
339
  end
348
340
 
349
341
  def catalog
350
- repositories = readable_repositories.docker_type.collect do |repository|
342
+ repositories = Repository.readable_docker_catalog.collect do |repository|
351
343
  repository.container_repository_name
352
344
  end
353
345
  render json: { repositories: repositories }
@@ -485,7 +477,7 @@ module Katello
485
477
  return nil unless scope
486
478
 
487
479
  scopes = scope.split(':')
488
- scopes[2] == 'pull' ? Repository.docker_type.find_by_container_repository_name(scopes[1]) : nil
480
+ scopes[2] == 'pull' ? Repository.docker_type.non_archived.find_by_container_repository_name(scopes[1]) : nil
489
481
  end
490
482
 
491
483
  def disable_strong_params
@@ -242,15 +242,8 @@ module Katello
242
242
  #description N_("This service is available for unauthenticated users")
243
243
  def server_status
244
244
  candlepin_response = Resources::Candlepin::CandlepinPing.ping
245
- status = { :managerCapabilities => candlepin_response['managerCapabilities'] + ["combined_reporting"],
246
- :result => candlepin_response['result'],
247
- :rulesSource => candlepin_response['rulesSource'],
248
- :rulesVersion => candlepin_response['rulesVersion'],
249
- :standalone => candlepin_response['standalone'],
250
- :timeUTC => Time.now.getutc,
251
- :version => Katello::VERSION }
252
-
253
- render :json => status
245
+ candlepin_response[:managerCapabilities] << 'combined_reporting'
246
+ render :json => candlepin_response
254
247
  end
255
248
 
256
249
  #api :PUT, "/consumers/:id", N_("Update consumer information")
@@ -6,7 +6,7 @@ module Katello
6
6
  before_action :find_environment, :only => [:index, :create, :update]
7
7
  before_action :find_optional_organization, :only => [:index, :create, :show]
8
8
  before_action :find_content_view, :only => [:index]
9
- before_action :find_authorized_katello_resource, :only => [:show, :update, :destroy, :available_releases, :product_content,
9
+ before_action :find_authorized_katello_resource, :only => [:show, :update, :destroy, :available_releases,
10
10
  :available_host_collections, :add_host_collections, :remove_host_collections,
11
11
  :content_override, :add_subscriptions, :remove_subscriptions,
12
12
  :subscriptions]
@@ -141,29 +141,6 @@ module Katello
141
141
  respond_for_index :collection => response
142
142
  end
143
143
 
144
- api :GET, "/activation_keys/:id/product_content", N_("Show content available for an activation key")
145
- param :id, String, :desc => N_("ID of the activation key"), :required => true
146
- param :content_access_mode_all, :bool, :desc => N_("Get all content available, not just that provided by subscriptions")
147
- param :content_access_mode_env, :bool, :desc => N_("Limit content to just that available in the activation key's content view version")
148
- def product_content
149
- content_access_mode_all = ::Foreman::Cast.to_bool(params[:content_access_mode_all])
150
- content_access_mode_env = ::Foreman::Cast.to_bool(params[:content_access_mode_env])
151
-
152
- content_finder = ProductContentFinder.new(
153
- :match_subscription => !content_access_mode_all,
154
- :match_environment => content_access_mode_env,
155
- :consumable => @activation_key
156
- )
157
-
158
- content = content_finder.presenter_with_overrides(@activation_key.content_overrides)
159
- response = {
160
- :results => content,
161
- :total => content.size,
162
- :subtotal => content.size
163
- }
164
- respond_for_index :collection => response
165
- end
166
-
167
144
  api :POST, "/activation_keys/:id/host_collections"
168
145
  param :id, :number, :desc => N_("ID of the activation key"), :required => true
169
146
  param :host_collection_ids, Array, :required => true, :desc => N_("List of host collection IDs to associate with activation key")
@@ -248,6 +225,15 @@ module Katello
248
225
  respond_for_show(:resource => @activation_key)
249
226
  end
250
227
 
228
+ api :GET, "/activation_keys/:id/product_content", N_("Show content available for an activation key")
229
+ param :id, String, :desc => N_("ID of the activation key"), :required => true
230
+ param :content_access_mode_all, :bool, :desc => N_("Get all content available, not just that provided by subscriptions")
231
+ param :content_access_mode_env, :bool, :desc => N_("Limit content to just that available in the activation key's content view version")
232
+ def product_content
233
+ # note this is just there as a place holder for apipie.
234
+ # The routing would automatically redirect it to repository_sets#index
235
+ end
236
+
251
237
  def index_relation
252
238
  activation_keys = ActivationKey.readable
253
239
  activation_keys = activation_keys.where(:name => params[:name]) if params[:name]
@@ -39,7 +39,18 @@ module Katello
39
39
  end
40
40
 
41
41
  def deprecate_katello_agent
42
- ::Foreman::Deprecation.api_deprecation_warning("Katello-agent is deprecated and will be removed in a future release.")
42
+ check_katello_agent_not_disabled
43
+ ::Foreman::Deprecation.api_deprecation_warning("This action uses katello-agent, which is deprecated and will be removed in #{katello_agent_removal_release}.")
44
+ end
45
+
46
+ def check_katello_agent_not_disabled
47
+ unless ::Katello.with_katello_agent?
48
+ fail HttpErrors::BadRequest, _("This action uses katello-agent, which is currently disabled. Use remote execution instead.")
49
+ end
50
+ end
51
+
52
+ def katello_agent_removal_release
53
+ self.class.katello_agent_removal_release
43
54
  end
44
55
 
45
56
  def full_result_response(collection)
@@ -75,7 +86,8 @@ module Katello
75
86
  end
76
87
 
77
88
  total = scoped_search_total(query, group)
78
-
89
+ # If you get an ArgumentError here (wrong number of arguments given)
90
+ # it's probably because query is an array and not an ActiveRecord::Relation
79
91
  query = query.select(:id) if query.respond_to?(:select)
80
92
  query = resource.search_for(*search_options).where("#{resource.table_name}.id" => query)
81
93
 
@@ -207,7 +219,7 @@ module Katello
207
219
  end
208
220
 
209
221
  def find_host_with_subscriptions(id, permission)
210
- @host = resource_finder(::Host::Managed.authorized(permission, ::Host::Managed), id)
222
+ @host = resource_finder(::Host::Managed.authorized(permission, ::Host::Managed), id&.to_i)
211
223
  fail HttpErrors::BadRequest, _("Host has not been registered with subscription-manager") if @host.subscription_facet.nil?
212
224
  end
213
225
 
@@ -49,7 +49,7 @@ module Katello
49
49
 
50
50
  content = nil
51
51
  if filepath
52
- content = File.open(filepath, 'rb') { |file| file.read }
52
+ content = File.read(filepath, mode: 'rb')
53
53
  else
54
54
  content = params[:content]
55
55
  end
@@ -1,6 +1,5 @@
1
1
  module Katello
2
2
  class Api::V2::ContentExportIncrementalsController < Api::V2::ApiController
3
- before_action :fail_if_not_pulp3, :only => [:version, :library]
4
3
  before_action :find_exportable_organization, :only => [:library]
5
4
  before_action :find_exportable_content_view_version, :only => [:version]
6
5
  before_action :find_library_export_view, :only => [:library]
@@ -16,7 +15,7 @@ module Katello
16
15
  param :fail_on_missing_content, :bool, :desc => N_("Fails if any of the repositories belonging to this version"\
17
16
  " are unexportable. False by default."), :required => false
18
17
  def version
19
- tasks = async_task(::Actions::Pulp3::Orchestration::ContentViewVersion::Export,
18
+ tasks = async_task(Actions::Katello::ContentViewVersion::Export,
20
19
  content_view_version: @version,
21
20
  destination_server: params[:destination_server],
22
21
  chunk_size: params[:chunk_size_mb],
@@ -88,11 +87,5 @@ module Katello
88
87
  throw_resource_not_found(name: 'organization', id: params[:organization_id])
89
88
  end
90
89
  end
91
-
92
- def fail_if_not_pulp3
93
- unless SmartProxy.pulp_primary.pulp3_repository_type_support?(Katello::Repository::YUM_TYPE)
94
- fail HttpErrors::BadRequest, _("Invalid usage for Pulp 2 repositories. Use export for Yum repositories")
95
- end
96
- end
97
90
  end
98
91
  end
@@ -1,6 +1,5 @@
1
1
  module Katello
2
2
  class Api::V2::ContentExportsController < Api::V2::ApiController
3
- before_action :fail_if_not_pulp3, :only => [:version, :library]
4
3
  before_action :find_exportable_organization, :only => [:library]
5
4
  before_action :find_exportable_content_view_version, :only => [:version]
6
5
 
@@ -27,12 +26,6 @@ module Katello
27
26
  :collection => scoped_search(history, 'id', 'asc', resource_class: ContentViewVersionExportHistory))
28
27
  end
29
28
 
30
- api :GET, "/content_exports/api_status", N_("true if the export api is pulp3 ready and usable. This API is intended for use by hammer-cli only.")
31
- def api_status
32
- ::Foreman::Deprecation.api_deprecation_warning("/content_exports/api_status is being deprecated and will be removed in a future version of Katello.")
33
- render json: { api_usable: SmartProxy.pulp_primary.pulp3_repository_type_support?(Katello::Repository::YUM_TYPE) }, status: :ok
34
- end
35
-
36
29
  api :POST, "/content_exports/version", N_("Performs a full-export of a content view version.")
37
30
  param :id, :number, :desc => N_("Content view version identifier"), :required => true
38
31
  param :destination_server, String, :desc => N_("Destination Server name"), :required => false
@@ -41,7 +34,7 @@ module Katello
41
34
  param :fail_on_missing_content, :bool, :desc => N_("Fails if any of the repositories belonging to this version"\
42
35
  " are unexportable. False by default."), :required => false
43
36
  def version
44
- tasks = async_task(::Actions::Pulp3::Orchestration::ContentViewVersion::Export,
37
+ tasks = async_task(::Actions::Katello::ContentViewVersion::Export,
45
38
  content_view_version: @version,
46
39
  destination_server: params[:destination_server],
47
40
  chunk_size: params[:chunk_size_mb],
@@ -78,11 +71,5 @@ module Katello
78
71
  throw_resource_not_found(name: 'organization', id: params[:organization_id])
79
72
  end
80
73
  end
81
-
82
- def fail_if_not_pulp3
83
- unless SmartProxy.pulp_primary.pulp3_repository_type_support?(Katello::Repository::YUM_TYPE)
84
- fail HttpErrors::BadRequest, _("Invalid usage for Pulp 2 repositories. Use export for Yum repositories")
85
- end
86
- end
87
74
  end
88
75
  end
@@ -1,20 +1,39 @@
1
1
  module Katello
2
2
  class Api::V2::ContentImportsController < Api::V2::ApiController
3
- before_action :find_publishable_content_view, :only => [:version]
3
+ before_action :find_organization, :only => [:version]
4
+ before_action :check_authorized, :only => [:version]
5
+
4
6
  before_action :find_importable_organization, :only => [:library]
5
7
  before_action :find_default_content_view, :only => [:library]
6
8
 
9
+ api :GET, "/content_imports", N_("List import histories")
10
+ param :content_view_version_id, :number, :desc => N_("Content view version identifier"), :required => false
11
+ param :content_view_id, :number, :desc => N_("Content view identifier"), :required => false
12
+ param :organization_id, :number, :desc => N_("Organization identifier"), :required => false
13
+ param :id, :number, :desc => N_("Content view version import history identifier"), :required => false
14
+ param :type, ::Katello::ContentViewVersionExportHistory::EXPORT_TYPES,
15
+ :desc => N_("Import Types"),
16
+ :required => false
17
+ param_group :search, Api::V2::ApiController
18
+ add_scoped_search_description_for(ContentViewVersionImportHistory)
19
+ def index
20
+ history = ContentViewVersionImportHistory.readable
21
+ history = history.where(:id => params[:id]) unless params[:id].blank?
22
+ history = history.where(:content_view_version_id => params[:content_view_version_id]) unless params[:content_view_version_id].blank?
23
+ history = history.with_organization_id(params[:organization_id]) unless params[:organization_id].blank?
24
+ history = history.with_content_view_id(params[:content_view_id]) unless params[:content_view_id].blank?
25
+ history = history.where(:import_type => params[:type]) unless params[:type].blank?
26
+ respond_with_template_collection("index", 'content_view_version_import_histories',
27
+ :collection => scoped_search(history, 'id', 'asc', resource_class: ContentViewVersionImportHistory))
28
+ end
29
+
7
30
  api :POST, "/content_imports/version", N_("Import a content view version")
8
- param :content_view_id, :number, :desc => N_("Content view identifier"), :required => true
31
+ param :organization_id, :number, :desc => N_("Organization identifier"), :required => true
9
32
  param :path, String, :desc => N_("Directory containing the exported Content View Version"), :required => true
10
33
  param :metadata, Hash, :desc => N_("Metadata taken from the upstream export history for this Content View Version"), :required => true
11
34
  def version
12
- if @view.default?
13
- fail HttpErrors::BadRequest, _("Cannot use this end point for importing to library. "\
14
- "If you intented to upload to library, use the library endpoint.")
15
- end
16
-
17
- task = async_task(::Actions::Katello::ContentViewVersion::Import, @view, path: params[:path], metadata: metadata_params.to_h)
35
+ task = async_task(::Actions::Katello::ContentViewVersion::Import, organization: @organization,
36
+ path: params[:path], metadata: metadata_params.to_h)
18
37
  respond_for_async :resource => task
19
38
  end
20
39
 
@@ -29,9 +48,8 @@ module Katello
29
48
 
30
49
  private
31
50
 
32
- def find_publishable_content_view
33
- @view = ContentView.publishable.find(params[:content_view_id])
34
- throw_resource_not_found(name: 'content_view', id: params[:content_view_id]) if @view.blank?
51
+ def check_authorized
52
+ fail HttpErrors::Forbidden, _("Action unauthorized to be performed in this organization.") unless ContentView.importable?
35
53
  end
36
54
 
37
55
  def find_default_content_view
@@ -47,12 +65,17 @@ module Katello
47
65
  def metadata_params
48
66
  params.require(:metadata).permit(
49
67
  :organization,
50
- :content_view,
51
- :repository_mapping,
68
+ :repositories,
69
+ :products,
52
70
  :toc,
53
- content_view_version: [:major, :minor]
71
+ :incremental,
72
+ gpg_keys: {},
73
+ content_view: [:name, :label, :description],
74
+ content_view_version: [:major, :minor, :description],
75
+ from_content_view_version: [:major, :minor]
54
76
  ).tap do |nested|
55
- nested[:repository_mapping] = params[:metadata].require(:repository_mapping).permit!
77
+ nested[:repositories] = params[:metadata].require(:repositories).permit!
78
+ nested[:products] = params[:metadata].require(:products).permit!
56
79
  end
57
80
  end
58
81
  end