katello 3.17.0.rc1 → 3.17.0.rc2
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 +5 -3
- data/app/controllers/katello/api/rhsm/candlepin_dynflow_proxy_controller.rb +1 -1
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +2 -2
- data/app/controllers/katello/api/v2/api_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +5 -5
- data/app/controllers/katello/api/v2/content_view_repositories_controller.rb +47 -0
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +50 -19
- data/app/controllers/katello/api/v2/gpg_keys_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_tracer_controller.rb +0 -5
- data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +15 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +24 -14
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/{associations_permission_check.rb → authorization.rb} +20 -2
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +11 -5
- data/app/helpers/katello/content_view_helper.rb +1 -1
- data/app/lib/actions/candlepin/product/content_add.rb +1 -2
- data/app/lib/actions/katello/capsule_content/refresh_repos.rb +1 -1
- data/app/lib/actions/katello/capsule_content/sync.rb +2 -2
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +17 -3
- data/app/lib/actions/katello/content_view/capsule_sync.rb +1 -1
- data/app/lib/actions/katello/content_view/destroy.rb +2 -2
- data/app/lib/actions/katello/content_view/incremental_updates.rb +1 -1
- data/app/lib/actions/katello/content_view/promote_to_environment.rb +1 -0
- data/app/lib/actions/katello/content_view/publish.rb +12 -7
- data/app/lib/actions/katello/content_view_puppet_environment/clone.rb +1 -1
- data/app/lib/actions/katello/content_view_puppet_environment/create.rb +2 -2
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +4 -4
- data/app/lib/actions/katello/organization/manifest_delete.rb +1 -0
- data/app/lib/actions/katello/organization/manifest_import.rb +1 -0
- data/app/lib/actions/katello/organization/manifest_refresh.rb +1 -0
- data/app/lib/actions/katello/product/content_create.rb +3 -3
- data/app/lib/actions/katello/product/destroy.rb +25 -4
- data/app/lib/actions/katello/repository/clone_contents.rb +3 -3
- data/app/lib/actions/katello/repository/clone_to_environment.rb +2 -2
- data/app/lib/actions/katello/repository/clone_to_version.rb +1 -1
- data/app/lib/actions/katello/repository/create.rb +1 -1
- data/app/lib/actions/katello/repository/destroy.rb +10 -4
- data/app/lib/actions/katello/repository/export.rb +3 -3
- data/app/lib/actions/katello/repository/finish_upload.rb +2 -2
- data/app/lib/actions/katello/repository/import_upload.rb +3 -3
- data/app/lib/actions/katello/repository/metadata_generate.rb +1 -1
- data/app/lib/actions/katello/repository/multi_clone_contents.rb +6 -10
- data/app/lib/actions/katello/repository/purge_empty_content.rb +1 -1
- data/app/lib/actions/katello/repository/remove_content.rb +1 -1
- data/app/lib/actions/katello/repository/sync.rb +35 -25
- data/app/lib/actions/katello/repository/update.rb +30 -19
- data/app/lib/actions/katello/repository/update_http_proxy_details.rb +1 -1
- data/app/lib/actions/katello/repository/update_metadata_sync.rb +1 -1
- data/app/lib/actions/katello/repository/upload_files.rb +2 -2
- data/app/lib/actions/katello/repository/verify_checksum.rb +28 -0
- data/app/lib/actions/pulp/content_view_puppet_environment/copy_contents.rb +1 -1
- data/app/lib/actions/pulp/orchestration/orphan_cleanup/remove_orphans.rb +1 -1
- data/app/lib/actions/pulp/orchestration/repository/sync.rb +2 -1
- data/app/lib/actions/pulp/repository/copy_all_units.rb +1 -1
- data/app/lib/actions/pulp/repository/copy_units.rb +1 -1
- data/app/lib/actions/pulp/repository/create.rb +1 -1
- data/app/lib/actions/pulp/repository/destroy.rb +1 -1
- data/app/lib/actions/pulp/repository/remove_units.rb +2 -2
- data/app/lib/actions/pulp/repository/sync.rb +3 -2
- data/app/lib/actions/pulp3/capsule_content/sync.rb +3 -1
- data/app/lib/actions/pulp3/content_guard/refresh_all_distributions.rb +19 -0
- data/app/lib/actions/pulp3/content_migration.rb +3 -3
- data/app/lib/actions/pulp3/content_view_version/create_exporter.rb +20 -0
- data/app/lib/actions/pulp3/content_view_version/destroy_exporter.rb +16 -0
- data/app/lib/actions/pulp3/content_view_version/export.rb +19 -0
- data/app/lib/actions/pulp3/import_migration.rb +3 -3
- data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +69 -0
- data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +1 -2
- data/app/lib/actions/pulp3/orchestration/repository/create.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/repository/sync.rb +3 -1
- data/app/lib/actions/pulp3/orchestration/repository/trigger_update_repo_cert_guard.rb +22 -0
- data/app/lib/actions/pulp3/orchestration/repository/upload_content.rb +1 -1
- data/app/lib/actions/pulp3/repository/copy_content.rb +0 -1
- data/app/lib/actions/pulp3/repository/multi_copy_units.rb +2 -2
- data/app/lib/actions/pulp3/repository/presenters/repair_presenter.rb +85 -0
- data/app/lib/actions/pulp3/repository/refresh_distribution.rb +11 -5
- data/app/lib/actions/pulp3/repository/repair.rb +29 -0
- data/app/lib/actions/pulp3/repository/save_artifact.rb +1 -1
- data/app/lib/actions/pulp3/repository/save_distribution_references.rb +2 -2
- data/app/lib/actions/pulp3/repository/save_version.rb +20 -16
- data/app/lib/actions/pulp3/repository/save_versions.rb +1 -1
- data/app/lib/actions/pulp3/repository/sync.rb +1 -1
- data/app/lib/actions/pulp3/repository/update_cv_repository_cert_guard.rb +6 -2
- data/app/lib/actions/pulp3/repository/upload_file.rb +2 -2
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +5 -3
- data/app/lib/katello/concerns/permission_extensions.rb +14 -0
- data/app/lib/katello/foreman.rb +1 -1
- data/app/lib/katello/resources/candlepin/product.rb +0 -11
- data/app/lib/katello/resources/registry.rb +3 -3
- data/app/models/katello/authorization/content_view_version_export_history.rb +11 -0
- data/app/models/katello/authorization/product.rb +4 -0
- data/app/models/katello/authorization/repository.rb +8 -0
- data/app/models/katello/concerns/content_facet_host_extensions.rb +2 -1
- data/app/models/katello/concerns/organization_extensions.rb +6 -1
- data/app/models/katello/concerns/pulp_database_unit.rb +2 -2
- data/app/models/katello/concerns/redhat_extensions.rb +4 -2
- data/app/models/katello/concerns/smart_proxy_extensions.rb +33 -16
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +1 -1
- data/app/models/katello/content_view.rb +1 -1
- data/app/models/katello/content_view_package_filter.rb +1 -1
- data/app/models/katello/content_view_puppet_environment.rb +1 -1
- data/app/models/katello/content_view_version.rb +3 -1
- data/app/models/katello/content_view_version_export_history.rb +22 -0
- data/app/models/katello/docker_meta_tag.rb +1 -1
- data/app/models/katello/errata_status.rb +21 -12
- data/app/models/katello/erratum.rb +1 -1
- data/app/models/katello/glue/candlepin/owner.rb +4 -2
- data/app/models/katello/glue/pulp/repo.rb +3 -1
- data/app/models/katello/host/content_facet.rb +8 -0
- data/app/models/katello/kt_environment.rb +1 -1
- data/app/models/katello/package_group.rb +1 -1
- data/app/models/katello/ping.rb +8 -3
- data/app/models/katello/pulp3/content_guard.rb +1 -1
- data/app/models/katello/purpose_status.rb +2 -2
- data/app/models/katello/repository.rb +23 -15
- data/app/models/katello/rhsm_fact_parser.rb +1 -1
- data/app/models/katello/root_repository.rb +2 -15
- data/app/models/katello/sync_plan.rb +8 -0
- data/app/models/setting/content.rb +3 -1
- data/app/services/cert/certs.rb +10 -2
- data/app/services/katello/candlepin/event_handler.rb +1 -0
- data/app/services/katello/host_status_manager.rb +7 -0
- data/app/services/katello/pulp/content.rb +1 -1
- data/app/services/katello/pulp/repository.rb +7 -7
- data/app/services/katello/pulp/repository/deb.rb +2 -2
- data/app/services/katello/pulp/repository/docker.rb +5 -5
- data/app/services/katello/pulp/repository/file.rb +2 -2
- data/app/services/katello/pulp/repository/ostree.rb +2 -2
- data/app/services/katello/pulp/repository/puppet.rb +2 -2
- data/app/services/katello/pulp/repository/yum.rb +5 -6
- data/app/services/katello/pulp/smart_proxy_repository.rb +1 -1
- data/app/services/katello/pulp3/ansible_collection.rb +2 -2
- data/app/services/katello/pulp3/api/core.rb +16 -0
- data/app/services/katello/pulp3/content.rb +3 -3
- data/app/services/katello/pulp3/content_view_version/export.rb +71 -0
- data/app/services/katello/pulp3/distribution.rb +2 -2
- data/app/services/katello/pulp3/docker_blob.rb +2 -2
- data/app/services/katello/pulp3/docker_manifest.rb +2 -2
- data/app/services/katello/pulp3/docker_manifest_list.rb +2 -2
- data/app/services/katello/pulp3/docker_tag.rb +2 -2
- data/app/services/katello/pulp3/erratum.rb +2 -2
- data/app/services/katello/pulp3/file_unit.rb +2 -2
- data/app/services/katello/pulp3/migration.rb +139 -34
- data/app/services/katello/pulp3/migration_plan.rb +50 -14
- data/app/services/katello/pulp3/migration_switchover.rb +41 -9
- data/app/services/katello/pulp3/module_stream.rb +2 -2
- data/app/services/katello/pulp3/package_group.rb +2 -2
- data/app/services/katello/pulp3/repository.rb +9 -9
- data/app/services/katello/pulp3/repository/docker.rb +18 -10
- data/app/services/katello/pulp3/repository/yum.rb +25 -13
- data/app/services/katello/pulp3/repository_mirror.rb +2 -1
- data/app/services/katello/pulp3/rpm.rb +2 -2
- data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +2 -2
- data/app/services/katello/pulp3/smart_proxy_repository.rb +1 -1
- data/app/services/katello/pulp3/srpm.rb +2 -2
- data/app/services/katello/pulp3/task_group.rb +1 -1
- data/app/services/katello/pulp3/yum_metadata_file.rb +2 -2
- data/app/services/katello/registration_manager.rb +9 -3
- data/app/services/katello/repository_type.rb +1 -1
- data/app/services/katello/smart_proxy_helper.rb +14 -17
- data/app/views/foreman/job_templates/install_errata_-_katello_ansible_default.erb +10 -2
- data/app/views/katello/api/v2/content_view_repositories/show_all.json.rabl +8 -0
- data/app/views/katello/api/v2/content_view_version_export_histories/index.json.rabl +7 -0
- data/app/views/katello/api/v2/content_view_version_export_histories/show.json.rabl +13 -0
- data/app/views/katello/api/v2/package_groups/show.json.rabl +1 -1
- data/app/views/katello/api/v2/packages/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repositories/base.json.rabl +2 -1
- data/app/views/katello/api/v2/srpms/show.json.rabl +1 -1
- data/app/views/katello/api/v2/sync_plans/show.json.rabl +2 -1
- data/config/routes/api/rhsm.rb +1 -0
- data/config/routes/api/v2.rb +8 -1
- data/db/migrate/20200818040551_add_content_view_version_export_history.rb +13 -0
- data/db/migrate/20200818192230_update_system_purpose_status.rb +12 -0
- data/db/migrate/20200820145217_add_download_concurrency_to_katello_root_repositories.rb +5 -0
- data/db/migrate/20200910140340_remove_distribution_uuid.rb +5 -0
- data/db/migrate/20200914200906_remove_auto_enabled.rb +5 -0
- data/engines/bastion/app/assets/javascripts/bastion/bastion.js +1 -0
- data/engines/bastion/app/assets/javascripts/bastion/routing.module.js +1 -1
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-ui-router/stateEvents.js +300 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-add-subscriptions.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-subscriptions.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-products.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-repositories.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-host-collections-modal.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-module-streams-modal.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-subscriptions-modal.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-traces-modal.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-installed.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-traces.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-host-collections.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-subscriptions.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-host-collections.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-subscriptions.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/content-view-composite-available-content-views.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/content-view-composite-content-views-list.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-docker-repositories.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-ostree-repositories.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-docker-repositories-list.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-ostree-repositories-list.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-versions.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-errata-filter.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-package-group-filter.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-names.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-versions.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-modules.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/debs.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/deb-content-views.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/deb-repositories.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/environment-content.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum-repositories.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/file-content-views.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/file-repositories.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/files.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/host-collections.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +57 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +45 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +42 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +45 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +11 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/organization-selector.controller.js +5 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branch-repositories.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/package-repositories.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/packages.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/product-bulk-action.factory.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-sync-plan-modal.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +7 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +0 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +0 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +16 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/products.html +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-content-views.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-repositories.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details-info.controller.js +4 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.controller.js +1 -1
- data/lib/katello/engine.rb +2 -0
- data/lib/katello/permission_creator.rb +14 -9
- data/lib/katello/tasks/clean_published_repo_directories.rake +3 -3
- data/lib/katello/tasks/pulp3_content_switchover.rake +24 -6
- data/lib/katello/tasks/pulp3_migration.rake +4 -2
- data/lib/katello/tasks/pulp3_post_migration_check.rake +2 -2
- data/lib/katello/tasks/reimport.rake +1 -1
- data/lib/katello/tasks/repository.rake +15 -2
- data/lib/katello/tasks/unify_hosts.rake +1 -0
- data/lib/katello/tasks/upgrades/3.11/update_puppet_repos.rake +3 -3
- data/lib/katello/tasks/upgrades/3.12/remove_pulp2_notifier.rake +2 -2
- data/lib/katello/tasks/upgrades/3.8/clear_checksum_type.rake +2 -2
- data/lib/katello/version.rb +1 -1
- data/locale/action_names.rb +47 -47
- data/locale/katello.pot +160 -160
- data/webpack/containers/Application/config.js +4 -4
- data/webpack/redux/actions/RedHatRepositories/helpers.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +22 -32
- data/webpack/scenes/Subscriptions/Manifest/__tests__/SimpleContentAccess.test.js +0 -14
- data/webpack/scenes/Subscriptions/Manifest/index.js +2 -5
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +15 -6
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +0 -1
- data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +3 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +24 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +114 -26
- metadata +67 -33
- data/app/lib/actions/candlepin/product/content_update_enablement.rb +0 -18
- data/app/lib/actions/katello/repository/content_update.rb +0 -41
- data/app/lib/actions/katello/repository/update_cv_repo_cert_guard.rb +0 -17
@@ -3,7 +3,7 @@ module Katello
|
|
3
3
|
def separated_repo_mapping(repo_mapping)
|
4
4
|
separated_mapping = { :pulp3_yum => {}, :other => {} }
|
5
5
|
repo_mapping.each do |source_repos, dest_repo|
|
6
|
-
if dest_repo.content_type == "yum" && SmartProxy.
|
6
|
+
if dest_repo.content_type == "yum" && SmartProxy.pulp_primary.pulp3_support?(dest_repo)
|
7
7
|
separated_mapping[:pulp3_yum][source_repos] = dest_repo
|
8
8
|
else
|
9
9
|
separated_mapping[:other][source_repos] = dest_repo
|
@@ -6,12 +6,11 @@ module Actions
|
|
6
6
|
param :product_id
|
7
7
|
param :content_id
|
8
8
|
param :owner
|
9
|
-
param :enabled
|
10
9
|
end
|
11
10
|
|
12
11
|
def run
|
13
12
|
output[:response] = ::Katello::Resources::Candlepin::Product.
|
14
|
-
add_content(input[:owner], input[:product_id], input[:content_id],
|
13
|
+
add_content(input[:owner], input[:product_id], input[:content_id], true)
|
15
14
|
end
|
16
15
|
end
|
17
16
|
end
|
@@ -37,7 +37,7 @@ module Actions
|
|
37
37
|
current_repos_on_capsule = smart_proxy_service.current_repositories(environment, content_view)
|
38
38
|
current_repos_on_capsule_ids = current_repos_on_capsule.pluck(:id)
|
39
39
|
|
40
|
-
list_of_repos_to_sync = smart_proxy_helper.
|
40
|
+
list_of_repos_to_sync = smart_proxy_helper.combined_repos_available_to_capsule(environment, content_view, repository)
|
41
41
|
list_of_repos_to_sync.each do |repo|
|
42
42
|
if repo.is_a?(Katello::ContentViewPuppetEnvironment)
|
43
43
|
repo = repo.nonpersisted_repository
|
@@ -28,10 +28,10 @@ module Actions
|
|
28
28
|
content_view_id = options.fetch(:content_view_id, nil)
|
29
29
|
content_view = ::Katello::ContentView.find(content_view_id) if content_view_id
|
30
30
|
|
31
|
-
fail _("Action not allowed for the default smart proxy.") if smart_proxy.
|
31
|
+
fail _("Action not allowed for the default smart proxy.") if smart_proxy.pulp_primary?
|
32
32
|
|
33
33
|
smart_proxy_helper = ::Katello::SmartProxyHelper.new(smart_proxy)
|
34
|
-
repositories = smart_proxy_helper.
|
34
|
+
repositories = smart_proxy_helper.combined_repos_available_to_capsule(environment, content_view, repository)
|
35
35
|
|
36
36
|
smart_proxy.ping_pulp if repositories.any? { |repo| !smart_proxy.pulp3_support?(repo) }
|
37
37
|
|
@@ -10,11 +10,12 @@ module Actions
|
|
10
10
|
repository = options[:repository]
|
11
11
|
skip_metadata_check = options.fetch(:skip_metadata_check, false)
|
12
12
|
|
13
|
-
smart_proxy_helper = ::Katello::SmartProxyHelper.new(smart_proxy)
|
14
13
|
sequence do
|
15
|
-
|
14
|
+
repos = repos_to_sync(smart_proxy, environment, content_view, repository)
|
15
|
+
|
16
|
+
repos.in_groups_of(Setting[:foreman_proxy_content_batch_size], false) do |repo_batch|
|
16
17
|
concurrence do
|
17
|
-
|
18
|
+
repo_batch.each do |repo|
|
18
19
|
plan_pulp_action([Actions::Pulp::Orchestration::Repository::SmartProxySync,
|
19
20
|
Actions::Pulp3::CapsuleContent::Sync],
|
20
21
|
repo, smart_proxy,
|
@@ -33,6 +34,19 @@ module Actions
|
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
37
|
+
def repos_to_sync(smart_proxy, environment, content_view, repository)
|
38
|
+
smart_proxy_helper = ::Katello::SmartProxyHelper.new(smart_proxy)
|
39
|
+
smart_proxy_helper.lifecycle_environment_check(environment, repository)
|
40
|
+
|
41
|
+
if repository
|
42
|
+
[repository]
|
43
|
+
else
|
44
|
+
repositories = smart_proxy_helper.repositories_available_to_capsule(environment, content_view).by_rpm_count
|
45
|
+
puppet_envs = smart_proxy_helper.puppet_environments_available_to_capsule(environment, content_view)
|
46
|
+
repositories + puppet_envs
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
36
50
|
def resource_locks
|
37
51
|
:link
|
38
52
|
end
|
@@ -11,7 +11,7 @@ module Actions
|
|
11
11
|
concurrence do
|
12
12
|
smart_proxies = SmartProxy.with_environment(environment)
|
13
13
|
unless smart_proxies.blank?
|
14
|
-
plan_action(::Actions::BulkAction, ::Actions::Katello::CapsuleContent::Sync, smart_proxies,
|
14
|
+
plan_action(::Actions::BulkAction, ::Actions::Katello::CapsuleContent::Sync, smart_proxies.sort,
|
15
15
|
:content_view_id => content_view.id, :environment_id => environment.id)
|
16
16
|
end
|
17
17
|
end
|
@@ -17,8 +17,8 @@ module Actions
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
if SmartProxy.
|
21
|
-
plan_action(Actions::Pulp3::ContentView::DeleteRepositoryReferences, content_view, SmartProxy.
|
20
|
+
if SmartProxy.pulp_primary&.pulp3_enabled?
|
21
|
+
plan_action(Actions::Pulp3::ContentView::DeleteRepositoryReferences, content_view, SmartProxy.pulp_primary)
|
22
22
|
end
|
23
23
|
plan_self
|
24
24
|
end
|
@@ -52,7 +52,7 @@ module Actions
|
|
52
52
|
action = plan_action(ContentViewVersion::IncrementalUpdate, composite_version, environments,
|
53
53
|
:new_components => new_components, :description => description,
|
54
54
|
:content => {:puppet_module_ids => puppet_module_ids})
|
55
|
-
unless SmartProxy.
|
55
|
+
unless SmartProxy.pulp_primary.pulp3_repository_type_support?("yum")
|
56
56
|
output_for_version_ids << {:version_id => action.new_content_view_version.id, :output => action.output}
|
57
57
|
end
|
58
58
|
end
|
@@ -47,6 +47,7 @@ module Actions
|
|
47
47
|
::Katello::Host::ContentFacet.where(:content_view_id => input[:content_view_id],
|
48
48
|
:lifecycle_environment_id => input[:environment_id]).each do |facet|
|
49
49
|
facet.update_applicability_counts
|
50
|
+
facet.update_errata_status
|
50
51
|
end
|
51
52
|
|
52
53
|
history = ::Katello::ContentViewHistory.find(input[:history_id])
|
@@ -5,7 +5,7 @@ module Actions
|
|
5
5
|
class Publish < Actions::EntryAction
|
6
6
|
include ::Katello::ContentViewHelper
|
7
7
|
attr_accessor :version
|
8
|
-
# rubocop:disable Metrics/MethodLength,Metrics/AbcSize
|
8
|
+
# rubocop:disable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity
|
9
9
|
def plan(content_view, description = "", options = {})
|
10
10
|
action_subject(content_view)
|
11
11
|
content_view.check_ready_to_publish!
|
@@ -50,7 +50,7 @@ module Actions
|
|
50
50
|
separated_repo_map = separated_repo_mapping(repository_mapping)
|
51
51
|
|
52
52
|
if separated_repo_map[:pulp3_yum].keys.flatten.present? &&
|
53
|
-
SmartProxy.
|
53
|
+
SmartProxy.pulp_primary.pulp3_support?(separated_repo_map[:pulp3_yum].keys.flatten.first)
|
54
54
|
plan_action(Repository::MultiCloneToVersion, separated_repo_map[:pulp3_yum], version)
|
55
55
|
end
|
56
56
|
|
@@ -69,15 +69,19 @@ module Actions
|
|
69
69
|
plan_action(Repository::Destroy, repo, :skip_environment_update => true)
|
70
70
|
end
|
71
71
|
end
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
plan_action(ContentViewPuppetEnvironment::
|
76
|
-
|
72
|
+
|
73
|
+
if SmartProxy.pulp_primary.has_feature?(SmartProxy::PULP_FEATURE)
|
74
|
+
has_modules = content_view.publish_puppet_environment?
|
75
|
+
plan_action(ContentViewPuppetEnvironment::CreateForVersion, version)
|
76
|
+
unless options[:skip_promotion]
|
77
|
+
plan_action(ContentViewPuppetEnvironment::Clone, version, :environment => library,
|
78
|
+
:puppet_modules_present => has_modules)
|
79
|
+
end
|
77
80
|
end
|
78
81
|
plan_action(Candlepin::Environment::SetContent, content_view, library, content_view.content_view_environment(library)) unless options[:skip_promotion]
|
79
82
|
plan_action(Katello::Foreman::ContentUpdate, library, content_view) unless options[:skip_promotion]
|
80
83
|
plan_action(ContentView::ErrataMail, content_view, library) unless options[:skip_promotion]
|
84
|
+
|
81
85
|
plan_self(history_id: history.id, content_view_id: content_view.id,
|
82
86
|
auto_publish_composite_ids: auto_publish_composite_ids(content_view),
|
83
87
|
content_view_version_name: version.name,
|
@@ -118,6 +122,7 @@ module Actions
|
|
118
122
|
::Katello::Host::ContentFacet.where(:content_view_id => input[:content_view_id],
|
119
123
|
:lifecycle_environment_id => input[:environment_id]).each do |facet|
|
120
124
|
facet.update_applicability_counts
|
125
|
+
facet.update_errata_status
|
121
126
|
end
|
122
127
|
end
|
123
128
|
|
@@ -46,7 +46,7 @@ module Actions
|
|
46
46
|
clone.save!
|
47
47
|
plan_action(ContentViewPuppetEnvironment::Clear, clone)
|
48
48
|
|
49
|
-
unless ::Katello::Repository.needs_distributor_updates([clone], SmartProxy.
|
49
|
+
unless ::Katello::Repository.needs_distributor_updates([clone], SmartProxy.pulp_primary).empty?
|
50
50
|
plan_action(Pulp::Repository::Refresh, clone)
|
51
51
|
end
|
52
52
|
end
|
@@ -3,7 +3,7 @@ module Actions
|
|
3
3
|
module ContentViewPuppetEnvironment
|
4
4
|
class Create < Actions::EntryAction
|
5
5
|
def plan(puppet_environment, clone = false)
|
6
|
-
internal_capsule = SmartProxy.
|
6
|
+
internal_capsule = SmartProxy.pulp_primary
|
7
7
|
fail _("Content View %s cannot be published without an internal capsule." % puppet_environment.name) unless internal_capsule
|
8
8
|
|
9
9
|
User.as_anonymous_admin { puppet_environment.save! }
|
@@ -22,7 +22,7 @@ module Actions
|
|
22
22
|
|
23
23
|
def run
|
24
24
|
puppet_environment = ::Katello::ContentViewPuppetEnvironment.find(input[:content_view_puppet_environment_id])
|
25
|
-
output[:response] = ::Katello::Pulp::Repository::Puppet.new(puppet_environment.nonpersisted_repository, SmartProxy.
|
25
|
+
output[:response] = ::Katello::Pulp::Repository::Puppet.new(puppet_environment.nonpersisted_repository, SmartProxy.pulp_primary).create
|
26
26
|
end
|
27
27
|
|
28
28
|
def humanized_name
|
@@ -32,7 +32,7 @@ module Actions
|
|
32
32
|
validate_environments(environments, old_version)
|
33
33
|
|
34
34
|
new_minor = old_version.content_view.versions.where(:major => old_version.major).maximum(:minor) + 1
|
35
|
-
if SmartProxy.
|
35
|
+
if SmartProxy.pulp_primary.pulp3_repository_type_support?("yum") && is_composite
|
36
36
|
sequence do
|
37
37
|
publish_action = plan_action(::Actions::Katello::ContentView::Publish, old_version.content_view, description,
|
38
38
|
:major => old_version.major, :minor => new_minor,
|
@@ -73,7 +73,7 @@ module Actions
|
|
73
73
|
|
74
74
|
unless extended_repo_mapping.empty? || unit_map.values.flatten.empty?
|
75
75
|
copy_action_outputs << plan_action(Pulp3::Repository::MultiCopyUnits, extended_repo_mapping, unit_map,
|
76
|
-
dependency_solving:
|
76
|
+
dependency_solving: dep_solve).output
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
@@ -266,9 +266,9 @@ module Actions
|
|
266
266
|
history.status = ::Katello::ContentViewHistory::SUCCESSFUL
|
267
267
|
history.save!
|
268
268
|
|
269
|
-
unless SmartProxy.
|
269
|
+
unless SmartProxy.pulp_primary.pulp3_support?(version.repositories.first)
|
270
270
|
version.repositories.each do |repo|
|
271
|
-
SmartProxy.
|
271
|
+
SmartProxy.pulp_primary.pulp_api.extensions.send(:module_default).
|
272
272
|
copy(repo.library_instance.pulp_id,
|
273
273
|
repo.pulp_id)
|
274
274
|
end
|
@@ -45,6 +45,7 @@ module Actions
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def finalize
|
48
|
+
subject_organization.clear_syspurpose_status if subject_organization.simple_content_access?(cached: false)
|
48
49
|
subject_organization.clear_manifest_expired_notifications
|
49
50
|
subject_organization.audit_manifest_action(_('Manifest imported'))
|
50
51
|
end
|
@@ -61,6 +61,7 @@ module Actions
|
|
61
61
|
|
62
62
|
def finalize
|
63
63
|
org = ::Organization.find(input[:organization_id])
|
64
|
+
subject_organization.clear_syspurpose_status if subject_organization.simple_content_access?(cached: false)
|
64
65
|
org.clear_manifest_expired_notifications
|
65
66
|
subject_organization.audit_manifest_action(_('Manifest refreshed'))
|
66
67
|
end
|
@@ -17,8 +17,7 @@ module Actions
|
|
17
17
|
content_id = content_create.output[:response][:id]
|
18
18
|
plan_action(Candlepin::Product::ContentAdd, owner: root.product.organization.label,
|
19
19
|
product_id: root.product.cp_id,
|
20
|
-
content_id: content_id
|
21
|
-
enabled: root.auto_enabled?)
|
20
|
+
content_id: content_id)
|
22
21
|
|
23
22
|
else
|
24
23
|
content_id = root.content_id
|
@@ -52,7 +51,8 @@ module Actions
|
|
52
51
|
content_url: root.custom_content_path,
|
53
52
|
vendor: ::Katello::Provider::CUSTOM)
|
54
53
|
|
55
|
-
|
54
|
+
#custom product content is always enabled by default
|
55
|
+
::Katello::ProductContent.create!(product: root.product, content: content, enabled: true)
|
56
56
|
end
|
57
57
|
end
|
58
58
|
end
|
@@ -5,6 +5,8 @@ module Actions
|
|
5
5
|
# rubocop:disable Metrics/MethodLength
|
6
6
|
def plan(product, options = {})
|
7
7
|
organization_destroy = options.fetch(:organization_destroy, false)
|
8
|
+
skip_environment_update = options.fetch(:skip_environment_update, false) ||
|
9
|
+
options.fetch(:organization_destroy, false)
|
8
10
|
|
9
11
|
unless organization_destroy || product.user_deletable?
|
10
12
|
if product.redhat?
|
@@ -24,11 +26,13 @@ module Actions
|
|
24
26
|
|
25
27
|
sequence do
|
26
28
|
unless organization_destroy
|
29
|
+
sequence do
|
30
|
+
# ContentDestroy must be called sequentially due to Candlepin's
|
31
|
+
# issues with running multiple remove_content calls at the same time.
|
32
|
+
plan_content_destruction(product, skip_environment_update)
|
33
|
+
end
|
27
34
|
concurrence do
|
28
|
-
product
|
29
|
-
repo_options = options.clone
|
30
|
-
plan_action(Katello::Repository::Destroy, repo, repo_options)
|
31
|
-
end
|
35
|
+
plan_repo_destruction(product, options)
|
32
36
|
end
|
33
37
|
plan_action(Candlepin::Product::DeletePools,
|
34
38
|
cp_id: product.cp_id, organization_label: product.organization.label)
|
@@ -65,6 +69,23 @@ module Actions
|
|
65
69
|
product.pool_products.delete_all
|
66
70
|
end
|
67
71
|
|
72
|
+
def plan_content_destruction(product, skip_environment_update)
|
73
|
+
product.repositories.in_default_view.each do |repo|
|
74
|
+
if repo.root.repositories.where.not(id: repo.id).empty? &&
|
75
|
+
!repo.redhat? &&
|
76
|
+
!skip_environment_update
|
77
|
+
plan_action(::Actions::Katello::Product::ContentDestroy, repo.root)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def plan_repo_destruction(product, options)
|
83
|
+
product.repositories.in_default_view.each do |repo|
|
84
|
+
repo_options = options.clone
|
85
|
+
plan_action(Katello::Repository::Destroy, repo, repo_options.merge(destroy_content: false))
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
68
89
|
def view_versions(product)
|
69
90
|
cvvs = product.published_content_view_versions.uniq
|
70
91
|
views = cvvs.inject({}) do |result, version|
|
@@ -15,7 +15,7 @@ module Actions
|
|
15
15
|
if copy_contents
|
16
16
|
plan_pulp_action([Pulp3::Orchestration::Repository::CopyAllUnits, Pulp::Orchestration::Repository::CopyAllUnits],
|
17
17
|
new_repository,
|
18
|
-
SmartProxy.
|
18
|
+
SmartProxy.pulp_primary,
|
19
19
|
source_repositories,
|
20
20
|
filters: filters, rpm_filenames: rpm_filenames, solve_dependencies: solve_dependencies)
|
21
21
|
end
|
@@ -26,7 +26,7 @@ module Actions
|
|
26
26
|
index_options[:source_repository_id] = source_repositories.first.id if source_repositories.count == 1 && filters.empty? && rpm_filenames.nil?
|
27
27
|
plan_action(Katello::Repository::IndexContent, index_options)
|
28
28
|
|
29
|
-
if purge_empty_contents && new_repository.backend_service(SmartProxy.
|
29
|
+
if purge_empty_contents && new_repository.backend_service(SmartProxy.pulp_primary).should_purge_empty_contents?
|
30
30
|
plan_action(Katello::Repository::PurgeEmptyContent, id: new_repository.id)
|
31
31
|
end
|
32
32
|
end
|
@@ -40,7 +40,7 @@ module Actions
|
|
40
40
|
end
|
41
41
|
|
42
42
|
check_matching_content = ::Katello::RepositoryTypeManager.find(new_repository.content_type).metadata_publish_matching_check
|
43
|
-
if new_repository.environment && source_repositories.count == 1 && check_matching_content && !SmartProxy.
|
43
|
+
if new_repository.environment && source_repositories.count == 1 && check_matching_content && !SmartProxy.pulp_primary.pulp3_support?(new_repository)
|
44
44
|
match_check_output = plan_action(Katello::Repository::CheckMatchingContent,
|
45
45
|
:source_repo_id => source_repositories.first.id,
|
46
46
|
:target_repo_id => new_repository.id).output
|
@@ -13,9 +13,9 @@ module Actions
|
|
13
13
|
plan_action(Repository::Create, clone, true, false)
|
14
14
|
else
|
15
15
|
#only clear if it should be empty, but its not
|
16
|
-
plan_optional_pulp_action([Actions::Pulp::Repository::Clear], clone, SmartProxy.
|
16
|
+
plan_optional_pulp_action([Actions::Pulp::Repository::Clear], clone, SmartProxy.pulp_primary)
|
17
17
|
# Do we need to refresh distributors here?
|
18
|
-
plan_optional_pulp_action([Actions::Pulp::Orchestration::Repository::RefreshIfNeeded], clone, SmartProxy.
|
18
|
+
plan_optional_pulp_action([Actions::Pulp::Orchestration::Repository::RefreshIfNeeded], clone, SmartProxy.pulp_primary)
|
19
19
|
end
|
20
20
|
|
21
21
|
plan_action(::Actions::Katello::Repository::CloneContents, [repository], clone, :copy_contents => !clone.yum?)
|
@@ -13,7 +13,7 @@ module Actions
|
|
13
13
|
Rails.logger.warn("Filters on content view have been overridden by passed-in filename list during publish") if filters.any?
|
14
14
|
end
|
15
15
|
|
16
|
-
copy_contents = destination_repository.
|
16
|
+
copy_contents = destination_repository.primary?
|
17
17
|
fail _('Cannot publish a link repository if multiple component clones are specified') if !copy_contents && repositories.count > 1
|
18
18
|
|
19
19
|
sequence do
|
@@ -22,7 +22,7 @@ module Actions
|
|
22
22
|
pulp2_create_action = plan_create ? Actions::Pulp::Repository::CreateInPlan : Actions::Pulp::Repository::Create
|
23
23
|
sequence do
|
24
24
|
create_action = plan_pulp_action([pulp2_create_action, Pulp3::Orchestration::Repository::Create],
|
25
|
-
repository, SmartProxy.
|
25
|
+
repository, SmartProxy.pulp_primary)
|
26
26
|
|
27
27
|
return if create_action.error
|
28
28
|
|
@@ -7,9 +7,11 @@ module Actions
|
|
7
7
|
|
8
8
|
# options:
|
9
9
|
# skip_environment_update - defaults to false. skips updating the CP environment
|
10
|
+
# destroy_content - can be disabled to skip Candlepin remove_content
|
10
11
|
def plan(repository, options = {})
|
11
12
|
skip_environment_update = options.fetch(:skip_environment_update, false) ||
|
12
13
|
options.fetch(:organization_destroy, false)
|
14
|
+
destroy_content = options.fetch(:destroy_content, true)
|
13
15
|
action_subject(repository)
|
14
16
|
|
15
17
|
unless repository.destroyable?
|
@@ -22,21 +24,24 @@ module Actions
|
|
22
24
|
plan_pulp_action([Actions::Pulp::Orchestration::Repository::Delete,
|
23
25
|
Actions::Pulp3::Orchestration::Repository::Delete],
|
24
26
|
repository,
|
25
|
-
SmartProxy.
|
27
|
+
SmartProxy.pulp_primary)
|
26
28
|
|
27
29
|
plan_self(:user_id => ::User.current.id)
|
28
30
|
sequence do
|
29
31
|
if repository.redhat?
|
30
32
|
handle_redhat_content(repository) unless skip_environment_update
|
31
33
|
else
|
32
|
-
|
34
|
+
if destroy_content && !skip_environment_update
|
35
|
+
handle_custom_content(repository)
|
36
|
+
end
|
33
37
|
end
|
34
38
|
end
|
35
39
|
end
|
36
40
|
|
37
41
|
def finalize
|
38
42
|
repository = ::Katello::Repository.find(input[:repository][:id])
|
39
|
-
|
43
|
+
docker_cleanup = repository.content_type == ::Katello::Repository::DOCKER_TYPE
|
44
|
+
delete_record(repository, {docker_cleanup: docker_cleanup})
|
40
45
|
end
|
41
46
|
|
42
47
|
def handle_custom_content(repository)
|
@@ -52,9 +57,10 @@ module Actions
|
|
52
57
|
end
|
53
58
|
end
|
54
59
|
|
55
|
-
def delete_record(repository)
|
60
|
+
def delete_record(repository, options = {})
|
56
61
|
repository.destroy!
|
57
62
|
repository.root.destroy! if repository.root.repositories.empty?
|
63
|
+
::Katello::DockerMetaTag.cleanup_tags if options[:docker_cleanup]
|
58
64
|
end
|
59
65
|
|
60
66
|
def humanized_name
|
@@ -15,7 +15,7 @@ module Actions
|
|
15
15
|
end
|
16
16
|
|
17
17
|
unless File.writable?(Setting['pulp_export_destination'])
|
18
|
-
fail ::Foreman::Exception, N_("Unable to export
|
18
|
+
fail ::Foreman::Exception, N_("Unable to export. 'pulp_export_destination' setting is not a writable directory.")
|
19
19
|
end
|
20
20
|
|
21
21
|
repo_pulp_ids = repos.collect do |repo|
|
@@ -68,8 +68,8 @@ module Actions
|
|
68
68
|
repos.each do |repo|
|
69
69
|
sequence do
|
70
70
|
if repo.link?
|
71
|
-
plan_action(Pulp::Repository::Clear, repo, SmartProxy.
|
72
|
-
plan_action(Pulp::Repository::CopyAllUnits, repo, ::SmartProxy.
|
71
|
+
plan_action(Pulp::Repository::Clear, repo, SmartProxy.pulp_primary!)
|
72
|
+
plan_action(Pulp::Repository::CopyAllUnits, repo, ::SmartProxy.pulp_primary, repo.target_repository)
|
73
73
|
end
|
74
74
|
end
|
75
75
|
end
|