katello 4.0.3 → 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 (563) 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/controllers/katello/api/registry/registry_proxies_controller.rb +5 -11
  5. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +2 -9
  6. data/app/controllers/katello/api/v2/activation_keys_controller.rb +10 -24
  7. data/app/controllers/katello/api/v2/api_controller.rb +15 -3
  8. data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -1
  9. data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +1 -8
  10. data/app/controllers/katello/api/v2/content_exports_controller.rb +1 -14
  11. data/app/controllers/katello/api/v2/content_imports_controller.rb +38 -15
  12. data/app/controllers/katello/api/v2/content_uploads_controller.rb +1 -1
  13. data/app/controllers/katello/api/v2/content_view_components_controller.rb +22 -1
  14. data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +6 -1
  15. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +2 -59
  16. data/app/controllers/katello/api/v2/content_views_controller.rb +3 -58
  17. data/app/controllers/katello/api/v2/host_errata_controller.rb +7 -6
  18. data/app/controllers/katello/api/v2/host_packages_controller.rb +4 -4
  19. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +18 -22
  20. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +16 -16
  21. data/app/controllers/katello/api/v2/organizations_controller.rb +2 -1
  22. data/app/controllers/katello/api/v2/package_groups_controller.rb +4 -0
  23. data/app/controllers/katello/api/v2/repositories_controller.rb +13 -12
  24. data/app/controllers/katello/api/v2/repository_sets_controller.rb +50 -4
  25. data/app/controllers/katello/api/v2/subscriptions_controller.rb +7 -1
  26. data/app/controllers/katello/concerns/api/api_controller.rb +10 -0
  27. data/app/controllers/katello/concerns/api/v2/registration_commands_controller_extensions.rb +46 -0
  28. data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +8 -0
  29. data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +31 -22
  30. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +0 -8
  31. data/app/controllers/katello/concerns/organizations_controller_extensions.rb +1 -1
  32. data/app/controllers/katello/concerns/registration_commands_controller_extensions.rb +34 -0
  33. data/app/helpers/katello/katello_urls_helper.rb +23 -0
  34. data/app/lib/actions/candlepin/owner/import.rb +10 -3
  35. data/app/lib/actions/candlepin/product/content_update.rb +1 -1
  36. data/app/lib/actions/foreman/environment/destroy.rb +2 -2
  37. data/app/lib/actions/katello/agent_action.rb +1 -6
  38. data/app/lib/actions/katello/capsule_content/refresh_repos.rb +0 -7
  39. data/app/lib/actions/katello/capsule_content/sync.rb +1 -1
  40. data/app/lib/actions/katello/capsule_content/sync_capsule.rb +1 -2
  41. data/app/lib/actions/katello/content_view/add_to_environment.rb +9 -7
  42. data/app/lib/actions/katello/content_view/incremental_updates.rb +3 -10
  43. data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +2 -3
  44. data/app/lib/actions/katello/content_view/promote_to_environment.rb +1 -4
  45. data/app/lib/actions/katello/content_view/publish.rb +21 -31
  46. data/app/lib/actions/katello/content_view_environment/destroy.rb +0 -5
  47. data/app/lib/actions/katello/content_view_version/auto_create_products.rb +22 -0
  48. data/app/lib/actions/katello/content_view_version/auto_create_repositories.rb +22 -0
  49. data/app/lib/actions/katello/content_view_version/destroy.rb +0 -10
  50. data/app/lib/actions/katello/content_view_version/export.rb +20 -22
  51. data/app/lib/actions/katello/content_view_version/import.rb +27 -13
  52. data/app/lib/actions/katello/content_view_version/import_library.rb +4 -2
  53. data/app/lib/actions/katello/content_view_version/incremental_update.rb +12 -67
  54. data/app/lib/actions/katello/content_view_version/republish_repositories.rb +0 -4
  55. data/app/lib/actions/katello/content_view_version/reset_content_view_repositories_from_metadata.rb +11 -0
  56. data/app/lib/actions/katello/foreman/content_update.rb +0 -3
  57. data/app/lib/actions/katello/host/auto_attach_subscriptions.rb +0 -4
  58. data/app/lib/actions/katello/organization/manifest_import.rb +7 -1
  59. data/app/lib/actions/katello/organization/manifest_refresh.rb +28 -7
  60. data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +2 -2
  61. data/app/lib/actions/katello/product/create.rb +0 -1
  62. data/app/lib/actions/katello/repository/check_matching_content.rb +4 -3
  63. data/app/lib/actions/katello/repository/destroy.rb +1 -1
  64. data/app/lib/actions/katello/repository/discover.rb +1 -1
  65. data/app/lib/actions/katello/repository/filtered_index_content.rb +1 -4
  66. data/app/lib/actions/katello/repository/import_upload.rb +0 -1
  67. data/app/lib/actions/katello/repository/update.rb +0 -1
  68. data/app/lib/actions/middleware/record_smart_proxy_sync_history.rb +0 -5
  69. data/app/lib/actions/pulp/repository/create.rb +1 -7
  70. data/app/lib/actions/pulp/repository/distributor_publish.rb +2 -10
  71. data/app/lib/actions/pulp/repository/sync.rb +1 -3
  72. data/app/lib/actions/pulp3/capsule_content/refresh_content_guard.rb +17 -0
  73. data/app/lib/actions/pulp3/content_guard/refresh.rb +10 -6
  74. data/app/lib/actions/pulp3/content_view_version/create_export_history.rb +57 -0
  75. data/app/lib/actions/pulp3/content_view_version/create_import_history.rb +34 -0
  76. data/app/lib/actions/pulp3/orchestration/content_view_version/copy_version_units_to_library.rb +2 -3
  77. data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +34 -51
  78. data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +2 -2
  79. data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +13 -1
  80. data/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb +1 -1
  81. data/app/lib/actions/pulp3/orchestration/repository/sync.rb +1 -0
  82. data/app/lib/actions/pulp3/repository/refresh_remote.rb +17 -0
  83. data/app/lib/katello/agent/client_message_handler.rb +3 -11
  84. data/app/lib/katello/concerns/base_template_scope_extensions.rb +117 -3
  85. data/app/lib/katello/errors.rb +6 -11
  86. data/app/lib/katello/event_daemon/monitor.rb +0 -1
  87. data/app/lib/katello/event_daemon/runner.rb +2 -2
  88. data/app/lib/katello/event_daemon/services/agent_event_receiver.rb +10 -6
  89. data/app/lib/katello/http_resource.rb +1 -6
  90. data/app/lib/katello/logging.rb +11 -6
  91. data/app/lib/katello/qpid/connection.rb +1 -3
  92. data/app/lib/katello/repo_discovery.rb +15 -1
  93. data/app/lib/katello/resources/candlepin/owner.rb +3 -2
  94. data/app/lib/katello/resources/candlepin/pool.rb +6 -2
  95. data/app/lib/katello/resources/candlepin.rb +10 -0
  96. data/app/lib/katello/util/package.rb +1 -1
  97. data/app/lib/katello/util/pulpcore_content_filters.rb +1 -1
  98. data/app/lib/katello/validators/hostgroup_kickstart_repository_validator.rb +0 -6
  99. data/app/models/katello/authorization/content_view.rb +8 -0
  100. data/app/models/katello/authorization/content_view_version_import_history.rb +11 -0
  101. data/app/models/katello/concerns/content_facet_host_extensions.rb +1 -1
  102. data/app/models/katello/concerns/content_view_filter_rule_common.rb +2 -2
  103. data/app/models/katello/concerns/host_managed_extensions.rb +1 -32
  104. data/app/models/katello/concerns/hostgroup_extensions.rb +2 -9
  105. data/app/models/katello/concerns/http_proxy_extensions.rb +2 -4
  106. data/app/models/katello/concerns/location_extensions.rb +2 -25
  107. data/app/models/katello/concerns/operatingsystem_extensions.rb +0 -2
  108. data/app/models/katello/concerns/organization_extensions.rb +4 -18
  109. data/app/models/katello/concerns/redhat_extensions.rb +10 -18
  110. data/app/models/katello/concerns/smart_proxy_extensions.rb +6 -31
  111. data/app/models/katello/content_view.rb +17 -113
  112. data/app/models/katello/content_view_component.rb +5 -0
  113. data/app/models/katello/content_view_docker_filter_rule.rb +1 -0
  114. data/app/models/katello/content_view_package_filter_rule.rb +4 -0
  115. data/app/models/katello/content_view_package_group_filter.rb +1 -0
  116. data/app/models/katello/content_view_repository.rb +4 -5
  117. data/app/models/katello/content_view_version.rb +9 -33
  118. data/app/models/katello/content_view_version_export_history.rb +18 -4
  119. data/app/models/katello/content_view_version_import_history.rb +42 -0
  120. data/app/models/katello/erratum.rb +1 -1
  121. data/app/models/katello/events/delete_pool.rb +19 -0
  122. data/app/models/katello/glue/candlepin/environment.rb +7 -0
  123. data/app/models/katello/glue/candlepin/owner.rb +12 -1
  124. data/app/models/katello/glue/candlepin/pool.rb +42 -25
  125. data/app/models/katello/glue/provider.rb +3 -6
  126. data/app/models/katello/glue/pulp/repo.rb +19 -9
  127. data/app/models/katello/host/content_facet.rb +1 -0
  128. data/app/models/katello/host/subscription_facet.rb +3 -1
  129. data/app/models/katello/kt_environment.rb +0 -6
  130. data/app/models/katello/package_group.rb +4 -0
  131. data/app/models/katello/ping.rb +15 -4
  132. data/app/models/katello/pool.rb +9 -0
  133. data/app/models/katello/product.rb +0 -6
  134. data/app/models/katello/product_content.rb +3 -1
  135. data/app/models/katello/pulp_sync_status.rb +0 -10
  136. data/app/models/katello/repository.rb +20 -35
  137. data/app/models/katello/root_repository.rb +0 -5
  138. data/app/models/katello/subscription.rb +10 -0
  139. data/app/models/katello/sync_plan.rb +7 -0
  140. data/app/models/setting/content.rb +7 -8
  141. data/app/presenters/katello/content_view_version_compare_presenter.rb +2 -6
  142. data/app/presenters/katello/product_content_presenter.rb +3 -5
  143. data/app/services/cert/certs.rb +3 -7
  144. data/app/services/katello/applicability/applicable_content_helper.rb +1 -2
  145. data/app/services/katello/candlepin/event_handler.rb +22 -22
  146. data/app/services/katello/candlepin/message_handler.rb +24 -15
  147. data/app/services/katello/content_view_manager.rb +24 -0
  148. data/app/services/katello/event_monitor/poller_thread.rb +25 -20
  149. data/app/services/katello/managed_content_medium_provider.rb +4 -0
  150. data/app/services/katello/organization_creator.rb +120 -0
  151. data/app/services/katello/product_content_finder.rb +5 -1
  152. data/app/services/katello/pulp/pulp_content_unit.rb +6 -6
  153. data/app/services/katello/pulp/smart_proxy_repository.rb +2 -17
  154. data/app/services/katello/pulp3/api/ansible_collection.rb +14 -2
  155. data/app/services/katello/pulp3/api/apt.rb +1 -1
  156. data/app/services/katello/pulp3/api/content_guard.rb +6 -40
  157. data/app/services/katello/pulp3/api/core.rb +27 -2
  158. data/app/services/katello/pulp3/api/docker.rb +1 -1
  159. data/app/services/katello/pulp3/api/file.rb +5 -1
  160. data/app/services/katello/pulp3/api/yum.rb +9 -1
  161. data/app/services/katello/pulp3/content_view_version/export.rb +18 -40
  162. data/app/services/katello/pulp3/content_view_version/import.rb +75 -30
  163. data/app/services/katello/pulp3/content_view_version/import_gpg_keys.rb +32 -0
  164. data/app/services/katello/pulp3/content_view_version/import_validator.rb +53 -21
  165. data/app/services/katello/pulp3/content_view_version/importable_products.rb +47 -0
  166. data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +52 -0
  167. data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +99 -0
  168. data/app/services/katello/pulp3/pulp_content_unit.rb +1 -1
  169. data/app/services/katello/pulp3/repository/ansible_collection.rb +5 -1
  170. data/app/services/katello/pulp3/repository/apt.rb +2 -1
  171. data/app/services/katello/pulp3/repository/yum.rb +0 -16
  172. data/app/services/katello/pulp3/repository.rb +20 -1
  173. data/app/services/katello/pulp3/rpm.rb +5 -1
  174. data/app/services/katello/pulp3/task.rb +12 -5
  175. data/app/services/katello/pulp3/task_group.rb +10 -5
  176. data/app/services/katello/smart_proxy_helper.rb +1 -8
  177. data/app/services/katello/ui_notifications/pulp/proxy_disk_space.rb +0 -1
  178. data/app/services/katello/ui_notifications/system_error.rb +25 -0
  179. data/app/views/katello/api/v2/content_view_components/show.json.rabl +1 -1
  180. data/app/views/katello/api/v2/content_view_filters/show.json.rabl +0 -1
  181. data/app/views/katello/api/v2/{puppet_modules → content_view_version_import_histories}/index.json.rabl +1 -1
  182. data/app/views/katello/api/v2/content_view_version_import_histories/show.json.rabl +14 -0
  183. data/app/views/katello/api/v2/content_view_versions/base.json.rabl +2 -2
  184. data/app/views/katello/api/v2/content_view_versions/show.json.rabl +0 -7
  185. data/app/views/katello/api/v2/content_views/base.json.rabl +20 -9
  186. data/app/views/katello/api/v2/environments/show.json.rabl +0 -1
  187. data/app/views/katello/api/v2/package_groups/index.json.rabl +4 -0
  188. data/app/views/katello/api/v2/repositories/base.json.rabl +0 -1
  189. data/app/views/katello/api/v2/repositories/show.json.rabl +1 -1
  190. data/app/views/katello/api/v2/repository_sets/index.json.rabl +4 -1
  191. data/app/views/katello/api/v2/repository_sets/show.json.rabl +22 -0
  192. data/app/views/katello/api/v2/subscriptions/show.json.rabl +1 -1
  193. data/app/views/overrides/activation_keys/_host_media_type_select.html.erb +1 -1
  194. data/app/views/overrides/smart_proxies/_download_policy.erb +1 -1
  195. data/config/initializers/monkeys.rb +0 -1
  196. data/config/katello.yaml.example +0 -1
  197. data/config/routes/api/v2.rb +9 -21
  198. data/config/routes/overrides.rb +1 -2
  199. data/db/migrate/20140422000001_update_products_add_organization.rb +3 -2
  200. data/db/migrate/20160701180402_add_sortable_version_to_puppet_modules.rb +2 -0
  201. data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +1 -1
  202. data/db/migrate/20210119162528_delete_puppet_and_ostree_repos.rb +14 -20
  203. data/db/migrate/20210224160921_remove_disabled_products_from_sync_plans.rb +6 -0
  204. data/db/migrate/20210302165636_remove_katello_puppet_modules.rb +62 -0
  205. data/db/migrate/20210309160925_create_katello_content_view_version_import_histories.rb +13 -0
  206. data/db/migrate/20210318204533_add_import_type_to_import_histories.rb +8 -0
  207. data/db/migrate/20210319123300_add_foreign_keys_to_import_export_histories.rb +6 -0
  208. data/db/migrate/20210322142311_add_auth_url_token_to_root_repositories.rb +6 -0
  209. data/db/migrate/20210331180353_katello_pool_organization_id_not_nullable.rb +16 -0
  210. data/db/migrate/20210409033915_add_created_in_katello_to_taxonomy.rb +9 -0
  211. data/db/seeds.d/101-locations.rb +0 -3
  212. data/db/seeds.d/102-organizations.rb +1 -5
  213. data/db/seeds.d/109-katello-notification-blueprints.rb +12 -0
  214. data/db/seeds.d/111-upgrade_tasks.rb +3 -2
  215. data/engines/bastion/vendor/assets/javascripts/bastion/angular/angular.js +325 -156
  216. data/engines/bastion/vendor/assets/javascripts/bastion/angular-animate/angular-animate.js +3 -3
  217. data/engines/bastion/vendor/assets/javascripts/bastion/angular-resource/angular-resource.js +3 -3
  218. data/engines/bastion/vendor/assets/javascripts/bastion/angular-route/angular-route.js +3 -3
  219. data/engines/bastion/vendor/assets/javascripts/bastion/angular-sanitize/angular-sanitize.js +21 -43
  220. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +9 -10
  221. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-repository-sets.html +2 -9
  222. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +0 -1
  223. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +0 -3
  224. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +2 -0
  225. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +2 -0
  226. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +11 -4
  227. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +18 -11
  228. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html +10 -4
  229. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +2 -0
  230. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-actions.controller.js +5 -1
  231. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js +7 -2
  232. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +7 -2
  233. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +6 -6
  234. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +7 -7
  235. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +14 -6
  236. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +5 -5
  237. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js +0 -14
  238. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-repository-sets.controller.js +9 -11
  239. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -2
  240. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-repository-sets.html +2 -8
  241. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +3 -6
  242. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register.html +5 -0
  243. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-view.factory.js +0 -6
  244. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +0 -56
  245. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-available-content-views.html +0 -5
  246. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-content-views-list.html +0 -5
  247. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +2 -9
  248. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-info.html +0 -12
  249. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +0 -3
  250. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +2 -6
  251. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +0 -1
  252. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +0 -7
  253. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/content.service.js +0 -5
  254. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +0 -1
  255. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js +0 -11
  256. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/environments.html +0 -3
  257. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +21 -6
  258. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +9 -0
  259. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +71 -311
  260. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +0 -10
  261. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +0 -1
  262. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +2 -4
  263. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +13 -15
  264. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +21 -7
  265. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repositories.routes.js +0 -9
  266. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +0 -6
  267. data/engines/bastion_katello/lib/bastion_katello/engine.rb +3 -3
  268. data/lib/katello/engine.rb +16 -15
  269. data/lib/katello/middleware/organization_created_enforcer.rb +22 -0
  270. data/lib/katello/permission_creator.rb +12 -28
  271. data/lib/katello/permissions/host_permissions.rb +3 -2
  272. data/lib/katello/plugin.rb +6 -19
  273. data/lib/katello/repository_types/ansible_collection.rb +1 -1
  274. data/lib/katello/repository_types/deb.rb +1 -1
  275. data/lib/katello/repository_types/docker.rb +1 -1
  276. data/lib/katello/repository_types/file.rb +1 -1
  277. data/lib/katello/repository_types/yum.rb +1 -1
  278. data/lib/katello/tasks/clean_backend_objects.rake +25 -0
  279. data/lib/katello/tasks/jenkins.rake +6 -0
  280. data/lib/katello/tasks/receptor/extract_orgs.rake +1 -3
  281. data/lib/katello/tasks/reimport.rake +0 -1
  282. data/lib/katello/tasks/repository.rake +0 -30
  283. data/lib/katello/tasks/update_subscription_facet_backend_data.rake +3 -3
  284. data/lib/katello/tasks/upgrades/4.0/remove_ostree_puppet_content.rake +2 -4
  285. data/lib/katello/tasks/upgrades/4.1/fix_invalid_pools.rake +62 -0
  286. data/lib/katello/tasks/upgrades/4.1/sync_noarch_content.rake +15 -0
  287. data/lib/katello/version.rb +1 -1
  288. data/lib/katello.rb +1 -1
  289. data/locale/action_names.rb +65 -63
  290. data/locale/bn/katello.edit.po +1357 -1606
  291. data/locale/bn/katello.po +465 -744
  292. data/locale/cs/katello.edit.po +1213 -1087
  293. data/locale/cs/katello.po +307 -219
  294. data/locale/de/katello.edit.po +1498 -1520
  295. data/locale/de/katello.po +589 -625
  296. data/locale/en/katello.edit.po +1198 -1074
  297. data/locale/en/katello.po +304 -213
  298. data/locale/es/katello.edit.po +2344 -2304
  299. data/locale/es/katello.po +1407 -1407
  300. data/locale/fr/katello.edit.po +2720 -2642
  301. data/locale/fr/katello.po +1703 -1750
  302. data/locale/gu/katello.edit.po +1546 -1797
  303. data/locale/gu/katello.po +654 -935
  304. data/locale/hi/katello.edit.po +1545 -1793
  305. data/locale/hi/katello.po +653 -931
  306. data/locale/it/katello.edit.po +1323 -1310
  307. data/locale/it/katello.po +407 -409
  308. data/locale/ja/katello.edit.po +2645 -2557
  309. data/locale/ja/katello.po +1646 -1664
  310. data/locale/katello.pot +1435 -1289
  311. data/locale/kn/katello.edit.po +1546 -1795
  312. data/locale/kn/katello.po +654 -933
  313. data/locale/ko/katello.edit.po +1464 -1449
  314. data/locale/ko/katello.po +554 -554
  315. data/locale/mr/katello.edit.po +1545 -1758
  316. data/locale/mr/katello.po +653 -896
  317. data/locale/or/katello.edit.po +1546 -1795
  318. data/locale/or/katello.po +654 -933
  319. data/locale/pa/katello.edit.po +1541 -1775
  320. data/locale/pa/katello.po +649 -913
  321. data/locale/pt/katello.edit.po +1289 -1255
  322. data/locale/pt/katello.po +398 -394
  323. data/locale/pt_BR/katello.edit.po +2370 -2315
  324. data/locale/pt_BR/katello.po +1435 -1421
  325. data/locale/ru/katello.edit.po +1611 -1608
  326. data/locale/ru/katello.po +704 -716
  327. data/locale/ta/katello.edit.po +1358 -1605
  328. data/locale/ta/katello.po +465 -742
  329. data/locale/te/katello.edit.po +1545 -1792
  330. data/locale/te/katello.po +653 -930
  331. data/locale/zh_CN/katello.edit.po +3052 -2930
  332. data/locale/zh_CN/katello.po +2055 -2039
  333. data/locale/zh_TW/katello.edit.po +1571 -1669
  334. data/locale/zh_TW/katello.po +649 -777
  335. data/package.json +2 -2
  336. data/webpack/{scenes/ContentViews/Details/Repositories/RepoAddedStatus.js → components/AddedStatusLabel.js} +5 -5
  337. data/webpack/components/RoutedTabs/RoutedTabs.js +91 -0
  338. data/webpack/components/RoutedTabs/__tests__/RoutedTabs.test.js +32 -0
  339. data/webpack/components/RoutedTabs/index.js +4 -0
  340. data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageConstants.js +2 -0
  341. data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js +21 -0
  342. data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageSelectors.js +21 -0
  343. data/webpack/components/extensions/RegistrationCommands/__tests__/ActivationKeys.test.js +18 -0
  344. data/webpack/components/extensions/RegistrationCommands/__tests__/Force.test.js +9 -0
  345. data/webpack/components/extensions/RegistrationCommands/__tests__/IgnoreSubmanErrors.test.js +9 -0
  346. data/webpack/components/extensions/RegistrationCommands/__tests__/LifeCycleEnvironment.test.js +11 -0
  347. data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/ActivationKeys.test.js.snap +58 -0
  348. data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/Force.test.js.snap +25 -0
  349. data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/IgnoreSubmanErrors.test.js.snap +25 -0
  350. data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/LifeCycleEnvironment.test.js.snap +27 -0
  351. data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +99 -0
  352. data/webpack/components/extensions/RegistrationCommands/fields/Force.js +38 -0
  353. data/webpack/components/extensions/RegistrationCommands/fields/IgnoreSubmanErrors.js +38 -0
  354. data/webpack/components/extensions/RegistrationCommands/fields/LifecycleEnvironment.js +56 -0
  355. data/webpack/components/extensions/RegistrationCommands/index.js +81 -0
  356. data/webpack/components/pf3Table/formatters/EntitlementsInlineEditFormatter.js +23 -24
  357. data/webpack/components/pf3Table/formatters/__tests__/__snapshots__/EntitlementsInlineEditFormatter.test.js.snap +3 -1
  358. data/webpack/components/pf3Table/formatters/entitlementsValueFormatter.js +16 -0
  359. data/webpack/containers/Application/overrides.scss +3 -0
  360. data/webpack/fills_index.js +3 -0
  361. data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +0 -2
  362. data/webpack/scenes/ContentViews/ContentViewsConstants.js +8 -1
  363. data/webpack/scenes/ContentViews/Copy/__tests__/contentViewCopyResult.fixtures.json +1 -3
  364. data/webpack/scenes/ContentViews/Create/__tests__/contentViewCreateResult.fixtures.json +1 -3
  365. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentEnvironments.js +28 -0
  366. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentVersion.js +45 -0
  367. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +124 -0
  368. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.fixtures.json +161 -0
  369. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +163 -0
  370. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/unpublishedCVComponents.fixtures.json +64 -0
  371. data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +67 -7
  372. data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +61 -4
  373. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +34 -11
  374. data/webpack/scenes/ContentViews/Details/Filters/CVFilterDetailType.js +33 -0
  375. data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +117 -0
  376. data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +115 -0
  377. data/webpack/scenes/ContentViews/Details/Filters/ContentType.js +7 -10
  378. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetails.js +49 -0
  379. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +56 -0
  380. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +3 -17
  381. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +116 -0
  382. data/webpack/scenes/ContentViews/Details/Filters/__tests__/allFilterPackageGroups.fixtures.json +69 -0
  383. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetail.fixtures.json +103 -0
  384. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +116 -0
  385. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterDetail.fixtures.json +147 -0
  386. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterRules.fixtures.json +30 -0
  387. data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +136 -0
  388. data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.fixtures.json +370 -0
  389. data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +94 -0
  390. data/webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js +0 -1
  391. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +106 -13
  392. data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +11 -5
  393. data/webpack/scenes/ContentViews/Details/Repositories/RepoIcon.js +5 -1
  394. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +138 -0
  395. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +0 -2
  396. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.test.js +1 -1
  397. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewRepoAdd.fixture.json +57 -0
  398. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +73 -0
  399. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionEnvironments.js +31 -0
  400. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.js +64 -0
  401. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.scss +8 -0
  402. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionPackages.js +0 -0
  403. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +105 -0
  404. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +728 -0
  405. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +154 -0
  406. data/webpack/scenes/ContentViews/Details/Versions/__tests__/emptyCVVersion.fixtures.json +13 -0
  407. data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +3 -1
  408. data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetails.fixtures.json +0 -2
  409. data/webpack/scenes/ContentViews/Table/ContentViewVersionCell.js +33 -0
  410. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +17 -22
  411. data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +51 -102
  412. data/webpack/scenes/ContentViews/__tests__/basicContentViews.fixtures.js +5 -3
  413. data/webpack/scenes/ContentViews/__tests__/contentViewList.fixtures.json +30 -5
  414. data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +95 -0
  415. data/webpack/scenes/ContentViews/components/ContentViewIcon.js +11 -5
  416. data/webpack/scenes/ContentViews/components/EnvironmentLabels.js +16 -0
  417. data/webpack/scenes/ContentViews/components/IconWithCount.js +1 -1
  418. data/webpack/scenes/ContentViews/components/InactiveText.js +15 -0
  419. data/webpack/scenes/ContentViews/expansions/DetailsExpansion.js +19 -1
  420. data/webpack/scenes/Subscriptions/Details/SubscriptionPurposeAttributes.js +1 -1
  421. data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailInfo.test.js.snap +1 -1
  422. data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +3 -3
  423. data/webpack/scenes/Subscriptions/Details/__tests__/subscriptionDetails.fixtures.js +1 -1
  424. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +17 -0
  425. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +2 -1
  426. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +1 -1
  427. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +144 -0
  428. data/webpack/scenes/Tasks/helpers.js +2 -2
  429. data/webpack/test-utils/react-testing-lib-wrapper.js +11 -3
  430. data/webpack/utils/__tests__/useParamsWithHash.test.js +22 -0
  431. data/webpack/utils/helpers.js +2 -0
  432. data/webpack/utils/paramsFromHash.js +16 -0
  433. data/webpack/utils/useUrlParams.js +14 -0
  434. metadata +122 -206
  435. data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +0 -82
  436. data/app/controllers/katello/api/v2/puppet_modules_controller.rb +0 -19
  437. data/app/controllers/katello/concerns/registration_controller_extensions.rb +0 -16
  438. data/app/helpers/katello/concerns/hosts_and_hostgroups_helper_extensions.rb +0 -20
  439. data/app/lib/actions/candlepin/owner/create.rb +0 -16
  440. data/app/lib/actions/katello/content_view_puppet_environment/clear.rb +0 -11
  441. data/app/lib/actions/katello/content_view_puppet_environment/clone.rb +0 -78
  442. data/app/lib/actions/katello/content_view_puppet_environment/clone_content_for_version.rb +0 -20
  443. data/app/lib/actions/katello/content_view_puppet_environment/create.rb +0 -34
  444. data/app/lib/actions/katello/content_view_puppet_environment/create_for_version.rb +0 -23
  445. data/app/lib/actions/katello/content_view_puppet_environment/destroy.rb +0 -28
  446. data/app/lib/actions/katello/content_view_puppet_module/destroy.rb +0 -46
  447. data/app/lib/actions/katello/environment/library_create.rb +0 -35
  448. data/app/lib/actions/katello/organization/create.rb +0 -38
  449. data/app/lib/actions/pulp/content_view_puppet_environment/copy_contents.rb +0 -36
  450. data/app/lib/actions/pulp/content_view_puppet_environment/index_content.rb +0 -19
  451. data/app/lib/actions/pulp/repository/presenters/puppet_presenter.rb +0 -54
  452. data/app/lib/actions/pulp3/content_migration.rb +0 -31
  453. data/app/lib/actions/pulp3/content_migration_presenter.rb +0 -59
  454. data/app/lib/actions/pulp3/content_migration_reset.rb +0 -22
  455. data/app/lib/katello/foreman.rb +0 -32
  456. data/app/lib/katello/mapping.rb +0 -31
  457. data/app/lib/katello/util/hostgroup_facets_helper.rb +0 -126
  458. data/app/lib/katello/validators/content_view_puppet_module_validator.rb +0 -32
  459. data/app/models/katello/concerns/environment_extensions.rb +0 -74
  460. data/app/models/katello/content_view_puppet_environment.rb +0 -116
  461. data/app/models/katello/content_view_puppet_environment_puppet_module.rb +0 -11
  462. data/app/models/katello/content_view_puppet_module.rb +0 -63
  463. data/app/models/katello/puppet_module.rb +0 -77
  464. data/app/models/katello/repository_puppet_module.rb +0 -7
  465. data/app/services/katello/pulp/puppet_module.rb +0 -21
  466. data/app/services/katello/pulp/repository/puppet.rb +0 -68
  467. data/app/services/katello/pulp3/migration.rb +0 -329
  468. data/app/services/katello/pulp3/migration_plan.rb +0 -178
  469. data/app/services/katello/pulp3/migration_switchover.rb +0 -126
  470. data/app/services/katello/puppet_class_importer_extensions.rb +0 -32
  471. data/app/views/foreman/hosts/_registration.html.erb +0 -12
  472. data/app/views/katello/api/v2/activation_keys/product_content.json.rabl +0 -30
  473. data/app/views/katello/api/v2/content_view_puppet_modules/create.json.rabl +0 -3
  474. data/app/views/katello/api/v2/content_view_puppet_modules/index.json.rabl +0 -7
  475. data/app/views/katello/api/v2/content_view_puppet_modules/show.json.rabl +0 -9
  476. data/app/views/katello/api/v2/content_views/puppet_modules.json.rabl +0 -7
  477. data/app/views/katello/api/v2/host_subscriptions/content_override.json.rabl +0 -3
  478. data/app/views/katello/api/v2/host_subscriptions/product_content.json.rabl +0 -29
  479. data/app/views/katello/api/v2/puppet_modules/backend.json.rabl +0 -7
  480. data/app/views/katello/api/v2/puppet_modules/base.json.rabl +0 -9
  481. data/app/views/katello/api/v2/puppet_modules/compare.json.rabl +0 -10
  482. data/app/views/katello/api/v2/puppet_modules/name.json.rabl +0 -3
  483. data/app/views/katello/api/v2/puppet_modules/names.json.rabl +0 -7
  484. data/app/views/katello/api/v2/puppet_modules/show.json.rabl +0 -4
  485. data/db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb +0 -11
  486. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register-client.directive.js +0 -6
  487. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register-os-client.directive.js +0 -17
  488. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register.controller.js +0 -44
  489. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html +0 -28
  490. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-deb-client.html +0 -38
  491. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-oracle-client.html +0 -5
  492. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-sles-client.html +0 -28
  493. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-puppet-modules.controller.js +0 -9
  494. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-names.controller.js +0 -45
  495. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-versions.controller.js +0 -61
  496. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module.factory.js +0 -23
  497. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-modules.controller.js +0 -74
  498. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-names.html +0 -57
  499. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-versions.html +0 -64
  500. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-modules.html +0 -54
  501. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-puppet-modules.html +0 -19
  502. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-puppet-modules.html +0 -25
  503. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +0 -6903
  504. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +0 -7094
  505. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +0 -7303
  506. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +0 -6895
  507. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +0 -6865
  508. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +0 -6720
  509. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +0 -7077
  510. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +0 -6832
  511. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +0 -6766
  512. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +0 -6703
  513. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-puppet-modules.html +0 -66
  514. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-content-views.controller.js +0 -44
  515. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-repositories.controller.js +0 -36
  516. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module.controller.js +0 -34
  517. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-content-views.html +0 -41
  518. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-info.html +0 -32
  519. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-repositories.html +0 -52
  520. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module.html +0 -37
  521. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-module.factory.js +0 -28
  522. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.controller.js +0 -35
  523. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.module.js +0 -20
  524. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.routes.js +0 -71
  525. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/views/puppet-modules.html +0 -47
  526. data/lib/katello/repository_types/puppet.rb +0 -5
  527. data/lib/katello/tasks/fix_hostgroup_facets.rake +0 -8
  528. data/lib/katello/tasks/pulp3_content_switchover.rake +0 -32
  529. data/lib/katello/tasks/pulp3_migration.rake +0 -41
  530. data/lib/katello/tasks/pulp3_migration_abort.rake +0 -22
  531. data/lib/katello/tasks/pulp3_migration_reset.rake +0 -26
  532. data/lib/katello/tasks/pulp3_migration_stats.rake +0 -41
  533. data/lib/katello/tasks/pulp3_post_migration_check.rake +0 -51
  534. data/lib/monkeys/passenger_tee_input.rb +0 -20
  535. data/locale/bn/LC_MESSAGES/katello.mo +0 -0
  536. data/locale/cs/LC_MESSAGES/katello.mo +0 -0
  537. data/locale/de/LC_MESSAGES/katello.mo +0 -0
  538. data/locale/en/LC_MESSAGES/katello.mo +0 -0
  539. data/locale/es/LC_MESSAGES/katello.mo +0 -0
  540. data/locale/fr/LC_MESSAGES/katello.mo +0 -0
  541. data/locale/gu/LC_MESSAGES/katello.mo +0 -0
  542. data/locale/hi/LC_MESSAGES/katello.mo +0 -0
  543. data/locale/it/LC_MESSAGES/katello.mo +0 -0
  544. data/locale/ja/LC_MESSAGES/katello.mo +0 -0
  545. data/locale/kn/LC_MESSAGES/katello.mo +0 -0
  546. data/locale/ko/LC_MESSAGES/katello.mo +0 -0
  547. data/locale/mr/LC_MESSAGES/katello.mo +0 -0
  548. data/locale/or/LC_MESSAGES/katello.mo +0 -0
  549. data/locale/pa/LC_MESSAGES/katello.mo +0 -0
  550. data/locale/pt/LC_MESSAGES/katello.mo +0 -0
  551. data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
  552. data/locale/ru/LC_MESSAGES/katello.mo +0 -0
  553. data/locale/ta/LC_MESSAGES/katello.mo +0 -0
  554. data/locale/te/LC_MESSAGES/katello.mo +0 -0
  555. data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
  556. data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
  557. data/webpack/components/TabWrapper/TabWrapper.js +0 -26
  558. data/webpack/components/TabWrapper/index.js +0 -3
  559. data/webpack/components/TabbedView/TabbedView.js +0 -38
  560. data/webpack/components/TabbedView/TabbedView.scss +0 -3
  561. data/webpack/components/TabbedView/index.js +0 -3
  562. data/webpack/scenes/ContentViews/expansions/EnvironmentsExpansion.js +0 -19
  563. data/webpack/scenes/ContentViews/expansions/VersionsExpansion.js +0 -11
@@ -21,7 +21,7 @@ module Katello
21
21
  param :component_ids, Array, :desc => N_("List of component content view version ids for composite views")
22
22
  param :auto_publish, :bool, :desc => N_("Enable/Disable auto publish of composite view")
23
23
  param :solve_dependencies, :bool, :desc => N_("Solve RPM dependencies by default on Content View publish, defaults to false")
24
- param :import_only, :bool, :desc => N_("Designate this Content View for importing from upstream servers only. Defaults to false") if pulp3_yum?
24
+ param :import_only, :bool, :desc => N_("Designate this Content View for importing from upstream servers only. Defaults to false")
25
25
  end
26
26
 
27
27
  def filtered_associations
@@ -31,10 +31,6 @@ module Katello
31
31
  }
32
32
  end
33
33
 
34
- def self.pulp3_yum?
35
- SmartProxy.pulp_primary&.pulp3_repository_type_support?(Katello::Repository::YUM_TYPE)
36
- end
37
-
38
34
  api :GET, "/organizations/:organization_id/content_views", N_("List content views")
39
35
  api :GET, "/content_views", N_("List content views")
40
36
  param :organization_id, :number, :desc => N_("organization identifier")
@@ -47,7 +43,7 @@ module Katello
47
43
  param_group :search, Api::V2::ApiController
48
44
  add_scoped_search_description_for(ContentView)
49
45
  def index
50
- content_view_includes = [:activation_keys, :content_view_puppet_modules, :content_view_versions,
46
+ content_view_includes = [:activation_keys, :content_view_versions,
51
47
  :environments, :organization, :repositories]
52
48
  respond(:collection => scoped_search(index_relation.distinct, :name, :asc, :includes => content_view_includes))
53
49
  end
@@ -72,10 +68,6 @@ module Katello
72
68
  param :composite, :bool, :desc => N_("Composite content view")
73
69
  param_group :content_view
74
70
  def create
75
- if ::Foreman::Cast.to_bool(params[:content_view][:import_only])
76
- fail HttpErrors::BadRequest, _("Import-only content views will be available in a future version.") unless self.class.pulp3_yum?
77
- end
78
-
79
71
  @content_view = ContentView.create!(view_params) do |view|
80
72
  view.organization = @organization
81
73
  view.label ||= labelize_params(params[:content_view])
@@ -128,53 +120,6 @@ module Katello
128
120
  respond :resource => @content_view
129
121
  end
130
122
 
131
- api :GET, "/content_views/:id/available_puppet_modules",
132
- N_("Get puppet modules that are available to be added to the content view")
133
- param :id, :number, :desc => N_("content view numeric identifier"), :required => true
134
- param :name, String, :desc => N_("module name to restrict modules for"), :required => false
135
- def available_puppet_modules
136
- current_cv_puppet_modules = @content_view.content_view_puppet_modules.where("uuid is NOT NULL")
137
- current_uuids = current_cv_puppet_modules.pluck(:uuid)
138
- repositories = @content_view.organization.library.puppet_repositories
139
- query = PuppetModule.in_repositories(repositories)
140
- selected_latest_versions = []
141
- if params[:name]
142
- query = query.where(:name => params[:name])
143
- if current_uuids.present?
144
- module_by_name = current_cv_puppet_modules.find_by(:name => params[:name])
145
- if module_by_name&.latest_in_modules_by_author?(query)
146
- current_uuids.delete(module_by_name.uuid)
147
- selected_latest_versions.push(module_by_name.uuid)
148
- end
149
- end
150
- end
151
- query = query.where("#{PuppetModule.table_name}.pulp_id NOT in (?)", current_uuids) if current_uuids.present?
152
- custom_sort = ->(sort_query) { sort_query.order('author, name, sortable_version DESC') }
153
- sorted_records = scoped_search(query, nil, nil, :resource_class => PuppetModule, :custom_sort => custom_sort)
154
- if params[:name]
155
- sorted_records_with_use_latest = add_use_latest_records(sorted_records[:results].to_a, selected_latest_versions)
156
- sorted_records[:results] = sorted_records_with_use_latest
157
- sorted_records[:total] = sorted_records_with_use_latest.count
158
- sorted_records[:subtotal] = sorted_records_with_use_latest.count
159
- end
160
- respond_for_index :template => 'puppet_modules', :collection => sorted_records
161
- end
162
-
163
- api :GET, "/content_views/:id/available_puppet_module_names",
164
- N_("Get puppet modules names that are available to be added to the content view")
165
- param :id, :number, :desc => N_("content view numeric identifier"), :required => true
166
- def available_puppet_module_names
167
- current_names = @content_view.content_view_puppet_modules.where("name is NOT NULL").pluck(:name)
168
-
169
- repos = @content_view.organization.library.puppet_repositories
170
-
171
- modules = PuppetModule.in_repositories(repos)
172
- modules = modules.where('name NOT in (?)', current_names) if current_names.present?
173
-
174
- respond_for_index :template => '../puppet_modules/names',
175
- :collection => scoped_search(modules, 'name', 'ASC', :resource_class => PuppetModule, :group => :name)
176
- end
177
-
178
123
  api :DELETE, "/content_views/:id/environments/:environment_id", N_("Remove a content view from an environment")
179
124
  param :id, :number, :desc => N_("content view numeric identifier"), :required => true
180
125
  param :environment_id, :number, :desc => N_("environment numeric identifier"), :required => true
@@ -246,7 +191,7 @@ module Katello
246
191
  end
247
192
 
248
193
  def view_params
249
- attrs = [:name, :description, :force_puppet_environment, :auto_publish, :solve_dependencies, :import_only,
194
+ attrs = [:name, :description, :auto_publish, :solve_dependencies, :import_only,
250
195
  :default, :created_at, :updated_at, :next_version, {:component_ids => []}]
251
196
  attrs.push(:label, :composite) if action_name == "create"
252
197
  if (!@content_view || !@content_view.composite?)
@@ -2,11 +2,12 @@ module Katello
2
2
  class Api::V2::HostErrataController < Api::V2::ApiController
3
3
  include Katello::Concerns::FilteredAutoCompleteSearch
4
4
 
5
- before_action :find_host, :only => :index
6
- before_action :find_host_editable, :except => :index
7
- before_action :find_errata_ids, :only => :apply
8
- before_action :find_environment, :only => :index
9
- before_action :find_content_view, :only => :index
5
+ before_action :find_host, only: :index
6
+ before_action :find_host_editable, except: :index
7
+ before_action :find_errata_ids, only: :apply
8
+ before_action :find_environment, only: :index
9
+ before_action :find_content_view, only: :index
10
+ before_action :deprecate_katello_agent, only: :apply
10
11
 
11
12
  resource_description do
12
13
  api_version 'v2'
@@ -49,7 +50,7 @@ module Katello
49
50
  respond_for_index :collection => collection
50
51
  end
51
52
 
52
- api :PUT, "/hosts/:host_id/errata/apply", N_("Schedule errata for installation")
53
+ api :PUT, "/hosts/:host_id/errata/apply", N_("Schedule errata for installation using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
53
54
  param :host_id, :number, :desc => N_("Host ID"), :required => true
54
55
  param :errata_ids, Array, :desc => N_("List of Errata ids to install. Will be removed in Katello 4.1."), :required => false, :deprecated => true
55
56
 
@@ -27,7 +27,7 @@ module Katello
27
27
  respond_for_index(:collection => collection)
28
28
  end
29
29
 
30
- api :PUT, "/hosts/:host_id/packages/install", N_("Install packages remotely")
30
+ api :PUT, "/hosts/:host_id/packages/install", N_("Install packages remotely using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
31
31
  param :host_id, :number, :required => true, :desc => N_("ID of the host")
32
32
  param_group :packages_or_groups
33
33
  def install
@@ -45,7 +45,7 @@ module Katello
45
45
  end
46
46
  end
47
47
 
48
- api :PUT, "/hosts/:host_id/packages/upgrade", N_("Update packages remotely")
48
+ api :PUT, "/hosts/:host_id/packages/upgrade", N_("Update packages remotely using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
49
49
  param :host_id, :number, :required => true, :desc => N_("ID of the host")
50
50
  param :packages, Array, :desc => N_("list of packages names"), :required => true
51
51
  def upgrade
@@ -56,14 +56,14 @@ module Katello
56
56
  end
57
57
  end
58
58
 
59
- api :PUT, "/hosts/:host_id/packages/upgrade_all", N_("Update packages remotely")
59
+ api :PUT, "/hosts/:host_id/packages/upgrade_all", N_("Update packages remotely using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
60
60
  param :host_id, :number, :required => true, :desc => N_("ID of the host")
61
61
  def upgrade_all
62
62
  task = async_task(::Actions::Katello::Host::Package::Update, @host, content: [])
63
63
  respond_for_async :resource => task
64
64
  end
65
65
 
66
- api :PUT, "/hosts/:host_id/packages/remove", N_("Uninstall packages remotely")
66
+ api :PUT, "/hosts/:host_id/packages/remove", N_("Uninstall packages remotely using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
67
67
  param :host_id, :number, :required => true, :desc => N_("ID of the host")
68
68
  param_group :packages_or_groups
69
69
  def remove
@@ -90,8 +90,8 @@ module Katello
90
90
  def params_to_rhsm_params
91
91
  rhsm_params = params.slice(:facts, :uuid, :name).to_unsafe_h
92
92
  rhsm_params[:releaseVer] = params['release_version'] if params['release_version']
93
- rhsm_params[:usage] = parms['purpose_usage'] if params['purpose_usage']
94
- rhsm_params[:role] = parms['purpose_role'] if params['purpose_role']
93
+ rhsm_params[:usage] = params['purpose_usage'] if params['purpose_usage']
94
+ rhsm_params[:role] = params['purpose_role'] if params['purpose_role']
95
95
  rhsm_params[:addOns] = params['purpose_addons'] if params['purpose_addons']
96
96
  rhsm_params[:serviceLevel] = params['service_level'] if params['service_level']
97
97
  rhsm_params[:guestIds] = params['hypervisor_guest_uuids'] if params[:hypervisor_guest_uuids]
@@ -147,6 +147,15 @@ module Katello
147
147
  respond_for_index(:collection => index_response(true), :template => "index")
148
148
  end
149
149
 
150
+ api :GET, "/hosts/:host_id/subscriptions/product_content", N_("Get content and overrides for the host")
151
+ param :host_id, String, :desc => N_("Id of the host"), :required => true
152
+ param :content_access_mode_all, :bool, :desc => N_("Get all content available, not just that provided by subscriptions")
153
+ param :content_access_mode_env, :bool, :desc => N_("Limit content to just that available in the host's content view version")
154
+ def product_content
155
+ # note this is just there as a place holder for apipie.
156
+ # The routing would automatically redirect it to repository_sets#index
157
+ end
158
+
150
159
  api :PUT, "/hosts/:host_id/subscriptions/content_override", N_("Set content overrides for the host")
151
160
  param :host_id, String, :desc => N_("Id of the content host"), :required => true
152
161
  param :value, String, :desc => N_("Override to a boolean value or 'default'"), :required => false
@@ -163,26 +172,7 @@ module Katello
163
172
  validate_content_overrides_enabled(override_params)
164
173
  end
165
174
  sync_task(::Actions::Katello::Host::UpdateContentOverrides, @host, content_override_values, false)
166
- product_content
167
- end
168
-
169
- api :GET, "/hosts/:host_id/subscriptions/product_content", N_("Get content and overrides for the host")
170
- param :host_id, String, :desc => N_("Id of the host"), :required => true
171
- param :content_access_mode_all, :bool, :desc => N_("Get all content available, not just that provided by subscriptions")
172
- param :content_access_mode_env, :bool, :desc => N_("Limit content to just that available in the host's content view version")
173
- def product_content
174
- content_access_mode_all = ::Foreman::Cast.to_bool(params[:content_access_mode_all])
175
- content_access_mode_env = ::Foreman::Cast.to_bool(params[:content_access_mode_env])
176
-
177
- content_finder = ProductContentFinder.new(
178
- :consumable => @host.subscription_facet,
179
- :match_subscription => !content_access_mode_all,
180
- :match_environment => content_access_mode_env
181
- )
182
-
183
- content = content_finder.presenter_with_overrides(@host.subscription_facet.candlepin_consumer.content_overrides)
184
-
185
- respond_for_index(:collection => full_result_response(content))
175
+ fetch_product_content
186
176
  end
187
177
 
188
178
  api :GET, "/hosts/:host_id/subscriptions/available_release_versions", N_("Show releases available for the content host")
@@ -194,6 +184,12 @@ module Katello
194
184
 
195
185
  private
196
186
 
187
+ def fetch_product_content
188
+ content_finder = ProductContentFinder.new(:consumable => @host.subscription_facet)
189
+ content = content_finder.presenter_with_overrides(@host.subscription_facet.candlepin_consumer.content_overrides)
190
+ respond_with_template_collection("index", 'repository_sets', :collection => full_result_response(content))
191
+ end
192
+
197
193
  def find_content_view_environment
198
194
  @content_view_environment = Katello::ContentViewEnvironment.where(:content_view_id => params[:content_view_id],
199
195
  :environment_id => params[:lifecycle_environment_id]).first
@@ -4,19 +4,19 @@ module Katello
4
4
  include Concerns::Api::V2::BulkHostsExtensions
5
5
  include Katello::Concerns::Api::V2::ContentOverridesController
6
6
 
7
- before_action :find_host_collections, :only => [:bulk_add_host_collections, :bulk_remove_host_collections]
8
- before_action :find_environment, :only => [:environment_content_view]
9
- before_action :find_content_view, :only => [:environment_content_view]
10
- before_action :find_editable_hosts, :except => [:destroy_hosts, :resolve_traces]
11
- before_action :find_deletable_hosts, :only => [:destroy_hosts]
12
- before_action :find_readable_hosts, :only => [:applicable_errata, :installable_errata, :available_incremental_updates]
13
- before_action :find_errata, :only => [:available_incremental_updates]
14
- before_action :find_organization, :only => [:add_subscriptions]
15
- before_action :find_traces, :only => [:resolve_traces]
16
- before_action :deprecate_katello_agent, :only => [:install_content, :update_content, :remove_content]
17
-
18
- before_action :validate_content_action, :only => [:install_content, :update_content, :remove_content]
19
- before_action :validate_organization, :only => [:add_subscriptions]
7
+ before_action :find_host_collections, only: [:bulk_add_host_collections, :bulk_remove_host_collections]
8
+ before_action :find_environment, only: [:environment_content_view]
9
+ before_action :find_content_view, only: [:environment_content_view]
10
+ before_action :find_editable_hosts, except: [:destroy_hosts, :resolve_traces]
11
+ before_action :find_deletable_hosts, only: [:destroy_hosts]
12
+ before_action :find_readable_hosts, only: [:applicable_errata, :installable_errata, :available_incremental_updates]
13
+ before_action :find_errata, only: [:available_incremental_updates]
14
+ before_action :find_organization, only: [:add_subscriptions]
15
+ before_action :find_traces, only: [:resolve_traces]
16
+ before_action :deprecate_katello_agent, only: [:install_content, :update_content, :remove_content]
17
+
18
+ before_action :validate_content_action, only: [:install_content, :update_content, :remove_content]
19
+ before_action :validate_organization, only: [:add_subscriptions]
20
20
 
21
21
  # disable *_count fields on erratum rabl, since they perform N+1 queries
22
22
  before_action :disable_erratum_hosts_count
@@ -115,7 +115,7 @@ module Katello
115
115
  :resource_class => Erratum))
116
116
  end
117
117
 
118
- api :PUT, "/hosts/bulk/install_content", N_("Install content on one or more hosts")
118
+ api :PUT, "/hosts/bulk/install_content", N_("Install content on one or more hosts using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
119
119
  param_group :bulk_params
120
120
  param :content_type, String,
121
121
  :desc => N_("The type of content. The following types are supported: 'package', 'package_group' and 'errata'."),
@@ -125,7 +125,7 @@ module Katello
125
125
  content_action
126
126
  end
127
127
 
128
- api :PUT, "/hosts/bulk/update_content", N_("Update content on one or more hosts")
128
+ api :PUT, "/hosts/bulk/update_content", N_("Update content on one or more hosts using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
129
129
  param_group :bulk_params
130
130
  param :content_type, String,
131
131
  :desc => N_("The type of content. The following types are supported: 'package' and 'package_group."),
@@ -136,7 +136,7 @@ module Katello
136
136
  content_action
137
137
  end
138
138
 
139
- api :PUT, "/hosts/bulk/remove_content", N_("Remove content on one or more hosts")
139
+ api :PUT, "/hosts/bulk/remove_content", N_("Remove content on one or more hosts using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
140
140
  param_group :bulk_params
141
141
  param :content_type, String,
142
142
  :desc => N_("The type of content. The following types are supported: 'package' and 'package_group."),
@@ -69,7 +69,8 @@ module Katello
69
69
  param_group :resource
70
70
  def create
71
71
  @organization = Organization.new(resource_params)
72
- sync_task(::Actions::Katello::Organization::Create, @organization)
72
+ creator = ::Katello::OrganizationCreator.new(@organization)
73
+ creator.create!
73
74
  @organization.reload
74
75
  # @taxonomy instance variable is necessary for foreman side
75
76
  # app/views/api/v2/taxonomies/show.json.rabl is using it.
@@ -66,6 +66,10 @@ module Katello
66
66
  collection
67
67
  end
68
68
 
69
+ def all_for_content_view_filter(filter, _collection)
70
+ PackageGroup.joins(:repositories).merge(filter.applicable_repos)
71
+ end
72
+
69
73
  def default_sort
70
74
  %w(name asc)
71
75
  end
@@ -57,6 +57,8 @@ module Katello
57
57
  param :deb_architectures, String, :desc => N_("whitespace-separated list of architectures to be synced from deb-archive")
58
58
  param :ignorable_content, Array, :desc => N_("List of content units to ignore while syncing a yum repository. Must be subset of %s") % RootRepository::IGNORABLE_CONTENT_UNIT_TYPES.join(",")
59
59
  param :ansible_collection_requirements, String, :desc => N_("Contents of requirement yaml file to sync from URL")
60
+ param :ansible_collection_auth_url, String, :desc => N_("The URL to receive a session token from, e.g. used with Automation Hub.")
61
+ param :ansible_collection_auth_token, String, :desc => N_("The token key to use for authentication.")
60
62
  param :http_proxy_policy, ::Katello::RootRepository::HTTP_PROXY_POLICIES, :desc => N_("policies for HTTP proxy for content sync")
61
63
  param :http_proxy_id, :number, :desc => N_("ID of a HTTP Proxy")
62
64
  param :arch, String, :desc => N_("Architecture of content in the repository")
@@ -205,12 +207,6 @@ module Katello
205
207
  .where("#{OstreeBranch.table_name}.id" => OstreeBranch.with_identifiers(params[:ostree_branch_id]))
206
208
  end
207
209
 
208
- if params[:puppet_module_id]
209
- query = query
210
- .joins(:puppet_modules)
211
- .where("#{PuppetModule.table_name}.id" => PuppetModule.with_identifiers(params[:puppet_module_id]))
212
- end
213
-
214
210
  query
215
211
  end
216
212
 
@@ -356,12 +352,11 @@ module Katello
356
352
 
357
353
  api :PUT, "/repositories/:id/remove_packages"
358
354
  api :PUT, "/repositories/:id/remove_docker_manifests"
359
- api :PUT, "/repositories/:id/remove_puppet_modules"
360
355
  api :PUT, "/repositories/:id/remove_content"
361
356
  desc "Remove content from a repository"
362
357
  param :id, :number, :required => true, :desc => "repository ID"
363
358
  param 'ids', Array, :required => true, :desc => "Array of content ids to remove"
364
- param :content_type, RepositoryTypeManager.removable_content_types.map(&:label), :required => false, :desc => N_("content type ('deb', 'docker_manifest', 'file', 'ostree', 'puppet_module', 'rpm', 'srpm')")
359
+ param :content_type, RepositoryTypeManager.removable_content_types.map(&:label), :required => false, :desc => N_("content type ('deb', 'docker_manifest', 'file', 'ostree', 'rpm', 'srpm')")
365
360
  param 'sync_capsule', :bool, :desc => N_("Whether or not to sync an external capsule after upload. Default: true")
366
361
  def remove_content
367
362
  sync_capsule = ::Foreman::Cast.to_bool(params.fetch(:sync_capsule, true))
@@ -372,7 +367,7 @@ module Katello
372
367
  api :POST, "/repositories/:id/upload_content", N_("Upload content into the repository")
373
368
  param :id, :number, :required => true, :desc => N_("repository ID")
374
369
  param :content, File, :required => true, :desc => N_("Content files to upload. Can be a single file or array of files.")
375
- param :content_type, RepositoryTypeManager.uploadable_content_types.map(&:label), :required => false, :desc => N_("content type ('deb', 'docker_manifest', 'file', 'ostree', 'puppet_module', 'rpm', 'srpm')")
370
+ param :content_type, RepositoryTypeManager.uploadable_content_types.map(&:label), :required => false, :desc => N_("content type ('deb', 'docker_manifest', 'file', 'ostree', 'rpm', 'srpm')")
376
371
  def upload_content
377
372
  fail Katello::Errors::InvalidRepositoryContent, _("Cannot upload Container Image content.") if @repository.docker?
378
373
 
@@ -401,7 +396,7 @@ module Katello
401
396
  param :async, :bool, desc: N_("Do not wait for the ImportUpload action to finish. Default: false")
402
397
  param 'publish_repository', :bool, :desc => N_("Whether or not to regenerate the repository on disk. Default: true")
403
398
  param 'sync_capsule', :bool, :desc => N_("Whether or not to sync an external capsule after upload. Default: true")
404
- param :content_type, RepositoryTypeManager.uploadable_content_types.map(&:label), :required => false, :desc => N_("content type ('deb', 'docker_manifest', 'file', 'ostree', 'puppet_module', 'rpm', 'srpm')")
399
+ param :content_type, RepositoryTypeManager.uploadable_content_types.map(&:label), :required => false, :desc => N_("content type ('deb', 'docker_manifest', 'file', 'ostree', 'rpm', 'srpm')")
405
400
  param :uploads, Array, :desc => N_("Array of uploads to import") do
406
401
  param 'id', String, :required => true
407
402
  param 'content_unit_id', String
@@ -482,7 +477,7 @@ module Katello
482
477
  ]
483
478
 
484
479
  keys += [{:docker_tags_whitelist => []}, :docker_upstream_name] if params[:action] == 'create' || @repository&.docker?
485
- keys += [:ansible_collection_requirements] if params[:action] == 'create' || @repository&.ansible_collection?
480
+ keys += [:ansible_collection_requirements, :ansible_collection_auth_url, :ansible_collection_auth_token] if params[:action] == 'create' || @repository&.ansible_collection?
486
481
  keys += [:label, :content_type] if params[:action] == "create"
487
482
  if params[:action] == 'create' || @repository.custom?
488
483
  keys += [:url, :gpg_key_id, :ssl_ca_cert_id, :ssl_client_cert_id, :ssl_client_key_id, :unprotected, :name,
@@ -502,6 +497,7 @@ module Katello
502
497
  end
503
498
 
504
499
  # rubocop:disable Metrics/CyclomaticComplexity
500
+ # rubocop:disable Metrics/PerceivedComplexity
505
501
  def construct_repo_from_params(repo_params) # rubocop:disable Metrics/AbcSize
506
502
  root = @product.add_repo(repo_params.slice(:label, :name, :description, :url, :content_type, :arch, :unprotected,
507
503
  :gpg_key, :ssl_ca_cert, :ssl_client_cert, :ssl_client_key,
@@ -513,7 +509,6 @@ module Katello
513
509
  root.upstream_username = repo_params[:upstream_username] if repo_params.key?(:upstream_username)
514
510
  root.upstream_password = repo_params[:upstream_password] if repo_params.key?(:upstream_password)
515
511
  root.ignorable_content = repo_params[:ignorable_content] if root.yum? && repo_params.key?(:ignorable_content)
516
- root.ansible_collection_requirements = repo_params[:ansible_collection_requirements] if root.ansible_collection?
517
512
  root.http_proxy_policy = repo_params[:http_proxy_policy] if repo_params.key?(:http_proxy_policy)
518
513
  root.http_proxy_id = repo_params[:http_proxy_id] if repo_params.key?(:http_proxy_id)
519
514
  root.os_versions = repo_params.fetch(:os_versions, []) if root.yum?
@@ -528,6 +523,12 @@ module Katello
528
523
  root.deb_architectures = repo_params[:deb_architectures] if repo_params[:deb_architectures]
529
524
  end
530
525
 
526
+ if root.ansible_collection?
527
+ root.ansible_collection_requirements = repo_params[:ansible_collection_requirements] if repo_params[:ansible_collection_requirements]
528
+ root.ansible_collection_auth_url = repo_params[:ansible_collection_auth_url] if repo_params[:ansible_collection_auth_url]
529
+ root.ansible_collection_auth_token = repo_params[:ansible_collection_auth_token] if repo_params[:ansible_collection_auth_token]
530
+ end
531
+
531
532
  root
532
533
  end
533
534
  # rubocop:enable Metrics/CyclomaticComplexity
@@ -8,6 +8,9 @@ module Katello
8
8
  before_action :set_editable_product_scope, only: [:enable, :disable]
9
9
  before_action :find_product
10
10
  before_action :custom_product?
11
+ before_action :setup_params
12
+ before_action :find_authorized_activation_key, :only => [:index, :auto_complete_search]
13
+ before_action :find_authorized_host, :only => [:index, :auto_complete_search]
11
14
  before_action :find_organization
12
15
  before_action :find_product_content, :except => [:index, :auto_complete_search]
13
16
 
@@ -23,10 +26,18 @@ module Katello
23
26
  param :with_active_subscription, :bool, :required => false, :desc => N_("If true, only return repository sets that are associated with an active subscriptions")
24
27
  param :organization_id, :number, :desc => N_("organization identifier"), :required => false
25
28
  param :with_custom, :bool, :required => false, :desc => N_("If true, return custom repository sets along with redhat repos")
29
+ param :activation_key_id, :number, :desc => N_("activation key identifier"), :required => false
30
+ param :host_id, :number, :desc => N_("Id of the host"), :required => false
31
+ param :content_access_mode_all, :bool, :desc => N_("Get all content available, not just that provided by subscriptions. Relevant for Activation Keys only")
32
+ param :content_access_mode_env, :bool, :desc => N_("Limit content to just that available in the activation key's content view version. Relevant for Activation Keys only")
26
33
  param_group :search, Api::V2::ApiController
27
34
  add_scoped_search_description_for(Katello::ProductContent)
28
35
  def index
29
- respond(:collection => scoped_search(index_relation, :name, :asc, :resource_class => Katello::ProductContent))
36
+ collection = scoped_search(index_relation, :name, :asc, :resource_class => Katello::ProductContent)
37
+ collection[:results] = ProductContentFinder.wrap_with_overrides(
38
+ product_contents: collection[:results],
39
+ overrides: @consumable&.content_overrides)
40
+ respond(:collection => collection)
30
41
  end
31
42
 
32
43
  api :GET, "/repository_sets/:id", N_("Get info about a repository set")
@@ -100,7 +111,7 @@ module Katello
100
111
  protected
101
112
 
102
113
  def resource_class
103
- Katello::Content
114
+ Katello::ProductContent
104
115
  end
105
116
 
106
117
  def index_relation
@@ -122,7 +133,20 @@ module Katello
122
133
 
123
134
  relation = relation.where(Katello::Content.table_name => {:name => params[:name]}) if params[:name].present?
124
135
  relation = relation.redhat unless ::Foreman::Cast.to_bool(params[:with_custom])
125
- relation
136
+ index_relation_with_consumable_overrides(relation)
137
+ end
138
+
139
+ def index_relation_with_consumable_overrides(relation)
140
+ return relation if @consumable.blank?
141
+
142
+ content_access_mode_all = ::Foreman::Cast.to_bool(params[:content_access_mode_all])
143
+ content_access_mode_env = ::Foreman::Cast.to_bool(params[:content_access_mode_env])
144
+
145
+ content_finder = ProductContentFinder.new(
146
+ :match_subscription => !content_access_mode_all,
147
+ :match_environment => content_access_mode_env,
148
+ :consumable => @consumable)
149
+ relation.merge(content_finder.product_content)
126
150
  end
127
151
 
128
152
  def find_product_content
@@ -153,7 +177,7 @@ module Katello
153
177
  end
154
178
 
155
179
  def find_organization
156
- @organization = @product&.organization || super
180
+ @organization = @product&.organization || @consumable&.organization || super
157
181
  end
158
182
 
159
183
  def custom_product?
@@ -163,5 +187,27 @@ module Katello
163
187
  def substitutions
164
188
  params.permit(:basearch, :releasever).to_h
165
189
  end
190
+
191
+ def find_authorized_activation_key
192
+ return unless params[:activation_key_id]
193
+ @activation_key = ActivationKey.readable.find_by(:id => params[:activation_key_id])
194
+ @consumable = @activation_key
195
+ throw_resource_not_found(name: 'activation_key', id: params[:activation_key_id]) if @activation_key.blank?
196
+ end
197
+
198
+ def find_authorized_host
199
+ return unless params[:host_id]
200
+ find_host_with_subscriptions(params[:host_id], :view_hosts)
201
+ @consumable = @host.subscription_facet
202
+ end
203
+
204
+ def setup_params
205
+ return unless params[:id]
206
+ if params[:entity] == :activation_key
207
+ params[:activation_key_id] ||= params[:id]
208
+ else
209
+ params[:host_id] ||= params[:id]
210
+ end
211
+ end
166
212
  end
167
213
  end
@@ -21,14 +21,19 @@ module Katello
21
21
  api :GET, "/activation_keys/:activation_key_id/subscriptions", N_("List an activation key's subscriptions")
22
22
  api :GET, "/subscriptions", N_("List subscriptions")
23
23
  param_group :search, Api::V2::ApiController
24
- param :organization_id, :number, :desc => N_("Organization ID"), :required => false
24
+ param :organization_id, :number, :desc => N_("Organization ID"), :required => true
25
25
  param :host_id, String, :desc => N_("id of a host"), :required => false
26
26
  param :activation_key_id, String, :desc => N_("Activation key ID"), :required => false
27
+ param :name, String, :desc => N_("name of the subscription"), :required => false
27
28
  param :available_for, String, :desc => N_("Object to show subscriptions available for, either 'host' or 'activation_key'"), :required => false
28
29
  param :match_host, :bool, :desc => N_("Ignore subscriptions that are unavailable to the specified host")
29
30
  param :match_installed, :bool, :desc => N_("Return subscriptions that match installed products of the specified host")
30
31
  param :no_overlap, :bool, :desc => N_("Return subscriptions which do not overlap with a currently-attached subscription")
31
32
  def index
33
+ unless @organization || @activation_key
34
+ fail HttpErrors::NotFound, _("Organization Information not provided.")
35
+ end
36
+
32
37
  options = { resource_class: Pool, includes: [:subscription] }
33
38
  base_args = [index_relation.distinct, :name, :asc]
34
39
 
@@ -63,6 +68,7 @@ module Katello
63
68
  return for_host if params[:host_id]
64
69
  return available_for_activation_key if params[:available_for] == "activation_key"
65
70
  collection = Pool.readable
71
+ collection = collection.where("#{Katello::Subscription.table_name}.name" => params[:name]) if params[:name]
66
72
  collection = collection.where(:unmapped_guest => false)
67
73
  collection = collection.where(organization: Organization.find(params[:organization_id])) if params[:organization_id]
68
74
  collection = collection.for_activation_key(@activation_key) if params[:activation_key_id]
@@ -17,6 +17,16 @@ module Katello
17
17
  User.current
18
18
  end
19
19
 
20
+ class_methods do
21
+ def katello_agent_deprecation_text
22
+ N_("NOTE: Katello-agent is deprecated and will be removed in %s. Consider using remote execution instead.") % katello_agent_removal_release
23
+ end
24
+
25
+ def katello_agent_removal_release
26
+ N_("a future release")
27
+ end
28
+ end
29
+
20
30
  protected
21
31
 
22
32
  def request_from_katello_cli?
@@ -0,0 +1,46 @@
1
+ module Katello
2
+ module Concerns
3
+ module Api::V2::RegistrationCommandsControllerExtensions
4
+ extend ActiveSupport::Concern
5
+
6
+ module Overrides
7
+ def registration_args
8
+ args = super
9
+ args['activation_keys'] ||= []
10
+
11
+ if args['activation_key'].present?
12
+ args['activation_keys'] << args.delete('activation_key').split(',').map(&:strip).reject(&:blank?).join(',')
13
+ end
14
+
15
+ args['activation_keys'] = args['activation_keys'].join(',')
16
+ args.delete('activation_keys') if args['activation_keys'].empty?
17
+ args
18
+ end
19
+
20
+ def append_array_of_ids(hash_params)
21
+ return if registration_params['activation_key'].present? || registration_params['activation_keys'].present?
22
+ super
23
+ end
24
+ end
25
+
26
+ module ApiPieExtensions
27
+ extend ::Apipie::DSL::Concern
28
+
29
+ update_api(:create) do
30
+ param :registration_command, Hash do
31
+ param :activation_key, String, desc: N_('Activation key for subscription-manager client. Required for CentOS and Red Hat Enterprise Linux. Multiple keys add separated by comma, example: key1,key2,key3.'), deprecated: true
32
+ param :activation_keys, Array, required: true, desc: N_('Activation key(s) for subscription-manager client. Required for CentOS and Red Hat Enterprise Linux. Required only if host group has no activation keys')
33
+ param :lifecycle_environment_id, :number, required: false, desc: N_('Lifecycle environment for the host.')
34
+ param :force, :bool, required: false, desc: N_('Clear any previous registration and run subscription-manager with --force.')
35
+ param :ignore_subman_errors, :bool, required: false, desc: N_('Ignore subscription-manager errors for `subscription-manager register` command')
36
+ end
37
+ end
38
+ end
39
+
40
+ included do
41
+ prepend Overrides
42
+ include ApiPieExtensions
43
+ end
44
+ end
45
+ end
46
+ end
@@ -16,6 +16,14 @@ module Katello
16
16
  super
17
17
  end
18
18
  end
19
+
20
+ def host_setup_extension
21
+ if params['host']['lifecycle_environment_id']
22
+ @host.update!(lifecycle_environment: KTEnvironment.readable.find(params['host']['lifecycle_environment_id']))
23
+ end
24
+
25
+ super
26
+ end
19
27
  end
20
28
  end
21
29
  end