katello 4.6.2.1 → 4.7.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/assets/javascripts/katello/common/vendor.js +0 -1
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +1 -0
- data/app/controllers/katello/api/v2/alternate_content_sources_controller.rb +4 -4
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +5 -0
- data/app/controllers/katello/api/v2/content_imports_controller.rb +1 -0
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +2 -1
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/organizations_controller.rb +1 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +78 -12
- data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +7 -1
- data/app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb +1 -0
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +11 -9
- data/app/helpers/katello/content_source_helper.rb +9 -0
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +31 -0
- data/app/lib/actions/katello/activation_key/destroy.rb +1 -0
- data/app/lib/actions/katello/agent_action.rb +1 -0
- data/app/lib/actions/katello/alternate_content_source/create.rb +1 -1
- data/app/lib/actions/katello/alternate_content_source/update.rb +2 -2
- data/app/lib/actions/katello/capsule_content/sync.rb +10 -2
- data/app/lib/actions/katello/cdn_configuration/update.rb +1 -1
- data/app/lib/actions/katello/content_view/promote.rb +1 -0
- data/app/lib/actions/katello/content_view/publish.rb +5 -2
- data/app/lib/actions/katello/content_view_version/auto_create_redhat_repositories.rb +7 -3
- data/app/lib/actions/katello/content_view_version/auto_create_repositories.rb +4 -2
- data/app/lib/actions/katello/content_view_version/import.rb +22 -10
- data/app/lib/actions/katello/product/destroy.rb +1 -1
- data/app/lib/actions/katello/repository/destroy.rb +3 -3
- data/app/lib/actions/katello/repository/errata_mail.rb +9 -6
- data/app/lib/actions/katello/repository/refresh_repository.rb +1 -1
- data/app/lib/actions/katello/repository/sync.rb +13 -6
- data/app/lib/actions/katello/repository_set/enable_repository.rb +6 -2
- data/app/lib/actions/pulp3/alternate_content_source/refresh_remote.rb +16 -0
- data/app/lib/actions/pulp3/orchestration/alternate_content_source/refresh.rb +1 -0
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_repository.rb +10 -2
- data/app/lib/katello/concerns/renderer_extensions.rb +2 -1
- data/app/lib/katello/errors.rb +2 -2
- data/app/lib/katello/resources/candlepin.rb +7 -1
- data/app/lib/katello/resources/cdn/katello_cdn.rb +3 -13
- data/app/lib/katello/resources/cdn.rb +14 -9
- data/app/lib/katello/util/candlepin_repository_checker.rb +73 -0
- data/app/models/katello/activation_key.rb +12 -1
- data/app/models/katello/alternate_content_source.rb +15 -4
- data/app/models/katello/alternate_content_source_product.rb +1 -1
- data/app/models/katello/authorization/repository.rb +2 -2
- data/app/models/katello/cdn_configuration.rb +12 -3
- data/app/models/katello/concerns/host_managed_extensions.rb +15 -2
- data/app/models/katello/concerns/http_proxy_extensions.rb +5 -10
- data/app/models/katello/concerns/smart_proxy_extensions.rb +30 -15
- data/app/models/katello/content.rb +15 -0
- data/app/models/katello/content_credential.rb +8 -9
- data/app/models/katello/content_view.rb +7 -3
- data/app/models/katello/content_view_component.rb +4 -0
- data/app/models/katello/content_view_version.rb +1 -1
- data/app/models/katello/erratum.rb +6 -2
- data/app/models/katello/host/content_facet.rb +13 -3
- data/app/models/katello/repository.rb +15 -1
- data/app/models/katello/root_repository.rb +0 -2
- data/app/overrides/add_smart_proxy_form.rb +5 -0
- data/app/presenters/katello/content_view_version_compare_presenter.rb +5 -0
- data/app/presenters/katello/host_package_presenter.rb +4 -4
- data/app/services/katello/pulp3/alternate_content_source.rb +23 -15
- data/app/services/katello/pulp3/ansible_collection.rb +7 -10
- data/app/services/katello/pulp3/content_view_version/export.rb +19 -6
- data/app/services/katello/pulp3/content_view_version/import.rb +2 -0
- data/app/services/katello/pulp3/content_view_version/import_validator.rb +21 -5
- data/app/services/katello/pulp3/content_view_version/importable_products.rb +11 -1
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +38 -9
- data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +12 -5
- data/app/services/katello/pulp3/content_view_version/metadata_map.rb +13 -2
- data/app/services/katello/pulp3/content_view_version/syncable_format_export.rb +5 -1
- data/app/services/katello/pulp3/pulp_content_unit.rb +3 -0
- data/app/services/katello/pulp3/repository.rb +18 -6
- data/app/services/katello/pulp3/repository_mirror.rb +0 -1
- data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +2 -2
- data/app/services/katello/pulp3/task_group.rb +18 -1
- data/app/services/katello/repository_type.rb +5 -2
- data/app/services/katello/repository_type_manager.rb +4 -3
- data/app/views/dashboard/_content_views_widget.html.erb +1 -1
- data/app/views/foreman/job_templates/change_content_source.erb +6 -0
- data/app/views/foreman/job_templates/update_packages_by_search_query.erb +7 -1
- data/app/views/katello/api/v2/alternate_content_sources/base.json.rabl +4 -4
- data/app/views/katello/api/v2/alternate_content_sources/index.json.rabl +1 -0
- data/app/views/katello/api/v2/alternate_content_sources/permissions.rabl +11 -0
- data/app/views/katello/api/v2/content_credentials/show.json.rabl +12 -0
- data/app/views/katello/api/v2/content_views/permissions.rabl +1 -0
- data/app/views/katello/api/v2/host_packages/base.json.rabl +1 -1
- data/app/views/katello/api/v2/module_streams/show.json.rabl +7 -0
- data/app/views/katello/api/v2/repositories/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/smart_proxies/pulp_info.json.rabl +1 -0
- data/app/views/katello/hosts/_errata_counts.html.erb +46 -0
- data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +1 -0
- data/app/views/overrides/smart_proxies/_acs_http_proxy.html.erb +6 -0
- data/config/initializers/monkeys.rb +1 -0
- data/config/routes/api/v2.rb +2 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20220730033504_update_custom_cdn.rb +13 -0
- data/db/migrate/20220920173656_add_http_proxy_to_smart_proxy.rb +7 -0
- data/db/migrate/20220920180858_remove_http_proxy_from_katello_alternate_content_sources.rb +6 -0
- data/engines/bastion/app/assets/javascripts/bastion/components/notification.service.js +1 -1
- data/engines/bastion/app/views/bastion/layouts/assets.html.erb +5 -5
- data/engines/bastion/vendor/assets/javascripts/bastion/angular/angular.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/content-credential.factory.js +17 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/content-credentials.routes.js +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-acs.controller.js +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-details.controller.js +7 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/views/content-credential-acs.html +38 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/views/content-credential-details.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/views/content-credentials.html +7 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +4 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +14 -1392
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/katello-features.run.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +7 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +1 -1
- data/lib/katello/permission_creator.rb +1 -0
- data/lib/katello/plugin.rb +34 -11
- data/lib/katello/repository_types/deb.rb +1 -1
- data/lib/katello/repository_types/docker.rb +1 -1
- data/lib/katello/repository_types/python.rb +3 -3
- data/lib/katello/tasks/check_candlepin_content.rake +16 -0
- data/lib/katello/tasks/reset.rake +1 -1
- data/lib/katello/version.rb +1 -1
- data/lib/monkeys/try_pulp_container_path.rb +35 -0
- data/locale/action_names.rb +7 -7
- data/locale/bn/katello.po +395 -63
- data/locale/cs/katello.po +396 -64
- data/locale/de/katello.po +399 -67
- data/locale/en/katello.po +395 -63
- data/locale/es/katello.po +399 -67
- data/locale/fr/katello.po +400 -68
- data/locale/gu/katello.po +395 -63
- data/locale/hi/katello.po +395 -63
- data/locale/it/katello.po +396 -64
- data/locale/ja/katello.po +400 -68
- data/locale/katello.pot +1916 -1213
- data/locale/kn/katello.po +395 -63
- data/locale/ko/katello.po +396 -64
- data/locale/mr/katello.po +395 -63
- data/locale/or/katello.po +395 -63
- data/locale/pa/katello.po +395 -63
- data/locale/pt/katello.po +395 -63
- data/locale/pt_BR/katello.po +399 -67
- data/locale/ru/katello.po +396 -64
- data/locale/ta/katello.po +395 -63
- data/locale/te/katello.po +395 -63
- data/locale/zh_CN/katello.po +400 -68
- data/locale/zh_TW/katello.po +396 -64
- data/webpack/components/Bookmark/index.js +5 -1
- data/webpack/components/Content/Details/ContentDetails.js +1 -1
- data/webpack/components/Content/Details/__tests__/__snapshots__/ContentDetails.test.js.snap +6 -0
- data/webpack/components/EditableSwitch.js +1 -0
- data/webpack/components/EditableTextInput/EditableTextInput.js +3 -3
- data/webpack/components/Errata/errataHelpers.js +33 -0
- data/webpack/components/Errata/index.js +45 -12
- data/webpack/components/Loading.js +18 -8
- data/webpack/components/Packages/index.js +8 -24
- data/webpack/components/RoutedTabs/index.js +1 -0
- data/webpack/components/Search/Search.js +20 -2
- data/webpack/components/Search/__tests__/search.test.js +3 -3
- data/webpack/components/Table/EmptyStateMessage.js +1 -1
- data/webpack/components/Table/PageControls.js +1 -0
- data/webpack/components/Table/TableHooks.js +4 -0
- data/webpack/components/Table/TableWrapper.js +7 -7
- data/webpack/components/TypeAhead/pf4Search/TypeAheadInput.js +1 -0
- data/webpack/components/TypeAhead/pf4Search/TypeAheadItems.js +2 -0
- data/webpack/components/TypeAhead/pf4Search/TypeAheadSearch.js +1 -1
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.js +3 -1
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +2 -1
- data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.js +124 -68
- data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.scss +5 -0
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsCard.js +30 -4
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsCard.scss +23 -0
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +5 -4
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsCard.test.js +25 -10
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeCard.js +3 -3
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeEditModal.js +6 -0
- data/webpack/components/extensions/HostDetails/Cards/__tests__/errataOverviewCard.test.js +145 -32
- data/webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js +3 -1
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/constants.js +2 -1
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/index.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +78 -26
- data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +23 -10
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/HostPackagesConstants.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +9 -4
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +141 -23
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.scss +6 -1
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +9 -8
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +24 -3
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab/EnableTracerModal.js +7 -2
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesEnabler.js +2 -1
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js +20 -4
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +56 -38
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packages.fixtures.json +3 -3
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +5 -4
- data/webpack/components/extensions/HostDetails/Tabs/customizedRexUrlHelpers.js +3 -3
- data/webpack/containers/Application/config.js +2 -2
- data/webpack/containers/Application/overrides.scss +12 -0
- data/webpack/global_test_setup.js +19 -1
- data/webpack/ouia_id_check.js +0 -2
- data/webpack/redux/actions/RedHatRepositories/helpers.js +4 -8
- data/webpack/scenes/AlternateContentSources/ACSActions.js +37 -6
- data/webpack/scenes/AlternateContentSources/ACSConstants.js +2 -0
- data/webpack/scenes/AlternateContentSources/ACSIndexPage.js +1 -1
- data/webpack/scenes/AlternateContentSources/ACSSelectors.js +6 -6
- data/webpack/scenes/AlternateContentSources/Acs.scss +3 -0
- data/webpack/scenes/AlternateContentSources/Create/ACSCreateWizard.js +24 -3
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCreateFinish.js +10 -8
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js +25 -4
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSReview.js +22 -11
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSSmartProxies.js +27 -2
- data/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js +49 -17
- data/webpack/scenes/AlternateContentSources/Create/Steps/SelectSource.js +76 -23
- data/webpack/scenes/AlternateContentSources/Create/__tests__/acsCreate.test.js +159 -11
- data/webpack/scenes/AlternateContentSources/Details/ACSExpandableDetails.js +83 -29
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditCredentials.js +9 -8
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditDetails.js +2 -2
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditProducts.js +2 -2
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditSmartProxies.js +39 -7
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +27 -11
- data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSEdits.test.js +58 -55
- data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSExpandableDetails.test.js +35 -32
- data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +323 -150
- data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsIndex.fixtures.json +5 -1
- data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsTable.test.js +10 -11
- data/webpack/scenes/AlternateContentSources/helpers.js +26 -0
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +1 -0
- data/webpack/scenes/ContentViews/ContentViewsPage.js +1 -1
- data/webpack/scenes/ContentViews/Copy/CopyContentViewForm.js +1 -0
- data/webpack/scenes/ContentViews/Copy/CopyContentViewModal.js +1 -0
- data/webpack/scenes/ContentViews/Create/ContentViewFormComponents.js +10 -5
- data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +30 -7
- data/webpack/scenes/ContentViews/Create/CreateContentViewModal.js +1 -0
- data/webpack/scenes/ContentViews/Create/__tests__/createContentView.test.js +21 -6
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeleteEnvironmentsSelection.js +3 -3
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignActivationKeysForm.js +1 -0
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignHostsForm.js +1 -0
- data/webpack/scenes/ContentViews/Delete/__tests__/CvData.fixtures.json +2 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +3 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewBulkAddModal.js +4 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentVersion.js +1 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +2 -1
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +14 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +11 -1
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +1 -1
- data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +2 -0
- data/webpack/scenes/ContentViews/Details/Filters/Add/CVFilterAddModal.js +5 -0
- data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositorySelection.js +1 -0
- data/webpack/scenes/ContentViews/Details/Filters/ArtifactsWithNoErrata.js +1 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +8 -2
- data/webpack/scenes/ContentViews/Details/Filters/CVDebFilterContent.js +5 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +22 -6
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +19 -9
- data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +9 -2
- data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +9 -2
- data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +8 -2
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +2 -1
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVRpmMatchContentModal.js +3 -2
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/__tests__/CVRpmMatchContentModal.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js +2 -2
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +2 -2
- data/webpack/scenes/ContentViews/Details/Promote/ContentViewVersionPromote.js +2 -0
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +2 -1
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ReviewEnvironments.js +3 -3
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompare.js +9 -1
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +83 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareTable.js +32 -8
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/CVVersionCompare.test.js +56 -3
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/cvCompareRepositories.fixtures.json +175 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +6 -2
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVEnvironmentSelectionForm.js +3 -3
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignActivationKeysForm.js +1 -0
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignHostsForm.js +1 -0
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +2 -2
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +2 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +2 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetails.js +1 -0
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsHeader.js +4 -1
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsTable.js +5 -4
- data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +5 -1
- data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +3 -3
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +10 -5
- data/webpack/scenes/ContentViews/__tests__/basicContentViews.fixtures.js +2 -0
- data/webpack/scenes/ContentViews/__tests__/contentViewList.fixtures.json +1 -0
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +81 -19
- data/webpack/scenes/ContentViews/components/CVBreadCrumb.js +1 -1
- data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +1 -0
- data/webpack/scenes/ContentViews/components/InactiveText.js +9 -1
- data/webpack/scenes/ContentViews/expansions/RelatedCompositeContentViewsModal.js +4 -2
- data/webpack/scenes/ContentViews/expansions/RelatedContentViewComponentsModal.js +3 -2
- data/webpack/scenes/Hosts/ChangeContentSource/actions.js +18 -11
- data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +15 -8
- data/webpack/scenes/Hosts/ChangeContentSource/components/FormField.js +3 -4
- data/webpack/scenes/Hosts/ChangeContentSource/components/Hosts.js +55 -0
- data/webpack/scenes/Hosts/ChangeContentSource/components/HostsModal.js +59 -0
- data/webpack/scenes/Hosts/ChangeContentSource/constants.js +1 -0
- data/webpack/scenes/Hosts/ChangeContentSource/helpers.js +2 -5
- data/webpack/scenes/Hosts/ChangeContentSource/index.js +46 -41
- data/webpack/scenes/Hosts/ChangeContentSource/selectors.js +5 -5
- data/webpack/scenes/ModuleStreams/Details/ModuleDetailsSchema.js +10 -1
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetails.js +1 -1
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetails.test.js.snap +97 -2
- data/webpack/scenes/Organizations/OrganizationSelectors.js +1 -0
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnConfigurationConstants.js +2 -1
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnTypeForm.js +10 -25
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CustomCdnTypeForm.js +154 -0
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/ExportSyncForm.js +4 -4
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/NetworkSyncForm.js +59 -44
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/CdnTypeForm.test.js +3 -28
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/CustomCdnTypeForm.test.js +97 -0
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/ExportSyncForm.test.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/NetworkSyncForm.test.js +4 -4
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/index.js +23 -10
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +1 -1
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +2 -1
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +5 -5
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +3 -3
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +2 -2
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +3 -3
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +3 -3
- data/webpack/scenes/Tasks/helpers.js +14 -7
- metadata +54 -35
- data/app/lib/actions/pulp3/orchestration/alternate_content_source/refresh_remote.rb +0 -18
- data/db/migrate/20221206170122_update_ignore_srpm_to_false_for_mirror_complete.rb +0 -5
- data/vendor/assets/javascripts/katello/jquery.trunk8.js +0 -203
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 366dabf3ddc6fab48cf353603f9ac49fb9ed3c87ac47e965eba48a63b4ce4847
|
4
|
+
data.tar.gz: a8307026cb41c314df92d6a89590ee38ba7547e215bbed82dd454e5fc135c68f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b167060d9d9795261b6262d47fbcca7fae09a587b170e173a7cbb9ceb382371c1b8414ef7b361ab51e96088d1485f2be2d35758f34cb8574257f81951d082a5
|
7
|
+
data.tar.gz: 06b29d35d28b57eb6484a34622b9fec4b4395dcb66f938440051bb9cec8323e1f808e1216e0500183f1f6f7e894abd882a30dcd0468207df7a08126bac3e3281
|
@@ -230,6 +230,7 @@ module Katello
|
|
230
230
|
param :id, String, :desc => N_("ID of the activation key"), :required => true
|
231
231
|
param :content_access_mode_all, :bool, :desc => N_("Get all content available, not just that provided by subscriptions")
|
232
232
|
param :content_access_mode_env, :bool, :desc => N_("Limit content to just that available in the activation key's content view version")
|
233
|
+
param_group :search, Api::V2::ApiController
|
233
234
|
def product_content
|
234
235
|
# note this is just there as a place holder for apipie.
|
235
236
|
# The routing would automatically redirect it to repository_sets#index
|
@@ -21,8 +21,8 @@ module Katello
|
|
21
21
|
param :ssl_ca_cert_id, :number, desc: N_("Identifier of the content credential containing the SSL CA Cert"), required: false
|
22
22
|
param :ssl_client_cert_id, :number, desc: N_("Identifier of the content credential containing the SSL Client Cert"), required: false
|
23
23
|
param :ssl_client_key_id, :number, desc: N_("Identifier of the content credential containing the SSL Client Key"), required: false
|
24
|
-
param :http_proxy_id, :number, desc: N_("ID of a HTTP Proxy"), required: false
|
25
24
|
param :verify_ssl, :bool, desc: N_("If SSL should be verified for the upstream URL"), required: false
|
25
|
+
param :use_http_proxies, :bool, desc: N_("If the smart proxies' assigned HTTP proxies should be used"), required: false
|
26
26
|
param :product_ids, Array, desc: N_("IDs of products to copy repository information from into a Simplified Alternate Content Source. Products must include at least one repository of the chosen content type."), required: false
|
27
27
|
end
|
28
28
|
|
@@ -34,7 +34,7 @@ module Katello
|
|
34
34
|
format.csv do
|
35
35
|
options[:csv] = true
|
36
36
|
alternate_content_sources = scoped_search(index_relation, :name, :asc)
|
37
|
-
if @acs.custom?
|
37
|
+
if @acs.custom? || @acs.rhui?
|
38
38
|
csv_response(alternate_content_sources,
|
39
39
|
[:id, :name, :description, :label, :base_url, :subpaths, :content_type, :alternate_content_source_type],
|
40
40
|
['Id', 'Name', 'Description', 'label', 'Base URL', 'Subpaths', 'Content Type', 'Alternate Content Source Type'])
|
@@ -114,8 +114,8 @@ module Katello
|
|
114
114
|
protected
|
115
115
|
|
116
116
|
def acs_params
|
117
|
-
keys = [:name, :label, :description, {smart_proxy_ids: []}, {smart_proxy_names: []}, :content_type, :alternate_content_source_type]
|
118
|
-
keys += [:base_url, {subpaths: []}, :upstream_username, :upstream_password, :ssl_ca_cert_id, :ssl_client_cert_id, :ssl_client_key_id, :
|
117
|
+
keys = [:name, :label, :description, {smart_proxy_ids: []}, {smart_proxy_names: []}, :content_type, :alternate_content_source_type, :use_http_proxies]
|
118
|
+
keys += [:base_url, {subpaths: []}, :upstream_username, :upstream_password, :ssl_ca_cert_id, :ssl_client_cert_id, :ssl_client_key_id, :verify_ssl] if params[:action] == 'create' || @alternate_content_source&.custom? || @alternate_content_source&.rhui?
|
119
119
|
keys += [{product_ids: []}] if params[:action] == 'create' || @alternate_content_source&.simplified?
|
120
120
|
params.require(:alternate_content_source).permit(*keys).to_h.with_indifferent_access
|
121
121
|
end
|
@@ -7,6 +7,7 @@ module Katello
|
|
7
7
|
before_action :find_capsule, :except => [:sync, :cancel_sync, :add_lifecycle_environment, :remove_lifecycle_environment, :reclaim_space]
|
8
8
|
before_action :find_editable_capsule, :only => [:sync, :cancel_sync, :add_lifecycle_environment, :remove_lifecycle_environment]
|
9
9
|
before_action :find_environment, :only => [:add_lifecycle_environment, :remove_lifecycle_environment]
|
10
|
+
before_action :find_acs_http_proxy, :only => [:add_acs_http_proxy]
|
10
11
|
before_action :find_optional_organization, :only => [:sync_status]
|
11
12
|
|
12
13
|
def_param_group :lifecycle_environments do
|
@@ -123,6 +124,10 @@ module Katello
|
|
123
124
|
@environment = Katello::KTEnvironment.readable.find(params[:environment_id])
|
124
125
|
end
|
125
126
|
|
127
|
+
def find_acs_http_proxy
|
128
|
+
@acs_http_proxy = ::HttpProxy.readable.find(params[:alternate_content_source_http_proxy_id])
|
129
|
+
end
|
130
|
+
|
126
131
|
def find_content_view
|
127
132
|
@content_view = Katello::ContentView.readable.find(params[:content_view_id])
|
128
133
|
end
|
@@ -47,7 +47,7 @@ module Katello
|
|
47
47
|
CAST (#{kcc}.composite_content_view_id as BOOLEAN) ASC, #{kc}.name
|
48
48
|
SQL
|
49
49
|
query = Katello::ContentView.readable.in_organization(@organization)
|
50
|
-
query = query&.non_composite&.non_default
|
50
|
+
query = query&.non_composite&.non_default&.generated_for_none
|
51
51
|
component_cv_ids = Katello::ContentViewComponent.where(composite_content_view_id: @view.id).select(:content_view_id)
|
52
52
|
query = case params[:status]
|
53
53
|
when "Not added"
|
@@ -24,7 +24,7 @@ module Katello
|
|
24
24
|
param :service_level, String, :desc => N_("Service level to be used for autoheal")
|
25
25
|
param :hypervisor_guest_uuids, Array, :desc => N_("List of hypervisor guest uuids")
|
26
26
|
param :installed_products_attributes, Array, :desc => N_("List of products installed on the host") do
|
27
|
-
param_group :installed_products
|
27
|
+
param_group :installed_products, Api::V2::HostSubscriptionsController
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -152,6 +152,7 @@ module Katello
|
|
152
152
|
param :host_id, String, :desc => N_("Id of the host"), :required => true
|
153
153
|
param :content_access_mode_all, :bool, :desc => N_("Get all content available, not just that provided by subscriptions")
|
154
154
|
param :content_access_mode_env, :bool, :desc => N_("Limit content to just that available in the host's content view version")
|
155
|
+
param_group :search, Api::V2::ApiController
|
155
156
|
def product_content
|
156
157
|
# note this is just there as a place holder for apipie.
|
157
158
|
# The routing would automatically redirect it to repository_sets#index
|
@@ -319,7 +319,7 @@ module Katello
|
|
319
319
|
lifecycle_environment = KTEnvironment.readable.find(params[:environment_id])
|
320
320
|
content_view = Katello::ContentView.readable.find(params[:content_view_id])
|
321
321
|
content_source = SmartProxy.authorized(:view_smart_proxies).find(params[:content_source_id])
|
322
|
-
template = prepare_ssl_cert(foreman_server_ca_cert) + configure_subman(content_source)
|
322
|
+
template = prepare_ssl_cert(foreman_server_ca_cert) + configure_subman(content_source) + reconfigure_yggdrasild(hosts.first)
|
323
323
|
|
324
324
|
hosts.each do |host|
|
325
325
|
next unless host.content_facet
|
@@ -29,6 +29,7 @@ module Katello
|
|
29
29
|
param :hostgroup_ids, Array, N_("Host group IDs"), :required => false
|
30
30
|
param :environment_ids, Array, N_("Environment IDs"), :required => false
|
31
31
|
param :subnet_ids, Array, N_("Subnet IDs"), :required => false
|
32
|
+
param :ignore_types, Array, N_("List of resources types that will be automatically associated"), :required => false
|
32
33
|
param :location_ids, Array, N_("Associated location IDs"), :required => false
|
33
34
|
end
|
34
35
|
end
|
@@ -81,7 +81,7 @@ module Katello
|
|
81
81
|
def_param_group :repo_create do
|
82
82
|
param :label, String, :required => false
|
83
83
|
param :product_id, :number, :required => true, :desc => N_("Product the repository belongs to")
|
84
|
-
param :content_type,
|
84
|
+
param :content_type, String, :required => true, :desc => N_("Type of repository. Available types endpoint: /katello/api/repositories/repository_types")
|
85
85
|
end
|
86
86
|
|
87
87
|
api :GET, "/repositories", N_("List of enabled repositories")
|
@@ -102,18 +102,28 @@ module Katello
|
|
102
102
|
param :ansible_collection_id, String, :desc => N_("Id of an ansible collection to find repositories that contain the ansible collection")
|
103
103
|
param :library, :bool, :desc => N_("show repositories in Library and the default content view")
|
104
104
|
param :archived, :bool, :desc => N_("show archived repositories")
|
105
|
-
param :content_type,
|
105
|
+
param :content_type, String, :desc => N_("Limit the repository type. Available types endpoint: /katello/api/repositories/repository_types")
|
106
106
|
param :name, String, :desc => N_("name of the repository"), :required => false
|
107
107
|
param :label, String, :desc => N_("label of the repository"), :required => false
|
108
108
|
param :description, String, :desc => N_("description of the repository")
|
109
109
|
param :available_for, String, :desc => N_("interpret specified object to return only Repositories that can be associated with specified object. Only 'content_view' & 'content_view_version' are supported."),
|
110
110
|
:required => false
|
111
|
-
param :with_content,
|
111
|
+
param :with_content, String, :desc => N_("Filter repositories by content unit type (erratum, docker_tag, etc.). Check the \"Indexed?\" types here: /katello/api/repositories/repository_types")
|
112
112
|
param :download_policy, ::Katello::RootRepository::DOWNLOAD_POLICIES, :desc => N_("limit to only repositories with this download policy")
|
113
113
|
param :username, String, :desc => N_("only show the repositories readable by this user with this username")
|
114
114
|
param_group :search, Api::V2::ApiController
|
115
115
|
add_scoped_search_description_for(Repository)
|
116
116
|
def index
|
117
|
+
unless params[:content_type].empty? || RepositoryTypeManager.find(params[:content_type])
|
118
|
+
msg = _("Invalid params provided - content_type must be one of %s") %
|
119
|
+
RepositoryTypeManager.enabled_repository_types.keys.sort.join(",")
|
120
|
+
fail HttpErrors::UnprocessableEntity, msg
|
121
|
+
end
|
122
|
+
unless params[:with_content].empty? || RepositoryTypeManager.find_content_type(params[:with_content], true)
|
123
|
+
msg = _("Invalid params provided - with_content must be one of %s") %
|
124
|
+
RepositoryTypeManager.indexable_content_types.map(&:label).sort.join(",")
|
125
|
+
fail HttpErrors::UnprocessableEntity, msg
|
126
|
+
end
|
117
127
|
base_args = [index_relation.distinct, :name, :asc]
|
118
128
|
options = {:includes => [:environment, {:root => [:gpg_key, :product]}]}
|
119
129
|
|
@@ -224,6 +234,51 @@ module Katello
|
|
224
234
|
query
|
225
235
|
end
|
226
236
|
|
237
|
+
api :GET, "/repositories/compare/", N_("List :resource")
|
238
|
+
param :content_view_version_ids, Array, :desc => N_("content view versions to compare")
|
239
|
+
param :repository_id, :number, :desc => N_("Library repository id to restrict comparisons to")
|
240
|
+
param :restrict_comparison, String, :desc => N_("Return same, different or all results")
|
241
|
+
|
242
|
+
def compare
|
243
|
+
fail _("No content_view_version_ids provided") if params[:content_view_version_ids].empty?
|
244
|
+
@versions = ContentViewVersion.readable.where(:id => params[:content_view_version_ids])
|
245
|
+
if @versions.count != params[:content_view_version_ids].uniq.length
|
246
|
+
missing = params[:content_view_version_ids] - @versions.pluck(:id)
|
247
|
+
fail HttpErrors::NotFound, _("Couldn't find content view versions '%s'") % missing.join(',')
|
248
|
+
end
|
249
|
+
|
250
|
+
archived_version_repos = Katello::Repository.where(:content_view_version_id => @versions&.pluck(:id))&.archived
|
251
|
+
repos = Katello::Repository.where(id: archived_version_repos&.pluck(:library_instance_id))
|
252
|
+
repos = repos.where(:root_id => @repo.root_id) if @repo
|
253
|
+
repositories = restrict_comparison(repos, @versions, params[:restrict_comparison])
|
254
|
+
collection = scoped_search(repositories.distinct, :name, :asc)
|
255
|
+
collection[:results] = collection[:results].map { |item| ContentViewVersionComparePresenter.new(item, @versions, @repo) }
|
256
|
+
respond_for_index(:collection => collection)
|
257
|
+
end
|
258
|
+
|
259
|
+
def restrict_comparison(collection, content_view_versions = nil, compare = 'all')
|
260
|
+
case compare
|
261
|
+
when 'same'
|
262
|
+
same_repo_ids = compare_same(collection, content_view_versions)
|
263
|
+
collection.where(id: same_repo_ids)
|
264
|
+
when 'different'
|
265
|
+
same_repo_ids = compare_same(collection, content_view_versions)
|
266
|
+
collection.where.not(id: same_repo_ids)
|
267
|
+
else
|
268
|
+
collection
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
def compare_same(collection, content_view_versions = nil)
|
273
|
+
same_repo_ids = []
|
274
|
+
collection.each do |repo|
|
275
|
+
if (content_view_versions&.pluck(:id)&.- repo.published_in_versions&.pluck(:id))&.empty?
|
276
|
+
same_repo_ids << repo.id
|
277
|
+
end
|
278
|
+
end
|
279
|
+
same_repo_ids
|
280
|
+
end
|
281
|
+
|
227
282
|
api :POST, "/repositories", N_("Create a custom repository")
|
228
283
|
param :name, String, :desc => N_("Name of the repository"), :required => true
|
229
284
|
param :description, String, :desc => N_("Description of the repository"), :required => false
|
@@ -233,7 +288,7 @@ module Katello
|
|
233
288
|
repo_params = repository_params
|
234
289
|
unless RepositoryTypeManager.creatable_by_user?(repo_params[:content_type], false)
|
235
290
|
msg = _("Invalid params provided - content_type must be one of %s") %
|
236
|
-
RepositoryTypeManager.creatable_repository_types
|
291
|
+
RepositoryTypeManager.creatable_repository_types.keys.sort.join(",")
|
237
292
|
fail HttpErrors::UnprocessableEntity, msg
|
238
293
|
end
|
239
294
|
|
@@ -374,9 +429,14 @@ module Katello
|
|
374
429
|
desc "Remove content from a repository"
|
375
430
|
param :id, :number, :required => true, :desc => "repository ID"
|
376
431
|
param 'ids', Array, :required => true, :desc => "Array of content ids to remove"
|
377
|
-
param :content_type,
|
432
|
+
param :content_type, String, :required => false, :desc => N_("The type of content to remove (srpm, docker_manifest, etc.). Check removable types here: /katello/api/repositories/repository_types")
|
378
433
|
param 'sync_capsule', :bool, :desc => N_("Whether or not to sync an external capsule after upload. Default: true")
|
379
434
|
def remove_content
|
435
|
+
unless params[:content_type].empty? || RepositoryTypeManager.removable_content_types.map(&:label).include?(params[:content_type])
|
436
|
+
msg = _("Invalid params provided - content_type must be one of %s") %
|
437
|
+
RepositoryTypeManager.removable_content_types.map(&:label).sort.join(",")
|
438
|
+
fail HttpErrors::UnprocessableEntity, msg
|
439
|
+
end
|
380
440
|
sync_capsule = ::Foreman::Cast.to_bool(params.fetch(:sync_capsule, true))
|
381
441
|
fail _("No content ids provided") if @content.blank?
|
382
442
|
respond_for_async :resource => sync_task(::Actions::Katello::Repository::RemoveContent, @repository, @content, content_type: params[:content_type], sync_capsule: sync_capsule)
|
@@ -385,7 +445,7 @@ module Katello
|
|
385
445
|
api :POST, "/repositories/:id/upload_content", N_("Upload content into the repository")
|
386
446
|
param :id, :number, :required => true, :desc => N_("repository ID")
|
387
447
|
param :content, File, :required => true, :desc => N_("Content files to upload. Can be a single file or array of files.")
|
388
|
-
param :content_type,
|
448
|
+
param :content_type, String, :required => false, :desc => N_("The type of content to upload (srpm, file, etc.). Check uploadable types here: /katello/api/repositories/repository_types")
|
389
449
|
def upload_content
|
390
450
|
fail Katello::Errors::InvalidRepositoryContent, _("Cannot upload Container Image content.") if @repository.docker?
|
391
451
|
fail Katello::Errors::InvalidRepositoryContent, _("Cannot upload Ansible collections.") if @repository.ansible_collection?
|
@@ -426,7 +486,7 @@ module Katello
|
|
426
486
|
param 'content_unit_id', String
|
427
487
|
param 'size', String
|
428
488
|
param 'checksum', String
|
429
|
-
param 'name', String, :desc => N_("Needs to only be set for file repositories or docker tags")
|
489
|
+
param 'name', String, :desc => N_("Needs to only be set for file repositories or docker tags"), :required => true
|
430
490
|
param 'digest', String, :desc => N_("Needs to only be set for docker tags")
|
431
491
|
end
|
432
492
|
Katello::RepositoryTypeManager.generic_repository_types.each_pair do |_, repo_type|
|
@@ -447,6 +507,14 @@ module Katello
|
|
447
507
|
upload.permit(:id, :content_unit_id, :size, :checksum, :name, :digest).to_h
|
448
508
|
end
|
449
509
|
|
510
|
+
if @repository.content_type != 'docker' && uploads.first['checksum'].nil?
|
511
|
+
fail HttpErrors::BadRequest, _('Checksum is a required parameter.')
|
512
|
+
end
|
513
|
+
|
514
|
+
if uploads.first['name'].nil?
|
515
|
+
fail HttpErrors::BadRequest, _('Name is a required parameter.')
|
516
|
+
end
|
517
|
+
|
450
518
|
begin
|
451
519
|
upload_args = {
|
452
520
|
content_type: params[:content_type],
|
@@ -598,7 +666,7 @@ module Katello
|
|
598
666
|
|
599
667
|
def handle_mirror_on_sync(repo_params)
|
600
668
|
if !repo_params.key?(:mirroring_policy) && repo_params.key?(:mirror_on_sync)
|
601
|
-
::Foreman::Deprecation.api_deprecation_warning("mirror_on_sync is deprecated in favor of mirroring_policy. It will be removed in Katello 4.
|
669
|
+
::Foreman::Deprecation.api_deprecation_warning("mirror_on_sync is deprecated in favor of mirroring_policy. It will be removed in Katello 4.8.")
|
602
670
|
if ::Foreman::Cast.to_bool(repo_params[:mirror_on_sync])
|
603
671
|
repo_params[:mirroring_policy] = Katello::RootRepository::MIRRORING_POLICY_CONTENT
|
604
672
|
else
|
@@ -664,12 +732,10 @@ module Katello
|
|
664
732
|
end
|
665
733
|
|
666
734
|
def generic_remote_options_hash(repo_params)
|
667
|
-
generic_remote_options = {}
|
668
735
|
content_type = @repository&.content_type || repo_params[:content_type]
|
669
|
-
RepositoryTypeManager.generic_remote_options(content_type: content_type).
|
670
|
-
|
736
|
+
RepositoryTypeManager.generic_remote_options(content_type: content_type).to_h do |option|
|
737
|
+
[option.name, repo_params[option.name].nil? ? option&.default : repo_params[option.name]]
|
671
738
|
end
|
672
|
-
generic_remote_options
|
673
739
|
end
|
674
740
|
|
675
741
|
def generic_content_type_import_upload_args
|
@@ -48,7 +48,7 @@ module Katello
|
|
48
48
|
end
|
49
49
|
|
50
50
|
api :DELETE, "/organizations/:organization_id/upstream_subscriptions",
|
51
|
-
N_("Remove one or more subscriptions from an upstream
|
51
|
+
N_("Remove one or more subscriptions from an upstream manifest")
|
52
52
|
param :organization_id, :number, :desc => N_("Organization ID"), :required => true
|
53
53
|
param :pool_ids, Array, desc: N_("Array of local pool IDs. Only pools originating upstream are accepted."), required: true
|
54
54
|
def destroy
|
@@ -2,6 +2,7 @@ module Katello
|
|
2
2
|
module Concerns
|
3
3
|
module Api::V2::RegistrationControllerExtensions
|
4
4
|
extend ActiveSupport::Concern
|
5
|
+
include ::Foreman::Controller::SmartProxyAuth
|
5
6
|
|
6
7
|
def prepare_host
|
7
8
|
if params['uuid']
|
@@ -35,7 +36,7 @@ module Katello
|
|
35
36
|
|
36
37
|
def smart_proxy
|
37
38
|
@smart_proxy ||= begin
|
38
|
-
proxy = params[:url] ?
|
39
|
+
proxy = params[:url] ? find_smart_proxy : SmartProxy.pulp_primary
|
39
40
|
|
40
41
|
fail Foreman::Exception, _('Smart proxy content source not found!') unless proxy
|
41
42
|
fail Foreman::Exception, _('Pulp 3 is not enabled on Smart proxy!') unless proxy.pulp3_enabled?
|
@@ -43,6 +44,11 @@ module Katello
|
|
43
44
|
proxy
|
44
45
|
end
|
45
46
|
end
|
47
|
+
|
48
|
+
def find_smart_proxy
|
49
|
+
auth_smart_proxy
|
50
|
+
@detected_proxy
|
51
|
+
end
|
46
52
|
end
|
47
53
|
end
|
48
54
|
end
|
@@ -8,6 +8,7 @@ module Katello
|
|
8
8
|
param :smart_proxy, Hash do
|
9
9
|
param :download_policy, String, :required => false, :desc => N_('Download Policy of the capsule, must be one of %s') %
|
10
10
|
SmartProxy::DOWNLOAD_POLICIES.join(', ')
|
11
|
+
param :http_proxy_id, Integer, :required => false, :desc => N_('Id of the HTTP proxy to use with alternate content sources')
|
11
12
|
end
|
12
13
|
end
|
13
14
|
end
|
@@ -72,30 +72,32 @@ module Katello
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def change_content_source_data
|
75
|
-
hosts = ::Host.where(id: params[:host_ids])
|
76
|
-
|
75
|
+
hosts = params[:search].presence ? ::Host.search_for(params[:search]) : ::Host.where(id: params[:host_ids])
|
76
|
+
content_hosts = []
|
77
77
|
hosts_without_content = []
|
78
78
|
|
79
79
|
hosts.each do |host|
|
80
80
|
if host.content_facet
|
81
|
-
|
81
|
+
content_hosts << { id: host.id, name: host.name }
|
82
82
|
else
|
83
|
-
hosts_without_content << host.name
|
83
|
+
hosts_without_content << { id: host.id, name: host.name }
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
|
-
|
88
|
-
|
87
|
+
content_sources = SmartProxy.authorized(:view_smart_proxies)
|
88
|
+
.with_content
|
89
|
+
.includes([:smart_proxy_features])
|
90
|
+
.joins(:lifecycle_environments)
|
91
|
+
.distinct
|
89
92
|
|
90
93
|
if Katello.with_remote_execution?
|
91
94
|
template_id = JobTemplate.find_by(name: 'Change content source')&.id
|
92
|
-
job_invocation_path = new_job_invocation_path(template_id: template_id, host_ids:
|
95
|
+
job_invocation_path = new_job_invocation_path(template_id: template_id, host_ids: content_hosts.map { |h| h[:id] }) if template_id
|
93
96
|
end
|
94
97
|
|
95
98
|
render json: {
|
96
|
-
|
99
|
+
content_hosts: content_hosts,
|
97
100
|
hosts_without_content: hosts_without_content,
|
98
|
-
environments: environments,
|
99
101
|
content_sources: content_sources,
|
100
102
|
job_invocation_path: job_invocation_path
|
101
103
|
}
|
@@ -41,5 +41,14 @@ module Katello
|
|
41
41
|
subscription-manager facts --update
|
42
42
|
CMD
|
43
43
|
end
|
44
|
+
|
45
|
+
def reconfigure_yggdrasild(host)
|
46
|
+
template = Template.find_by(name: 'remote_execution_pull_setup')
|
47
|
+
return '' unless template
|
48
|
+
|
49
|
+
source = Foreman::Renderer.get_source(template: template, host: host)
|
50
|
+
scope = Foreman::Renderer.get_scope(source: source, host: host)
|
51
|
+
Foreman::Renderer.render(source, scope)
|
52
|
+
end
|
44
53
|
end
|
45
54
|
end
|
@@ -269,6 +269,37 @@ module Katello
|
|
269
269
|
[{ action: [_('Change Content Source'), '/change_host_content_source', false], priority: 100 }]
|
270
270
|
end
|
271
271
|
|
272
|
+
def host_status_icon(status)
|
273
|
+
colours = [:green, :yellow, :red]
|
274
|
+
|
275
|
+
colour = colours[status] || :red
|
276
|
+
|
277
|
+
icons = {
|
278
|
+
green: "#{colour} host-status pficon pficon-ok status-ok",
|
279
|
+
yellow: "#{colour} host-status pficon pficon-info status-warn",
|
280
|
+
red: "#{colour} host-status pficon pficon-error-circle-o status-error"
|
281
|
+
}
|
282
|
+
|
283
|
+
"<span class=\"#{icons[colour]}\"></span>".html_safe
|
284
|
+
end
|
285
|
+
|
286
|
+
def errata_counts(host)
|
287
|
+
counts = host.content_facet_attributes&.errata_counts || {}
|
288
|
+
render partial: 'katello/hosts/errata_counts', locals: { counts: counts, host: host }
|
289
|
+
end
|
290
|
+
|
291
|
+
def host_registered_time(host)
|
292
|
+
return _('Never registered') unless host.subscription_facet_attributes&.registered_at
|
293
|
+
|
294
|
+
date_time_relative_value(host.subscription_facet_attributes.registered_at)
|
295
|
+
end
|
296
|
+
|
297
|
+
def host_checkin_time(host)
|
298
|
+
return _('Never checked in') unless host.subscription_facet_attributes&.last_checkin
|
299
|
+
|
300
|
+
date_time_relative_value(host.subscription_facet_attributes.last_checkin)
|
301
|
+
end
|
302
|
+
|
272
303
|
private
|
273
304
|
|
274
305
|
def hostgroup_content_facet(hostgroup, param_host)
|
@@ -11,7 +11,7 @@ module Actions
|
|
11
11
|
smart_proxies = smart_proxies.present? ? smart_proxies.uniq : []
|
12
12
|
concurrence do
|
13
13
|
smart_proxies.each do |smart_proxy|
|
14
|
-
if acs.custom?
|
14
|
+
if acs.custom? || acs.rhui?
|
15
15
|
smart_proxy_acs = ::Katello::SmartProxyAlternateContentSource.create(alternate_content_source_id: acs.id, smart_proxy_id: smart_proxy.id)
|
16
16
|
plan_action(Pulp3::Orchestration::AlternateContentSource::Create, smart_proxy_acs)
|
17
17
|
elsif acs.simplified?
|
@@ -37,7 +37,7 @@ module Actions
|
|
37
37
|
|
38
38
|
def create_acss(acs, smart_proxies_to_associate)
|
39
39
|
smart_proxies_to_associate&.each do |smart_proxy|
|
40
|
-
if acs.custom?
|
40
|
+
if acs.custom? || acs.rhui?
|
41
41
|
smart_proxy_acs = ::Katello::SmartProxyAlternateContentSource.create(alternate_content_source_id: acs.id, smart_proxy_id: smart_proxy.id)
|
42
42
|
plan_action(Pulp3::Orchestration::AlternateContentSource::Create, smart_proxy_acs)
|
43
43
|
elsif acs.simplified?
|
@@ -56,7 +56,7 @@ module Actions
|
|
56
56
|
|
57
57
|
def update_acss(acs, smart_proxies_to_update, products_to_associate, products_to_disassociate)
|
58
58
|
smart_proxies_to_update&.each do |smart_proxy|
|
59
|
-
if acs.custom?
|
59
|
+
if acs.custom? || acs.rhui?
|
60
60
|
smart_proxy_acs = ::Katello::SmartProxyAlternateContentSource.find_by(alternate_content_source_id: acs.id, smart_proxy_id: smart_proxy.id, repository_id: nil)
|
61
61
|
plan_action(Pulp3::Orchestration::AlternateContentSource::Update, smart_proxy_acs)
|
62
62
|
elsif acs.simplified?
|
@@ -31,8 +31,8 @@ module Actions
|
|
31
31
|
fail _("Action not allowed for the default smart proxy.") if smart_proxy.pulp_primary?
|
32
32
|
|
33
33
|
refresh_options = options.merge(content_view: content_view,
|
34
|
-
|
35
|
-
|
34
|
+
environment: environment,
|
35
|
+
repository: repository)
|
36
36
|
sequence do
|
37
37
|
if smart_proxy.has_feature?(SmartProxy::PULP_NODE_FEATURE)
|
38
38
|
plan_action(Actions::Pulp::Orchestration::Repository::RefreshRepos, smart_proxy, refresh_options)
|
@@ -44,6 +44,14 @@ module Actions
|
|
44
44
|
end
|
45
45
|
plan_action(SyncCapsule, smart_proxy, refresh_options)
|
46
46
|
end
|
47
|
+
plan_self(smart_proxy_id: smart_proxy.id)
|
48
|
+
end
|
49
|
+
|
50
|
+
def finalize
|
51
|
+
smart_proxy = SmartProxy.unscoped.authorized(:view_capsule_content).find(input[:smart_proxy_id])
|
52
|
+
unless smart_proxy&.pulp_primary?
|
53
|
+
smart_proxy&.audit_capsule_sync
|
54
|
+
end
|
47
55
|
end
|
48
56
|
end
|
49
57
|
end
|
@@ -18,7 +18,7 @@ module Actions
|
|
18
18
|
org = cdn_configuration.organization
|
19
19
|
roots = ::Katello::RootRepository.redhat.in_organization(org)
|
20
20
|
roots.each do |root|
|
21
|
-
full_path = if cdn_configuration.redhat_cdn?
|
21
|
+
full_path = if cdn_configuration.redhat_cdn? || cdn_configuration.custom_cdn?
|
22
22
|
root.product.repo_url(root.library_instance.generate_content_path)
|
23
23
|
elsif cdn_configuration.network_sync?
|
24
24
|
resource.repository_url(content_label: root.content.label, arch: root.arch, major: root.major, minor: root.minor)
|
@@ -8,6 +8,7 @@ module Actions
|
|
8
8
|
def plan(version, environments, is_force = false, description = nil, incremental_update = false)
|
9
9
|
action_subject(version.content_view)
|
10
10
|
version.check_ready_to_promote!(environments)
|
11
|
+
::Katello::Util::CandlepinRepositoryChecker.check_repositories_for_promote!(version)
|
11
12
|
|
12
13
|
fail ::Katello::HttpErrors::BadRequest, _("Cannot promote environment out of sequence. Use force to bypass restriction.") if !is_force && !version.promotable?(environments)
|
13
14
|
|
@@ -9,10 +9,13 @@ module Actions
|
|
9
9
|
execution_plan_hooks.use :trigger_capsule_sync, :on => :success
|
10
10
|
|
11
11
|
# rubocop:disable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity
|
12
|
-
def plan(content_view, description = "", options = {importing: false}) # rubocop:disable Metrics/PerceivedComplexity
|
12
|
+
def plan(content_view, description = "", options = {importing: false, syncable: false}) # rubocop:disable Metrics/PerceivedComplexity
|
13
13
|
action_subject(content_view)
|
14
14
|
|
15
|
-
content_view.check_ready_to_publish!(importing
|
15
|
+
content_view.check_ready_to_publish!(options.slice(:importing, :syncable))
|
16
|
+
unless options[:importing] || options[:syncable]
|
17
|
+
::Katello::Util::CandlepinRepositoryChecker.check_repositories_for_publish!(content_view)
|
18
|
+
end
|
16
19
|
|
17
20
|
if options[:repos_units].present?
|
18
21
|
valid_labels_from_cv = content_view.repositories.map(&:label)
|
@@ -2,16 +2,20 @@ module Actions
|
|
2
2
|
module Katello
|
3
3
|
module ContentViewVersion
|
4
4
|
class AutoCreateRedhatRepositories < Actions::Base
|
5
|
-
def plan(import:)
|
5
|
+
def plan(import:, path:)
|
6
6
|
helper = ::Katello::Pulp3::ContentViewVersion::ImportableRepositories.new(
|
7
7
|
organization: import.organization,
|
8
|
-
metadata_repositories: import.metadata_map.repositories.select { |r| r.redhat }
|
8
|
+
metadata_repositories: import.metadata_map.repositories.select { |r| r.redhat },
|
9
|
+
syncable_format: import.metadata_map.syncable_format?,
|
10
|
+
path: path
|
9
11
|
)
|
10
12
|
helper.generate!
|
11
13
|
|
12
14
|
sequence do
|
13
15
|
helper.creatable.each do |root|
|
14
|
-
plan_action(::Actions::Katello::RepositorySet::EnableRepository,
|
16
|
+
plan_action(::Actions::Katello::RepositorySet::EnableRepository,
|
17
|
+
root[:product], root[:content], root[:substitutions],
|
18
|
+
override_url: root[:override_url])
|
15
19
|
end
|
16
20
|
helper.updatable.each do |root|
|
17
21
|
plan_action(::Actions::Katello::Repository::Update, root[:repository], root[:options])
|
@@ -2,10 +2,12 @@ module Actions
|
|
2
2
|
module Katello
|
3
3
|
module ContentViewVersion
|
4
4
|
class AutoCreateRepositories < Actions::Base
|
5
|
-
def plan(import:)
|
5
|
+
def plan(import:, path:)
|
6
6
|
helper = ::Katello::Pulp3::ContentViewVersion::ImportableRepositories.new(
|
7
7
|
organization: import.organization,
|
8
|
-
metadata_repositories: import.metadata_map.repositories.select { |r| !r.redhat }
|
8
|
+
metadata_repositories: import.metadata_map.repositories.select { |r| !r.redhat },
|
9
|
+
syncable_format: import.metadata_map.syncable_format?,
|
10
|
+
path: path
|
9
11
|
)
|
10
12
|
helper.generate!
|
11
13
|
|