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
@@ -1,37 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
class Abstract < Actions::Base
|
4
|
-
BACKEND_SERVICE_TYPE = 'pulp2'.freeze
|
5
|
-
|
6
|
-
middleware.use ::Actions::Middleware::RemoteAction
|
7
|
-
middleware.use Actions::Middleware::PulpServicesCheck
|
8
|
-
|
9
|
-
def self.backend_service_type
|
10
|
-
BACKEND_SERVICE_TYPE
|
11
|
-
end
|
12
|
-
|
13
|
-
def pulp_resources(capsule_id = nil)
|
14
|
-
capsule_content(capsule_id).resources
|
15
|
-
end
|
16
|
-
|
17
|
-
def pulp_extensions(capsule_id = nil)
|
18
|
-
capsule_content(capsule_id).extensions
|
19
|
-
end
|
20
|
-
|
21
|
-
def smart_proxy(id)
|
22
|
-
SmartProxy.unscoped.find(id)
|
23
|
-
end
|
24
|
-
|
25
|
-
private
|
26
|
-
|
27
|
-
def capsule_content(capsule_id = nil)
|
28
|
-
capsule_id ||= input["capsule_id"] || input["smart_proxy_id"]
|
29
|
-
if capsule_id
|
30
|
-
SmartProxy.unscoped.find(capsule_id).pulp_api
|
31
|
-
else
|
32
|
-
::Katello.pulp_server
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
@@ -1,154 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
class AbstractAsyncTask < Pulp::Abstract
|
4
|
-
include Actions::Base::Polling
|
5
|
-
include ::Dynflow::Action::Cancellable
|
6
|
-
|
7
|
-
FINISHED_STATES = %w(finished error canceled skipped).freeze
|
8
|
-
|
9
|
-
# A call report (documented http://pulp-dev-guide.readthedocs.org/en/latest/conventions/sync-v-async.html)
|
10
|
-
# Looks like: {
|
11
|
-
# "result": {},
|
12
|
-
# "error": {},
|
13
|
-
# "spawned_tasks": [{"_href": "/pulp/api/v2/tasks/7744e2df-39b9-46f0-bb10-feffa2f7014b/",
|
14
|
-
# "task_id": "7744e2df-39b9-46f0-bb10-feffa2f7014b" }]
|
15
|
-
# }
|
16
|
-
#
|
17
|
-
#
|
18
|
-
|
19
|
-
# A Task (documented http://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/dispatch/task.html#task-management)
|
20
|
-
# Looks like:
|
21
|
-
# {
|
22
|
-
# "_href": "/pulp/api/v2/tasks/0fe4fcab-a040-11e1-a71c-00508d977dff/",
|
23
|
-
# "state": "running",
|
24
|
-
# "queue": "reserved_resource_worker-0@your.domain.com",
|
25
|
-
# "task_id": "0fe4fcab-a040-11e1-a71c-00508d977dff",
|
26
|
-
# "task_type": "pulp.server.tasks.repository.sync_with_auto_publish",
|
27
|
-
# "progress_report": {}, # contents depend on the operation
|
28
|
-
# "result": null,
|
29
|
-
# "start_time": "2012-05-17T16:48:00Z",
|
30
|
-
# "finish_time": null,
|
31
|
-
# "exception": null,
|
32
|
-
# "traceback": null,
|
33
|
-
# "tags": [
|
34
|
-
# "pulp:repository:f16",
|
35
|
-
# "pulp:action:sync"
|
36
|
-
# ],
|
37
|
-
# "spawned_tasks": [{"href": "/pulp/api/v2/tasks/7744e2df-39b9-46f0-bb10-feffa2f7014b/",
|
38
|
-
# "task_id": "7744e2df-39b9-46f0-bb10-feffa2f7014b" }],
|
39
|
-
# "error": null
|
40
|
-
#}
|
41
|
-
|
42
|
-
def run(event = nil)
|
43
|
-
# do nothing when the action is being skipped
|
44
|
-
unless event == Dynflow::Action::Skip
|
45
|
-
super
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
def humanized_state
|
50
|
-
case state
|
51
|
-
when :running
|
52
|
-
if self.external_task.nil?
|
53
|
-
_("initiating Pulp task")
|
54
|
-
else
|
55
|
-
_("checking Pulp task status")
|
56
|
-
end
|
57
|
-
when :suspended
|
58
|
-
if external_task&.all? { |task| task[:start_time].nil? }
|
59
|
-
_("waiting for Pulp to start the task")
|
60
|
-
else
|
61
|
-
_("waiting for Pulp to finish the task")
|
62
|
-
end
|
63
|
-
else
|
64
|
-
super
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
def done?
|
69
|
-
external_task&.all? { |task| task[:finish_time] || FINISHED_STATES.include?(task[:state]) }
|
70
|
-
end
|
71
|
-
|
72
|
-
def external_task
|
73
|
-
output[:pulp_tasks]
|
74
|
-
end
|
75
|
-
|
76
|
-
def cancel!
|
77
|
-
output[:cancelled] = true
|
78
|
-
cancel
|
79
|
-
self.external_task = poll_external_task
|
80
|
-
# We suspend the action and the polling will take care of finding
|
81
|
-
# out if the cancelling was successful
|
82
|
-
suspend unless done?
|
83
|
-
end
|
84
|
-
|
85
|
-
def cancel
|
86
|
-
output[:pulp_tasks].each do |pulp_task|
|
87
|
-
task_resource.cancel(pulp_task['task_id'])
|
88
|
-
#the main task may have completed, so cancel spawned tasks too
|
89
|
-
pulp_task['spawned_tasks']&.each { |spawned| task_resource.cancel(spawned['task_id']) }
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
|
-
def rescue_external_task(error)
|
94
|
-
if error.is_a?(::Katello::Errors::PulpError)
|
95
|
-
fail error
|
96
|
-
else
|
97
|
-
super
|
98
|
-
end
|
99
|
-
end
|
100
|
-
|
101
|
-
private
|
102
|
-
|
103
|
-
def external_task=(external_task_data)
|
104
|
-
external_task_data = [] if external_task_data.nil?
|
105
|
-
external_task_data = [external_task_data] if external_task_data.is_a?(Hash)
|
106
|
-
|
107
|
-
new_tasks = []
|
108
|
-
external_task_data.each do |task|
|
109
|
-
if task['spawned_tasks'].length > 0
|
110
|
-
spawned_ids = task['spawned_tasks'].map { |spawned| spawned['task_id'] }
|
111
|
-
new_tasks.concat(get_new_tasks(external_task_data, spawned_ids))
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
|
-
# Combine new tasks and remove call reports and ignored tasks
|
116
|
-
output[:pulp_tasks] = (external_task_data + new_tasks).reject do |task|
|
117
|
-
task["task_id"].nil? || (task["tags"] && (task["tags"] & ignored_tags).present?)
|
118
|
-
end
|
119
|
-
output[:pulp_tasks].each do |pulp_task|
|
120
|
-
if (pulp_exception = ::Katello::Errors::PulpError.from_task(pulp_task))
|
121
|
-
fail pulp_exception
|
122
|
-
end
|
123
|
-
end
|
124
|
-
end
|
125
|
-
|
126
|
-
def get_new_tasks(current_list, spawned_task_ids)
|
127
|
-
new_tasks = (spawned_task_ids - current_list.map { |task| task['task_id'] }).map do |task_id|
|
128
|
-
task_resource.poll(task_id)
|
129
|
-
end
|
130
|
-
|
131
|
-
if new_tasks.empty?
|
132
|
-
[]
|
133
|
-
else
|
134
|
-
spawned = new_tasks.map { |t| t['spawned_tasks'].map { |st| st['task_id'] } }.flatten
|
135
|
-
new_tasks + get_new_tasks(current_list + new_tasks, spawned)
|
136
|
-
end
|
137
|
-
end
|
138
|
-
|
139
|
-
def poll_external_task
|
140
|
-
external_task.map do |task|
|
141
|
-
task_resource.poll(task[:task_id])
|
142
|
-
end
|
143
|
-
end
|
144
|
-
|
145
|
-
def task_resource
|
146
|
-
pulp_resources.task
|
147
|
-
end
|
148
|
-
|
149
|
-
def ignored_tags
|
150
|
-
[]
|
151
|
-
end
|
152
|
-
end
|
153
|
-
end
|
154
|
-
end
|
@@ -1,94 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
class AbstractAsyncTaskGroup < Pulp::Abstract
|
4
|
-
include Actions::Base::Polling
|
5
|
-
include ::Dynflow::Action::Cancellable
|
6
|
-
|
7
|
-
# A call report (documented https://github.com/pulp/pulp/blob/master/docs/dev-guide/integration/rest-api/consumer/applicability.rst#id65)
|
8
|
-
# Looks like:
|
9
|
-
# {
|
10
|
-
# "_href": "/pulp/api/v2/task_groups/7744e2df-39b9-46f0-bb10-feffa2f7014b/",
|
11
|
-
# "group_id": "7744e2df-39b9-46f0-bb10-feffa2f7014b"
|
12
|
-
# }
|
13
|
-
#
|
14
|
-
# A TaskGroup (https://github.com/pulp/pulp/blob/master/docs/dev-guide/integration/rest-api/tasks.rst#task-group-management)
|
15
|
-
# Looks like:
|
16
|
-
# {
|
17
|
-
# "accepted": 0,
|
18
|
-
# "finished": 100,
|
19
|
-
# "running": 4,
|
20
|
-
# "canceled": 0,
|
21
|
-
# "waiting": 2,
|
22
|
-
# "skipped": 0,
|
23
|
-
# "suspended": 0,
|
24
|
-
# "error": 0,
|
25
|
-
# "total": 106
|
26
|
-
# }
|
27
|
-
|
28
|
-
def run(event = nil)
|
29
|
-
# do nothing when the action is being skipped
|
30
|
-
unless event == Dynflow::Action::Skip
|
31
|
-
super
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
def cancel!
|
36
|
-
cancel
|
37
|
-
self.external_task = poll_external_task
|
38
|
-
# We suspend the action and the polling will take care of finding
|
39
|
-
# out if the cancelling was successful
|
40
|
-
suspend unless done?
|
41
|
-
end
|
42
|
-
|
43
|
-
def cancel
|
44
|
-
group = output['pulp_task_group']
|
45
|
-
if group
|
46
|
-
task_resource.cancel(group['id'])
|
47
|
-
end
|
48
|
-
rescue RestClient::ResourceNotFound
|
49
|
-
nil #Pulp throws a 404 if there are no tasks in the task group https://pulp.plan.io/issues/2943
|
50
|
-
end
|
51
|
-
|
52
|
-
def humanized_state
|
53
|
-
case state
|
54
|
-
when :running
|
55
|
-
if self.external_task.nil?
|
56
|
-
_("initiating Pulp task")
|
57
|
-
else
|
58
|
-
_("checking Pulp task status")
|
59
|
-
end
|
60
|
-
else
|
61
|
-
super
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
def done?
|
66
|
-
finishing_states = ["finished", "canceled", "skipped", "suspended", "error"]
|
67
|
-
return false if (finishing_states - external_task.keys).present?
|
68
|
-
task_resource.completed?(external_task)
|
69
|
-
end
|
70
|
-
|
71
|
-
def external_task
|
72
|
-
output["pulp_task_group"]
|
73
|
-
end
|
74
|
-
|
75
|
-
private
|
76
|
-
|
77
|
-
def external_task=(external_task_data)
|
78
|
-
if external_task_data.key?("group_id")
|
79
|
-
output["pulp_task_group"] = {"group_id" => external_task_data["group_id"]}
|
80
|
-
else
|
81
|
-
output["pulp_task_group"] = {"group_id" => output["pulp_task_group"]["group_id"]}.merge(external_task_data)
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
def poll_external_task
|
86
|
-
task_resource.summary(output["pulp_task_group"]["group_id"])
|
87
|
-
end
|
88
|
-
|
89
|
-
def task_resource
|
90
|
-
::Katello.pulp_server.resources.task_group
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Consumer
|
4
|
-
class SyncCapsule < ::Actions::Pulp::AbstractAsyncTask
|
5
|
-
include ::Actions::Helpers::SmartProxySyncHistoryHelper
|
6
|
-
input_format do
|
7
|
-
param :capsule_id, Integer
|
8
|
-
param :repo_pulp_id, String
|
9
|
-
param :repository_id, Integer
|
10
|
-
param :sync_options
|
11
|
-
end
|
12
|
-
|
13
|
-
def plan(repository, smart_proxy, options)
|
14
|
-
plan_self(:capsule_id => smart_proxy.id, :repo_pulp_id => repository.pulp_id, :repository_id => repository.id, :sync_options => options)
|
15
|
-
end
|
16
|
-
|
17
|
-
def humanized_name
|
18
|
-
_("Synchronize capsule content")
|
19
|
-
end
|
20
|
-
|
21
|
-
def invoke_external_task
|
22
|
-
output[:pulp_tasks] = pulp_resources.repository.sync(input[:repo_pulp_id], override_config: input[:sync_options])
|
23
|
-
end
|
24
|
-
|
25
|
-
def run_progress
|
26
|
-
# override this method so this task's progress isn't 0.5
|
27
|
-
# when it is initiated, skewing the progress bar progress
|
28
|
-
self.done? ? 1 : 0.1
|
29
|
-
end
|
30
|
-
|
31
|
-
def rescue_strategy_for_self
|
32
|
-
if output[:cancelled]
|
33
|
-
Dynflow::Action::Rescue::Fail
|
34
|
-
else
|
35
|
-
Dynflow::Action::Rescue::Skip
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def run_progress_weight
|
40
|
-
100
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Consumer
|
4
|
-
class UnassociateUnits < ::Actions::Pulp::AbstractAsyncTask
|
5
|
-
input_format do
|
6
|
-
param :capsule_id, Integer
|
7
|
-
param :repo_pulp_id, String
|
8
|
-
end
|
9
|
-
|
10
|
-
def humanized_name
|
11
|
-
_("Unassociate units in repository")
|
12
|
-
end
|
13
|
-
|
14
|
-
def invoke_external_task
|
15
|
-
pulp_resources.repository.unassociate_units(input[:repo_pulp_id])
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module ExpectOneTask
|
4
|
-
def external_task=(external_task_data)
|
5
|
-
external_task_data = [external_task_data] unless external_task_data.is_a?(Array)
|
6
|
-
fail "Not expecting more than one task" if external_task_data.length > 1
|
7
|
-
super(external_task_data)
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Orchestration
|
4
|
-
module OrphanCleanup
|
5
|
-
class RemoveOrphans < Pulp::Abstract
|
6
|
-
def plan(proxy)
|
7
|
-
sequence do
|
8
|
-
plan_action(Actions::Pulp::OrphanCleanup::RemoveUnneededRepos, proxy) unless proxy.pulp_primary?
|
9
|
-
plan_action(Actions::Pulp::OrphanCleanup::RemoveOrphans, proxy)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Orchestration
|
4
|
-
module Repository
|
5
|
-
class CopyAllUnits < Pulp::Abstract
|
6
|
-
def plan(target_repo, smart_proxy, source_repos, options = {})
|
7
|
-
source_repos.each do |source_repo|
|
8
|
-
plan_action(Pulp::Repository::CopyAllUnits,
|
9
|
-
target_repo,
|
10
|
-
smart_proxy,
|
11
|
-
source_repo,
|
12
|
-
options)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Orchestration
|
4
|
-
module Repository
|
5
|
-
class Delete < Pulp::Abstract
|
6
|
-
def plan(repository, _smart_proxy)
|
7
|
-
sequence do
|
8
|
-
plan_action(Pulp::Repository::Destroy, repository_id: repository.id)
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Orchestration
|
4
|
-
module Repository
|
5
|
-
class Refresh < Pulp::Abstract
|
6
|
-
def plan(repository, smart_proxy, options = {})
|
7
|
-
options[:capsule_id] = smart_proxy.id
|
8
|
-
plan_action(Actions::Pulp::Repository::Refresh, repository, options)
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Orchestration
|
4
|
-
module Repository
|
5
|
-
class RefreshIfNeeded < Pulp::Abstract
|
6
|
-
def plan(repository, smart_proxy, _options = {})
|
7
|
-
plan_action(Actions::Pulp::Repository::Refresh, repository, smart_proxy_id: smart_proxy.id)
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Orchestration
|
4
|
-
module Repository
|
5
|
-
class RefreshRepos < Pulp::AbstractAsyncTask
|
6
|
-
include ::Actions::Katello::CapsuleContent::RefreshRepos
|
7
|
-
|
8
|
-
def fetch_proxy_service(smart_proxy)
|
9
|
-
::Katello::Pulp::SmartProxyRepository.new(smart_proxy)
|
10
|
-
end
|
11
|
-
|
12
|
-
def act_on_repo?(repo, smart_proxy)
|
13
|
-
!smart_proxy.pulp3_support?(repo)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Orchestration
|
4
|
-
module Repository
|
5
|
-
class RemoveUnits < Pulp::Abstract
|
6
|
-
def plan(repository, _smart_proxy, options)
|
7
|
-
options[:repo_id] = repository.id
|
8
|
-
plan_action(Actions::Pulp::Repository::RemoveUnits, options)
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Orchestration
|
4
|
-
module Repository
|
5
|
-
class SmartProxySync < Pulp::Abstract
|
6
|
-
def plan(repository, smart_proxy, options)
|
7
|
-
skip_metadata_check = options.fetch(:skip_metadata_check, false)
|
8
|
-
sequence do
|
9
|
-
if repository && ['yum', 'puppet'].exclude?(repository.content_type)
|
10
|
-
# we unassociate units in non-yum/puppet repos in order to avoid version conflicts
|
11
|
-
# during publish. (i.e. two versions of a unit in the same repository)
|
12
|
-
plan_action(Pulp::Consumer::UnassociateUnits,
|
13
|
-
capsule_id: smart_proxy.id,
|
14
|
-
repo_pulp_id: repository.pulp_id)
|
15
|
-
end
|
16
|
-
pulp_options = { remove_missing: repository && ["deb", "puppet", "yum"].include?(repository.content_type) }
|
17
|
-
pulp_options[:force_full] = true if skip_metadata_check && repository.content_type == "yum"
|
18
|
-
pulp_options[:repair_sync] = true if skip_metadata_check && repository.content_type == "deb"
|
19
|
-
|
20
|
-
plan_action(Pulp::Consumer::SyncCapsule,
|
21
|
-
repository, smart_proxy, pulp_options)
|
22
|
-
if skip_metadata_check
|
23
|
-
plan_action(Katello::Repository::MetadataGenerate,
|
24
|
-
repository,
|
25
|
-
smart_proxy: smart_proxy,
|
26
|
-
force: true)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Orchestration
|
4
|
-
module Repository
|
5
|
-
class Sync < Pulp::Abstract
|
6
|
-
include Actions::Helpers::OutputPropagator
|
7
|
-
def plan(repository, smart_proxy, options)
|
8
|
-
sequence do
|
9
|
-
options.merge!(:repo_id => repository.id, :smart_proxy_id => smart_proxy.id)
|
10
|
-
action_output = plan_action(Actions::Pulp::Repository::Sync, options).output
|
11
|
-
plan_self(:subaction_output => action_output)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Orchestration
|
4
|
-
module Repository
|
5
|
-
class UploadContent < Pulp::Abstract
|
6
|
-
include Actions::Helpers::OutputPropagator
|
7
|
-
def plan(repository, smart_proxy, file, unit_type_id)
|
8
|
-
sequence do
|
9
|
-
upload_request = plan_action(Pulp::Repository::CreateUploadRequest)
|
10
|
-
plan_action(Pulp::Repository::UploadFile,
|
11
|
-
upload_id: upload_request.output[:upload_id],
|
12
|
-
file: file[:path])
|
13
|
-
plan_action(Pulp::Repository::ImportUpload,
|
14
|
-
repository, smart_proxy,
|
15
|
-
pulp_id: repository.pulp_id,
|
16
|
-
unit_type_id: unit_type_id,
|
17
|
-
unit_key: unit_key(file, repository),
|
18
|
-
upload_id: upload_request.output[:upload_id])
|
19
|
-
plan_action(Pulp::Repository::DeleteUploadRequest,
|
20
|
-
upload_id: upload_request.output[:upload_id])
|
21
|
-
plan_self(:subaction_output => nil)
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def unit_key(file, repository)
|
26
|
-
return {} unless repository.file?
|
27
|
-
{
|
28
|
-
:checksum => Digest::SHA256.hexdigest(File.read(file[:path])),
|
29
|
-
:name => file[:filename],
|
30
|
-
:size => File.size(file[:path])
|
31
|
-
}
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module OrphanCleanup
|
4
|
-
class RemoveOrphans < Pulp::AbstractAsyncTask
|
5
|
-
def plan(proxy)
|
6
|
-
plan_self(:capsule_id => proxy.id)
|
7
|
-
end
|
8
|
-
|
9
|
-
def invoke_external_task
|
10
|
-
pulp_resources.content.remove_orphans
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module OrphanCleanup
|
4
|
-
class RemoveUnneededRepos < Pulp::AbstractAsyncTask
|
5
|
-
def plan(smart_proxy)
|
6
|
-
plan_self(:smart_proxy_id => smart_proxy.id)
|
7
|
-
end
|
8
|
-
|
9
|
-
def invoke_external_task
|
10
|
-
smart_proxy_service = ::Katello::Pulp::SmartProxyRepository.new(::SmartProxy.unscoped.find(input[:smart_proxy_id]))
|
11
|
-
smart_proxy_service.delete_orphaned_repos
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Repository
|
4
|
-
class AbstractCopyContent < Pulp::AbstractAsyncTask
|
5
|
-
input_format do
|
6
|
-
param :source_pulp_id
|
7
|
-
param :target_pulp_id
|
8
|
-
param :clauses
|
9
|
-
param :full_clauses
|
10
|
-
param :override_config
|
11
|
-
param :include_result
|
12
|
-
end
|
13
|
-
|
14
|
-
# @api override - pulp extension representing the content type to copy
|
15
|
-
def content_extension
|
16
|
-
fail NotImplementedError
|
17
|
-
end
|
18
|
-
|
19
|
-
def invoke_external_task
|
20
|
-
optional = criteria
|
21
|
-
optional[:override_config] = input[:override_config] if input[:override_config]
|
22
|
-
content_extension.copy(input[:source_pulp_id],
|
23
|
-
input[:target_pulp_id],
|
24
|
-
optional)
|
25
|
-
end
|
26
|
-
|
27
|
-
def criteria
|
28
|
-
if input[:full_clauses]
|
29
|
-
input[:full_clauses]
|
30
|
-
elsif input[:clauses]
|
31
|
-
{ filters: {:unit => input[:clauses] } }
|
32
|
-
else
|
33
|
-
{}
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def external_task=(external_task_data)
|
38
|
-
external_task_data = [external_task_data] if external_task_data.is_a?(Hash)
|
39
|
-
external_task_data = external_task_data.map { |task| task.except('result') } unless input[:include_result]
|
40
|
-
super(external_task_data)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|