katello 4.13.1 → 4.14.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/hosts/host_and_hostgroup_edit.js +12 -8
- data/app/assets/javascripts/katello/locale/bn/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ca/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/cs/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +275 -23
- data/app/assets/javascripts/katello/locale/de/katello.js +280 -28
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/el/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/en/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/en_US/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/es/katello.js +276 -24
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/fr/katello.js +283 -31
- data/app/assets/javascripts/katello/locale/gl/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/gu/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/hi/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/id/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/it/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ja/katello.js +283 -31
- data/app/assets/javascripts/katello/locale/ka/katello.js +280 -28
- data/app/assets/javascripts/katello/locale/kn/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ko/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/mr/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/or/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/pa/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/pl/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/pt/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +276 -24
- data/app/assets/javascripts/katello/locale/ro/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ru/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/sl/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ta/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/te/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/tr/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/vi/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/zh/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +283 -31
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +274 -22
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +118 -74
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +15 -10
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +1 -1
- data/app/controllers/katello/api/v2/api_controller.rb +7 -0
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +4 -4
- data/app/controllers/katello/api/v2/debs_controller.rb +3 -2
- data/app/controllers/katello/api/v2/environments_controller.rb +2 -4
- data/app/controllers/katello/api/v2/host_contents_controller.rb +8 -3
- data/app/controllers/katello/api/v2/host_errata_controller.rb +4 -4
- data/app/controllers/katello/api/v2/host_packages_controller.rb +2 -2
- data/app/controllers/katello/api/v2/organizations_controller.rb +1 -1
- data/app/controllers/katello/api/v2/packages_controller.rb +13 -3
- data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +6 -2
- data/app/controllers/katello/api/v2/repositories_controller.rb +3 -4
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +13 -14
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +15 -9
- data/app/controllers/katello/api/v2/sync_controller.rb +2 -2
- data/app/controllers/katello/application_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/authorization.rb +3 -2
- data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +28 -0
- data/app/controllers/katello/concerns/api/v2/registration_commands_controller_extensions.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +4 -3
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +2 -4
- data/app/controllers/katello/remote_execution_controller.rb +53 -58
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +19 -2
- data/app/helpers/katello/katello_urls_helper.rb +1 -1
- data/app/lib/actions/katello/alternate_content_source/alternate_content_source_common.rb +1 -1
- data/app/lib/actions/katello/alternate_content_source/update.rb +2 -1
- data/app/lib/actions/katello/capsule_content/verify_checksum.rb +1 -2
- data/app/lib/actions/katello/content_view/publish.rb +1 -0
- data/app/lib/actions/katello/content_view_version/create_repos.rb +1 -0
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +3 -2
- data/app/lib/actions/katello/environment/{publish_repositories.rb → publish_container_repositories.rb} +10 -8
- data/app/lib/actions/katello/foreman/content_update.rb +4 -6
- data/app/lib/actions/katello/host/hypervisors_update.rb +6 -4
- data/app/lib/actions/katello/repository/create.rb +4 -4
- data/app/lib/actions/katello/repository/import_upload.rb +4 -6
- data/app/lib/actions/katello/repository/metadata_generate.rb +1 -0
- data/app/lib/actions/katello/repository/update.rb +3 -3
- data/app/lib/actions/katello/repository_set/enable_repository.rb +5 -6
- data/app/lib/actions/middleware/backend_services_check.rb +3 -2
- data/app/lib/actions/pulp3/abstract_async_task.rb +2 -4
- data/app/lib/actions/pulp3/capsule_content/verify_checksum.rb +1 -2
- data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +5 -1
- data/app/lib/actions/pulp3/orchestration/repository/delete.rb +5 -2
- data/app/lib/actions/pulp3/repository/save_version.rb +3 -5
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +5 -9
- data/app/lib/katello/errors.rb +1 -0
- data/app/lib/katello/http_resource.rb +1 -0
- data/app/lib/katello/lazy_accessor.rb +1 -1
- data/app/lib/katello/resources/candlepin/candlepin_ping.rb +0 -5
- data/app/lib/katello/resources/candlepin/owner.rb +1 -1
- data/app/lib/katello/resources/candlepin/pool.rb +1 -2
- data/app/lib/katello/resources/candlepin/upstream_job.rb +1 -1
- data/app/lib/katello/resources/cdn.rb +3 -2
- data/app/lib/katello/resources/discovery/yum.rb +3 -3
- data/app/lib/katello/util/cdn_var_substitutor.rb +5 -3
- data/app/lib/katello/util/data.rb +3 -2
- data/app/lib/katello/util/errata.rb +4 -3
- data/app/lib/katello/util/package.rb +3 -3
- data/app/lib/katello/util/path_with_substitutions.rb +1 -1
- data/app/lib/katello/util/report_table.rb +3 -2
- data/app/lib/katello/util/url_matcher.rb +1 -1
- data/app/lib/katello/validators/alternate_content_source_path_validator.rb +4 -3
- data/app/lib/katello/validators/alternate_content_source_products_validator.rb +5 -7
- data/app/lib/katello/validators/container_image_name_validator.rb +1 -1
- data/app/lib/katello/validators/katello_name_format_validator.rb +2 -2
- data/app/lib/katello/validators/no_trailing_space_validator.rb +2 -2
- data/app/lib/katello/validators/prior_validator.rb +2 -2
- data/app/lib/katello/validators/product_unique_attribute_validator.rb +2 -4
- data/app/models/katello/activation_key.rb +4 -6
- data/app/models/katello/alternate_content_source.rb +1 -1
- data/app/models/katello/authorization/host_tracer.rb +1 -2
- data/app/models/katello/candlepin/repository_mapper.rb +2 -2
- data/app/models/katello/concerns/host_managed_extensions.rb +41 -10
- data/app/models/katello/concerns/hostgroup_extensions.rb +2 -4
- data/app/models/katello/concerns/location_extensions.rb +2 -4
- data/app/models/katello/concerns/operatingsystem_extensions.rb +84 -16
- data/app/models/katello/concerns/smart_proxy_extensions.rb +4 -4
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +2 -0
- data/app/models/katello/content_view.rb +5 -1
- data/app/models/katello/content_view_environment.rb +19 -4
- data/app/models/katello/content_view_environment_content_facet.rb +11 -0
- data/app/models/katello/erratum.rb +1 -1
- data/app/models/katello/event.rb +1 -1
- data/app/models/katello/glue/provider.rb +1 -2
- data/app/models/katello/hash_util.rb +1 -1
- data/app/models/katello/host/content_facet.rb +16 -3
- data/app/models/katello/host/subscription_facet.rb +27 -4
- data/app/models/katello/host_collection.rb +12 -8
- data/app/models/katello/pool.rb +5 -1
- data/app/models/katello/product.rb +7 -4
- data/app/models/katello/provider.rb +1 -2
- data/app/models/katello/repository.rb +18 -4
- data/app/models/katello/root_repository.rb +19 -0
- data/app/models/katello/rpm.rb +2 -2
- data/app/models/katello/subscription_facet_pool.rb +1 -1
- data/app/models/katello/sync_plan.rb +5 -4
- data/app/models/katello/task_status.rb +18 -18
- data/app/presenters/katello/product_host_count_presenter.rb +10 -0
- data/app/services/katello/candlepin/consumer.rb +11 -11
- data/app/services/katello/candlepin/message_handler.rb +3 -2
- data/app/services/katello/content_unit_indexer.rb +6 -0
- data/app/services/katello/pulp3/alternate_content_source.rb +1 -3
- data/app/services/katello/pulp3/api/core.rb +1 -1
- data/app/services/katello/pulp3/api/docker.rb +10 -0
- data/app/services/katello/pulp3/content_view_version/export.rb +1 -0
- data/app/services/katello/pulp3/content_view_version/import.rb +6 -4
- data/app/services/katello/pulp3/content_view_version/importable_products.rb +1 -3
- data/app/services/katello/pulp3/repository/apt.rb +4 -16
- data/app/services/katello/pulp3/repository/yum.rb +9 -5
- data/app/services/katello/pulp3/repository.rb +2 -2
- data/app/services/katello/pulp3/repository_mirror.rb +2 -9
- data/app/services/katello/pulp3/task.rb +4 -2
- data/app/services/katello/registration_manager.rb +13 -3
- data/app/services/katello/smart_proxy_helper.rb +1 -0
- data/app/views/dashboard/_host_collection_widget.html.erb +5 -4
- data/app/views/foreman/job_templates/install_errata.erb +2 -0
- data/app/views/foreman/job_templates/install_errata_-_katello_ansible_default.erb +2 -0
- data/app/views/foreman/job_templates/install_errata_by_search_query.erb +2 -0
- data/app/views/foreman/job_templates/install_errata_by_search_query_-_katello_ansible_default.erb +3 -1
- data/app/views/foreman/job_templates/install_packages_by_search_query_-_katello_ansible_default.erb +1 -1
- data/app/views/foreman/job_templates/remove_packages_by_search_query_-_katello_ansible_default.erb +2 -2
- data/app/views/foreman/job_templates/resolve_traces.erb +5 -1
- data/app/views/foreman/job_templates/update_packages_by_search_query_-_katello_ansible_default.erb +1 -1
- data/app/views/foreman/job_templates/upload_profile.erb +2 -0
- data/app/views/foreman/smart_proxies/_reclaim_space.html.erb +7 -5
- data/app/views/katello/api/v2/content_facet/base.json.rabl +18 -2
- data/app/views/katello/api/v2/packages/thindex.json.rabl +6 -0
- data/app/views/katello/api/v2/repositories/show.json.rabl +8 -8
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +1 -1
- data/app/views/katello/api/v2/subscription_facet/base.json.rabl +1 -1
- data/app/views/katello/api/v2/subscriptions/index.json.rabl +1 -0
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +1 -0
- data/app/views/overrides/activation_keys/_host_environment_select.html.erb +14 -11
- data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +4 -4
- data/config/routes/api/v2.rb +3 -1
- data/config/routes.rb +1 -3
- data/db/migrate/20160114200145_add_mirror_on_sync_to_repositories.rb +1 -0
- data/db/migrate/20160131182301_add_download_policy_to_katello_repositories.rb +1 -0
- data/db/migrate/20210119162528_delete_puppet_and_ostree_repos.rb +3 -0
- data/db/migrate/20240522165308_add_priority_to_content_view_environment_content_facet.rb +5 -0
- data/db/migrate/20240621121212_katello_repository_debs_id_bigint.rb +6 -0
- data/db/migrate/20240729192228_add_convert2rhel_to_host_facets.rb +9 -0
- data/db/seeds.d/102-organizations.rb +5 -7
- data/db/seeds.d/150-module_job_templates.rb +7 -9
- data/db/seeds.d/75-job_templates.rb +9 -16
- data/engines/bastion_katello/README.md +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb-info.html +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-content-hosts.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/package-info.html +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +28 -27
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +2 -2
- data/lib/katello/engine.rb +1 -8
- data/lib/katello/permission_creator.rb +3 -2
- data/lib/katello/plugin.rb +31 -27
- data/lib/katello/tasks/clean_old_file_repos.rake +2 -4
- data/lib/katello/tasks/reset.rake +3 -4
- data/lib/katello/version.rb +1 -1
- data/lib/katello.rb +0 -2
- data/lib/monkeys/ar_postgres_evr_t.rb +2 -0
- data/locale/action_names.rb +1 -1
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +274 -22
- data/locale/bn_IN/katello.po +274 -22
- data/locale/ca/katello.po +274 -22
- data/locale/cs/katello.po +274 -22
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +275 -23
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +280 -28
- data/locale/de_AT/katello.po +274 -22
- data/locale/de_DE/katello.po +274 -22
- data/locale/el/katello.po +274 -22
- data/locale/en/katello.po +274 -22
- data/locale/en_GB/katello.po +274 -22
- data/locale/en_US/katello.po +274 -22
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +276 -24
- data/locale/et_EE/katello.po +274 -22
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +283 -31
- data/locale/gl/katello.po +274 -22
- data/locale/gu/katello.po +274 -22
- data/locale/he_IL/katello.po +274 -22
- data/locale/hi/katello.po +274 -22
- data/locale/id/katello.po +274 -22
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +274 -22
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +283 -31
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +280 -28
- data/locale/katello.pot +1001 -527
- data/locale/kn/katello.po +274 -22
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +274 -22
- data/locale/ml_IN/katello.po +274 -22
- data/locale/mr/katello.po +274 -22
- data/locale/nl_NL/katello.po +274 -22
- data/locale/or/katello.po +274 -22
- data/locale/pa/katello.po +274 -22
- data/locale/pl/katello.po +274 -22
- data/locale/pl_PL/katello.po +274 -22
- data/locale/pt/katello.po +274 -22
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +276 -24
- data/locale/ro/katello.po +274 -22
- data/locale/ro_RO/katello.po +274 -22
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +274 -22
- data/locale/sl/katello.po +274 -22
- data/locale/sv_SE/katello.po +274 -22
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +274 -22
- data/locale/ta_IN/katello.po +274 -22
- data/locale/te/katello.po +274 -22
- data/locale/tr/katello.po +274 -22
- data/locale/vi/katello.po +274 -22
- data/locale/vi_VN/katello.po +274 -22
- data/locale/zh/katello.po +274 -22
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +283 -31
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +274 -22
- data/webpack/ForemanColumnExtensions/index.js +44 -1
- data/webpack/components/Table/TableWrapper.js +6 -0
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.js +24 -3
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +124 -56
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/HostContentViewActions.js +2 -3
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/contentViewDetailsCard.test.js +44 -10
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +75 -31
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionConstants.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionHooks.js +1 -1
- data/webpack/components/extensions/HostDetails/Tabs/customizedRexUrlHelpers.js +22 -7
- data/webpack/components/extensions/Hosts/ActionsBar/ActionsBar.scss +14 -0
- data/webpack/components/extensions/Hosts/ActionsBar/index.js +82 -23
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCVModal/index.js +5 -2
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/02_BulkErrataTable.js +171 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/04_Review.js +160 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/04_ReviewFooter.js +99 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/BulkErrataWizard.js +157 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/index.js +24 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/02_BulkPackagesTable.js +157 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/04_Review.js +168 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/04_ReviewFooter.js +141 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/BulkPackagesWizard.js +252 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/index.js +24 -0
- data/webpack/components/extensions/Hosts/BulkActions/HostReview.js +176 -0
- data/webpack/components/extensions/Hosts/TableRowActions/index.js +17 -0
- data/webpack/global_index.js +11 -3
- data/webpack/redux/actions/RedHatRepositories/repositorySetRepositories.js +5 -6
- data/webpack/redux/reducers/RedHatRepositories/__tests__/repositorySetRepositories.test.js +1 -1
- data/webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.js +1 -1
- data/webpack/scenes/ContentViews/Copy/CopyContentViewModal.js +2 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +2 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewBulkAddModal.js +2 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +2 -1
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +2 -1
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +2 -2
- data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +2 -1
- data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +3 -2
- data/webpack/scenes/ContentViews/Publish/PublishContentViewWizard.js +2 -1
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +2 -1
- data/webpack/scenes/ContentViews/components/CVBreadCrumb.js +2 -1
- data/webpack/scenes/ContentViews/components/ContentViewSelect/ContentViewSelectOption.js +2 -2
- data/webpack/scenes/Subscriptions/Details/SubscriptionAttributes.js +1 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailInfo.test.js.snap +10 -0
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +6 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +2 -0
- data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +14 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +1 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +10 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.fixtures.js +1 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/__snapshots__/SubscriptionsToolbar.test.js.snap +10 -0
- data/webpack/scenes/Tasks/helpers.js +1 -1
- metadata +24 -63
- data/app/assets/javascripts/katello/containers/container.js +0 -304
- data/app/lib/katello/util/http_helper.rb +0 -15
- data/app/models/732bd3db9f64c621c64d2be4f2a838727aac0845.patch +0 -61
- data/app/models/katello/repository.rb.bak +0 -978
- data/app/services/katello/pulp3/content_view_version/import_validator.rb.bak +0 -166
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb.bak +0 -164
- data/lib/katello/tasks/update_repository_expiry.rake +0 -114
- data/locale/bn/katello.po.time_stamp +0 -0
- data/locale/bn_IN/katello.po.time_stamp +0 -0
- data/locale/ca/katello.po.time_stamp +0 -0
- data/locale/cs/katello.po.time_stamp +0 -0
- data/locale/cs_CZ/katello.po.time_stamp +0 -0
- data/locale/de/katello.po.time_stamp +0 -0
- data/locale/de_AT/katello.po.time_stamp +0 -0
- data/locale/de_DE/katello.po.time_stamp +0 -0
- data/locale/el/katello.po.time_stamp +0 -0
- data/locale/en/katello.po.time_stamp +0 -0
- data/locale/en_GB/katello.po.time_stamp +0 -0
- data/locale/en_US/katello.po.time_stamp +0 -0
- data/locale/es/katello.po.time_stamp +0 -0
- data/locale/et_EE/katello.po.time_stamp +0 -0
- data/locale/fr/katello.po.time_stamp +0 -0
- data/locale/gl/katello.po.time_stamp +0 -0
- data/locale/gu/katello.po.time_stamp +0 -0
- data/locale/he_IL/katello.po.time_stamp +0 -0
- data/locale/hi/katello.po.time_stamp +0 -0
- data/locale/id/katello.po.time_stamp +0 -0
- data/locale/it/katello.po.time_stamp +0 -0
- data/locale/ja/katello.po.time_stamp +0 -0
- data/locale/ka/katello.po.time_stamp +0 -0
- data/locale/kn/katello.po.time_stamp +0 -0
- data/locale/ko/katello.po.time_stamp +0 -0
- data/locale/ml_IN/katello.po.time_stamp +0 -0
- data/locale/mr/katello.po.time_stamp +0 -0
- data/locale/nl_NL/katello.po.time_stamp +0 -0
- data/locale/or/katello.po.time_stamp +0 -0
- data/locale/pa/katello.po.time_stamp +0 -0
- data/locale/pl/katello.po.time_stamp +0 -0
- data/locale/pl_PL/katello.po.time_stamp +0 -0
- data/locale/pt/katello.po.time_stamp +0 -0
- data/locale/pt_BR/katello.po.time_stamp +0 -0
- data/locale/ro/katello.po.time_stamp +0 -0
- data/locale/ro_RO/katello.po.time_stamp +0 -0
- data/locale/ru/katello.po.time_stamp +0 -0
- data/locale/sl/katello.po.time_stamp +0 -0
- data/locale/sv_SE/katello.po.time_stamp +0 -0
- data/locale/ta/katello.po.time_stamp +0 -0
- data/locale/ta_IN/katello.po.time_stamp +0 -0
- data/locale/te/katello.po.time_stamp +0 -0
- data/locale/tr/katello.po.time_stamp +0 -0
- data/locale/vi/katello.po.time_stamp +0 -0
- data/locale/vi_VN/katello.po.time_stamp +0 -0
- data/locale/zh/katello.po.time_stamp +0 -0
- data/locale/zh_CN/katello.po.time_stamp +0 -0
- data/locale/zh_TW/katello.po.time_stamp +0 -0
- data/webpack/global_test_setup.js.bak +0 -59
- data/webpack/utils/useKatelloDocUrl.js +0 -18
@@ -32,6 +32,8 @@ module Katello
|
|
32
32
|
|
33
33
|
EXPORTABLE_TYPES = [YUM_TYPE, FILE_TYPE, ANSIBLE_COLLECTION_TYPE, DOCKER_TYPE, DEB_TYPE].freeze
|
34
34
|
|
35
|
+
ALLOWED_UPDATE_FIELDS = ['version_href', 'last_indexed'].freeze
|
36
|
+
|
35
37
|
define_model_callbacks :sync, :only => :after
|
36
38
|
|
37
39
|
belongs_to :root, :inverse_of => :repositories, :class_name => "Katello::RootRepository"
|
@@ -119,8 +121,10 @@ module Katello
|
|
119
121
|
|
120
122
|
before_validation :set_pulp_id
|
121
123
|
before_validation :set_container_repository_name, :unless => :skip_container_name?
|
124
|
+
before_update :prevent_updates, :unless => :allow_updates?
|
122
125
|
|
123
126
|
scope :has_url, -> { joins(:root).where.not("#{RootRepository.table_name}.url" => nil) }
|
127
|
+
scope :not_uln, -> { joins(:root).where("#{RootRepository.table_name}.url NOT LIKE 'uln%'") }
|
124
128
|
scope :on_demand, -> { joins(:root).where("#{RootRepository.table_name}.download_policy" => ::Katello::RootRepository::DOWNLOAD_ON_DEMAND) }
|
125
129
|
scope :immediate, -> { joins(:root).where("#{RootRepository.table_name}.download_policy" => ::Katello::RootRepository::DOWNLOAD_IMMEDIATE) }
|
126
130
|
scope :non_immediate, -> { joins(:root).where.not("#{RootRepository.table_name}.download_policy" => ::Katello::RootRepository::DOWNLOAD_IMMEDIATE) }
|
@@ -166,7 +170,7 @@ module Katello
|
|
166
170
|
scoped_search :on => :name, :relation => :product, :rename => :product_name
|
167
171
|
scoped_search :on => :id, :relation => :product, :rename => :product_id, :only_explicit => true
|
168
172
|
scoped_search :on => :label, :relation => :root, :complete_value => true, :only_explicit => true
|
169
|
-
scoped_search :on => :content_label, :ext_method => :search_by_content_label
|
173
|
+
scoped_search :on => :content_label, :ext_method => :search_by_content_label, :default_operator => :like
|
170
174
|
|
171
175
|
delegate :product, :redhat?, :custom?, :to => :root
|
172
176
|
delegate :yum?, :docker?, :deb?, :file?, :ostree?, :ansible_collection?, :generic?, :to => :root
|
@@ -179,7 +183,7 @@ module Katello
|
|
179
183
|
:deb_components, :deb_architectures, :ssl_ca_cert_id, :ssl_ca_cert, :ssl_client_cert, :ssl_client_cert_id,
|
180
184
|
:ssl_client_key_id, :os_versions, :ssl_client_key, :ignorable_content, :description, :include_tags, :exclude_tags,
|
181
185
|
:ansible_collection_requirements, :ansible_collection_auth_url, :ansible_collection_auth_token,
|
182
|
-
:http_proxy_policy, :http_proxy_id, :to => :root
|
186
|
+
:http_proxy_policy, :http_proxy_id, :prevent_updates, :to => :root
|
183
187
|
|
184
188
|
delegate :content_id, to: :root, allow_nil: true
|
185
189
|
delegate :repository_type, to: :root
|
@@ -345,9 +349,10 @@ module Katello
|
|
345
349
|
def content_counts
|
346
350
|
content_counts = {}
|
347
351
|
RepositoryTypeManager.defined_repository_types[content_type].content_types_to_index.each do |content_type|
|
348
|
-
|
352
|
+
case content_type&.model_class::CONTENT_TYPE
|
353
|
+
when DockerTag::CONTENT_TYPE
|
349
354
|
content_counts[DockerTag::CONTENT_TYPE] = docker_tags.count
|
350
|
-
|
355
|
+
when GenericContentUnit::CONTENT_TYPE
|
351
356
|
content_counts[content_type.content_type] = content_type&.model_class&.in_repositories(self)&.where(:content_type => content_type.content_type)&.count
|
352
357
|
else
|
353
358
|
content_counts[content_type.label] = content_type&.model_class&.in_repositories(self)&.count
|
@@ -791,6 +796,8 @@ module Katello
|
|
791
796
|
return true
|
792
797
|
elsif !self.custom? && self.redhat_deletable?(remove_from_content_view_versions)
|
793
798
|
return true
|
799
|
+
elsif Setting.find_by(name: 'delete_repo_across_cv')&.value
|
800
|
+
return true
|
794
801
|
else
|
795
802
|
errors.add(:base, _("Repository cannot be deleted since it has already been included in a published Content View. " \
|
796
803
|
"Please delete all Content View versions containing this repository before attempting to delete it "\
|
@@ -1007,6 +1014,7 @@ module Katello
|
|
1007
1014
|
repository_type.index_additional_data_proc&.call(self)
|
1008
1015
|
end
|
1009
1016
|
self.update!(last_indexed: DateTime.now)
|
1017
|
+
|
1010
1018
|
true
|
1011
1019
|
end
|
1012
1020
|
|
@@ -1048,6 +1056,12 @@ module Katello
|
|
1048
1056
|
DockerMetaTag.cleanup_tags
|
1049
1057
|
end
|
1050
1058
|
|
1059
|
+
def allow_updates?
|
1060
|
+
# allow the update if this repo is not in the default view
|
1061
|
+
return true unless in_default_view?
|
1062
|
+
root.allow_updates?(::Katello::Repository::ALLOWED_UPDATE_FIELDS)
|
1063
|
+
end
|
1064
|
+
|
1051
1065
|
apipie :class, desc: "A class representing #{model_name.human} object" do
|
1052
1066
|
name 'Repository'
|
1053
1067
|
refs 'Repository'
|
@@ -46,6 +46,8 @@ module Katello
|
|
46
46
|
MIRRORING_POLICY_COMPLETE = 'mirror_complete'.freeze
|
47
47
|
MIRRORING_POLICIES = [MIRRORING_POLICY_ADDITIVE, MIRRORING_POLICY_COMPLETE, MIRRORING_POLICY_CONTENT].freeze
|
48
48
|
|
49
|
+
ALLOWED_UPDATE_FIELDS = ['updated_at', 'content_id'].freeze
|
50
|
+
|
49
51
|
belongs_to :product, :inverse_of => :root_repositories, :class_name => "Katello::Product"
|
50
52
|
has_one :provider, :through => :product
|
51
53
|
|
@@ -115,6 +117,7 @@ module Katello
|
|
115
117
|
}
|
116
118
|
|
117
119
|
validates :container_push_name_format, inclusion: { in: ['label', 'id'].freeze, allow_nil: true}
|
120
|
+
before_update :prevent_updates, :unless => :allow_updates?
|
118
121
|
|
119
122
|
scope :subscribable, -> { where(content_type: RootRepository::SUBSCRIBABLE_TYPES) }
|
120
123
|
scope :skipable_metadata_check, -> { where(content_type: RootRepository::SKIPABLE_METADATA_TYPES) }
|
@@ -455,6 +458,22 @@ module Katello
|
|
455
458
|
end
|
456
459
|
end
|
457
460
|
|
461
|
+
def allow_updates?(additional_allowed_fields = [])
|
462
|
+
# allow updates for non-container-push repos, repos not in default view, and
|
463
|
+
# repos with a library instance
|
464
|
+
return true unless is_container_push && library_instance.present?
|
465
|
+
|
466
|
+
# let updates that contain ONLY allowed strings through
|
467
|
+
allowed_fields = ::Katello::RootRepository::ALLOWED_UPDATE_FIELDS + additional_allowed_fields
|
468
|
+
return true if (changed - allowed_fields).empty?
|
469
|
+
|
470
|
+
false
|
471
|
+
end
|
472
|
+
|
473
|
+
def prevent_updates
|
474
|
+
fail _("Cannot update properties of a container push repository")
|
475
|
+
end
|
476
|
+
|
458
477
|
apipie :class, desc: 'A class representing Repository object' do
|
459
478
|
name 'Repository'
|
460
479
|
refs 'Repository'
|
data/app/models/katello/rpm.rb
CHANGED
@@ -53,7 +53,7 @@ module Katello
|
|
53
53
|
# https://github.com/wvanbergen/scoped_search/blob/master/lib/scoped_search/query_builder.rb
|
54
54
|
if ['LIKE', 'NOT LIKE'].include?(operator)
|
55
55
|
conditions = "#{self.table_name}.#{column} #{operator} ?"
|
56
|
-
parameter = (value !~
|
56
|
+
parameter = (value !~ /^%|\*/ && value !~ /%|\*$/) ? "%#{value}%" : value.tr_s('%*', '%')
|
57
57
|
return { :conditions => conditions, :parameter => [parameter] }
|
58
58
|
elsif ['IN', 'NOT IN'].include?(operator)
|
59
59
|
conditions = "#{self.table_name}.#{column} #{operator} (#{value.split(',').collect { '?' }.join(',')})"
|
@@ -124,7 +124,7 @@ module Katello
|
|
124
124
|
end
|
125
125
|
|
126
126
|
def self.scoped_search_evr_like(operator, value)
|
127
|
-
val = (value !~
|
127
|
+
val = (value !~ /^%|\*/ && value !~ /%|\*$/) ? "%#{value}%" : value.tr_s('%*', '%')
|
128
128
|
evr = Util::Package.parse_evr(val)
|
129
129
|
(e, v, r) = [evr[:epoch], evr[:version], evr[:release]]
|
130
130
|
conditions = []
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Katello
|
2
2
|
class SubscriptionFacetPool < Katello::Model
|
3
|
-
#
|
3
|
+
# NOTE: Do not use active record call backs or dependent references on this class
|
4
4
|
# Direct deletes are made in Pool#import_hosts (instead of destroys).
|
5
5
|
belongs_to :subscription_facet, :inverse_of => :subscription_facet_pools, :class_name => 'Katello::Host::SubscriptionFacet'
|
6
6
|
belongs_to :pool, :inverse_of => :subscription_facet_pools, :class_name => 'Katello::Pool'
|
@@ -148,13 +148,14 @@ module Katello
|
|
148
148
|
if interval.nil?
|
149
149
|
fail _("Interval cannot be nil")
|
150
150
|
end
|
151
|
-
|
151
|
+
case interval.downcase
|
152
|
+
when "hourly"
|
152
153
|
cron = min.to_s + " * * * *"
|
153
|
-
|
154
|
+
when "daily"
|
154
155
|
cron = min.to_s + " " + hour.to_s + " * * *"
|
155
|
-
|
156
|
+
when "weekly"
|
156
157
|
cron = min.to_s + " " + hour.to_s + " * * " + day.to_s
|
157
|
-
|
158
|
+
when CUSTOM_CRON
|
158
159
|
cron = cron_expression
|
159
160
|
else
|
160
161
|
fail _("Interval not set correctly")
|
@@ -154,18 +154,16 @@ module Katello
|
|
154
154
|
when :package
|
155
155
|
p = self.parameters[:packages]
|
156
156
|
first_package = p.first.is_a?(Hash) ? p.first[:name] : p.first
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
return _("all packages update")
|
168
|
-
end
|
157
|
+
if !p && p.length > 0 && (self.task_type == "package_update")
|
158
|
+
case self.overall_status
|
159
|
+
when "running"
|
160
|
+
return "updating"
|
161
|
+
when "waiting"
|
162
|
+
return "updating"
|
163
|
+
when "error"
|
164
|
+
return _("all packages update failed")
|
165
|
+
else
|
166
|
+
return _("all packages update")
|
169
167
|
end
|
170
168
|
end
|
171
169
|
|
@@ -229,14 +227,15 @@ module Katello
|
|
229
227
|
ret = []
|
230
228
|
task_type = self.task_type.to_s
|
231
229
|
|
232
|
-
|
230
|
+
case task_type
|
231
|
+
when /^package_group/
|
233
232
|
action = task_type.include?("remove") ? :removed : :installed
|
234
233
|
ret = packages_change_description(result[:details][:package_group], action)
|
235
|
-
|
234
|
+
when "package_install", "errata_install"
|
236
235
|
ret = packages_change_description(result[:details][:rpm], :installed)
|
237
|
-
|
236
|
+
when "package_update"
|
238
237
|
ret = packages_change_description(result[:details][:rpm], :updated)
|
239
|
-
|
238
|
+
when "package_remove"
|
240
239
|
ret = packages_change_description(result[:details][:rpm], :removed)
|
241
240
|
end
|
242
241
|
ret
|
@@ -246,13 +245,14 @@ module Katello
|
|
246
245
|
errors, stacktrace = self.result[:errors]
|
247
246
|
return "" unless errors
|
248
247
|
# Handle not very friendly Pulp message
|
249
|
-
|
248
|
+
case errors
|
249
|
+
when /^\(.*\)$/
|
250
250
|
if stacktrace.class == Array
|
251
251
|
stacktrace.last.split(":").first
|
252
252
|
else
|
253
253
|
stacktrace.split("(").first
|
254
254
|
end
|
255
|
-
|
255
|
+
when /^\[.*,.*\]$/m
|
256
256
|
result = errors.split(",").map do |error|
|
257
257
|
error.gsub(/^\W+|\W+$/, "")
|
258
258
|
end
|
@@ -136,26 +136,26 @@ module Katello
|
|
136
136
|
def self.distribution_to_puppet_os(name)
|
137
137
|
return ::Operatingsystem::REDHAT_ATOMIC_HOST_OS if name == ::Operatingsystem::REDHAT_ATOMIC_HOST_DISTRO_NAME
|
138
138
|
|
139
|
-
|
140
|
-
|
139
|
+
case name.downcase
|
140
|
+
when /red\s*hat/
|
141
141
|
'RedHat'
|
142
|
-
|
142
|
+
when /centos/
|
143
143
|
'CentOS'
|
144
|
-
|
144
|
+
when /fedora/
|
145
145
|
'Fedora'
|
146
|
-
|
146
|
+
when /sles/, /suse.*enterprise.*/
|
147
147
|
'SLES'
|
148
|
-
|
148
|
+
when /debian/
|
149
149
|
'Debian'
|
150
|
-
|
150
|
+
when /ubuntu/
|
151
151
|
'Ubuntu'
|
152
|
-
|
152
|
+
when /oracle/
|
153
153
|
'OracleLinux'
|
154
|
-
|
154
|
+
when /almalinux/
|
155
155
|
'AlmaLinux'
|
156
|
-
|
156
|
+
when /rocky/
|
157
157
|
'Rocky'
|
158
|
-
|
158
|
+
when /amazon/
|
159
159
|
'Amazon'
|
160
160
|
else
|
161
161
|
'Unknown'
|
@@ -43,9 +43,10 @@ module Katello
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def pool_id
|
46
|
-
|
46
|
+
case subject
|
47
|
+
when 'pool.created', 'pool.deleted'
|
47
48
|
content['entityId']
|
48
|
-
|
49
|
+
when 'entitlement.created', 'entitlement.deleted'
|
49
50
|
content['referenceId']
|
50
51
|
end
|
51
52
|
end
|
@@ -38,6 +38,12 @@ module Katello
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
+
# Even after this bug (https://github.com/pulp/pulp_rpm/issues/2821) is fixed,
|
42
|
+
# it is possible to have duplicate errata asosociated to a repo.
|
43
|
+
if @content_type.label == 'erratum'
|
44
|
+
to_insert.uniq! { |row| row["pulp_id"] || row[:pulp_id] }
|
45
|
+
end
|
46
|
+
|
41
47
|
next if to_insert.empty?
|
42
48
|
insert_timestamps(to_insert)
|
43
49
|
if @content_type.mutable
|
@@ -3,9 +3,7 @@ module Katello
|
|
3
3
|
module Pulp3
|
4
4
|
class AlternateContentSource
|
5
5
|
include Katello::Pulp3::ServiceCommon
|
6
|
-
attr_accessor :acs
|
7
|
-
attr_accessor :smart_proxy
|
8
|
-
attr_accessor :repository
|
6
|
+
attr_accessor :acs, :smart_proxy, :repository
|
9
7
|
|
10
8
|
def initialize(acs, smart_proxy, repository = nil)
|
11
9
|
@acs = acs
|
@@ -264,7 +264,7 @@ module Katello
|
|
264
264
|
(response.count && (page_opts['offset'] < response.count)) ||
|
265
265
|
page_opts["offset"] == 0)
|
266
266
|
response = yield page_opts
|
267
|
-
results
|
267
|
+
results.concat(response.results)
|
268
268
|
page_opts[:offset] += page_size
|
269
269
|
end
|
270
270
|
|
@@ -19,6 +19,16 @@ module Katello
|
|
19
19
|
def container_push_api
|
20
20
|
PulpContainerClient::RepositoriesContainerPushApi.new(api_client)
|
21
21
|
end
|
22
|
+
|
23
|
+
def container_push_repo_for_name(name)
|
24
|
+
# There should be only one repository in Pulp with the requested name
|
25
|
+
container_push_api.list(name: name)&.results&.first
|
26
|
+
end
|
27
|
+
|
28
|
+
def container_push_distribution_for_repository(repository_href)
|
29
|
+
# There should be only one repository in Pulp with the requested repository_href
|
30
|
+
distributions_api.list(repository: repository_href)&.results&.first
|
31
|
+
end
|
22
32
|
end
|
23
33
|
end
|
24
34
|
end
|
@@ -8,6 +8,7 @@ module Katello
|
|
8
8
|
FORMATS = [SYNCABLE, IMPORTABLE].freeze
|
9
9
|
|
10
10
|
attr_reader :smart_proxy, :content_view_version, :destination_server, :from_content_view_version, :repository, :base_path
|
11
|
+
|
11
12
|
def self.create(options)
|
12
13
|
if options.delete(:format) == SYNCABLE
|
13
14
|
SyncableFormatExport.new(**options)
|
@@ -107,9 +107,10 @@ module Katello
|
|
107
107
|
end
|
108
108
|
|
109
109
|
def import_cv_name_from_export(name:, generated_for:)
|
110
|
-
|
110
|
+
case generated_for
|
111
|
+
when :library_import
|
111
112
|
::Katello::ContentView::IMPORT_LIBRARY
|
112
|
-
|
113
|
+
when :repository_import
|
113
114
|
name.gsub(/^Export/, 'Import')
|
114
115
|
else
|
115
116
|
name
|
@@ -138,9 +139,10 @@ module Katello
|
|
138
139
|
}
|
139
140
|
end
|
140
141
|
|
141
|
-
|
142
|
+
case generated_for
|
143
|
+
when :library_export
|
142
144
|
generated_for = :library_import
|
143
|
-
|
145
|
+
when :repository_export
|
144
146
|
generated_for = :repository_import
|
145
147
|
end
|
146
148
|
|
@@ -51,16 +51,6 @@ module Katello
|
|
51
51
|
popts
|
52
52
|
end
|
53
53
|
|
54
|
-
def mirror_publication_options
|
55
|
-
{
|
56
|
-
# Since we are synchronizing the "default" distribution from the simple publisher on the server,
|
57
|
-
# it will be included in the structured publish. Therefore, we MUST NOT use the simple publisher
|
58
|
-
# on the proxy, since this would collide!
|
59
|
-
#simple: true,
|
60
|
-
structured: true # publish real suites (e.g. 'stable')
|
61
|
-
}
|
62
|
-
end
|
63
|
-
|
64
54
|
def distribution_options(path)
|
65
55
|
{
|
66
56
|
base_path: path,
|
@@ -87,12 +77,10 @@ module Katello
|
|
87
77
|
# Not needed during incremental update due to dest_base_version
|
88
78
|
# -> Unless incrementally updating a CV repo that is a soft copy of its library instance.
|
89
79
|
# -> I.e. no filters and not an incremental version.
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
tasks << remove_all_content_from_repo(dest_repo_href)
|
95
|
-
end
|
80
|
+
# Don't perform extra content actions if the repo is a soft copy of its library instance.
|
81
|
+
# Taken care of by the IncrementalUpdate action.
|
82
|
+
if !dest_repo_id_map[:base_version] && !dest_repo.soft_copy_of_library?
|
83
|
+
tasks << remove_all_content_from_repo(dest_repo_href)
|
96
84
|
end
|
97
85
|
source_repo_ids.each do |source_repo_id|
|
98
86
|
source_repo_version = ::Katello::Repository.find(source_repo_id).version_href
|
@@ -22,7 +22,13 @@ module Katello
|
|
22
22
|
|
23
23
|
def publication_options(repository_version)
|
24
24
|
options = super(repository_version)
|
25
|
-
|
25
|
+
# To work around https://projects.theforeman.org/issues/37715
|
26
|
+
checksum_type = if root.checksum_type.nil?
|
27
|
+
'sha256'
|
28
|
+
else
|
29
|
+
root.checksum_type
|
30
|
+
end
|
31
|
+
options.merge(checksum_type: checksum_type)
|
26
32
|
end
|
27
33
|
|
28
34
|
def specific_create_options
|
@@ -57,10 +63,8 @@ module Katello
|
|
57
63
|
:distribution_family => distribution.results.first.release_name,
|
58
64
|
:distribution_bootable => self.class.distribution_bootable?(distribution)
|
59
65
|
)
|
60
|
-
|
61
|
-
|
62
|
-
repo.update!(:distribution_variant => distribution.results.first.variants.map(&:name).join(','))
|
63
|
-
end
|
66
|
+
if !distribution.results.first.variants.empty? && !distribution.results.first.variants.first.name.nil?
|
67
|
+
repo.update!(:distribution_variant => distribution.results.first.variants.map(&:name).join(','))
|
64
68
|
end
|
65
69
|
end
|
66
70
|
end
|
@@ -5,8 +5,8 @@ module Katello
|
|
5
5
|
class Repository
|
6
6
|
include Katello::Util::HttpProxy
|
7
7
|
include Katello::Pulp3::ServiceCommon
|
8
|
-
attr_accessor :repo
|
9
|
-
|
8
|
+
attr_accessor :repo, :smart_proxy
|
9
|
+
|
10
10
|
delegate :root, to: :repo
|
11
11
|
delegate :pulp3_api, to: :smart_proxy
|
12
12
|
|
@@ -2,6 +2,7 @@ module Katello
|
|
2
2
|
module Pulp3
|
3
3
|
class RepositoryMirror
|
4
4
|
attr_accessor :repo_service
|
5
|
+
|
5
6
|
delegate :repo, to: :repo_service
|
6
7
|
delegate :smart_proxy, to: :repo_service
|
7
8
|
|
@@ -166,21 +167,13 @@ module Katello
|
|
166
167
|
uri.to_s
|
167
168
|
end
|
168
169
|
|
169
|
-
def publication_options(repository_version)
|
170
|
-
popts = {repository_version: repository_version}
|
171
|
-
if (type_specific_options = repo_service.try(:mirror_publication_options))
|
172
|
-
popts.merge!(type_specific_options)
|
173
|
-
end
|
174
|
-
popts
|
175
|
-
end
|
176
|
-
|
177
170
|
def create_publication
|
178
171
|
if (href = version_href)
|
179
172
|
if repo_service.repo.content_type == "deb"
|
180
173
|
publication_data = api.publication_verbatim_class.new({repository_version: href})
|
181
174
|
api.publications_verbatim_api.create(publication_data)
|
182
175
|
else
|
183
|
-
publication_data = api.publication_class.new(
|
176
|
+
publication_data = api.publication_class.new(repository_version: href)
|
184
177
|
api.publications_api.create(publication_data)
|
185
178
|
end
|
186
179
|
end
|
@@ -39,6 +39,7 @@ module Katello
|
|
39
39
|
#needed for serialization in dynflow
|
40
40
|
|
41
41
|
attr_reader :pulp_data
|
42
|
+
|
42
43
|
delegate :[], :key?, :dig, :to_hash, :to => :task_data
|
43
44
|
|
44
45
|
def initialize(smart_proxy, data)
|
@@ -105,9 +106,10 @@ module Katello
|
|
105
106
|
end
|
106
107
|
|
107
108
|
def error
|
108
|
-
|
109
|
+
case task_data[:state]
|
110
|
+
when CANCELED
|
109
111
|
_("Task canceled")
|
110
|
-
|
112
|
+
when FAILED
|
111
113
|
if task_data[:error][:description].blank?
|
112
114
|
_("Pulp task error")
|
113
115
|
else
|
@@ -125,9 +125,11 @@ module Katello
|
|
125
125
|
# * organization_destroy: destroy some data associated with host, but
|
126
126
|
# leave items alone that will be removed later as part of org destroy
|
127
127
|
# * unregistering: unregister the host but don't destroy it
|
128
|
+
# * keep_kickstart_repository: ensure the KS repo ID is not set to nil
|
128
129
|
def unregister_host(host, options = {})
|
129
130
|
organization_destroy = options.fetch(:organization_destroy, false)
|
130
131
|
unregistering = options.fetch(:unregistering, false)
|
132
|
+
keep_kickstart_repository = options.fetch(:keep_kickstart_repository, false)
|
131
133
|
|
132
134
|
# if the first operation fails, just raise the error since there's nothing to clean up yet.
|
133
135
|
candlepin_consumer_destroy(host.subscription_facet.uuid) if !organization_destroy && host.subscription_facet.try(:uuid)
|
@@ -138,7 +140,11 @@ module Katello
|
|
138
140
|
host.subscription_facet.try(:destroy!)
|
139
141
|
|
140
142
|
if unregistering
|
141
|
-
|
143
|
+
if keep_kickstart_repository
|
144
|
+
remove_host_artifacts(host, kickstart_repository_id: host&.content_facet&.kickstart_repository_id)
|
145
|
+
else
|
146
|
+
remove_host_artifacts(host)
|
147
|
+
end
|
142
148
|
elsif organization_destroy
|
143
149
|
host.content_facet.try(:destroy!)
|
144
150
|
remove_host_artifacts(host, clear_content_facet: false)
|
@@ -152,7 +158,9 @@ module Katello
|
|
152
158
|
new_host = host.new_record?
|
153
159
|
unless new_host
|
154
160
|
host.save!
|
155
|
-
|
161
|
+
# Keep the kickstart repository ID so the host's Medium isn't unset
|
162
|
+
# Important for registering a host during provisioning
|
163
|
+
unregister_host(host, :unregistering => true, :keep_kickstart_repository => true)
|
156
164
|
host.reload
|
157
165
|
end
|
158
166
|
|
@@ -294,13 +302,15 @@ module Katello
|
|
294
302
|
subscription_facet
|
295
303
|
end
|
296
304
|
|
297
|
-
def remove_host_artifacts(host, clear_content_facet: true)
|
305
|
+
def remove_host_artifacts(host, clear_content_facet: true, kickstart_repository_id: nil)
|
306
|
+
Rails.logger.debug "Host ID: #{host.id}, clear_content_facet: #{clear_content_facet}, kickstart_repository_id: #{kickstart_repository_id}"
|
298
307
|
if host.content_facet && clear_content_facet
|
299
308
|
host.content_facet.bound_repositories = []
|
300
309
|
host.content_facet.applicable_errata = []
|
301
310
|
host.content_facet.uuid = nil
|
302
311
|
host.content_facet.content_view_environments = []
|
303
312
|
host.content_facet.content_source = ::SmartProxy.pulp_primary
|
313
|
+
host.content_facet.kickstart_repository_id = kickstart_repository_id
|
304
314
|
host.content_facet.save!
|
305
315
|
Rails.logger.debug "remove_host_artifacts: marking CVEs unchanged to prevent backend update"
|
306
316
|
host.content_facet.mark_cves_unchanged
|
@@ -18,13 +18,14 @@
|
|
18
18
|
</tr>
|
19
19
|
</thead>
|
20
20
|
<tbody>
|
21
|
+
<% installable_only = Setting['errata_status_installable'] %>
|
21
22
|
<% host_collections.each do |host_collection| %>
|
22
23
|
<tr>
|
23
24
|
<td>
|
24
|
-
<% if host_collection.security_updates? %>
|
25
|
-
<a href="/host_collections/<%= host_collection.id %>" style="text-align: center"><i class="label label-danger"> </i></a>
|
26
|
-
<% elsif host_collection.bugzilla_updates? || host_collection.enhancement_updates? %>
|
27
|
-
<a href="/host_collections/<%= host_collection.id %>" style="text-align: center"><i class="label label-warning"> </i></a>
|
25
|
+
<% if host_collection.security_updates?(installable_only: installable_only) %>
|
26
|
+
<a href="/host_collections/<%= host_collection.id %>" style="text-align: center" title="<%= installable_only ? _('Installable security errata') : _('Applicable security errata') %>"><i class="label label-danger"> </i></a>
|
27
|
+
<% elsif host_collection.bugzilla_updates?(installable_only: installable_only) || host_collection.enhancement_updates?(installable_only: installable_only) %>
|
28
|
+
<a href="/host_collections/<%= host_collection.id %>" style="text-align: center" title="<%= installable_only ? _('Installable bugfix/enhancement errata') : _('Applicable bugfix/enhancement errata') %>"><i class="label label-warning"> </i></a>
|
28
29
|
<% else %>
|
29
30
|
<a href="/host_collections/<%= host_collection.id %>" style="text-align: center"><i class="label label-success"> </i></a>
|
30
31
|
<% end %>
|
@@ -14,6 +14,7 @@ foreign_input_sets:
|
|
14
14
|
- template: Package Action - Script Default
|
15
15
|
exclude: action,package
|
16
16
|
%>
|
17
|
+
<%= snippet_if_exists(template_name + " custom pre") %>
|
17
18
|
<% if @host.operatingsystem.family == 'Suse' -%>
|
18
19
|
<% advisories = input(:errata).split(',').join(' ') -%>
|
19
20
|
<%= render_template('Package Action - Script Default', :action => 'install -n -t patch', :package => advisories) %>
|
@@ -21,3 +22,4 @@ foreign_input_sets:
|
|
21
22
|
<% advisories = input(:errata).split(',').map { |e| "--advisory=#{e}" }.join(' ') -%>
|
22
23
|
<%= render_template('Package Action - Script Default', :action => 'update-minimal', :package => advisories) %>
|
23
24
|
<% end -%>
|
25
|
+
<%= snippet_if_exists(template_name + " custom post") %>
|
@@ -14,6 +14,7 @@ provider_type: Ansible
|
|
14
14
|
kind: job_template
|
15
15
|
%>
|
16
16
|
|
17
|
+
<%= snippet_if_exists(template_name + " custom pre") %>
|
17
18
|
<% if @host.operatingsystem.family == 'Suse' -%>
|
18
19
|
<% advisories = input(:errata).split(',').join(' ') -%>
|
19
20
|
<%= render_template('Run Command - Ansible Default', :command => "zypper -n install -t patch #{advisories}") %>
|
@@ -21,3 +22,4 @@ kind: job_template
|
|
21
22
|
<% advisories = input(:errata).split(',').map { |e| "--advisory=#{e}" }.join(' ') -%>
|
22
23
|
<%= render_template('Run Command - Ansible Default', :command => "yum -y update-minimal #{advisories}") %>
|
23
24
|
<% end -%>
|
25
|
+
<%= snippet_if_exists(template_name + " custom post") %>
|