katello 4.7.6 → 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.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +6 -4
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +15 -12
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +0 -4
- data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +22 -81
- data/app/controllers/katello/api/v2/content_exports_controller.rb +11 -80
- data/app/controllers/katello/api/v2/content_imports_controller.rb +1 -0
- data/app/controllers/katello/api/v2/exports_controller.rb +130 -0
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +7 -8
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +8 -4
- data/app/controllers/katello/api/v2/organizations_controller.rb +3 -0
- data/app/controllers/katello/api/v2/package_groups_controller.rb +0 -52
- data/app/controllers/katello/api/v2/simple_content_access_controller.rb +1 -3
- data/app/controllers/katello/concerns/api/v2/bulk_hosts_extensions.rb +4 -6
- data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +1 -2
- data/app/controllers/katello/concerns/authorization/api/v2/content_views_controller.rb +4 -1
- data/app/controllers/katello/concerns/content_facet_hosts_controller_extensions.rb +24 -0
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +3 -3
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +55 -24
- data/app/helpers/katello/katello_urls_helper.rb +0 -15
- data/app/helpers/katello/sync_management_helper.rb +0 -4
- data/app/lib/actions/candlepin/owner/destroy_imports.rb +1 -1
- data/app/lib/actions/katello/capsule_content/sync.rb +0 -4
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +1 -2
- data/app/lib/actions/katello/content_view/publish.rb +6 -2
- data/app/lib/actions/katello/content_view/remove.rb +8 -2
- data/app/lib/actions/katello/content_view_version/destroy.rb +1 -1
- data/app/lib/actions/katello/environment/destroy.rb +8 -2
- data/app/lib/actions/katello/host/reassign.rb +4 -2
- data/app/lib/actions/katello/organization/simple_content_access/enable.rb +0 -10
- data/app/lib/actions/katello/organization/simple_content_access/toggle.rb +2 -12
- data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +0 -1
- data/app/lib/actions/katello/product/destroy.rb +2 -1
- data/app/lib/actions/katello/repository/filtered_index_content.rb +2 -10
- data/app/lib/actions/katello/repository/import_upload.rb +0 -1
- data/app/lib/actions/katello/repository/sync.rb +0 -1
- data/app/lib/actions/katello/repository/update.rb +5 -3
- data/app/lib/actions/katello/repository/upload_files.rb +0 -1
- data/app/lib/actions/pulp3/abstract.rb +0 -6
- data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +1 -2
- data/app/lib/actions/pulp3/content_view_version/create_syncable_export_history.rb +4 -0
- data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +1 -0
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_repository.rb +7 -2
- data/app/lib/actions/pulp3/orchestration/content_view_version/syncable_export.rb +7 -2
- data/app/lib/actions/pulp3/repository/refresh_distribution.rb +1 -2
- data/app/lib/actions/pulp3/repository/save_distribution_references.rb +2 -2
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +1 -1
- data/app/lib/katello/concerns/renderer_extensions.rb +1 -1
- data/app/lib/katello/event_daemon/runner.rb +12 -9
- data/app/lib/katello/resources/candlepin/consumer.rb +6 -6
- data/app/lib/katello/resources/candlepin/owner.rb +1 -1
- data/app/lib/katello/resources/candlepin/upstream_consumer.rb +3 -4
- data/app/lib/katello/resources/candlepin.rb +4 -4
- data/app/lib/katello/util/errata.rb +12 -10
- data/app/lib/katello/util/search.rb +0 -1
- data/app/lib/katello/validators/content_view_environment_org_validator.rb +5 -2
- data/app/lib/katello/validators/content_view_environment_validator.rb +1 -2
- data/app/lib/katello/validators/generated_content_view_validator.rb +16 -0
- data/app/mailers/katello/errata_mailer.rb +4 -2
- data/app/models/katello/alternate_content_source.rb +5 -1
- data/app/models/katello/concerns/content_facet_host_extensions.rb +25 -14
- data/app/models/katello/concerns/host_managed_extensions.rb +17 -8
- data/app/models/katello/concerns/redhat_extensions.rb +16 -6
- data/app/models/katello/concerns/smart_proxy_extensions.rb +0 -12
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +1 -0
- data/app/models/katello/content_view.rb +22 -5
- data/app/models/katello/content_view_environment.rb +11 -2
- data/app/models/katello/content_view_environment_content_facet.rb +9 -0
- data/app/models/katello/content_view_version.rb +10 -5
- data/app/models/katello/erratum.rb +6 -1
- data/app/models/katello/glue/candlepin/pool.rb +6 -0
- data/app/models/katello/glue/candlepin/product.rb +7 -1
- data/app/models/katello/glue/candlepin/subscription.rb +5 -0
- data/app/models/katello/glue/provider.rb +26 -26
- data/app/models/katello/host/content_facet.rb +106 -18
- data/app/models/katello/host/info_provider.rb +25 -21
- data/app/models/katello/host/subscription_facet.rb +18 -14
- data/app/models/katello/kt_environment.rb +12 -7
- data/app/models/katello/package_group.rb +0 -12
- data/app/models/katello/pool.rb +4 -1
- data/app/models/katello/product.rb +11 -1
- data/app/models/katello/product_content.rb +0 -4
- data/app/models/katello/repository.rb +11 -11
- data/app/models/katello/root_repository.rb +4 -3
- data/app/models/katello/task_status.rb +0 -18
- data/app/services/katello/candlepin/consumer.rb +2 -2
- data/app/services/katello/host/package_profile_uploader.rb +1 -1
- data/app/services/katello/product_content_finder.rb +11 -12
- data/app/services/katello/pulp3/content_view_version/export.rb +8 -65
- data/app/services/katello/pulp3/content_view_version/export_validation_error.rb +7 -0
- data/app/services/katello/pulp3/content_view_version/export_validator.rb +105 -0
- data/app/services/katello/pulp3/content_view_version/importable_products.rb +1 -1
- data/app/services/katello/pulp3/content_view_version/syncable_format_export.rb +7 -1
- data/app/services/katello/pulp3/erratum.rb +1 -0
- data/app/services/katello/pulp3/module_stream.rb +26 -11
- data/app/services/katello/pulp3/repository/yum.rb +2 -1
- data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +2 -1
- data/app/services/katello/registration_manager.rb +46 -26
- data/app/services/katello/repository_type.rb +3 -9
- data/app/services/katello/simple_package.rb +22 -0
- data/app/views/foreman/smart_proxies/_content_sync.html.erb +1 -0
- data/app/views/foreman/smart_proxies/_reclaim_space.html.erb +1 -0
- data/app/views/katello/api/v2/content_facet/base.json.rabl +23 -2
- data/app/views/katello/api/v2/content_facet/show.json.rabl +11 -8
- data/app/views/katello/api/v2/content_views/base.json.rabl +1 -1
- data/app/views/katello/api/v2/hosts/base.json.rabl +22 -2
- data/app/views/overrides/activation_keys/_host_environment_select.html.erb +2 -2
- data/config/initializers/monkeys.rb +0 -2
- data/config/routes/api/registry.rb +8 -7
- data/config/routes/api/v2.rb +0 -2
- data/config/routes.rb +3 -0
- data/db/migrate/20200429153103_installed_package_bad_nvrea.rb +1 -1
- data/db/migrate/20220110223754_update_disconnected_settings.rb +4 -8
- data/db/migrate/20220228173251_remove_drpm_from_ignorable_content.rb +7 -3
- data/db/migrate/20220419193414_content_settings_to_dsl_category.rb +1 -1
- data/db/migrate/20220929204746_add_content_view_environment_content_facet.rb +52 -0
- data/db/migrate/20221123212341_remove_pulp_docker_registry_port_setting.rb +5 -0
- data/db/migrate/20230119003859_ensure_repo_username_password_nil_not_blank.rb +1 -1
- data/db/seeds.d/111-upgrade_tasks.rb +2 -1
- data/engines/bastion/app/assets/stylesheets/bastion/bastion.scss +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +11 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-hosts-list.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +8 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +5485 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +5397 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +5658 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +5284 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ka.po +5231 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +5275 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +5389 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +5212 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +5145 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +2 -2
- data/lib/katello/engine.rb +2 -1
- data/lib/katello/permission_creator.rb +2 -4
- data/lib/katello/permissions/registry_permissions.rb +5 -5
- data/lib/katello/plugin.rb +22 -14
- data/lib/katello/repository_types/README.md +136 -19
- data/lib/katello/repository_types/deb.rb +0 -1
- data/lib/katello/repository_types/docker.rb +0 -1
- data/lib/katello/repository_types/file.rb +0 -1
- data/lib/katello/repository_types/yum.rb +0 -4
- data/lib/katello/tasks/clean_candlepin_orphaned_products.rake +38 -0
- data/lib/katello/tasks/clean_orphaned_facets.rb +20 -0
- data/lib/katello/tasks/reimport.rake +1 -2
- data/lib/katello/tasks/repository.rake +1 -22
- data/lib/katello/tasks/reset.rake +1 -0
- data/lib/katello/tasks/upgrades/4.8/fix_incorrect_providers.rake +29 -0
- data/lib/katello/version.rb +1 -1
- data/lib/katello.rb +0 -5
- data/locale/bn/katello.po +69 -27
- data/locale/cs/katello.po +69 -27
- data/locale/de/katello.po +78 -36
- data/locale/en/katello.po +69 -27
- data/locale/es/katello.po +70 -28
- data/locale/fr/katello.po +73 -31
- data/locale/gu/katello.po +69 -27
- data/locale/hi/katello.po +69 -27
- data/locale/it/katello.po +69 -27
- data/locale/ja/katello.po +73 -31
- data/locale/ka/katello.po +73 -31
- data/locale/katello.pot +335 -262
- data/locale/kn/katello.po +69 -27
- data/locale/ko/katello.po +69 -27
- data/locale/mr/katello.po +69 -27
- data/locale/or/katello.po +69 -27
- data/locale/pa/katello.po +69 -27
- data/locale/pt/katello.po +69 -27
- data/locale/pt_BR/katello.po +70 -28
- data/locale/ru/katello.po +70 -28
- data/locale/ta/katello.po +69 -27
- data/locale/te/katello.po +69 -27
- data/locale/zh_CN/katello.po +73 -31
- data/locale/zh_TW/katello.po +70 -28
- data/webpack/components/Content/ContentPage.js +51 -35
- data/webpack/components/Content/__tests__/ContentPage.test.js +2 -4
- data/webpack/components/Content/__tests__/__snapshots__/ContentPage.test.js.snap +22 -3
- data/webpack/components/Table/EmptyStateMessage.js +14 -11
- data/webpack/components/Table/MainTable.js +36 -15
- data/webpack/components/Table/TableWrapper.js +25 -25
- data/webpack/components/Table/__test__/emptyStateMessage.test.js +51 -0
- data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.js +5 -4
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +1 -1
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsModal.test.js +1 -17
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +18 -9
- data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +1 -2
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +1 -2
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +1 -2
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +47 -27
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js +1 -2
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +2 -21
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/moduleStreamsTab.test.js +1 -28
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packageInstallModal.test.js +1 -10
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +1 -18
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySetsTab.test.js +1 -17
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +1 -15
- data/webpack/global_test_setup.js +1 -1
- data/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js +12 -10
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js +6 -0
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSSmartProxies.js +1 -0
- data/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js +3 -10
- data/webpack/scenes/AlternateContentSources/Create/Steps/NameACS.js +1 -0
- data/webpack/scenes/AlternateContentSources/Create/__tests__/acsCreate.test.js +3 -3
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditDetails.js +1 -0
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +12 -4
- data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +7 -4
- data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsTable.test.js +4 -8
- data/webpack/scenes/AlternateContentSources/helpers.js +1 -1
- data/webpack/scenes/Content/Details/ContentRepositories.js +5 -4
- data/webpack/scenes/Content/Details/__tests__/contentDetail.test.js +1 -12
- data/webpack/scenes/Content/Table/ContentTable.js +2 -1
- data/webpack/scenes/Content/__tests__/contentTable.test.js +1 -14
- data/webpack/scenes/ContentViews/Delete/__tests__/contentViewDelete.test.js +1 -25
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +2 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +44 -31
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +2 -0
- data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositoryTable.js +6 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +2 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVDebFilterContent.js +2 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +3 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +3 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +3 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +2 -1
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +2 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +2 -1
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVDebMatchContentModal.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVRpmMatchContentModal.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentModal.test.js +35 -33
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js +48 -45
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +58 -24
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/ContentViewPackageGroupFilter.test.js +64 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +36 -20
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js +40 -23
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js +0 -13
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvModuleStreamFilter.test.js +0 -13
- data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +2 -1
- data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +1 -10
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +2 -1
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +1 -10
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +21 -9
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareTable.js +4 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js +1 -32
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +3 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvVersionRemove.test.js +1 -15
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +1 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +31 -9
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsTable.js +4 -0
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js +30 -14
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +1 -1
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +55 -120
- data/webpack/scenes/ContentViews/components/WizardHeader.js +1 -1
- data/webpack/scenes/ContentViews/expansions/RelatedContentViewComponentsModal.js +1 -1
- data/webpack/scenes/ContentViews/expansions/__tests__/contentViewComponentsModal.test.js +8 -1
- data/webpack/scenes/ModuleStreams/ModuleStreamsPage.js +3 -9
- data/webpack/scenes/ModuleStreams/__tests__/__snapshots__/ModuleStreamPage.test.js.snap +7 -1
- data/webpack/scenes/RedHatRepositories/components/Search.js +22 -16
- data/webpack/scenes/RedHatRepositories/index.scss +20 -1
- data/webpack/scenes/SmartProxy/SmartProxyContentTable.js +12 -1
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnTypeForm.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CustomCdnTypeForm.js +1 -1
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +21 -19
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +34 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +20 -7
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.test.js +0 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/__snapshots__/SubscriptionsToolbar.test.js.snap +65 -15
- metadata +49 -146
- data/app/lib/actions/katello/organization/simple_content_access/prepare_content_overrides.rb +0 -36
- data/app/lib/actions/katello/pulp_selector.rb +0 -24
- data/app/lib/actions/katello/repository/correct_checksum.rb +0 -24
- data/app/lib/actions/katello/repository/destroy_package_group.rb +0 -26
- data/app/lib/actions/katello/repository/upload_package_group.rb +0 -24
- data/app/lib/actions/pulp/abstract.rb +0 -37
- data/app/lib/actions/pulp/abstract_async_task.rb +0 -154
- data/app/lib/actions/pulp/abstract_async_task_group.rb +0 -94
- data/app/lib/actions/pulp/consumer/sync_capsule.rb +0 -45
- data/app/lib/actions/pulp/consumer/unassociate_units.rb +0 -20
- data/app/lib/actions/pulp/expect_one_task.rb +0 -11
- data/app/lib/actions/pulp/orchestration/orphan_cleanup/remove_orphans.rb +0 -16
- data/app/lib/actions/pulp/orchestration/repository/copy_all_units.rb +0 -19
- data/app/lib/actions/pulp/orchestration/repository/delete.rb +0 -15
- data/app/lib/actions/pulp/orchestration/repository/refresh.rb +0 -14
- data/app/lib/actions/pulp/orchestration/repository/refresh_if_needed.rb +0 -13
- data/app/lib/actions/pulp/orchestration/repository/refresh_repos.rb +0 -19
- data/app/lib/actions/pulp/orchestration/repository/remove_units.rb +0 -14
- data/app/lib/actions/pulp/orchestration/repository/smart_proxy_sync.rb +0 -34
- data/app/lib/actions/pulp/orchestration/repository/sync.rb +0 -18
- data/app/lib/actions/pulp/orchestration/repository/upload_content.rb +0 -37
- data/app/lib/actions/pulp/orphan_cleanup/remove_orphans.rb +0 -15
- data/app/lib/actions/pulp/orphan_cleanup/remove_unneeded_repos.rb +0 -16
- data/app/lib/actions/pulp/repository/abstract_copy_content.rb +0 -45
- data/app/lib/actions/pulp/repository/abstract_remove_content.rb +0 -32
- data/app/lib/actions/pulp/repository/clear.rb +0 -18
- data/app/lib/actions/pulp/repository/copy_all_units.rb +0 -30
- data/app/lib/actions/pulp/repository/copy_units.rb +0 -25
- data/app/lib/actions/pulp/repository/create.rb +0 -28
- data/app/lib/actions/pulp/repository/create_in_plan.rb +0 -15
- data/app/lib/actions/pulp/repository/create_upload_request.rb +0 -20
- data/app/lib/actions/pulp/repository/delete_upload_request.rb +0 -19
- data/app/lib/actions/pulp/repository/destroy.rb +0 -28
- data/app/lib/actions/pulp/repository/distributor_publish.rb +0 -25
- data/app/lib/actions/pulp/repository/download.rb +0 -16
- data/app/lib/actions/pulp/repository/import_upload.rb +0 -19
- data/app/lib/actions/pulp/repository/presenters/abstract_sync_presenter.rb +0 -47
- data/app/lib/actions/pulp/repository/presenters/deb_presenter.rb +0 -95
- data/app/lib/actions/pulp/repository/presenters/docker_presenter.rb +0 -103
- data/app/lib/actions/pulp/repository/presenters/file_unit_presenter.rb +0 -42
- data/app/lib/actions/pulp/repository/presenters/yum_presenter.rb +0 -131
- data/app/lib/actions/pulp/repository/refresh.rb +0 -21
- data/app/lib/actions/pulp/repository/regenerate_applicability.rb +0 -21
- data/app/lib/actions/pulp/repository/remove_distribution.rb +0 -11
- data/app/lib/actions/pulp/repository/remove_units.rb +0 -44
- data/app/lib/actions/pulp/repository/sync.rb +0 -99
- data/app/lib/actions/pulp/repository/upload_file.rb +0 -28
- data/app/lib/actions/pulp/repository_group/create.rb +0 -31
- data/app/lib/actions/pulp/repository_group/delete.rb +0 -17
- data/app/lib/actions/pulp/repository_group/export.rb +0 -51
- data/app/lib/katello/util/content_overrides_migrator.rb +0 -98
- data/app/lib/katello/util/package_clause_generator.rb +0 -77
- data/app/models/katello/glue/pulp/pulp_errors.rb +0 -9
- data/app/models/katello/glue/pulp/repo.rb +0 -353
- data/app/models/katello/pulp_sync_status.rb +0 -165
- data/app/models/katello/pulp_task_status.rb +0 -63
- data/app/services/katello/pulp/content.rb +0 -24
- data/app/services/katello/pulp/importer_comparison.rb +0 -28
- data/app/services/katello/pulp/repository/deb.rb +0 -61
- data/app/services/katello/pulp/repository/docker.rb +0 -82
- data/app/services/katello/pulp/repository/file.rb +0 -52
- data/app/services/katello/pulp/repository/yum.rb +0 -205
- data/app/services/katello/pulp/repository.rb +0 -327
- data/app/services/katello/pulp/server.rb +0 -35
- data/app/services/katello/pulp/simple_package.rb +0 -24
- data/app/services/katello/pulp/smart_proxy_repository.rb +0 -52
- data/lib/monkeys/fix_deb_optimized_sync.rb +0 -35
- data/lib/monkeys/fix_pulp_container_path.rb +0 -35
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/zanata.xml +0 -30
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- 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,
|
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 =
|
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,
|
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
|
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,
|
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
|
-
|
155
|
-
|
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
|
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,
|
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,
|
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
|
-
|
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,
|
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(
|
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,
|
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.
|
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
|
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
|
-
|
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, :
|
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
|
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
|
-
|
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 :
|
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
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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.
|
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.
|
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&.
|
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
|
-
|
7
|
-
|
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.
|
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.
|
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},
|
@@ -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
|
-
|
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
|
data/config/routes/api/v2.rb
CHANGED
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::
|
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,23 +1,19 @@
|
|
1
1
|
class UpdateDisconnectedSettings < ActiveRecord::Migration[6.0]
|
2
|
-
class FakeSetting < Katello::Model
|
3
|
-
self.table_name = 'settings'
|
4
|
-
end
|
5
|
-
|
6
2
|
def up
|
7
|
-
setting_disconnected =
|
3
|
+
setting_disconnected = Setting.find_by(name: 'content_disconnected')
|
8
4
|
setting = Setting.find_by(name: 'subscription_connection_enabled')
|
9
5
|
|
10
6
|
setting&.update!(
|
11
7
|
value: !setting_disconnected&.value
|
12
8
|
)
|
13
|
-
|
9
|
+
Setting.where(:name => 'content_disconnected').delete_all
|
14
10
|
end
|
15
11
|
|
16
12
|
def down
|
17
13
|
remove_column :katello_cdn_configurations, :airgapped
|
18
14
|
setting_disconnected = Setting.find_by(name: 'subscription_connection_enabled')
|
19
|
-
|
20
|
-
|
15
|
+
Setting.set('content_disconnected', N_("A server operating in disconnected mode does not communicate with the Red Hat CDN."),
|
16
|
+
!setting_disconnected.value, N_('Disconnected mode'))
|
21
17
|
|
22
18
|
Setting.where(:name => 'subscription_connection_enabled').delete_all
|
23
19
|
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&.
|
4
|
-
|
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
|
-
|
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
|
@@ -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.
|
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
|
@@ -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',
|
22
|
-
function ($scope, $state, $q, translate, ActivationKey, Organization, CurrentOrganization, Notification, ApiErrorHandler, simpleContentAccessEnabled
|
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';
|