katello 4.7.4 → 4.8.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 (334) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/registry/registry_proxies_controller.rb +6 -4
  3. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +15 -12
  4. data/app/controllers/katello/api/v2/capsule_content_controller.rb +0 -4
  5. data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +22 -81
  6. data/app/controllers/katello/api/v2/content_exports_controller.rb +11 -80
  7. data/app/controllers/katello/api/v2/content_imports_controller.rb +1 -0
  8. data/app/controllers/katello/api/v2/exports_controller.rb +130 -0
  9. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +7 -8
  10. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +8 -4
  11. data/app/controllers/katello/api/v2/organizations_controller.rb +3 -0
  12. data/app/controllers/katello/api/v2/package_groups_controller.rb +0 -52
  13. data/app/controllers/katello/concerns/api/v2/bulk_hosts_extensions.rb +4 -6
  14. data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +1 -2
  15. data/app/controllers/katello/concerns/authorization/api/v2/content_views_controller.rb +4 -1
  16. data/app/controllers/katello/concerns/content_facet_hosts_controller_extensions.rb +24 -0
  17. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +3 -3
  18. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +55 -24
  19. data/app/helpers/katello/katello_urls_helper.rb +0 -15
  20. data/app/helpers/katello/sync_management_helper.rb +0 -4
  21. data/app/lib/actions/candlepin/owner/destroy_imports.rb +1 -1
  22. data/app/lib/actions/katello/capsule_content/sync.rb +0 -4
  23. data/app/lib/actions/katello/capsule_content/sync_capsule.rb +1 -2
  24. data/app/lib/actions/katello/content_view/publish.rb +6 -2
  25. data/app/lib/actions/katello/content_view/remove.rb +8 -2
  26. data/app/lib/actions/katello/content_view_version/destroy.rb +1 -1
  27. data/app/lib/actions/katello/environment/destroy.rb +8 -2
  28. data/app/lib/actions/katello/host/reassign.rb +4 -2
  29. data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +0 -1
  30. data/app/lib/actions/katello/product/destroy.rb +2 -1
  31. data/app/lib/actions/katello/repository/filtered_index_content.rb +2 -10
  32. data/app/lib/actions/katello/repository/import_upload.rb +0 -1
  33. data/app/lib/actions/katello/repository/sync.rb +0 -1
  34. data/app/lib/actions/katello/repository/update.rb +5 -3
  35. data/app/lib/actions/katello/repository/upload_files.rb +0 -1
  36. data/app/lib/actions/pulp3/abstract.rb +0 -6
  37. data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +1 -2
  38. data/app/lib/actions/pulp3/content_view_version/create_syncable_export_history.rb +4 -0
  39. data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +1 -0
  40. data/app/lib/actions/pulp3/orchestration/content_view_version/export_repository.rb +7 -2
  41. data/app/lib/actions/pulp3/orchestration/content_view_version/syncable_export.rb +7 -2
  42. data/app/lib/actions/pulp3/repository/refresh_distribution.rb +1 -2
  43. data/app/lib/actions/pulp3/repository/save_distribution_references.rb +2 -2
  44. data/app/lib/katello/concerns/renderer_extensions.rb +1 -1
  45. data/app/lib/katello/event_daemon/runner.rb +12 -9
  46. data/app/lib/katello/resources/candlepin/consumer.rb +6 -6
  47. data/app/lib/katello/resources/candlepin/owner.rb +1 -1
  48. data/app/lib/katello/resources/candlepin/upstream_consumer.rb +3 -4
  49. data/app/lib/katello/resources/candlepin.rb +4 -4
  50. data/app/lib/katello/util/errata.rb +12 -10
  51. data/app/lib/katello/util/search.rb +0 -1
  52. data/app/lib/katello/validators/content_view_environment_org_validator.rb +5 -2
  53. data/app/lib/katello/validators/content_view_environment_validator.rb +1 -2
  54. data/app/lib/katello/validators/generated_content_view_validator.rb +16 -0
  55. data/app/mailers/katello/errata_mailer.rb +4 -2
  56. data/app/models/katello/alternate_content_source.rb +5 -1
  57. data/app/models/katello/concerns/content_facet_host_extensions.rb +25 -14
  58. data/app/models/katello/concerns/host_managed_extensions.rb +17 -8
  59. data/app/models/katello/concerns/redhat_extensions.rb +16 -6
  60. data/app/models/katello/concerns/smart_proxy_extensions.rb +0 -12
  61. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +1 -0
  62. data/app/models/katello/content_view.rb +22 -5
  63. data/app/models/katello/content_view_environment.rb +11 -2
  64. data/app/models/katello/content_view_environment_content_facet.rb +9 -0
  65. data/app/models/katello/content_view_version.rb +10 -5
  66. data/app/models/katello/erratum.rb +6 -1
  67. data/app/models/katello/glue/candlepin/pool.rb +6 -0
  68. data/app/models/katello/glue/candlepin/product.rb +7 -1
  69. data/app/models/katello/glue/candlepin/subscription.rb +5 -0
  70. data/app/models/katello/glue/provider.rb +26 -26
  71. data/app/models/katello/host/content_facet.rb +106 -18
  72. data/app/models/katello/host/info_provider.rb +25 -21
  73. data/app/models/katello/host/subscription_facet.rb +18 -14
  74. data/app/models/katello/kt_environment.rb +12 -7
  75. data/app/models/katello/package_group.rb +0 -12
  76. data/app/models/katello/pool.rb +4 -1
  77. data/app/models/katello/product.rb +11 -1
  78. data/app/models/katello/repository.rb +11 -11
  79. data/app/models/katello/root_repository.rb +5 -4
  80. data/app/models/katello/task_status.rb +0 -18
  81. data/app/services/katello/candlepin/consumer.rb +2 -2
  82. data/app/services/katello/host/package_profile_uploader.rb +1 -1
  83. data/app/services/katello/product_content_finder.rb +11 -8
  84. data/app/services/katello/pulp3/content_view_version/export.rb +8 -65
  85. data/app/services/katello/pulp3/content_view_version/export_validation_error.rb +7 -0
  86. data/app/services/katello/pulp3/content_view_version/export_validator.rb +105 -0
  87. data/app/services/katello/pulp3/content_view_version/importable_products.rb +1 -1
  88. data/app/services/katello/pulp3/content_view_version/syncable_format_export.rb +7 -1
  89. data/app/services/katello/pulp3/erratum.rb +1 -0
  90. data/app/services/katello/pulp3/module_stream.rb +26 -11
  91. data/app/services/katello/pulp3/repository/yum.rb +2 -1
  92. data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +2 -1
  93. data/app/services/katello/registration_manager.rb +46 -26
  94. data/app/services/katello/repository_type.rb +3 -9
  95. data/app/services/katello/simple_package.rb +22 -0
  96. data/app/views/foreman/smart_proxies/_content_sync.html.erb +1 -0
  97. data/app/views/foreman/smart_proxies/_reclaim_space.html.erb +1 -0
  98. data/app/views/katello/api/v2/content_facet/base.json.rabl +23 -2
  99. data/app/views/katello/api/v2/content_facet/show.json.rabl +11 -8
  100. data/app/views/katello/api/v2/content_views/base.json.rabl +1 -1
  101. data/app/views/katello/api/v2/hosts/base.json.rabl +22 -2
  102. data/app/views/overrides/activation_keys/_host_environment_select.html.erb +2 -2
  103. data/config/initializers/monkeys.rb +0 -2
  104. data/config/routes/api/registry.rb +8 -7
  105. data/config/routes/api/v2.rb +0 -2
  106. data/config/routes.rb +3 -0
  107. data/db/migrate/20200429153103_installed_package_bad_nvrea.rb +1 -1
  108. data/db/migrate/20220228173251_remove_drpm_from_ignorable_content.rb +7 -3
  109. data/db/migrate/20220419193414_content_settings_to_dsl_category.rb +1 -1
  110. data/db/migrate/20220929204746_add_content_view_environment_content_facet.rb +52 -0
  111. data/db/migrate/20221123212341_remove_pulp_docker_registry_port_setting.rb +5 -0
  112. data/db/migrate/20230119003859_ensure_repo_username_password_nil_not_blank.rb +1 -1
  113. data/db/seeds.d/111-upgrade_tasks.rb +2 -1
  114. data/engines/bastion/app/assets/stylesheets/bastion/bastion.scss +4 -0
  115. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +2 -4
  116. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +0 -1
  117. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +2 -4
  118. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +2 -1
  119. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +11 -3
  120. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-hosts-list.html +1 -1
  121. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +8 -4
  122. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +5485 -0
  123. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +5397 -0
  124. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +5658 -0
  125. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +5284 -0
  126. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ka.po +5231 -0
  127. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +5275 -0
  128. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +5389 -0
  129. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +5212 -0
  130. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +5145 -0
  131. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +9 -0
  132. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +2 -2
  133. data/lib/katello/engine.rb +2 -1
  134. data/lib/katello/permission_creator.rb +2 -4
  135. data/lib/katello/permissions/registry_permissions.rb +5 -5
  136. data/lib/katello/plugin.rb +22 -14
  137. data/lib/katello/repository_types/README.md +136 -19
  138. data/lib/katello/repository_types/deb.rb +0 -1
  139. data/lib/katello/repository_types/docker.rb +0 -1
  140. data/lib/katello/repository_types/file.rb +0 -1
  141. data/lib/katello/repository_types/yum.rb +0 -4
  142. data/lib/katello/tasks/clean_candlepin_orphaned_products.rake +38 -0
  143. data/lib/katello/tasks/clean_orphaned_facets.rb +20 -0
  144. data/lib/katello/tasks/reimport.rake +1 -2
  145. data/lib/katello/tasks/repository.rake +1 -22
  146. data/lib/katello/tasks/reset.rake +1 -0
  147. data/lib/katello/tasks/upgrades/4.8/fix_incorrect_providers.rake +29 -0
  148. data/lib/katello/version.rb +1 -1
  149. data/lib/katello.rb +0 -5
  150. data/locale/bn/katello.po +69 -27
  151. data/locale/cs/katello.po +69 -27
  152. data/locale/de/katello.po +78 -36
  153. data/locale/en/katello.po +69 -27
  154. data/locale/es/katello.po +70 -28
  155. data/locale/fr/katello.po +73 -31
  156. data/locale/gu/katello.po +69 -27
  157. data/locale/hi/katello.po +69 -27
  158. data/locale/it/katello.po +69 -27
  159. data/locale/ja/katello.po +73 -31
  160. data/locale/ka/katello.po +73 -31
  161. data/locale/katello.pot +335 -262
  162. data/locale/kn/katello.po +69 -27
  163. data/locale/ko/katello.po +69 -27
  164. data/locale/mr/katello.po +69 -27
  165. data/locale/or/katello.po +69 -27
  166. data/locale/pa/katello.po +69 -27
  167. data/locale/pt/katello.po +69 -27
  168. data/locale/pt_BR/katello.po +70 -28
  169. data/locale/ru/katello.po +70 -28
  170. data/locale/ta/katello.po +69 -27
  171. data/locale/te/katello.po +69 -27
  172. data/locale/zh_CN/katello.po +73 -31
  173. data/locale/zh_TW/katello.po +70 -28
  174. data/webpack/components/Content/ContentPage.js +51 -35
  175. data/webpack/components/Content/__tests__/ContentPage.test.js +2 -4
  176. data/webpack/components/Content/__tests__/__snapshots__/ContentPage.test.js.snap +22 -3
  177. data/webpack/components/Table/EmptyStateMessage.js +14 -11
  178. data/webpack/components/Table/MainTable.js +36 -15
  179. data/webpack/components/Table/TableWrapper.js +25 -25
  180. data/webpack/components/Table/__test__/emptyStateMessage.test.js +51 -0
  181. data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.js +5 -4
  182. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +1 -1
  183. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsModal.test.js +1 -17
  184. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +18 -9
  185. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +1 -2
  186. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +1 -2
  187. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +1 -2
  188. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +47 -27
  189. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js +1 -2
  190. data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +2 -21
  191. data/webpack/components/extensions/HostDetails/Tabs/__tests__/moduleStreamsTab.test.js +1 -28
  192. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packageInstallModal.test.js +1 -10
  193. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +1 -18
  194. data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySetsTab.test.js +1 -17
  195. data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +1 -15
  196. data/webpack/global_test_setup.js +1 -1
  197. data/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js +12 -10
  198. data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js +6 -0
  199. data/webpack/scenes/AlternateContentSources/Create/Steps/ACSSmartProxies.js +1 -0
  200. data/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js +3 -10
  201. data/webpack/scenes/AlternateContentSources/Create/Steps/NameACS.js +1 -0
  202. data/webpack/scenes/AlternateContentSources/Create/__tests__/acsCreate.test.js +3 -3
  203. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditDetails.js +1 -0
  204. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +12 -4
  205. data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +7 -4
  206. data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsTable.test.js +4 -8
  207. data/webpack/scenes/AlternateContentSources/helpers.js +1 -1
  208. data/webpack/scenes/Content/Details/ContentRepositories.js +5 -4
  209. data/webpack/scenes/Content/Details/__tests__/contentDetail.test.js +1 -12
  210. data/webpack/scenes/Content/Table/ContentTable.js +2 -1
  211. data/webpack/scenes/Content/__tests__/contentTable.test.js +1 -14
  212. data/webpack/scenes/ContentViews/Delete/__tests__/contentViewDelete.test.js +1 -25
  213. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +2 -1
  214. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +44 -31
  215. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +2 -0
  216. data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositoryTable.js +6 -1
  217. data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +2 -1
  218. data/webpack/scenes/ContentViews/Details/Filters/CVDebFilterContent.js +2 -1
  219. data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +3 -1
  220. data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +3 -1
  221. data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +3 -1
  222. data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +2 -1
  223. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +2 -0
  224. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +2 -1
  225. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVDebMatchContentModal.js +1 -1
  226. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVRpmMatchContentModal.js +1 -1
  227. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentModal.test.js +35 -33
  228. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js +48 -45
  229. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +58 -24
  230. data/webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js +64 -0
  231. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +36 -20
  232. data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js +40 -23
  233. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js +0 -13
  234. data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js +0 -13
  235. data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +2 -1
  236. data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +1 -10
  237. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +2 -1
  238. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +1 -10
  239. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +21 -9
  240. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareTable.js +4 -0
  241. data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js +1 -32
  242. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +3 -1
  243. data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvVersionRemove.test.js +1 -15
  244. data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +1 -1
  245. data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +1 -2
  246. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +31 -9
  247. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsTable.js +4 -0
  248. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js +30 -14
  249. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +1 -1
  250. data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +55 -120
  251. data/webpack/scenes/ContentViews/components/WizardHeader.js +1 -1
  252. data/webpack/scenes/ContentViews/expansions/RelatedContentViewComponentsModal.js +1 -1
  253. data/webpack/scenes/ContentViews/expansions/__tests__/contentViewComponentsModal.test.js +8 -1
  254. data/webpack/scenes/ModuleStreams/ModuleStreamsPage.js +3 -9
  255. data/webpack/scenes/ModuleStreams/__tests__/__snapshots__/ModuleStreamPage.test.js.snap +7 -1
  256. data/webpack/scenes/RedHatRepositories/components/Search.js +22 -16
  257. data/webpack/scenes/RedHatRepositories/index.scss +20 -1
  258. data/webpack/scenes/SmartProxy/SmartProxyContentTable.js +12 -1
  259. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnTypeForm.js +1 -1
  260. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CustomCdnTypeForm.js +1 -1
  261. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +21 -19
  262. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +34 -1
  263. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +20 -7
  264. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.test.js +0 -1
  265. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/__snapshots__/SubscriptionsToolbar.test.js.snap +65 -15
  266. metadata +50 -116
  267. data/app/lib/actions/katello/pulp_selector.rb +0 -24
  268. data/app/lib/actions/katello/repository/correct_checksum.rb +0 -24
  269. data/app/lib/actions/katello/repository/destroy_package_group.rb +0 -26
  270. data/app/lib/actions/katello/repository/upload_package_group.rb +0 -24
  271. data/app/lib/actions/pulp/abstract.rb +0 -37
  272. data/app/lib/actions/pulp/abstract_async_task.rb +0 -154
  273. data/app/lib/actions/pulp/abstract_async_task_group.rb +0 -94
  274. data/app/lib/actions/pulp/consumer/sync_capsule.rb +0 -45
  275. data/app/lib/actions/pulp/consumer/unassociate_units.rb +0 -20
  276. data/app/lib/actions/pulp/expect_one_task.rb +0 -11
  277. data/app/lib/actions/pulp/orchestration/orphan_cleanup/remove_orphans.rb +0 -16
  278. data/app/lib/actions/pulp/orchestration/repository/copy_all_units.rb +0 -19
  279. data/app/lib/actions/pulp/orchestration/repository/delete.rb +0 -15
  280. data/app/lib/actions/pulp/orchestration/repository/refresh.rb +0 -14
  281. data/app/lib/actions/pulp/orchestration/repository/refresh_if_needed.rb +0 -13
  282. data/app/lib/actions/pulp/orchestration/repository/refresh_repos.rb +0 -19
  283. data/app/lib/actions/pulp/orchestration/repository/remove_units.rb +0 -14
  284. data/app/lib/actions/pulp/orchestration/repository/smart_proxy_sync.rb +0 -34
  285. data/app/lib/actions/pulp/orchestration/repository/sync.rb +0 -18
  286. data/app/lib/actions/pulp/orchestration/repository/upload_content.rb +0 -37
  287. data/app/lib/actions/pulp/orphan_cleanup/remove_orphans.rb +0 -15
  288. data/app/lib/actions/pulp/orphan_cleanup/remove_unneeded_repos.rb +0 -16
  289. data/app/lib/actions/pulp/repository/abstract_copy_content.rb +0 -45
  290. data/app/lib/actions/pulp/repository/abstract_remove_content.rb +0 -32
  291. data/app/lib/actions/pulp/repository/clear.rb +0 -18
  292. data/app/lib/actions/pulp/repository/copy_all_units.rb +0 -30
  293. data/app/lib/actions/pulp/repository/copy_units.rb +0 -25
  294. data/app/lib/actions/pulp/repository/create.rb +0 -28
  295. data/app/lib/actions/pulp/repository/create_in_plan.rb +0 -15
  296. data/app/lib/actions/pulp/repository/create_upload_request.rb +0 -20
  297. data/app/lib/actions/pulp/repository/delete_upload_request.rb +0 -19
  298. data/app/lib/actions/pulp/repository/destroy.rb +0 -28
  299. data/app/lib/actions/pulp/repository/distributor_publish.rb +0 -25
  300. data/app/lib/actions/pulp/repository/download.rb +0 -16
  301. data/app/lib/actions/pulp/repository/import_upload.rb +0 -19
  302. data/app/lib/actions/pulp/repository/presenters/abstract_sync_presenter.rb +0 -47
  303. data/app/lib/actions/pulp/repository/presenters/deb_presenter.rb +0 -95
  304. data/app/lib/actions/pulp/repository/presenters/docker_presenter.rb +0 -103
  305. data/app/lib/actions/pulp/repository/presenters/file_unit_presenter.rb +0 -42
  306. data/app/lib/actions/pulp/repository/presenters/yum_presenter.rb +0 -131
  307. data/app/lib/actions/pulp/repository/refresh.rb +0 -21
  308. data/app/lib/actions/pulp/repository/regenerate_applicability.rb +0 -21
  309. data/app/lib/actions/pulp/repository/remove_distribution.rb +0 -11
  310. data/app/lib/actions/pulp/repository/remove_units.rb +0 -44
  311. data/app/lib/actions/pulp/repository/sync.rb +0 -99
  312. data/app/lib/actions/pulp/repository/upload_file.rb +0 -28
  313. data/app/lib/actions/pulp/repository_group/create.rb +0 -31
  314. data/app/lib/actions/pulp/repository_group/delete.rb +0 -17
  315. data/app/lib/actions/pulp/repository_group/export.rb +0 -51
  316. data/app/lib/katello/util/package_clause_generator.rb +0 -77
  317. data/app/models/katello/glue/pulp/pulp_errors.rb +0 -9
  318. data/app/models/katello/glue/pulp/repo.rb +0 -353
  319. data/app/models/katello/pulp_sync_status.rb +0 -165
  320. data/app/models/katello/pulp_task_status.rb +0 -63
  321. data/app/services/katello/pulp/content.rb +0 -24
  322. data/app/services/katello/pulp/importer_comparison.rb +0 -28
  323. data/app/services/katello/pulp/repository/deb.rb +0 -61
  324. data/app/services/katello/pulp/repository/docker.rb +0 -82
  325. data/app/services/katello/pulp/repository/file.rb +0 -52
  326. data/app/services/katello/pulp/repository/yum.rb +0 -205
  327. data/app/services/katello/pulp/repository.rb +0 -327
  328. data/app/services/katello/pulp/server.rb +0 -35
  329. data/app/services/katello/pulp/simple_package.rb +0 -24
  330. data/app/services/katello/pulp/smart_proxy_repository.rb +0 -52
  331. data/lib/monkeys/fix_deb_optimized_sync.rb +0 -35
  332. data/lib/monkeys/fix_pulp_container_path.rb +0 -35
  333. data/locale/zanata.xml +0 -30
  334. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentSearch.fixtures.json +0 -33
@@ -4,10 +4,6 @@ module Katello
4
4
  private :new
5
5
  delegate :propose_existing_hostname, :new_host_from_facts, to: Katello::Host::SubscriptionFacet
6
6
 
7
- def determine_organization(content_view_environment, activation_key)
8
- content_view_environment.try(:environment).try(:organization) || activation_key.try(:organization)
9
- end
10
-
11
7
  def determine_host_dmi_uuid(rhsm_params)
12
8
  host_uuid = rhsm_params.dig(:facts, 'dmi.system.uuid')
13
9
 
@@ -18,17 +14,17 @@ module Katello
18
14
  [host_uuid, false]
19
15
  end
20
16
 
21
- def process_registration(rhsm_params, content_view_environment, activation_keys = [])
17
+ def process_registration(rhsm_params, content_view_environments, activation_keys = [])
22
18
  host_name = propose_existing_hostname(rhsm_params[:facts])
23
19
  host_uuid, host_uuid_overridden = determine_host_dmi_uuid(rhsm_params)
24
20
 
25
21
  rhsm_params[:facts]['dmi.system.uuid'] = host_uuid # ensure we find & validate against a potentially overridden UUID
26
22
 
27
- organization = determine_organization(content_view_environment, activation_keys.first)
23
+ organization = validate_content_view_environment_org(content_view_environments, activation_keys.first)
28
24
 
29
25
  hosts = find_existing_hosts(host_name, host_uuid)
30
26
 
31
- validate_hosts(hosts, organization, host_name, host_uuid, host_uuid_overridden)
27
+ validate_hosts(hosts, organization, host_name, host_uuid, host_uuid_overridden: host_uuid_overridden)
32
28
 
33
29
  host = hosts.first || new_host_from_facts(
34
30
  rhsm_params[:facts],
@@ -37,7 +33,7 @@ module Katello
37
33
  )
38
34
  host.organization = organization unless host.organization
39
35
 
40
- register_host(host, rhsm_params, content_view_environment, activation_keys)
36
+ register_host(host, rhsm_params, content_view_environments, activation_keys)
41
37
 
42
38
  if host_uuid_overridden
43
39
  host.subscription_facet.update_dmi_uuid_override(host_uuid)
@@ -71,7 +67,19 @@ module Katello
71
67
  query
72
68
  end
73
69
 
74
- def validate_hosts(hosts, organization, host_name, host_uuid, host_uuid_overridden = false)
70
+ def validate_content_view_environment_org(content_view_environments, activation_key)
71
+ orgs = Set.new([activation_key&.organization])
72
+ content_view_environments&.each do |cve|
73
+ orgs << cve&.environment&.organization
74
+ end
75
+ orgs.delete(nil)
76
+ if orgs.size != 1
77
+ registration_error(_("Content view environments and activation key must all belong to the same organization"))
78
+ end
79
+ orgs.first
80
+ end
81
+
82
+ def validate_hosts(hosts, organization, host_name, host_uuid, host_uuid_overridden: false)
75
83
  return if hosts.empty?
76
84
 
77
85
  hosts = hosts.where(organization_id: [organization.id, nil])
@@ -135,40 +143,42 @@ module Katello
135
143
  remove_host_artifacts(host)
136
144
  elsif organization_destroy
137
145
  host.content_facet.try(:destroy!)
138
- remove_host_artifacts(host, false)
146
+ remove_host_artifacts(host, clear_content_facet: false)
139
147
  else
140
148
  host.content_facet.try(:destroy!)
141
149
  destroy_host_record(host.id)
142
150
  end
143
151
  end
144
152
 
145
- def register_host(host, consumer_params, content_view_environment, activation_keys = [])
153
+ def register_host(host, consumer_params, content_view_environments, activation_keys = []) # rubocop:disable Metrics/MethodLength
146
154
  new_host = host.new_record?
147
-
148
155
  unless new_host
149
156
  host.save!
150
157
  unregister_host(host, :unregistering => true)
151
158
  host.reload
152
159
  end
153
160
 
154
- unless activation_keys.empty?
155
- content_view_environment ||= lookup_content_view_environment(activation_keys)
161
+ if activation_keys.present?
162
+ if content_view_environments.blank?
163
+ content_view_environments = [lookup_content_view_environment(activation_keys)]
164
+ end
156
165
  set_host_collections(host, activation_keys)
157
166
  end
158
- fail _('Content View and Environment not set for registration.') if content_view_environment.nil?
167
+ fail _('Content view and environment not set for registration.') if content_view_environments.blank?
159
168
 
160
169
  host.save! #the host is in foreman db at this point
161
170
 
162
171
  host_uuid = get_uuid(consumer_params)
163
172
  consumer_params[:uuid] = host_uuid
164
- host.content_facet = populate_content_facet(host, content_view_environment, host_uuid)
173
+ host.content_facet = populate_content_facet(host, content_view_environments, host_uuid)
174
+ host.content_facet.cves_changed = false # prevent backend_update_needed from triggering an update on a nonexistent consumer
165
175
  host.subscription_facet = populate_subscription_facet(host, activation_keys, consumer_params, host_uuid)
166
176
  host.save! # the host has content and subscription facets at this point
167
177
  create_initial_subscription_status(host)
168
178
 
169
179
  User.as_anonymous_admin do
170
180
  begin
171
- create_in_candlepin(host, content_view_environment, consumer_params, activation_keys)
181
+ create_in_candlepin(host, content_view_environments, consumer_params, activation_keys)
172
182
  rescue StandardError => e
173
183
  # we can't call CP here since something bad already happened. Just clean up our DB as best as we can.
174
184
  host.subscription_facet.try(:destroy!)
@@ -185,8 +195,7 @@ module Katello
185
195
  User.as_anonymous_admin do
186
196
  ping_results = Katello::Ping.ping
187
197
  end
188
- candlepin_ok = ping_results[:services][:candlepin][:status] == "ok"
189
- candlepin_ok
198
+ ping_results[:services][:candlepin][:status] == "ok"
190
199
  end
191
200
 
192
201
  private
@@ -199,6 +208,11 @@ module Katello
199
208
  end
200
209
 
201
210
  def get_uuid(params)
211
+ if params.key?(:uuid)
212
+ Rails.logger.info "assigning existing uuid #{params[:uuid]}"
213
+ else
214
+ Rails.logger.info "generating new uuid"
215
+ end
202
216
  params.key?(:uuid) ? params[:uuid] : SecureRandom.uuid
203
217
  end
204
218
 
@@ -211,11 +225,17 @@ module Katello
211
225
  host.subscription_facet.update_subscription_status(::Katello::SubscriptionStatus::UNKNOWN)
212
226
  end
213
227
 
214
- def create_in_candlepin(host, content_view_environment, consumer_params, activation_keys)
228
+ def create_in_candlepin(host, content_view_environments, consumer_params, activation_keys)
215
229
  # if CP fails, nothing to clean up yet w.r.t. backend services
216
- cp_create = ::Katello::Resources::Candlepin::Consumer.create(content_view_environment.cp_id, consumer_params, activation_keys.map(&:cp_name))
230
+ cp_create = ::Katello::Resources::Candlepin::Consumer.create(content_view_environments.map(&:cp_id), consumer_params, activation_keys.map(&:cp_name), host.organization)
217
231
  ::Katello::Host::SubscriptionFacet.update_facts(host, consumer_params[:facts]) unless consumer_params[:facts].blank?
218
- cp_create[:uuid]
232
+ uuid = cp_create[:uuid]
233
+ if uuid.present? && uuid != host.subscription_facet.uuid
234
+ Rails.logger.info(_("Candlepin returned different consumer uuid than requested (%s), updating uuid in subscription_facet.") % uuid)
235
+ host.subscription_facet.uuid = uuid
236
+ host.subscription_facet.save!
237
+ end
238
+ uuid
219
239
  end
220
240
 
221
241
  def finalize_registration(host)
@@ -271,10 +291,9 @@ module Katello
271
291
  end
272
292
  end
273
293
 
274
- def populate_content_facet(host, content_view_environment, uuid)
294
+ def populate_content_facet(host, content_view_environments, uuid)
275
295
  content_facet = host.content_facet || ::Katello::Host::ContentFacet.new(:host => host)
276
- content_facet.content_view = content_view_environment.content_view
277
- content_facet.lifecycle_environment = content_view_environment.environment
296
+ content_facet.content_view_environments = content_view_environments
278
297
  content_facet.uuid = uuid
279
298
  content_facet.save!
280
299
  content_facet
@@ -291,11 +310,12 @@ module Katello
291
310
  subscription_facet
292
311
  end
293
312
 
294
- def remove_host_artifacts(host, clear_content_facet = true)
313
+ def remove_host_artifacts(host, clear_content_facet: true)
295
314
  if host.content_facet && clear_content_facet
296
315
  host.content_facet.bound_repositories = []
297
316
  host.content_facet.applicable_errata = []
298
317
  host.content_facet.uuid = nil
318
+ host.content_facet.content_view_environments = []
299
319
  host.content_facet.save!
300
320
  host.content_facet.calculate_and_import_applicability
301
321
  end
@@ -72,12 +72,7 @@ module Katello
72
72
  end
73
73
 
74
74
  def content_types_to_index
75
- if SmartProxy.pulp_primary&.pulp3_repository_type_support?(self)
76
- # type.index being false supersedes type.index_on_pulp3 being true
77
- @content_types.select { |type| type.index && type.index_on_pulp3 }
78
- else
79
- @content_types.select { |type| type.index }
80
- end
75
+ @content_types.select { |type| type.index }
81
76
  end
82
77
 
83
78
  def default_managed_content_type(label = nil)
@@ -146,7 +141,7 @@ module Katello
146
141
 
147
142
  class ContentType
148
143
  attr_accessor :model_class, :priority, :pulp3_service_class, :index, :uploadable, :removable, :mutable,
149
- :primary_content, :index_on_pulp3, :generic_browser, :content_type, :repository_import_on_upload,
144
+ :primary_content, :generic_browser, :content_type, :repository_import_on_upload,
150
145
  :test_upload_path
151
146
 
152
147
  def initialize(options)
@@ -155,7 +150,6 @@ module Katello
155
150
  self.priority = options[:priority] || 99
156
151
  self.pulp3_service_class = options[:pulp3_service_class]
157
152
  self.index = options[:index].nil? ? true : options[:index]
158
- self.index_on_pulp3 = options[:index_on_pulp3].nil? ? true : options[:index_on_pulp3]
159
153
  self.uploadable = options[:uploadable] || false
160
154
  self.removable = options[:removable] || false
161
155
  self.primary_content = options[:primary_content] || false
@@ -176,7 +170,7 @@ module Katello
176
170
  generic: false,
177
171
  removable: removable,
178
172
  uploadable: uploadable,
179
- indexed: index && index_on_pulp3
173
+ indexed: index
180
174
  }
181
175
  end
182
176
 
@@ -0,0 +1,22 @@
1
+ module Katello
2
+ class SimplePackage
3
+ # {"epoch", "name", "arch", "version", "vendor", "release"}
4
+ attr_accessor :vendor, :arch, :epoch, :version, :release, :name
5
+
6
+ def initialize(params = {})
7
+ params.each_pair { |k, v| instance_variable_set("@#{k}", v) unless v.nil? }
8
+ end
9
+
10
+ def nvra
11
+ "#{@name}-#{@version}-#{@release}.#{@arch}"
12
+ end
13
+
14
+ def nvrea
15
+ if epoch.nil? || epoch.to_s == "0"
16
+ nvra
17
+ else
18
+ "#{@name}-#{@epoch}:#{@version}-#{@release}.#{@arch}"
19
+ end
20
+ end
21
+ end
22
+ end
@@ -56,6 +56,7 @@
56
56
  <a ng-click="reclaimSpace()" ng-hide="syncStatus.download_policy != 'on_demand'">
57
57
  <span translate><strong>Reclaim Space</strong></span>
58
58
  <p translate> Delete cached content units from an "On Demand" Smart Proxy.</p>
59
+ <p translate> Storage used by deleted repositories will be reclaimed during the next orphan cleanup run.</p>
59
60
  </a>
60
61
  </li>
61
62
  </ul>
@@ -3,6 +3,7 @@
3
3
  <p translate>
4
4
  <strong>Warning</strong>: reclaiming space will delete all cached content units in "On Demand" repositories on this Smart Proxy.<br>
5
5
  Take precaution when cleaning custom repositories whose upstream parents don't keep old package versions.
6
+ Storage used by deleted repositories will be reclaimed during the next orphan cleanup run.
6
7
  </p>
7
8
  <div class="button">
8
9
  <button class="btn btn-default" type="button" id="reclaimSpaceButton" ng-click="reclaimSpace()" translate>
@@ -10,11 +10,32 @@ attributes :applicable_rpm_count => :applicable_package_count
10
10
  attributes :upgradable_rpm_count => :upgradable_package_count
11
11
  attributes :applicable_module_stream_count, :upgradable_module_stream_count
12
12
 
13
- child :content_view => :content_view do
13
+ node :content_view do |content_facet|
14
+ content_view = content_facet.single_content_view
15
+ if content_view.present?
16
+ {
17
+ :id => content_view.id,
18
+ :name => content_view.name,
19
+ :composite => content_view.composite?
20
+ }
21
+ end
22
+ end
23
+
24
+ node :lifecycle_environment do |content_facet|
25
+ lifecycle_environment = content_facet.single_lifecycle_environment
26
+ if lifecycle_environment.present?
27
+ {
28
+ :id => lifecycle_environment.id,
29
+ :name => lifecycle_environment.name
30
+ }
31
+ end
32
+ end
33
+
34
+ child :content_views => :content_views do
14
35
  attributes :id, :name, :composite
15
36
  end
16
37
 
17
- child :lifecycle_environment => :lifecycle_environment do
38
+ child :lifecycle_environments => :lifecycle_environments do
18
39
  attributes :id, :name
19
40
  end
20
41
 
@@ -2,20 +2,23 @@ child :content_facet => :content_facet_attributes do
2
2
  extends 'katello/api/v2/content_facet/base'
3
3
 
4
4
  node do |content_facet|
5
- version = content_facet.content_view_version
6
- {
7
- :content_view_version => version.version,
8
- :content_view_version_id => version.id,
9
- :content_view_version_latest => version.latest?
10
- }
5
+ content_facet.single_content_view # just so Rails gives a warning and we remember to fix this
6
+ version = content_facet.content_view_environments.first&.content_view_version
7
+ if version.present?
8
+ {
9
+ :content_view_version => version.version,
10
+ :content_view_version_id => version.id,
11
+ :content_view_version_latest => version.latest?
12
+ }
13
+ end
11
14
  end
12
15
 
13
16
  node :content_view_default? do |content_facet|
14
- content_facet.content_view.default?
17
+ content_facet.single_content_view&.default? || false
15
18
  end
16
19
 
17
20
  node :lifecycle_environment_library? do |content_facet|
18
- content_facet.lifecycle_environment.library?
21
+ content_facet.single_lifecycle_environment&.library? || false
19
22
  end
20
23
 
21
24
  node :katello_agent_installed do |content_facet|
@@ -44,7 +44,7 @@ node :environments do |cv|
44
44
  label: env.label,
45
45
  name: env.label,
46
46
  activation_keys: cv&.activation_keys&.in_environment(env)&.ids,
47
- hosts: cv&.hosts&.in_environment(env)&.ids,
47
+ hosts: cv&.hosts&.in_environments([env])&.ids,
48
48
  permissions: {readable: env.readable?}
49
49
  }
50
50
  end
@@ -1,7 +1,27 @@
1
1
  object @resource
2
2
 
3
3
  @resource ||= @object
4
+ @facet = @resource.content_facet
4
5
 
5
6
  attributes :id, :name, :description
6
- attributes :content_view, :content_view_id
7
- attributes :lifecycle_environment => :environment
7
+ if @facet
8
+ node :content_view do
9
+ content_view = @facet&.single_content_view
10
+ if content_view.present?
11
+ {
12
+ :id => content_view.id,
13
+ :name => content_view.name,
14
+ :composite => content_view.composite?
15
+ }
16
+ end
17
+ end
18
+ node :lifecycle_environment do
19
+ lifecycle_environment = @facet&.single_lifecycle_environment
20
+ if lifecycle_environment.present?
21
+ {
22
+ :id => lifecycle_environment.id,
23
+ :name => lifecycle_environment.name
24
+ }
25
+ end
26
+ end
27
+ end
@@ -8,7 +8,7 @@
8
8
 
9
9
  <% env_select_id = using_hostgroups_page? ? :hostgroup_lifecycle_environment_id : :host_lifecycle_environment_id %>
10
10
  <% env_select_name = using_hostgroups_page? ? 'hostgroup[lifecycle_environment_id]' : 'host[content_facet_attributes][lifecycle_environment_id]' %>
11
- <% env_select_attr = using_hostgroups_page? ? 'lifecycle_environment' : 'content_facet.lifecycle_environment' %>
11
+ <% env_select_attr = using_hostgroups_page? ? 'lifecycle_environment' : 'content_facet.single_lifecycle_environment' %>
12
12
 
13
13
  <%= field(f, env_select_attr, {:label => _("Lifecycle Environment")}) do
14
14
  if using_hostgroups_page?
@@ -21,7 +21,7 @@ end %>
21
21
 
22
22
  <% cv_select_id = using_hostgroups_page? ? :hostgroup_content_view_id : :host_content_view_id %>
23
23
  <% cv_select_name = using_hostgroups_page? ? 'hostgroup[content_view_id]' : 'host[content_facet_attributes][content_view_id]' %>
24
- <% cv_select_attr = using_hostgroups_page? ? 'content_view' : 'content_facet.content_view' %>
24
+ <% cv_select_attr = using_hostgroups_page? ? 'content_view' : 'content_facet.single_content_view' %>
25
25
  <%= field(f, cv_select_attr, {:label => _("Content View")}) do
26
26
  if using_hostgroups_page?
27
27
  select_tag cv_select_id, content_views_for_host(@hostgroup, :include_blank => blank_or_inherit_with_id(f, :content_view)), :data => {"spinner_path" => spinner_path},
@@ -2,5 +2,3 @@
2
2
  require 'monkeys/anemone'
3
3
  require 'monkeys/ar_postgres_evr_t'
4
4
  require 'monkeys/fx_sqlite_skip'
5
- require 'monkeys/fix_pulp_container_path'
6
- require 'monkeys/fix_deb_optimized_sync'
@@ -10,15 +10,16 @@ Katello::Engine.routes.draw do
10
10
  match '/v2/token' => 'registry_proxies#token', :via => :get
11
11
  match '/v2/token' => 'registry_proxies#token', :via => :post
12
12
  match '/v2/*repository/manifests/:tag' => 'registry_proxies#pull_manifest', :via => :get
13
- match '/v2/*repository/manifests/:tag' => 'registry_proxies#push_manifest', :via => :put
13
+ # Push-related routes are disabled until there is support for pushing to Pulp 3.
14
+ # match '/v2/*repository/manifests/:tag' => 'registry_proxies#push_manifest', :via => :put
14
15
  match '/v2/*repository/blobs/:digest' => 'registry_proxies#pull_blob', :via => :get
15
16
  match '/v2/*repository/blobs/:digest' => 'registry_proxies#check_blob', :via => :head
16
- match '/v2/*repository/blobs/uploads' => 'registry_proxies#start_upload_blob', :via => :post
17
- match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#chunk_upload_blob', :via => :post
18
- match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#finish_upload_blob', :via => :put
19
- match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#upload_blob', :via => :patch
20
- match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#status_upload_blob', :via => :get
21
- match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#cancel_upload_blob', :via => :delete
17
+ # match '/v2/*repository/blobs/uploads' => 'registry_proxies#start_upload_blob', :via => :post
18
+ # match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#chunk_upload_blob', :via => :post
19
+ # match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#finish_upload_blob', :via => :put
20
+ # match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#upload_blob', :via => :patch
21
+ # match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#status_upload_blob', :via => :get
22
+ # match '/v2/*repository/blobs/uploads/:uuid' => 'registry_proxies#cancel_upload_blob', :via => :delete
22
23
  match '/v2/_catalog' => 'registry_proxies#catalog', :via => :get
23
24
  match '/v2/*repository/tags/list' => 'registry_proxies#tags_list', :via => :get
24
25
  match '/v2' => 'registry_proxies#ping', :via => :get
@@ -274,8 +274,6 @@ Katello::Engine.routes.draw do
274
274
  api_resources :package_groups, :only => [:index, :show] do
275
275
  collection do
276
276
  get :auto_complete_search
277
- post :create
278
- delete :destroy
279
277
  get :compare
280
278
  end
281
279
  end
data/config/routes.rb CHANGED
@@ -47,4 +47,7 @@ Katello::Engine.routes.draw do
47
47
  match '/organization_select' => 'react#index', :via => [:get]
48
48
 
49
49
  get '/change_host_content_source', to: 'react#index'
50
+ constraints(id: /[^\/]+/) do
51
+ get 'new/hosts/:id/content', to: redirect('new/hosts/%{id}#/Content')
52
+ end
50
53
  end
@@ -1,7 +1,7 @@
1
1
  class InstalledPackageBadNvrea < ActiveRecord::Migration[5.2]
2
2
  def up
3
3
  Katello::InstalledPackage.where(:epoch => "0").find_each do |pkg|
4
- simple = Katello::Pulp::SimplePackage.new(pkg.attributes)
4
+ simple = Katello::SimplePackage.new(pkg.attributes)
5
5
  if pkg.nvrea != simple.nvrea
6
6
  pkg.update_column(:nvrea, simple.nvrea)
7
7
  end
@@ -1,12 +1,16 @@
1
1
  class RemoveDrpmFromIgnorableContent < ActiveRecord::Migration[6.0]
2
2
  def up
3
- Katello::RootRepository.select { |r| r&.ignorable_content&.include? "drpm" }.each do |root|
4
- root.ignorable_content = root.ignorable_content - ["drpm"]
3
+ Katello::RootRepository.select { |r| !r&.ignorable_content&.blank? }.each do |root|
4
+ if root&.ignorable_content&.include?("srpm")
5
+ root.ignorable_content = ["srpm"]
6
+ else
7
+ root.ignorable_content = []
8
+ end
5
9
  root.save!
6
10
  end
7
11
  end
8
12
 
9
13
  def down
10
- fail ActiveRecord::IrreversibleMigration
14
+ #noop
11
15
  end
12
16
  end
@@ -1,5 +1,5 @@
1
1
  class ContentSettingsToDslCategory < ActiveRecord::Migration[6.0]
2
2
  def up
3
- Setting.where(category: 'Setting::Content').update_all(category: 'Setting')
3
+ Setting.where(category: 'Setting::Content').update_all(category: 'Setting') if column_exists?(:settings, :category)
4
4
  end
5
5
  end
@@ -0,0 +1,52 @@
1
+ class AddContentViewEnvironmentContentFacet < ActiveRecord::Migration[6.1]
2
+ class FakeContentFacet < ApplicationRecord
3
+ self.table_name = 'katello_content_facets'
4
+ end
5
+
6
+ def up
7
+ create_table :katello_content_view_environment_content_facets do |t|
8
+ t.references :content_view_environment, :null => false, :index => false, :foreign_key => { :to_table => 'katello_content_view_environments' }
9
+ t.references :content_facet, :null => false, :index => false, :foreign_key => { :to_table => 'katello_content_facets' }
10
+ end
11
+ FakeContentFacet.all.each do |content_facet|
12
+ cve_id = ::Katello::KTEnvironment.find(content_facet.lifecycle_environment_id)
13
+ .content_view_environments
14
+ .find_by(content_view_id: content_facet.content_view_id)
15
+ .id
16
+ unless ::Katello::ContentViewEnvironmentContentFacet.create(
17
+ content_facet_id: content_facet.id,
18
+ content_view_environment_id: cve_id
19
+ )
20
+ Rails.logger.warn "Failed to create ContentViewEnvironmentContentFacet for content_facet #{content_facet.id}"
21
+ end
22
+ end
23
+
24
+ remove_column :katello_content_facets, :content_view_id
25
+ remove_column :katello_content_facets, :lifecycle_environment_id
26
+ end
27
+
28
+ def down
29
+ add_column :katello_content_facets, :content_view_id, :integer, :index => true
30
+ add_column :katello_content_facets, :lifecycle_environment_id, :integer, :index => true
31
+
32
+ add_foreign_key "katello_content_facets", "katello_content_views",
33
+ :name => "katello_content_facets_content_view_id", :column => "content_view_id"
34
+
35
+ add_foreign_key "katello_content_facets", "katello_environments",
36
+ :name => "katello_content_facets_life_environment_id", :column => "lifecycle_environment_id"
37
+
38
+ ::Katello::Host::ContentFacet.reset_column_information
39
+
40
+ ::Katello::ContentViewEnvironmentContentFacet.all.each do |cvecf|
41
+ content_facet = cvecf.content_facet
42
+ content_facet.content_view_id = cvecf.content_view_environment.content_view_id
43
+ content_facet.lifecycle_environment_id = cvecf.content_view_environment.environment_id
44
+ content_facet.save(validate: false)
45
+ end
46
+
47
+ change_column :katello_content_facets, :content_view_id, :integer, :null => false
48
+ change_column :katello_content_facets, :lifecycle_environment_id, :integer, :null => false
49
+
50
+ drop_table :katello_content_view_environment_content_facets
51
+ end
52
+ end
@@ -0,0 +1,5 @@
1
+ class RemovePulpDockerRegistryPortSetting < ActiveRecord::Migration[6.1]
2
+ def change
3
+ Setting.where(name: 'pulp_docker_registry_port').destroy_all
4
+ end
5
+ end
@@ -2,7 +2,7 @@ class EnsureRepoUsernamePasswordNilNotBlank < ActiveRecord::Migration[6.1]
2
2
  def change
3
3
  ::Katello::Repository.library.each do |repo|
4
4
  if repo.upstream_username == '' && repo.upstream_password == ''
5
- repo.root.update(upstream_username: nil, upstream_password: nil)
5
+ repo.update(upstream_username: nil, upstream_password: nil)
6
6
  end
7
7
  end
8
8
  end
@@ -7,6 +7,7 @@ UpgradeTask.define_tasks(:katello) do
7
7
  {:name => 'katello:upgrades:4.1:fix_invalid_pools'},
8
8
  {:name => 'katello:upgrades:4.1:reupdate_content_import_export_perms'},
9
9
  {:name => 'katello:upgrades:4.2:remove_checksum_values'},
10
- {:name => 'katello:upgrades:4.4:publish_import_cvvs'}
10
+ {:name => 'katello:upgrades:4.4:publish_import_cvvs'},
11
+ {:name => 'katello:upgrades:4.8:fix_incorrect_providers'}
11
12
  ]
12
13
  end
@@ -157,6 +157,10 @@
157
157
  margin-bottom: 20px;
158
158
  }
159
159
  }
160
+ [bst-bookmark] li a{
161
+ white-space: break-spaces;
162
+ overflow-wrap: anywhere;
163
+ }
160
164
  }
161
165
 
162
166
  .modal.fade.in {
@@ -12,20 +12,18 @@
12
12
  * @requires Notification
13
13
  * @requires ApiErrorHandler
14
14
  * @requires simpleContentAccessEnabled
15
- * @requires isManifestImported
16
15
  *
17
16
  * @description
18
17
  * Provides the functionality for the activation key details action pane.
19
18
  */
20
19
  angular.module('Bastion.activation-keys').controller('ActivationKeyDetailsController',
21
- ['$scope', '$state', '$q', 'translate', 'ActivationKey', 'Organization', 'CurrentOrganization', 'Notification', 'ApiErrorHandler', 'simpleContentAccessEnabled', 'isManifestImported',
22
- function ($scope, $state, $q, translate, ActivationKey, Organization, CurrentOrganization, Notification, ApiErrorHandler, simpleContentAccessEnabled, isManifestImported) {
20
+ ['$scope', '$state', '$q', 'translate', 'ActivationKey', 'Organization', 'CurrentOrganization', 'Notification', 'ApiErrorHandler', 'simpleContentAccessEnabled',
21
+ function ($scope, $state, $q, translate, ActivationKey, Organization, CurrentOrganization, Notification, ApiErrorHandler, simpleContentAccessEnabled) {
23
22
  $scope.defaultRoles = ['Red Hat Enterprise Linux Server', 'Red Hat Enterprise Linux Workstation', 'Red Hat Enterprise Linux Compute Node'];
24
23
  $scope.defaultUsages = ['Production', 'Development/Test', 'Disaster Recovery'];
25
24
 
26
25
  $scope.purposeAddonsCount = 0;
27
26
  $scope.simpleContentAccessEnabled = simpleContentAccessEnabled;
28
- $scope.isManifestImported = isManifestImported;
29
27
 
30
28
  $scope.organization = Organization.get({id: CurrentOrganization}, function(org) {
31
29
  $scope.purposeAddonsCount += org.system_purposes.addons.length;
@@ -119,7 +119,6 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkErrataModalC
119
119
 
120
120
  $scope.installErrataViaRemoteExecution = function(customize) {
121
121
  var errataIds = $scope.selectedErrataIds();
122
-
123
122
  $scope.errataActionFormValues.bulkErrataIds = angular.toJson(errataIds);
124
123
 
125
124
  $scope.errataActionFormValues.remoteAction = 'errata_install';
@@ -14,14 +14,13 @@
14
14
  * @requires deleteHostOnUnregister
15
15
  * @requires ContentHostsHelper
16
16
  * @requires simpleContentAccessEnabled
17
- * @requires isManifestImported
18
17
  *
19
18
  * @description
20
19
  * Provides the functionality for the content host details action pane.
21
20
  */
22
21
  angular.module('Bastion.content-hosts').controller('ContentHostDetailsController',
23
- ['$scope', '$state', '$q', '$location', 'translate', 'Host', 'HostSubscription', 'Organization', 'CurrentOrganization', 'Notification', 'MenuExpander', 'ApiErrorHandler', 'deleteHostOnUnregister', 'ContentHostsHelper', 'simpleContentAccessEnabled', 'isManifestImported',
24
- function ($scope, $state, $q, $location, translate, Host, HostSubscription, Organization, CurrentOrganization, Notification, MenuExpander, ApiErrorHandler, deleteHostOnUnregister, ContentHostsHelper, simpleContentAccessEnabled, isManifestImported) {
22
+ ['$scope', '$state', '$q', '$location', 'translate', 'Host', 'HostSubscription', 'Organization', 'CurrentOrganization', 'Notification', 'MenuExpander', 'ApiErrorHandler', 'deleteHostOnUnregister', 'ContentHostsHelper', 'simpleContentAccessEnabled',
23
+ function ($scope, $state, $q, $location, translate, Host, HostSubscription, Organization, CurrentOrganization, Notification, MenuExpander, ApiErrorHandler, deleteHostOnUnregister, ContentHostsHelper, simpleContentAccessEnabled) {
25
24
  $scope.menuExpander = MenuExpander;
26
25
 
27
26
  $scope.getHostStatusIcon = ContentHostsHelper.getHostStatusIcon;
@@ -37,7 +36,6 @@ angular.module('Bastion.content-hosts').controller('ContentHostDetailsController
37
36
 
38
37
  $scope.purposeAddonsCount = 0;
39
38
  $scope.simpleContentAccessEnabled = simpleContentAccessEnabled;
40
- $scope.isManifestImported = isManifestImported;
41
39
 
42
40
  $scope.panel = {
43
41
  error: false,
@@ -100,7 +100,8 @@
100
100
  ng-controller="ContentHostStatusController">
101
101
  <td bst-table-cell>
102
102
  <span ng-switch="newHostDetailsUI">
103
- <a ng-switch-when="true" ng-href="/new/hosts/{{host.name}}">{{ host.name }}</a>
103
+ <a ng-switch-when="true" ng-if="host.subscription_facet_attributes.uuid" ng-href="/new/hosts/{{host.name}}/content">{{ host.name }}</a>
104
+ <a ng-switch-when="true" ng-if="!host.subscription_facet_attributes.uuid" ng-href="/new/hosts/{{host.name}}">{{ host.name}}</a>
104
105
  <a ng-switch-when="false" ui-sref="content-host.info({hostId: host.id})">{{ host.name }}</a>
105
106
  </span>
106
107
  </td>