katello 4.18.1 → 4.19.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/locale/bn/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/ca/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/cs/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +57 -108
- data/app/assets/javascripts/katello/locale/de/katello.js +58 -109
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/el/katello.js +57 -108
- data/app/assets/javascripts/katello/locale/en/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/en_US/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/es/katello.js +58 -109
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/fr/katello.js +59 -110
- data/app/assets/javascripts/katello/locale/gl/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/gu/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/hi/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/id/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/it/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/ja/katello.js +59 -110
- data/app/assets/javascripts/katello/locale/ka/katello.js +58 -109
- data/app/assets/javascripts/katello/locale/kn/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/ko/katello.js +59 -110
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/mr/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/or/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/pa/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/pl/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/pt/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +58 -109
- data/app/assets/javascripts/katello/locale/ro/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/ru/katello.js +57 -108
- data/app/assets/javascripts/katello/locale/sl/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/ta/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/te/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/tr/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/vi/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/zh/katello.js +56 -107
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +59 -110
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +57 -108
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +41 -12
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +3 -65
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_views_controller.rb +18 -3
- data/app/controllers/katello/api/v2/debs_controller.rb +21 -11
- data/app/controllers/katello/api/v2/docker_tags_controller.rb +7 -0
- data/app/controllers/katello/api/v2/flatpak_remote_repositories_controller.rb +21 -19
- data/app/controllers/katello/api/v2/host_debs_controller.rb +16 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +3 -60
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +10 -53
- data/app/controllers/katello/api/v2/repositories_controller.rb +0 -1
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +3 -0
- data/app/lib/actions/candlepin/activation_key/create.rb +0 -2
- data/app/lib/actions/candlepin/activation_key/update.rb +0 -2
- data/app/lib/actions/candlepin/product/content_create.rb +3 -5
- data/app/lib/actions/candlepin/product/content_update.rb +2 -3
- data/app/lib/actions/helpers/rolling_cv_repos.rb +1 -1
- data/app/lib/actions/katello/activation_key/create.rb +0 -1
- data/app/lib/actions/katello/activation_key/update.rb +0 -2
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +1 -6
- data/app/lib/actions/katello/content_credential/update.rb +1 -1
- data/app/lib/actions/katello/content_view/add_rolling_repo_clone.rb +18 -24
- data/app/lib/actions/katello/content_view/create.rb +9 -4
- data/app/lib/actions/katello/content_view/refresh_rolling_repo.rb +6 -1
- data/app/lib/actions/katello/content_view/remove_rolling_repo_clone.rb +16 -11
- data/app/lib/actions/katello/content_view/update.rb +34 -7
- data/app/lib/actions/katello/product/content_create.rb +2 -2
- data/app/lib/actions/katello/product/content_destroy.rb +1 -1
- data/app/lib/actions/katello/repository/check_matching_content.rb +1 -1
- data/app/lib/actions/katello/repository/clone_contents.rb +1 -1
- data/app/lib/actions/katello/repository/create.rb +1 -1
- data/app/lib/actions/katello/repository/destroy.rb +4 -4
- data/app/lib/actions/katello/repository/finish_upload.rb +1 -1
- data/app/lib/actions/katello/repository/sync.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +2 -2
- data/app/lib/actions/pulp3/orchestration/repository/generate_metadata.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/repository/multi_copy_all_units.rb +1 -1
- data/app/lib/actions/pulp3/repository/save_publication.rb +3 -1
- data/app/lib/actions/pulp3/repository/save_version.rb +45 -24
- data/app/lib/actions/pulp3/repository/save_versions.rb +2 -1
- data/app/lib/katello/resources/candlepin/activation_key.rb +3 -4
- data/app/lib/katello/resources/candlepin/upstream_job.rb +9 -1
- data/app/lib/katello/resources/candlepin.rb +4 -0
- data/app/models/katello/authorization/repository.rb +17 -4
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +0 -7
- data/app/models/katello/content_view_deb_filter.rb +10 -0
- data/app/models/katello/content_view_deb_filter_rule.rb +7 -0
- data/app/models/katello/deb.rb +10 -10
- data/app/models/katello/erratum.rb +1 -1
- data/app/models/katello/glue/provider.rb +14 -3
- data/app/models/katello/host/content_facet.rb +1 -1
- data/app/models/katello/host/subscription_facet.rb +1 -7
- data/app/models/katello/product_content.rb +2 -2
- data/app/models/katello/repository.rb +4 -23
- data/app/models/katello/root_repository.rb +2 -5
- data/app/services/katello/candlepin/event_handler.rb +0 -33
- data/app/services/katello/candlepin/message_handler.rb +0 -41
- data/app/services/katello/content_unit_indexer.rb +59 -13
- data/app/services/katello/product_content_finder.rb +5 -4
- data/app/services/katello/pulp3/alternate_content_source.rb +2 -2
- data/app/services/katello/pulp3/ansible_collection.rb +1 -0
- data/app/services/katello/pulp3/api/content_guard.rb +5 -5
- data/app/services/katello/pulp3/api/core.rb +10 -0
- data/app/services/katello/pulp3/deb.rb +1 -0
- data/app/services/katello/pulp3/docker_manifest.rb +1 -0
- data/app/services/katello/pulp3/docker_manifest_list.rb +1 -0
- data/app/services/katello/pulp3/docker_tag.rb +1 -0
- data/app/services/katello/pulp3/file_unit.rb +1 -0
- data/app/services/katello/pulp3/generic_content_unit.rb +1 -0
- data/app/services/katello/pulp3/module_stream.rb +1 -0
- data/app/services/katello/pulp3/package_group.rb +1 -0
- data/app/services/katello/pulp3/repository/apt.rb +30 -13
- data/app/services/katello/pulp3/repository.rb +59 -10
- data/app/services/katello/pulp3/rpm.rb +3 -2
- data/app/services/katello/pulp3/srpm.rb +3 -2
- data/app/services/katello/pulp3/task_group.rb +1 -1
- data/app/services/katello/registration_manager.rb +19 -17
- data/app/services/katello/repository_type_manager.rb +7 -5
- data/app/services/katello/smart_proxy_helper.rb +1 -6
- data/app/views/foreman/job_templates/upload_profile.erb +5 -0
- data/app/views/katello/api/v2/activation_keys/base.json.rabl +1 -1
- data/app/views/katello/api/v2/content_views/base.json.rabl +1 -0
- data/app/views/katello/api/v2/debs/thindex.json.rabl +6 -0
- data/app/views/katello/api/v2/docker_tags/_base.json.rabl +32 -0
- data/app/views/katello/api/v2/docker_tags/show.json.rabl +0 -5
- data/app/views/katello/api/v2/flatpak_remotes/index.json.rabl +6 -0
- data/app/views/katello/api/v2/host_debs/installed_debs.json.rabl +6 -0
- data/app/views/katello/api/v2/hosts_bulk_actions/applicable_errata.json.rabl +1 -1
- data/app/views/katello/api/v2/hosts_bulk_actions/applicable_erratum.json.rabl +9 -0
- data/app/views/katello/api/v2/hosts_bulk_actions/installable_errata.json.rabl +1 -1
- data/app/views/katello/api/v2/hosts_bulk_actions/{erratum.json.rabl → installable_erratum.json.rabl} +3 -3
- data/app/views/katello/api/v2/subscription_facet/base.json.rabl +1 -1
- data/config/initializers/monkeys.rb +1 -0
- data/config/routes/api/v2.rb +2 -2
- data/config/routes/overrides.rb +2 -7
- data/config/routes.rb +2 -0
- data/db/migrate/20211019192121_create_cdn_configuration.katello.rb +1 -1
- data/db/migrate/20250912000000_add_pulp_prn_fields.rb +73 -0
- data/db/migrate/20250912000001_populate_pulp_prn_fields.rb +403 -0
- data/db/migrate/20251009142516_remove_auto_attach_from_activation_keys.rb +5 -0
- data/db/migrate/20251009142517_remove_autoheal_from_subscription_facets.rb +5 -0
- data/db/seeds.d/111-upgrade_tasks.rb +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/el.po +2 -2
- data/lib/katello/permission_creator.rb +2 -2
- data/lib/katello/permissions/host_permissions.rb +0 -6
- data/lib/katello/plugin.rb +16 -8
- data/lib/katello/tasks/jenkins.rake +1 -1
- data/lib/katello/tasks/upgrades/4.19/enable_structured_apt_for_deb.rake +87 -0
- data/lib/katello/tasks/upgrades/4.19/populate_repository_version_prns.rake +32 -0
- data/lib/katello/version.rb +1 -1
- data/lib/monkeys/fix_rpm_repository_gpgcheck.rb +38 -0
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +56 -107
- data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn_IN/katello.po +56 -107
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po +56 -107
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/katello.po +56 -107
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +57 -108
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +58 -109
- data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_AT/katello.po +56 -107
- data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_DE/katello.po +56 -107
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po +58 -109
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/katello.po +56 -107
- data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_GB/katello.po +56 -107
- data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_US/katello.po +56 -107
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +58 -109
- data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
- data/locale/et_EE/katello.po +56 -107
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +59 -110
- data/locale/gl/LC_MESSAGES/katello.mo +0 -0
- data/locale/gl/katello.po +56 -107
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/katello.po +56 -107
- data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
- data/locale/he_IL/katello.po +56 -107
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/katello.po +56 -107
- data/locale/id/LC_MESSAGES/katello.mo +0 -0
- data/locale/id/katello.po +56 -107
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +56 -107
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +59 -110
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +58 -109
- data/locale/katello.pot +676 -749
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/katello.po +56 -107
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +59 -110
- data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ml_IN/katello.po +56 -107
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/katello.po +56 -107
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po +56 -107
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/katello.po +56 -107
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/katello.po +56 -107
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po +56 -107
- data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl_PL/katello.po +56 -107
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/katello.po +56 -107
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +58 -109
- data/locale/ro/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro/katello.po +56 -107
- data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro_RO/katello.po +56 -107
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +57 -108
- data/locale/sl/LC_MESSAGES/katello.mo +0 -0
- data/locale/sl/katello.po +56 -107
- data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
- data/locale/sv_SE/katello.po +56 -107
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +56 -107
- data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta_IN/katello.po +56 -107
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/katello.po +56 -107
- data/locale/tr/LC_MESSAGES/katello.mo +0 -0
- data/locale/tr/katello.po +56 -107
- data/locale/vi/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi/katello.po +56 -107
- data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi_VN/katello.po +56 -107
- data/locale/zh/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh/katello.po +56 -107
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +59 -110
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +57 -108
- data/webpack/components/Content/Details/__tests__/__snapshots__/ContentDetails.test.js.snap +2 -2
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeEditModal.js +0 -2
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/__tests__/SystemPurposeEditModal.test.js +0 -2
- data/webpack/components/extensions/Hosts/ActionsBar/index.js +1 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkActionsConstants.js +7 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/BulkChangeHostCollectionsModal.js +388 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/__tests__/BulkChangeHostCollectionsModal.test.js +640 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/actions.js +28 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCollectionsModal/index.js +71 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/BulkErrataWizard.js +1 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/02_BulkPackagesTable.js +10 -3
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/BulkPackagesWizard.js +51 -24
- data/webpack/components/extensions/Hosts/BulkActions/HostReview.js +7 -0
- data/webpack/containers/Application/config.js +11 -1
- data/webpack/global_index.js +3 -0
- data/webpack/scenes/{BootedContainerImages → ContainerImages/Booted}/BootedContainerImagesConstants.js +1 -1
- data/webpack/scenes/{BootedContainerImages → ContainerImages/Booted}/BootedContainerImagesPage.js +7 -43
- data/webpack/scenes/{BootedContainerImages → ContainerImages/Booted}/__tests__/bootedContainerImagesPage.test.js +1 -1
- data/webpack/scenes/ContainerImages/ContainerImagesPage.js +86 -0
- data/webpack/scenes/ContainerImages/LabelsAnnotationsModal.js +105 -0
- data/webpack/scenes/ContainerImages/Synced/Details/ManifestDetails.js +218 -0
- data/webpack/scenes/ContainerImages/Synced/Details/ManifestDetailsActions.js +15 -0
- data/webpack/scenes/ContainerImages/Synced/Details/ManifestDetailsSelectors.js +16 -0
- data/webpack/scenes/ContainerImages/Synced/Details/__tests__/ManifestDetails.test.js +395 -0
- data/webpack/scenes/ContainerImages/Synced/Details/__tests__/manifestDetails.fixtures.json +43 -0
- data/webpack/scenes/ContainerImages/Synced/Details/__tests__/manifestList.fixtures.json +58 -0
- data/webpack/scenes/ContainerImages/Synced/Details/index.js +4 -0
- data/webpack/scenes/ContainerImages/Synced/SyncedContainerImagesPage.js +359 -0
- data/webpack/scenes/ContainerImages/Synced/SyncedContainerImagesPage.scss +21 -0
- data/webpack/scenes/ContainerImages/Synced/__tests__/LabelsAnnotationsModal.test.js +69 -0
- data/webpack/scenes/ContainerImages/Synced/__tests__/SyncedContainerImagesPage.test.js +335 -0
- data/webpack/scenes/ContainerImages/Synced/__tests__/syncedContainerImages.fixtures.json +105 -0
- data/webpack/scenes/ContainerImages/TableEmptyState.js +67 -0
- data/webpack/scenes/ContainerImages/containerImagesHelpers.js +48 -0
- data/webpack/scenes/ContainerImages/index.js +4 -0
- data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +29 -3
- data/webpack/scenes/ContentViews/Create/__tests__/contentViewCreateResult.fixtures.json +1 -0
- data/webpack/scenes/ContentViews/Create/__tests__/createContentView.test.js +45 -1
- data/webpack/scenes/ContentViews/Delete/__tests__/affectedHosts.fixtures.json +0 -1
- data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +59 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVDebFilterContent.js +1 -0
- data/webpack/scenes/ContentViews/Details/Filters/Rules/DebPackage/AddEditDebPackageRuleModal.js +164 -24
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVDebFilterContent.test.js +268 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvDebFilterDetail.fixtures.json +95 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvDebFilterRules.fixtures.json +31 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/emptyCVDebFilterRules.fixtures.json +10 -0
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/hosts.fixtures.json +0 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvAffectedHosts.fixture.json +0 -1
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewRollingDetail.test.js +15 -0
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewRollingDetails.fixtures.json +1 -0
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +9 -0
- data/webpack/scenes/FlatpakRemotes/CreateEdit/CreateFlatpakRemoteModal.js +5 -3
- data/webpack/scenes/FlatpakRemotes/CreateEdit/EditFlatpakRemotesModal.js +1 -1
- data/webpack/scenes/FlatpakRemotes/CreateEdit/FlatpakRemoteform.js +35 -3
- data/webpack/scenes/FlatpakRemotes/Details/FlatpakRemoteDetails.js +1 -1
- data/webpack/scenes/FlatpakRemotes/Details/RemoteRepositories/RemoteRepositoriesTable.css +3 -0
- data/webpack/scenes/FlatpakRemotes/Details/RemoteRepositories/RemoteRepositoriesTable.js +63 -132
- data/webpack/scenes/FlatpakRemotes/FlatpakRemotesPage.js +67 -143
- data/webpack/scenes/SmartProxy/ExpandableCvDetails.js +10 -2
- data/webpack/scenes/SmartProxy/SmartProxyContentActions.js +13 -2
- data/webpack/scenes/SmartProxy/SmartProxyContentConstants.js +1 -0
- data/webpack/scenes/SmartProxy/SmartProxyExpandableTable.js +8 -2
- data/webpack/scenes/SmartProxy/__tests__/SmartProxyContentTest.js +67 -1
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +2 -2
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +0 -2
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsActions.test.js.snap +2 -2
- metadata +83 -55
- data/app/lib/actions/katello/host/attach_subscriptions.rb +0 -59
- data/app/lib/actions/katello/host/auto_attach_subscriptions.rb +0 -22
- data/app/lib/actions/katello/host/remove_subscriptions.rb +0 -50
- data/app/lib/actions/katello/organization/simple_content_access/disable.rb +0 -25
- data/app/lib/actions/katello/organization/simple_content_access/enable.rb +0 -25
- data/app/lib/actions/katello/organization/simple_content_access/toggle.rb +0 -42
- data/lib/katello/tasks/migrate_structure_content_for_deb.rake +0 -105
- data/lib/katello/tasks/upgrades/4.2/remove_checksum_values.rake +0 -17
- data/locale/action_names.rb +0 -186
- /data/webpack/scenes/{BootedContainerImages → ContainerImages/Booted}/__tests__/bootedContainerImages.fixtures.js +0 -0
- /data/webpack/scenes/{BootedContainerImages → ContainerImages/Booted}/index.js +0 -0
|
@@ -7,6 +7,15 @@ module Katello
|
|
|
7
7
|
UNIT_LIMIT = 10_000
|
|
8
8
|
SIGNING_SERVICE_NAME = 'katello_deb_sign'.freeze
|
|
9
9
|
|
|
10
|
+
def pulp_primary_api
|
|
11
|
+
# Sometimes we need to make sure we are talking to the pulp primary and not a smart proxy!
|
|
12
|
+
if smart_proxy.pulp_primary?
|
|
13
|
+
api
|
|
14
|
+
else
|
|
15
|
+
self.class.instance_for_type(repo, ::SmartProxy.pulp_primary).api
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
10
19
|
def initialize_empty
|
|
11
20
|
# For every empty APT library instance repository we must add at least a release component to
|
|
12
21
|
# ensure we have a publishable repo with consumable metadata. Otherwise smart proxy syncs will
|
|
@@ -15,6 +24,25 @@ module Katello
|
|
|
15
24
|
api.content_release_components_api.create(opts)
|
|
16
25
|
end
|
|
17
26
|
|
|
27
|
+
def pulp_components
|
|
28
|
+
return [] if repo.version_href.blank?
|
|
29
|
+
return ["all"] if version_missing_structure_content?
|
|
30
|
+
pulp_primary_api.content_release_components_api.list({:repository_version => repo.version_href}).results.map { |x| x.plain_component }.uniq
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def sanitize_pulp_distribution(distribution)
|
|
34
|
+
return "flat-repo" if distribution == "/"
|
|
35
|
+
return distribution.chomp("/") if distribution&.end_with?("/")
|
|
36
|
+
# Only needed for repository versions created with pulp_deb <= 3.6
|
|
37
|
+
distribution
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def pulp_distributions
|
|
41
|
+
return [] if repo.version_href.blank?
|
|
42
|
+
return ["default"] if version_missing_structure_content?
|
|
43
|
+
pulp_primary_api.content_release_components_api.list({:repository_version => repo.version_href}).results.map { |x| sanitize_pulp_distribution(x.distribution) }.uniq
|
|
44
|
+
end
|
|
45
|
+
|
|
18
46
|
def remote_options
|
|
19
47
|
deb_remote_options = {
|
|
20
48
|
policy: root.download_policy,
|
|
@@ -39,13 +67,7 @@ module Katello
|
|
|
39
67
|
end
|
|
40
68
|
|
|
41
69
|
def mirror_remote_options
|
|
42
|
-
distributions
|
|
43
|
-
repo.deb_pulp_distributions.join(' ')
|
|
44
|
-
else
|
|
45
|
-
'default'
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
super.merge({distributions: distributions})
|
|
70
|
+
super.merge({distributions: pulp_distributions.join(' ')})
|
|
49
71
|
end
|
|
50
72
|
|
|
51
73
|
def version_missing_structure_content?
|
|
@@ -54,9 +76,7 @@ module Katello
|
|
|
54
76
|
# It may also affect filtered CV versions created with very old Katello versions.
|
|
55
77
|
# This method can identify such cases, so that we may fall back to simple publishing.
|
|
56
78
|
return false if repo.version_href.blank?
|
|
57
|
-
|
|
58
|
-
api_primary = self.class.instance_for_type(repo, ::SmartProxy.pulp_primary).api
|
|
59
|
-
version = api_primary.repository_versions_api.read(repo.version_href)
|
|
79
|
+
version = pulp_primary_api.repository_versions_api.read(repo.version_href)
|
|
60
80
|
apt_content_types = version&.content_summary&.present&.keys
|
|
61
81
|
return apt_content_types.include?('deb.package') && !apt_content_types.include?('deb.package_release_component')
|
|
62
82
|
end
|
|
@@ -67,9 +87,6 @@ module Katello
|
|
|
67
87
|
if version_missing_structure_content?
|
|
68
88
|
popts.merge!({ structured: false })
|
|
69
89
|
popts.merge!({ simple: true })
|
|
70
|
-
else
|
|
71
|
-
popts.merge!({ structured: true })
|
|
72
|
-
popts.merge!({ simple: true }) unless repository.deb_using_structured_apt?
|
|
73
90
|
end
|
|
74
91
|
popts[:signing_service] = ss[0].pulp_href if ss && ss.length == 1
|
|
75
92
|
popts
|
|
@@ -25,6 +25,21 @@ module Katello
|
|
|
25
25
|
href.include?('/publications/')
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
+
# Build a PRN from a Pulp href
|
|
29
|
+
# @param href [String] Pulp href (e.g., "/pulp/api/v3/contentguards/certguard/rhsm/uuid/")
|
|
30
|
+
# @param pulp_plugin [String] Pulp plugin name (e.g., "certguard", "container", "rpm")
|
|
31
|
+
# @param pulp_model [String] Pulp model name (e.g., "rhsmcertguard", "containerrepository", "rpmrepository")
|
|
32
|
+
# @return [String, nil] PRN string (e.g., "prn:certguard.rhsmcertguard:uuid") or nil if href doesn't match expected format
|
|
33
|
+
def self.build_prn(href, pulp_plugin, pulp_model)
|
|
34
|
+
return nil unless href
|
|
35
|
+
|
|
36
|
+
# Extract UUID from href (last non-empty path segment)
|
|
37
|
+
uuid = href.split('/').reject(&:empty?).last
|
|
38
|
+
return nil unless uuid
|
|
39
|
+
|
|
40
|
+
"prn:#{pulp_plugin}.#{pulp_model}:#{uuid}"
|
|
41
|
+
end
|
|
42
|
+
|
|
28
43
|
def partial_repo_path
|
|
29
44
|
fail NotImplementedError
|
|
30
45
|
end
|
|
@@ -70,14 +85,14 @@ module Katello
|
|
|
70
85
|
|
|
71
86
|
def create_remote
|
|
72
87
|
response = super
|
|
73
|
-
repo.update!(:remote_href => response.pulp_href)
|
|
88
|
+
repo.update!(:remote_href => response.pulp_href, :remote_prn => response.prn)
|
|
74
89
|
end
|
|
75
90
|
|
|
76
91
|
def update_remote
|
|
77
92
|
href = repo.remote_href
|
|
78
93
|
if remote_options[:url].blank?
|
|
79
94
|
if href
|
|
80
|
-
repo.update(remote_href: nil)
|
|
95
|
+
repo.update(remote_href: nil, remote_prn: nil)
|
|
81
96
|
delete_remote(href: href)
|
|
82
97
|
end
|
|
83
98
|
else
|
|
@@ -109,7 +124,10 @@ module Katello
|
|
|
109
124
|
end
|
|
110
125
|
|
|
111
126
|
def self.instance_for_type(repo, smart_proxy)
|
|
112
|
-
Katello::RepositoryTypeManager.enabled_repository_types
|
|
127
|
+
repo_types = Katello::RepositoryTypeManager.enabled_repository_types(false)
|
|
128
|
+
# Populate cache on first call if empty
|
|
129
|
+
repo_types = Katello::RepositoryTypeManager.enabled_repository_types if repo_types.empty?
|
|
130
|
+
repo_types[repo.root.content_type].pulp3_service_class.new(repo, smart_proxy)
|
|
113
131
|
end
|
|
114
132
|
|
|
115
133
|
def should_purge_empty_contents?
|
|
@@ -157,7 +175,8 @@ module Katello
|
|
|
157
175
|
|
|
158
176
|
def distribution_needs_update?
|
|
159
177
|
if distribution_reference
|
|
160
|
-
|
|
178
|
+
# FIXME: Workaround for https://github.com/pulp/pulpcore/issues/7004
|
|
179
|
+
expected = secure_distribution_options(relative_path).except(:name, :content_guard_prn).compact
|
|
161
180
|
actual = get_distribution&.to_hash || {}
|
|
162
181
|
expected != actual.slice(*expected.keys)
|
|
163
182
|
elsif repo.environment
|
|
@@ -180,7 +199,8 @@ module Katello
|
|
|
180
199
|
RepositoryReference.where(
|
|
181
200
|
root_repository_id: repo.root_id,
|
|
182
201
|
content_view_id: repo.content_view.id,
|
|
183
|
-
repository_href: response.pulp_href
|
|
202
|
+
repository_href: response.pulp_href,
|
|
203
|
+
repository_prn: response.prn).create!
|
|
184
204
|
response
|
|
185
205
|
end
|
|
186
206
|
end
|
|
@@ -279,7 +299,9 @@ module Katello
|
|
|
279
299
|
end
|
|
280
300
|
|
|
281
301
|
def create_distribution(path)
|
|
282
|
-
|
|
302
|
+
options = secure_distribution_options(path)
|
|
303
|
+
options.delete(:content_guard_prn) # Remove PRN field before sending to Pulp
|
|
304
|
+
distribution_data = api.distribution_class.new(options)
|
|
283
305
|
unless ::Katello::RepositoryTypeManager.find(repo.content_type).pulp3_skip_publication
|
|
284
306
|
fail_missing_publication(distribution_data.publication)
|
|
285
307
|
end
|
|
@@ -300,7 +322,8 @@ module Katello
|
|
|
300
322
|
unless ::Katello::RepositoryTypeManager.find(repo.content_type).pulp3_skip_publication
|
|
301
323
|
fail_missing_publication(options[:publication])
|
|
302
324
|
end
|
|
303
|
-
|
|
325
|
+
content_guard_prn = options.delete(:content_guard_prn) # Extract PRN and remove from options
|
|
326
|
+
distribution_reference.update(:content_guard_href => options[:content_guard], :content_guard_prn => content_guard_prn)
|
|
304
327
|
api.distributions_api.partial_update(distribution_reference.href, options)
|
|
305
328
|
end
|
|
306
329
|
end
|
|
@@ -368,7 +391,23 @@ module Katello
|
|
|
368
391
|
def save_distribution_references(hrefs)
|
|
369
392
|
hrefs.each do |href|
|
|
370
393
|
pulp3_distribution_data = api.get_distribution(href)
|
|
371
|
-
path
|
|
394
|
+
path = pulp3_distribution_data&.base_path
|
|
395
|
+
content_guard_href = pulp3_distribution_data&.content_guard
|
|
396
|
+
|
|
397
|
+
# FIXME: Workaround for ansible distributions not returning PRN
|
|
398
|
+
# Remove once https://github.com/pulp/pulp_ansible/issues/2320 is fixed
|
|
399
|
+
if repo.ansible_collection?
|
|
400
|
+
prn = self.class.build_prn(href, 'ansible', 'ansibledistribution')
|
|
401
|
+
else
|
|
402
|
+
prn = pulp3_distribution_data&.prn
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
# Build content_guard PRN from href if content_guard exists
|
|
406
|
+
# FIXME: Workaround for https://github.com/pulp/pulpcore/issues/7004
|
|
407
|
+
content_guard_prn = if content_guard_href&.include?('/contentguards/certguard/rhsm/')
|
|
408
|
+
self.class.build_prn(content_guard_href, 'certguard', 'rhsmcertguard')
|
|
409
|
+
end
|
|
410
|
+
|
|
372
411
|
if distribution_reference
|
|
373
412
|
found_distribution = read_distribution(distribution_reference.href)
|
|
374
413
|
unless found_distribution
|
|
@@ -377,7 +416,14 @@ module Katello
|
|
|
377
416
|
end
|
|
378
417
|
unless distribution_reference
|
|
379
418
|
# Ensure that duplicates won't be created in the case of a race condition
|
|
380
|
-
DistributionReference.where(
|
|
419
|
+
DistributionReference.where(
|
|
420
|
+
path: path,
|
|
421
|
+
href: href,
|
|
422
|
+
prn: prn,
|
|
423
|
+
repository_id: repo.id,
|
|
424
|
+
content_guard_href: content_guard_href,
|
|
425
|
+
content_guard_prn: content_guard_prn
|
|
426
|
+
).first_or_create!
|
|
381
427
|
end
|
|
382
428
|
end
|
|
383
429
|
end
|
|
@@ -444,8 +490,11 @@ module Katello
|
|
|
444
490
|
secured_distribution_options = {}
|
|
445
491
|
if root.unprotected
|
|
446
492
|
secured_distribution_options[:content_guard] = nil
|
|
493
|
+
secured_distribution_options[:content_guard_prn] = nil
|
|
447
494
|
else
|
|
448
|
-
|
|
495
|
+
content_guard = ::Katello::Pulp3::ContentGuard.first
|
|
496
|
+
secured_distribution_options[:content_guard] = content_guard.pulp_href
|
|
497
|
+
secured_distribution_options[:content_guard_prn] = content_guard.pulp_prn
|
|
449
498
|
end
|
|
450
499
|
secured_distribution_options.merge!(distribution_options(path))
|
|
451
500
|
end
|
|
@@ -5,7 +5,7 @@ module Katello
|
|
|
5
5
|
CONTENT_TYPE = "rpm".freeze
|
|
6
6
|
PULPCORE_CONTENT_TYPE = "rpm.package".freeze
|
|
7
7
|
|
|
8
|
-
PULP_INDEXED_FIELDS = %w(pulp_href name version release arch epoch summary is_modular rpm_sourcerpm location_href pkgId).freeze
|
|
8
|
+
PULP_INDEXED_FIELDS = %w(pulp_href prn name version release arch epoch summary is_modular rpm_sourcerpm location_href pkgId).freeze
|
|
9
9
|
|
|
10
10
|
lazy_accessor :description, :license, :buildhost, :vendor, :relativepath, :children, :checksumtype,
|
|
11
11
|
:changelog, :group, :size, :url, :build_time, :group,
|
|
@@ -90,7 +90,8 @@ module Katello
|
|
|
90
90
|
custom_json = {}
|
|
91
91
|
custom_json['modular'] = unit['is_modular']
|
|
92
92
|
custom_json['pulp_id'] = unit['pulp_href']
|
|
93
|
-
|
|
93
|
+
custom_json['pulp_prn'] = unit['prn'] # Also store PRN alongside pulp_id
|
|
94
|
+
(PULP_INDEXED_FIELDS - ['is_modular', 'pulp_href', 'prn', 'rpm_sourcerpm', 'pkgId', 'location_href']).
|
|
94
95
|
each { |field| custom_json[field] = unit[field] }
|
|
95
96
|
custom_json['release_sortable'] = Util::Package.sortable_version(unit['release'])
|
|
96
97
|
custom_json['version_sortable'] = Util::Package.sortable_version(unit['version'])
|
|
@@ -6,7 +6,7 @@ module Katello
|
|
|
6
6
|
|
|
7
7
|
CONTENT_TYPE = "srpm".freeze
|
|
8
8
|
|
|
9
|
-
PULP_INDEXED_FIELDS = %w(pulp_href name version release arch epoch summary location_href pkgId).freeze
|
|
9
|
+
PULP_INDEXED_FIELDS = %w(pulp_href prn name version release arch epoch summary location_href pkgId).freeze
|
|
10
10
|
|
|
11
11
|
lazy_accessor :pulp_facts, :initializer => :backend_data
|
|
12
12
|
|
|
@@ -68,7 +68,8 @@ module Katello
|
|
|
68
68
|
def self.generate_model_row(unit)
|
|
69
69
|
custom_json = {}
|
|
70
70
|
custom_json['pulp_id'] = unit['pulp_href']
|
|
71
|
-
|
|
71
|
+
custom_json['pulp_prn'] = unit['prn']
|
|
72
|
+
(PULP_INDEXED_FIELDS - ['pulp_href', 'prn', 'pkgId', 'location_href']).
|
|
72
73
|
each { |field| custom_json[field] = unit[field] }
|
|
73
74
|
custom_json['release_sortable'] = Util::Package.sortable_version(unit['release'])
|
|
74
75
|
custom_json['version_sortable'] = Util::Package.sortable_version(unit['version'])
|
|
@@ -55,7 +55,7 @@ module Katello
|
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
def done?
|
|
58
|
-
|
|
58
|
+
IN_PROGRESS_STATES.all? { |state| task_group_data[state] == 0 }
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
def group_progress_reports
|
|
@@ -125,12 +125,10 @@ module Katello
|
|
|
125
125
|
# * organization_destroy: destroy some data associated with host, but
|
|
126
126
|
# leave items alone that will be removed later as part of org destroy
|
|
127
127
|
# * unregistering: unregister the host but don't destroy it
|
|
128
|
-
# * keep_kickstart_repository: ensure the KS repo ID is not set to nil
|
|
129
128
|
def unregister_host(host, options = {})
|
|
130
129
|
organization_destroy = options.fetch(:organization_destroy, false)
|
|
131
130
|
unregistering = options.fetch(:unregistering, false)
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
preserve_for_provisioning = options.fetch(:preserve_for_provisioning, false)
|
|
134
132
|
# if the first operation fails, just raise the error since there's nothing to clean up yet.
|
|
135
133
|
candlepin_consumer_destroy(host.subscription_facet.uuid) if !organization_destroy && host.subscription_facet.try(:uuid)
|
|
136
134
|
|
|
@@ -140,14 +138,10 @@ module Katello
|
|
|
140
138
|
host.subscription_facet.try(:destroy!)
|
|
141
139
|
|
|
142
140
|
if unregistering
|
|
143
|
-
|
|
144
|
-
remove_host_artifacts(host, kickstart_repository_id: host&.content_facet&.kickstart_repository_id)
|
|
145
|
-
else
|
|
146
|
-
remove_host_artifacts(host)
|
|
147
|
-
end
|
|
141
|
+
remove_host_artifacts(host, preserve_for_provisioning: preserve_for_provisioning)
|
|
148
142
|
elsif organization_destroy
|
|
149
143
|
host.content_facet.try(:destroy!)
|
|
150
|
-
remove_host_artifacts(host, clear_content_facet: false)
|
|
144
|
+
remove_host_artifacts(host, clear_content_facet: false, preserve_for_provisioning: preserve_for_provisioning)
|
|
151
145
|
else
|
|
152
146
|
host.content_facet.try(:destroy!)
|
|
153
147
|
destroy_host_record(host.id)
|
|
@@ -159,10 +153,11 @@ module Katello
|
|
|
159
153
|
new_host = host.new_record?
|
|
160
154
|
unless new_host
|
|
161
155
|
host.save!
|
|
162
|
-
#
|
|
163
|
-
#
|
|
156
|
+
# Unregister the host before re-registering
|
|
157
|
+
# The retain_build_profile_upon_unregistration setting controls whether
|
|
158
|
+
# provisioning information (including kickstart repository) is preserved
|
|
164
159
|
begin
|
|
165
|
-
unregister_host(host, :unregistering => true, :
|
|
160
|
+
unregister_host(host, :unregistering => true, :preserve_for_provisioning => true)
|
|
166
161
|
rescue RestClient::Gone
|
|
167
162
|
Rails.logger.debug("Host %s has been removed in preparation for reregistration" % host&.name)
|
|
168
163
|
end
|
|
@@ -319,15 +314,22 @@ module Katello
|
|
|
319
314
|
subscription_facet
|
|
320
315
|
end
|
|
321
316
|
|
|
322
|
-
def remove_host_artifacts(host, clear_content_facet: true,
|
|
323
|
-
Rails.logger.debug "Host ID: #{host.id}, clear_content_facet: #{clear_content_facet}
|
|
317
|
+
def remove_host_artifacts(host, clear_content_facet: true, preserve_for_provisioning: false)
|
|
318
|
+
Rails.logger.debug "Host ID: #{host.id}, clear_content_facet: #{clear_content_facet}"
|
|
324
319
|
if host.content_facet && clear_content_facet
|
|
325
320
|
host.content_facet.bound_repositories = []
|
|
326
321
|
host.content_facet.applicable_errata = []
|
|
327
322
|
host.content_facet.uuid = nil
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
323
|
+
|
|
324
|
+
# Clear or retain provisioning information based on setting
|
|
325
|
+
unless Setting[:retain_build_profile_upon_unregistration] || preserve_for_provisioning
|
|
326
|
+
# Clear provisioning information if setting is disabled
|
|
327
|
+
host.content_facet.content_view_environments = []
|
|
328
|
+
host.content_facet.kickstart_repository_id = nil
|
|
329
|
+
host.content_facet.content_source = ::SmartProxy.pulp_primary
|
|
330
|
+
end
|
|
331
|
+
# If setting is enabled, keep current values (CVEs, kickstart_repository_id, content_source)
|
|
332
|
+
|
|
331
333
|
host.content_facet.save!
|
|
332
334
|
Rails.logger.debug "remove_host_artifacts: marking CVEs unchanged to prevent backend update"
|
|
333
335
|
host.content_facet.mark_cves_unchanged
|
|
@@ -31,14 +31,16 @@ module Katello
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
def enabled_repository_types(update = true)
|
|
34
|
-
|
|
35
|
-
fix_pulp3_capabilities
|
|
36
|
-
end
|
|
34
|
+
return @enabled_repository_types unless update
|
|
37
35
|
|
|
38
36
|
disabled_types = @defined_repository_types.keys - @enabled_repository_types.keys
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
return @enabled_repository_types if disabled_types.empty?
|
|
38
|
+
|
|
39
|
+
if pulp_primary&.has_feature?(PULP3_FEATURE) && pulp_primary&.capabilities(PULP3_FEATURE)&.empty?
|
|
40
|
+
fix_pulp3_capabilities
|
|
41
41
|
end
|
|
42
|
+
|
|
43
|
+
disabled_types.each { |repo_type| update_enabled_repository_type(repo_type.to_s) }
|
|
42
44
|
@enabled_repository_types
|
|
43
45
|
end
|
|
44
46
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
module Katello
|
|
2
2
|
class SmartProxyHelper
|
|
3
|
-
include ::Actions::Helpers::RollingCVRepos
|
|
4
3
|
attr_accessor :smart_proxy
|
|
5
4
|
|
|
6
5
|
def initialize(smart_proxy)
|
|
@@ -40,11 +39,7 @@ module Katello
|
|
|
40
39
|
def combined_repos_available_to_capsule(environment = nil, content_view = nil, repository = nil)
|
|
41
40
|
lifecycle_environment_check(environment, repository)
|
|
42
41
|
if repository && !library_export_repo(repository)
|
|
43
|
-
|
|
44
|
-
[repository] + find_related_rolling_repos(repository)
|
|
45
|
-
else
|
|
46
|
-
[repository]
|
|
47
|
-
end
|
|
42
|
+
[repository]
|
|
48
43
|
else
|
|
49
44
|
repositories_available_to_capsule(environment, content_view)
|
|
50
45
|
end
|
|
@@ -9,7 +9,12 @@ feature: katello_upload_profile
|
|
|
9
9
|
%>
|
|
10
10
|
#!/bin/sh
|
|
11
11
|
<% if @host.operatingsystem.family == 'Redhat' -%>
|
|
12
|
+
# Use dnf for EL 8+ and use yum for below
|
|
13
|
+
<% if @host.operatingsystem.major.to_i >= 8 -%>
|
|
12
14
|
dnf uploadprofile --force-upload
|
|
15
|
+
<% else -%>
|
|
16
|
+
yum uploadprofile --force-upload
|
|
17
|
+
<% end -%>
|
|
13
18
|
<% elsif @host.operatingsystem.family == 'Suse' -%>
|
|
14
19
|
katello-package-upload --force
|
|
15
20
|
<% else -%>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
extends 'katello/api/v2/common/org_reference'
|
|
2
2
|
extends 'katello/api/v2/common/timestamps'
|
|
3
3
|
|
|
4
|
-
attributes :id, :name, :description, :unlimited_hosts, :
|
|
4
|
+
attributes :id, :name, :description, :unlimited_hosts, :content_view_environment_labels
|
|
5
5
|
|
|
6
6
|
node :multi_content_view_environment do |ak|
|
|
7
7
|
ak.multi_content_view_environment?
|
|
@@ -16,6 +16,26 @@ end
|
|
|
16
16
|
child :docker_manifest => :manifest do
|
|
17
17
|
attributes :pulp_id => :id
|
|
18
18
|
attributes :schema_version, :digest, :manifest_type
|
|
19
|
+
attributes :labels, :annotations
|
|
20
|
+
attributes :is_bootable, :is_flatpak
|
|
21
|
+
attributes :created_at, :updated_at
|
|
22
|
+
|
|
23
|
+
node :manifests, :if => lambda { |m| m.manifest_type == 'list' } do |manifest|
|
|
24
|
+
manifest.docker_manifests.map do |child_manifest|
|
|
25
|
+
{
|
|
26
|
+
:id => child_manifest.id,
|
|
27
|
+
:digest => child_manifest.digest,
|
|
28
|
+
:schema_version => child_manifest.schema_version,
|
|
29
|
+
:manifest_type => child_manifest.manifest_type,
|
|
30
|
+
:labels => child_manifest.labels,
|
|
31
|
+
:annotations => child_manifest.annotations,
|
|
32
|
+
:is_bootable => child_manifest.is_bootable,
|
|
33
|
+
:is_flatpak => child_manifest.is_flatpak,
|
|
34
|
+
:created_at => child_manifest.created_at,
|
|
35
|
+
:updated_at => child_manifest.updated_at,
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
end
|
|
19
39
|
end
|
|
20
40
|
|
|
21
41
|
if @organization
|
|
@@ -25,6 +45,9 @@ if @organization
|
|
|
25
45
|
:id => repo.id,
|
|
26
46
|
:name => repo.name,
|
|
27
47
|
:full_path => repo.full_path,
|
|
48
|
+
:library_instance => repo.library_instance?,
|
|
49
|
+
:product_id => repo.product&.id,
|
|
50
|
+
:product_name => repo.product&.name,
|
|
28
51
|
}
|
|
29
52
|
attributes
|
|
30
53
|
end
|
|
@@ -41,6 +64,15 @@ if @organization
|
|
|
41
64
|
else
|
|
42
65
|
child :repositories => :repositories do
|
|
43
66
|
attributes :id, :name, :full_path
|
|
67
|
+
node :library_instance do |repo|
|
|
68
|
+
repo.library_instance?
|
|
69
|
+
end
|
|
70
|
+
node :product_id do |repo|
|
|
71
|
+
repo.product&.id
|
|
72
|
+
end
|
|
73
|
+
node :product_name do |repo|
|
|
74
|
+
repo.product&.name
|
|
75
|
+
end
|
|
44
76
|
end
|
|
45
77
|
|
|
46
78
|
child :product => :product do
|
|
@@ -2,11 +2,6 @@ object @resource
|
|
|
2
2
|
|
|
3
3
|
extends 'katello/api/v2/docker_tags/base'
|
|
4
4
|
|
|
5
|
-
child :docker_manifest => :manifest do
|
|
6
|
-
attributes :uuid => :id
|
|
7
|
-
attributes :schema_version, :digest, :manifest_type
|
|
8
|
-
end
|
|
9
|
-
|
|
10
5
|
child :related_tags => :related_tags do
|
|
11
6
|
attributes :id, :name
|
|
12
7
|
end
|
|
@@ -3,6 +3,12 @@ object false
|
|
|
3
3
|
extends "katello/api/v2/common/index"
|
|
4
4
|
extends 'katello/api/v2/flatpak_remotes/permissions'
|
|
5
5
|
|
|
6
|
+
node :has_redhat_flatpak_remote do
|
|
7
|
+
User.as_anonymous_admin do
|
|
8
|
+
::Katello::FlatpakRemote.unscoped.where("url LIKE ?", "%flatpaks.redhat.io%").exists?
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
6
12
|
child @collection[:results] => :results do
|
|
7
13
|
extends "katello/api/v2/flatpak_remotes/base"
|
|
8
14
|
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
extends "katello/api/v2/errata/show"
|
|
2
|
+
|
|
3
|
+
node :applicable_hosts do |erratum|
|
|
4
|
+
erratum.hosts_applicable(params[:organization_id]).where("#{::Host.table_name}.id" => @hosts).
|
|
5
|
+
pluck(:id, :name).
|
|
6
|
+
map { |id, name| {:name => name, :id => id} }
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
node(:affected_hosts_count) { |erratum| erratum.hosts_applicable(params[:organization_id]).where("#{::Host.table_name}.id" => @hosts).count }
|
|
@@ -3,5 +3,5 @@ object false
|
|
|
3
3
|
extends "katello/api/v2/common/metadata"
|
|
4
4
|
|
|
5
5
|
node :results do
|
|
6
|
-
partial("katello/api/v2/hosts_bulk_actions/
|
|
6
|
+
partial("katello/api/v2/hosts_bulk_actions/installable_erratum", :object => @collection[:results])
|
|
7
7
|
end
|
data/app/views/katello/api/v2/hosts_bulk_actions/{erratum.json.rabl → installable_erratum.json.rabl}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
extends "katello/api/v2/errata/show"
|
|
2
2
|
|
|
3
3
|
node :applicable_hosts do |erratum|
|
|
4
|
-
erratum.hosts_available.where("#{::Host.table_name}.id" => @hosts).
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
erratum.hosts_available(params[:organization_id]).where("#{::Host.table_name}.id" => @hosts).
|
|
5
|
+
pluck(:id, :name).
|
|
6
|
+
map { |id, name| {:name => name, :id => id} }
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
node(:affected_hosts_count) { |erratum| erratum.hosts_available(params[:organization_id]).where("#{::Host.table_name}.id" => @hosts).count }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
attributes :id, :uuid, :last_checkin, :service_level, :release_version, :
|
|
1
|
+
attributes :id, :uuid, :last_checkin, :service_level, :release_version, :registered_at, :registered_through, :purpose_role, :purpose_usage, :hypervisor, :convert2rhel_through_foreman
|
|
2
2
|
|
|
3
3
|
child :user => :user do
|
|
4
4
|
attributes :id, :login
|
data/config/routes/api/v2.rb
CHANGED
|
@@ -58,8 +58,6 @@ Katello::Engine.routes.draw do
|
|
|
58
58
|
match '/product_content' => 'repository_sets#index', :via => :get, :entity => :activation_key
|
|
59
59
|
match '/content_override' => 'activation_keys#content_override', :via => :put
|
|
60
60
|
post :copy
|
|
61
|
-
put :add_subscriptions
|
|
62
|
-
put :remove_subscriptions
|
|
63
61
|
end
|
|
64
62
|
match '/releases' => 'activation_keys#available_releases', :via => :get, :on => :member
|
|
65
63
|
api_resources :host_collections, :only => [:index]
|
|
@@ -191,6 +189,8 @@ Katello::Engine.routes.draw do
|
|
|
191
189
|
end
|
|
192
190
|
end
|
|
193
191
|
|
|
192
|
+
get "/debs/thindex" => "debs#thindex"
|
|
193
|
+
|
|
194
194
|
api_resources :debs, :only => [:index, :show] do
|
|
195
195
|
collection do
|
|
196
196
|
get :auto_complete_search
|
data/config/routes/overrides.rb
CHANGED
|
@@ -9,7 +9,7 @@ module Katello
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
Foreman::Application.routes.draw do
|
|
12
|
-
override_message = '{"message": "Route
|
|
12
|
+
override_message = '{"message": "Route overridden by Katello, use the /katello API endpoint instead. See /apidoc for more details."}'
|
|
13
13
|
|
|
14
14
|
match "/api/v2/organizations/*all", :to => proc { [404, {}, [override_message]] },
|
|
15
15
|
:via => :put,
|
|
@@ -64,9 +64,6 @@ Foreman::Application.routes.draw do
|
|
|
64
64
|
match '/bulk/remove_host_collections' => 'hosts_bulk_actions#bulk_remove_host_collections', :via => :put
|
|
65
65
|
match '/bulk/remove_host_collections' => 'hosts_bulk_actions#bulk_remove_host_collections', :via => :put
|
|
66
66
|
|
|
67
|
-
match '/bulk/add_subscriptions' => 'hosts_bulk_actions#add_subscriptions', :via => :put
|
|
68
|
-
match '/bulk/remove_subscriptions' => 'hosts_bulk_actions#remove_subscriptions', :via => :put
|
|
69
|
-
match '/bulk/auto_attach' => 'hosts_bulk_actions#auto_attach', :via => :put
|
|
70
67
|
match '/bulk/content_overrides' => 'hosts_bulk_actions#content_overrides', :via => :put
|
|
71
68
|
|
|
72
69
|
match '/bulk/applicable_errata' => 'hosts_bulk_actions#applicable_errata', :via => :post
|
|
@@ -82,6 +79,7 @@ Foreman::Application.routes.draw do
|
|
|
82
79
|
match '/bulk/change_content_source' => 'hosts_bulk_actions#change_content_source', :via => :put
|
|
83
80
|
match '/subscriptions/' => 'host_subscriptions#create', :via => :post
|
|
84
81
|
match '/host_packages/installed_packages' => 'host_packages#installed_packages', :via => :get
|
|
82
|
+
match '/host_debs/installed_debs' => 'host_debs#installed_debs', :via => :get
|
|
85
83
|
end
|
|
86
84
|
|
|
87
85
|
resources :packages, :only => [:index], :controller => :host_packages do
|
|
@@ -98,13 +96,10 @@ Foreman::Application.routes.draw do
|
|
|
98
96
|
|
|
99
97
|
resources :subscriptions, :only => [:index], :controller => :host_subscriptions do
|
|
100
98
|
collection do
|
|
101
|
-
put :auto_attach
|
|
102
99
|
match '/product_content' => 'repository_sets#index', :via => :get, :entity => :host
|
|
103
100
|
get :available_release_versions
|
|
104
101
|
get :enabled_repositories
|
|
105
102
|
put :content_override
|
|
106
|
-
put :remove_subscriptions
|
|
107
|
-
put :add_subscriptions
|
|
108
103
|
delete :destroy
|
|
109
104
|
end
|
|
110
105
|
end
|
data/config/routes.rb
CHANGED
|
@@ -35,6 +35,8 @@ Katello::Engine.routes.draw do
|
|
|
35
35
|
|
|
36
36
|
match '/booted_container_images' => 'react#index', :via => [:get]
|
|
37
37
|
|
|
38
|
+
match '/container_images' => 'react#index', :via => [:get]
|
|
39
|
+
|
|
38
40
|
match '/flatpak_remotes' => 'react#index', :via => [:get]
|
|
39
41
|
match '/flatpak_remotes/*page' => 'react#index', :via => [:get]
|
|
40
42
|
|
|
@@ -23,7 +23,7 @@ class CreateCdnConfiguration < ActiveRecord::Migration[6.0]
|
|
|
23
23
|
::Organization.all.each do |org|
|
|
24
24
|
FakeCdnConfiguration.where(
|
|
25
25
|
organization_id: org.id,
|
|
26
|
-
url: org.redhat_provider
|
|
26
|
+
url: org.redhat_provider&.repository_url || ::Katello::Resources::CDN::CdnResource.redhat_cdn_url
|
|
27
27
|
).first_or_create!
|
|
28
28
|
end
|
|
29
29
|
|