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
@@ -4,11 +4,11 @@ module Katello
|
|
4
4
|
include LazyAccessor
|
5
5
|
|
6
6
|
def self.content_api
|
7
|
-
PulpRpmClient::ContentModulemdsApi.new(Katello::Pulp3::Api::Yum.new(SmartProxy.
|
7
|
+
PulpRpmClient::ContentModulemdsApi.new(Katello::Pulp3::Api::Yum.new(SmartProxy.pulp_primary!).api_client)
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.ids_for_repository(repo_id)
|
11
|
-
repo = Katello::Pulp3::Repository::Yum.new(Katello::Repository.find(repo_id), SmartProxy.
|
11
|
+
repo = Katello::Pulp3::Repository::Yum.new(Katello::Repository.find(repo_id), SmartProxy.pulp_primary)
|
12
12
|
repo_content_list = repo.content_list
|
13
13
|
repo_content_list.map { |content| content.try(:pulp_href) }
|
14
14
|
end
|
@@ -45,11 +45,11 @@ module Katello
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def self.content_api
|
48
|
-
PulpRpmClient::ContentPackagegroupsApi.new(Katello::Pulp3::Api::Yum.new(SmartProxy.
|
48
|
+
PulpRpmClient::ContentPackagegroupsApi.new(Katello::Pulp3::Api::Yum.new(SmartProxy.pulp_primary!).api_client)
|
49
49
|
end
|
50
50
|
|
51
51
|
def self.ids_for_repository(repo_id)
|
52
|
-
repo = Katello::Pulp3::Repository::Yum.new(Katello::Repository.find(repo_id), SmartProxy.
|
52
|
+
repo = Katello::Pulp3::Repository::Yum.new(Katello::Repository.find(repo_id), SmartProxy.pulp_primary)
|
53
53
|
repo_content_list = repo.content_list
|
54
54
|
repo_content_list.map { |content| content.try(:pulp_href) }
|
55
55
|
end
|
@@ -21,7 +21,7 @@ module Katello
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def with_mirror_adapter
|
24
|
-
if smart_proxy.
|
24
|
+
if smart_proxy.pulp_primary?
|
25
25
|
return self
|
26
26
|
else
|
27
27
|
return RepositoryMirror.new(self)
|
@@ -193,16 +193,15 @@ module Katello
|
|
193
193
|
ignore_404_exception { api.repositories_api.delete(href) } if href
|
194
194
|
end
|
195
195
|
|
196
|
-
def
|
197
|
-
|
196
|
+
def sync(options = {})
|
197
|
+
repository_sync_url_data = api.class.repository_sync_url_class.new(sync_url_params(options))
|
198
|
+
[api.repositories_api.sync(repository_reference.repository_href, repository_sync_url_data)]
|
198
199
|
end
|
199
200
|
|
200
|
-
def
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
repository_sync_url_data = api.class.repository_sync_url_class.new(sync_url_params)
|
205
|
-
[api.repositories_api.sync(repository_reference.repository_href, repository_sync_url_data)]
|
201
|
+
def sync_url_params(_sync_options)
|
202
|
+
params = {remote: repo.remote_href, mirror: repo.root.mirror_on_sync}
|
203
|
+
params[:skip_types] = skip_types if skip_types
|
204
|
+
params
|
206
205
|
end
|
207
206
|
|
208
207
|
def create_publication
|
@@ -294,6 +293,7 @@ module Katello
|
|
294
293
|
proxy_url: root.http_proxy&.full_url
|
295
294
|
}
|
296
295
|
remote_options[:url] = root.url unless root.url.blank?
|
296
|
+
remote_options[:download_concurrency] = root.download_concurrency unless root.download_concurrency.blank?
|
297
297
|
if root.upstream_username && root.upstream_password
|
298
298
|
remote_options.merge!(username: root.upstream_username,
|
299
299
|
password: root.upstream_password)
|
@@ -11,16 +11,24 @@ module Katello
|
|
11
11
|
def remote_options
|
12
12
|
options = {url: root.url, upstream_name: root.docker_upstream_name}
|
13
13
|
if root.docker_tags_whitelist&.any?
|
14
|
-
options[:
|
14
|
+
options[:include_tags] = root.docker_tags_whitelist
|
15
15
|
else
|
16
|
-
options[:
|
16
|
+
options[:include_tags] = nil
|
17
17
|
end
|
18
18
|
common_remote_options.merge(options)
|
19
19
|
end
|
20
20
|
|
21
|
+
def secure_distribution_options(path)
|
22
|
+
#we never need a content guard for docker, and pulp creates one behind the scenes,
|
23
|
+
# so we have to make sure not to try to clear it out
|
24
|
+
options = super
|
25
|
+
options.delete(:content_guard)
|
26
|
+
options
|
27
|
+
end
|
28
|
+
|
21
29
|
def mirror_remote_options
|
22
30
|
{
|
23
|
-
url: "https://#{SmartProxy.
|
31
|
+
url: "https://#{SmartProxy.pulp_primary.pulp3_host!.downcase}",
|
24
32
|
upstream_name: repo.container_repository_name
|
25
33
|
}
|
26
34
|
end
|
@@ -58,20 +66,20 @@ module Katello
|
|
58
66
|
|
59
67
|
def copy_content_for_source(source_repository, options = {})
|
60
68
|
filters = ContentViewDockerFilter.where(:id => options[:filter_ids])
|
61
|
-
|
62
|
-
|
69
|
+
include_list_ids = []
|
70
|
+
exclude_list_ids = []
|
63
71
|
filters.each do |filter|
|
64
72
|
if filter.inclusion
|
65
|
-
|
73
|
+
include_list_ids += filter.content_unit_pulp_ids(source_repository)
|
66
74
|
else
|
67
|
-
|
75
|
+
exclude_list_ids += filter.content_unit_pulp_ids(source_repository)
|
68
76
|
end
|
69
77
|
end
|
70
78
|
|
71
|
-
if
|
72
|
-
copy_units_recursively(source_repository.docker_tags.pluck(:pulp_id).sort -
|
79
|
+
if include_list_ids.empty?
|
80
|
+
copy_units_recursively(source_repository.docker_tags.pluck(:pulp_id).sort - exclude_list_ids, true)
|
73
81
|
else
|
74
|
-
copy_units_recursively(
|
82
|
+
copy_units_recursively(include_list_ids - exclude_list_ids, true)
|
75
83
|
end
|
76
84
|
end
|
77
85
|
end
|
@@ -8,11 +8,17 @@ module Katello
|
|
8
8
|
include Katello::Util::PulpcoreContentFilters
|
9
9
|
|
10
10
|
def remote_options
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
url, sles_token = extract_sles_token
|
12
|
+
options = common_remote_options
|
13
|
+
options.merge!(sles_auth_token: sles_token) if sles_token
|
14
|
+
options.merge!(url: url, policy: root.download_policy)
|
15
|
+
end
|
16
|
+
|
17
|
+
def extract_sles_token
|
18
|
+
uri = URI(root.url)
|
19
|
+
query = uri.query
|
20
|
+
uri.query = nil
|
21
|
+
[uri.to_s, query]
|
16
22
|
end
|
17
23
|
|
18
24
|
def skip_types
|
@@ -31,10 +37,6 @@ module Katello
|
|
31
37
|
}
|
32
38
|
end
|
33
39
|
|
34
|
-
def sync_params
|
35
|
-
{remote: repo.remote_href, mirror: repo.root.mirror_on_sync, optimize: false}
|
36
|
-
end
|
37
|
-
|
38
40
|
def mirror_remote_options
|
39
41
|
policy = smart_proxy.download_policy
|
40
42
|
|
@@ -52,7 +54,6 @@ module Katello
|
|
52
54
|
:distribution_version => distribution.results.first.release_version,
|
53
55
|
:distribution_arch => distribution.results.first.arch,
|
54
56
|
:distribution_family => distribution.results.first.release_name,
|
55
|
-
:distribution_uuid => distribution.results.first.pulp_href,
|
56
57
|
:distribution_bootable => self.class.distribution_bootable?(distribution)
|
57
58
|
)
|
58
59
|
unless distribution.results.first.variants.empty?
|
@@ -63,6 +64,12 @@ module Katello
|
|
63
64
|
end
|
64
65
|
end
|
65
66
|
|
67
|
+
def sync_url_params(sync_options)
|
68
|
+
params = super
|
69
|
+
params[:optimize] = sync_options[:optimize] if sync_options.key?(:optimize)
|
70
|
+
params
|
71
|
+
end
|
72
|
+
|
66
73
|
def self.distribution_bootable?(distribution)
|
67
74
|
file_paths = distribution.results.first.images.map(&:path)
|
68
75
|
file_paths.any? do |path|
|
@@ -83,7 +90,7 @@ module Katello
|
|
83
90
|
data.config = []
|
84
91
|
repo_id_map.each do |source_repo_ids, dest_repo_id_map|
|
85
92
|
dest_repo = ::Katello::Repository.find(dest_repo_id_map[:dest_repo])
|
86
|
-
dest_repo_href = ::Katello::Pulp3::Repository::Yum.new(dest_repo, SmartProxy.
|
93
|
+
dest_repo_href = ::Katello::Pulp3::Repository::Yum.new(dest_repo, SmartProxy.pulp_primary).repository_reference.repository_href
|
87
94
|
content_unit_hrefs = dest_repo_id_map[:content_unit_hrefs]
|
88
95
|
# Not needed during incremental update due to dest_base_version
|
89
96
|
unless dest_repo_id_map[:base_version]
|
@@ -114,7 +121,7 @@ module Katello
|
|
114
121
|
tasks = []
|
115
122
|
repo_id_map.each do |_source_repo_ids, dest_repo_id_map|
|
116
123
|
dest_repo = ::Katello::Repository.find(dest_repo_id_map[:dest_repo])
|
117
|
-
dest_repo_href = ::Katello::Pulp3::Repository::Yum.new(dest_repo, SmartProxy.
|
124
|
+
dest_repo_href = ::Katello::Pulp3::Repository::Yum.new(dest_repo, SmartProxy.pulp_primary).repository_reference.repository_href
|
118
125
|
tasks << remove_all_content_from_repo(dest_repo_href)
|
119
126
|
end
|
120
127
|
tasks
|
@@ -147,6 +154,11 @@ module Katello
|
|
147
154
|
api.repositories_api.modify(repo_href, data)
|
148
155
|
end
|
149
156
|
|
157
|
+
def repair(repository_version_href)
|
158
|
+
data = PulpRpmClient::RepositoryVersion.new
|
159
|
+
api.repository_versions_api.repair(repository_version_href, data)
|
160
|
+
end
|
161
|
+
|
150
162
|
def remove_all_content
|
151
163
|
data = PulpRpmClient::RepositoryAddRemoveContent.new(
|
152
164
|
remove_content_units: ['*'])
|
@@ -300,7 +312,7 @@ module Katello
|
|
300
312
|
end
|
301
313
|
|
302
314
|
def additional_content_hrefs(source_repository, content_unit_hrefs)
|
303
|
-
repo_service = source_repository.backend_service(SmartProxy.
|
315
|
+
repo_service = source_repository.backend_service(SmartProxy.pulp_primary)
|
304
316
|
options = { :repository_version => source_repository.version_href }
|
305
317
|
|
306
318
|
errata_to_include = filter_errata_by_pulp_href(source_repository.errata, content_unit_hrefs)
|
@@ -119,6 +119,7 @@ module Katello
|
|
119
119
|
remote_options = {
|
120
120
|
name: backend_object_name
|
121
121
|
}
|
122
|
+
remote_options.merge!({download_concurrency: repo.download_concurrency}) if repo.download_concurrency
|
122
123
|
remote_options.merge!(ssl_remote_options)
|
123
124
|
end
|
124
125
|
|
@@ -133,7 +134,7 @@ module Katello
|
|
133
134
|
end
|
134
135
|
|
135
136
|
def remote_feed_url
|
136
|
-
uri = ::SmartProxy.
|
137
|
+
uri = ::SmartProxy.pulp_primary.pulp3_uri!
|
137
138
|
uri.path = repo_service.partial_repo_path
|
138
139
|
uri.to_s
|
139
140
|
end
|
@@ -11,11 +11,11 @@ module Katello
|
|
11
11
|
:initializer => :backend_data
|
12
12
|
|
13
13
|
def self.content_api
|
14
|
-
PulpRpmClient::ContentPackagesApi.new(Katello::Pulp3::Api::Yum.new(SmartProxy.
|
14
|
+
PulpRpmClient::ContentPackagesApi.new(Katello::Pulp3::Api::Yum.new(SmartProxy.pulp_primary!).api_client)
|
15
15
|
end
|
16
16
|
|
17
17
|
def self.ids_for_repository(repo_id)
|
18
|
-
repo = Katello::Pulp3::Repository::Yum.new(Katello::Repository.find(repo_id), SmartProxy.
|
18
|
+
repo = Katello::Pulp3::Repository::Yum.new(Katello::Repository.find(repo_id), SmartProxy.pulp_primary)
|
19
19
|
repo_content_list = repo.content_list
|
20
20
|
repo_content_list.map { |content| content.try(:pulp_href) }
|
21
21
|
end
|
@@ -2,7 +2,7 @@ module Katello
|
|
2
2
|
module Pulp3
|
3
3
|
class SmartProxyMirrorRepository < SmartProxyRepository
|
4
4
|
def initialize(smart_proxy)
|
5
|
-
fail "Cannot use a central pulp smart proxy" if smart_proxy.
|
5
|
+
fail "Cannot use a central pulp smart proxy" if smart_proxy.pulp_primary?
|
6
6
|
@smart_proxy = smart_proxy
|
7
7
|
end
|
8
8
|
|
@@ -10,7 +10,7 @@ module Katello
|
|
10
10
|
repo_map = {}
|
11
11
|
|
12
12
|
smart_proxy_helper = ::Katello::SmartProxyHelper.new(smart_proxy)
|
13
|
-
katello_pulp_ids = smart_proxy_helper.
|
13
|
+
katello_pulp_ids = smart_proxy_helper.combined_repos_available_to_capsule.map(&:pulp_id)
|
14
14
|
pulp3_enabled_repo_types.each do |repo_type|
|
15
15
|
api = repo_type.pulp3_service_class.api(smart_proxy)
|
16
16
|
repo_map[api] = api.list_all.reject { |capsule_repo| katello_pulp_ids.include? capsule_repo.name }
|
@@ -14,7 +14,7 @@ module Katello
|
|
14
14
|
:initializer => :pulp_facts
|
15
15
|
|
16
16
|
def self.content_api
|
17
|
-
PulpRpmClient::ContentPackagesApi.new(Katello::Pulp3::Api::Yum.new(SmartProxy.
|
17
|
+
PulpRpmClient::ContentPackagesApi.new(Katello::Pulp3::Api::Yum.new(SmartProxy.pulp_primary!).api_client)
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.page_options(page_opts = {})
|
@@ -23,7 +23,7 @@ module Katello
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def self.ids_for_repository(repo_id)
|
26
|
-
repo = Katello::Pulp3::Repository::Yum.new(Katello::Repository.find(repo_id), SmartProxy.
|
26
|
+
repo = Katello::Pulp3::Repository::Yum.new(Katello::Repository.find(repo_id), SmartProxy.pulp_primary)
|
27
27
|
repo_content_list = repo.content_list
|
28
28
|
repo_content_list.map { |content| content.try(:pulp_href) }
|
29
29
|
end
|
@@ -50,7 +50,7 @@ module Katello
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def done?
|
53
|
-
task_group_data['all_tasks_dispatched']
|
53
|
+
task_group_data['all_tasks_dispatched'] == true && IN_PROGRESS_STATES.all? { |state| task_group_data[state] == 0 }
|
54
54
|
end
|
55
55
|
|
56
56
|
def poll
|
@@ -4,11 +4,11 @@ module Katello
|
|
4
4
|
include LazyAccessor
|
5
5
|
|
6
6
|
def self.content_api
|
7
|
-
PulpRpmClient::ContentRepoMetadataFilesApi.new(Katello::Pulp3::Repository::Yum.api_client(SmartProxy.
|
7
|
+
PulpRpmClient::ContentRepoMetadataFilesApi.new(Katello::Pulp3::Repository::Yum.api_client(SmartProxy.pulp_primary!))
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.ids_for_repository(repo_id)
|
11
|
-
repo = Katello::Pulp3::Repository::Yum.new(Katello::Repository.find(repo_id), SmartProxy.
|
11
|
+
repo = Katello::Pulp3::Repository::Yum.new(Katello::Repository.find(repo_id), SmartProxy.pulp_primary)
|
12
12
|
repo_content_list = repo.content_list
|
13
13
|
repo_content_list.map { |content| content.try(:pulp_href) }
|
14
14
|
end
|
@@ -113,7 +113,7 @@ module Katello
|
|
113
113
|
|
114
114
|
# if this fails, there is not much to do about it right now. We can't really re-create the candlepin consumer.
|
115
115
|
# This can be cleaned up later via clean_backend_objects.
|
116
|
-
pulp_consumer_destory(host.content_facet.uuid) if host.content_facet.try(:uuid)
|
116
|
+
pulp_consumer_destory(host.content_facet.uuid) if host.content_facet.try(:uuid) && pulp2_supported?
|
117
117
|
|
118
118
|
host.subscription_facet.try(:destroy!)
|
119
119
|
|
@@ -171,7 +171,9 @@ module Katello
|
|
171
171
|
User.as_anonymous_admin do
|
172
172
|
ping_results = Katello::Ping.ping
|
173
173
|
end
|
174
|
-
|
174
|
+
candlepin_ok = ping_results[:services][:candlepin][:status] == "ok"
|
175
|
+
pulp_ok = ping_results[:services][:pulp] ? ping_results[:services][:pulp][:status] == "ok" : true
|
176
|
+
candlepin_ok && pulp_ok
|
175
177
|
end
|
176
178
|
|
177
179
|
private
|
@@ -183,6 +185,10 @@ module Katello
|
|
183
185
|
Rails.logger.warn("Attempted to destroy host %s but host is already gone." % host_id)
|
184
186
|
end
|
185
187
|
|
188
|
+
def pulp2_supported?
|
189
|
+
SmartProxy.pulp_primary.has_feature?(SmartProxy::PULP_FEATURE)
|
190
|
+
end
|
191
|
+
|
186
192
|
def get_uuid(params)
|
187
193
|
params.key?(:uuid) ? params[:uuid] : SecureRandom.uuid
|
188
194
|
end
|
@@ -203,7 +209,7 @@ module Katello
|
|
203
209
|
|
204
210
|
# if pulp fails, remove the CP consumer we just made
|
205
211
|
begin
|
206
|
-
::Katello.pulp_server.extensions.consumer.create(cp_create[:uuid], display_name: host.name)
|
212
|
+
::Katello.pulp_server.extensions.consumer.create(cp_create[:uuid], display_name: host.name) if pulp2_supported?
|
207
213
|
rescue StandardError => e
|
208
214
|
::Katello::Resources::Candlepin::Consumer.destroy(cp_create[:uuid])
|
209
215
|
raise e
|
@@ -33,7 +33,7 @@ module Katello
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def content_types_to_index
|
36
|
-
if SmartProxy.
|
36
|
+
if SmartProxy.pulp_primary.pulp3_repository_type_support?(self)
|
37
37
|
# type.index being false supersedes type.index_on_pulp3 being true
|
38
38
|
@content_types.select { |type| type.index && type.index_on_pulp3 }
|
39
39
|
else
|
@@ -10,37 +10,34 @@ module Katello
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def default_capsule?
|
13
|
-
@smart_proxy.
|
13
|
+
@smart_proxy.pulp_primary?
|
14
14
|
end
|
15
15
|
|
16
|
-
def
|
17
|
-
|
18
|
-
if repository
|
19
|
-
environment = repository.environment
|
20
|
-
ret = [repository]
|
21
|
-
else
|
22
|
-
yum_repos = fetch_repos_available_to_capsule(environment, content_view) || []
|
23
|
-
puppet_envs = fetch_puppet_environments_available_to_capsule(environment, content_view) || []
|
24
|
-
ret = yum_repos + puppet_envs
|
25
|
-
end
|
16
|
+
def lifecycle_environment_check(environment = nil, repository = nil)
|
17
|
+
environment = repository.environment if repository
|
26
18
|
|
27
19
|
if environment && !self.smart_proxy.lifecycle_environments.include?(environment)
|
28
20
|
fail _("Lifecycle environment '%{environment}' is not attached to this capsule.") % { :environment => environment.name }
|
29
21
|
end
|
30
|
-
|
31
|
-
ret
|
32
22
|
end
|
33
23
|
|
34
|
-
|
24
|
+
def combined_repos_available_to_capsule(environment = nil, content_view = nil, repository = nil)
|
25
|
+
lifecycle_environment_check(environment, repository)
|
26
|
+
if repository
|
27
|
+
[repository]
|
28
|
+
else
|
29
|
+
repositories_available_to_capsule(environment, content_view) + puppet_environments_available_to_capsule(environment, content_view)
|
30
|
+
end
|
31
|
+
end
|
35
32
|
|
36
|
-
def
|
33
|
+
def repositories_available_to_capsule(environments, content_view)
|
37
34
|
environments = @smart_proxy.lifecycle_environments if environments.nil?
|
38
35
|
yum_repos = Katello::Repository.in_environment(environments)
|
39
36
|
yum_repos = yum_repos.in_content_views([content_view]) if content_view
|
40
|
-
yum_repos.
|
37
|
+
yum_repos.smart_proxy_syncable
|
41
38
|
end
|
42
39
|
|
43
|
-
def
|
40
|
+
def puppet_environments_available_to_capsule(environments, content_view)
|
44
41
|
environments = @smart_proxy.lifecycle_environments if environments.nil?
|
45
42
|
puppet_environments = Katello::ContentViewPuppetEnvironment.in_environment(environments)
|
46
43
|
puppet_environments = puppet_environments.in_content_view(content_view) if content_view
|
@@ -14,5 +14,13 @@ provider_type: Ansible
|
|
14
14
|
kind: job_template
|
15
15
|
%>
|
16
16
|
|
17
|
-
<%
|
18
|
-
|
17
|
+
<% if @host.operatingsystem.family == 'Suse' -%>
|
18
|
+
<% advisories = input(:errata).split(',').join(' ') -%>
|
19
|
+
<%= render_template('Run Command - Ansible Default', :command => "zypper -n install -t patch #{advisories}") -%>
|
20
|
+
<% elsif @host.operatingsystem.family == 'Debian' -%>
|
21
|
+
<% advisories = input(:errata).split(',').map { |e| @host.debs_for_erratum(e) }.join(' ') -%>
|
22
|
+
<%= render_template('Run Command - Ansible Default', :command => "apt-get -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\" -y --only-upgrade install -y #{advisories}") %>
|
23
|
+
<% else -%>
|
24
|
+
<% advisories = input(:errata).split(',').map { |e| "--advisory=#{e}" }.join(' ') -%>
|
25
|
+
<%= render_template('Run Command - Ansible Default', :command => "yum -y update-minimal #{advisories}") -%>
|
26
|
+
<% end -%>
|