katello 4.14.0 → 4.15.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/common/chosen.jquery.js +3 -3
- data/app/assets/javascripts/katello/common/env_select_scroll.js +3 -3
- data/app/assets/javascripts/katello/common/katello.js +8 -7
- data/app/assets/javascripts/katello/common/katello_object.js +3 -3
- data/app/assets/javascripts/katello/common/menu.js +7 -7
- data/app/assets/javascripts/katello/hosts/host_and_hostgroup_edit.js +6 -6
- data/app/assets/javascripts/katello/locale/bn/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/ca/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/cs/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/de/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/el/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/en/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/en_US/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/es/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/fr/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/gl/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/gu/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/hi/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/id/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/it/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/ja/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/ka/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/kn/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/ko/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/mr/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/or/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/pa/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/pl/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/pt/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/ro/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/ru/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/sl/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/ta/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/te/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/tr/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/vi/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/zh/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +259 -28
- data/app/assets/javascripts/katello/organizations/download_certificate.js +1 -1
- data/app/assets/javascripts/katello/sync_management/sync_management.js +22 -18
- data/app/assets/javascripts/katello/widgets/env_content_view_selector.js +5 -5
- data/app/assets/javascripts/katello/widgets/path_selector.js +6 -6
- data/app/assets/javascripts/katello/widgets/subpanel_new.js +1 -1
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +7 -7
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +6 -1
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +131 -59
- data/app/controllers/katello/api/v2/api_controller.rb +1 -1
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +21 -10
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_environments_controller.rb +54 -0
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +3 -3
- data/app/controllers/katello/api/v2/content_views_controller.rb +1 -1
- data/app/controllers/katello/api/v2/environments_controller.rb +1 -1
- data/app/controllers/katello/api/v2/exports_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_collections_controller.rb +2 -2
- data/app/controllers/katello/api/v2/host_contents_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_errata_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -4
- data/app/controllers/katello/api/v2/organizations_controller.rb +2 -1
- data/app/controllers/katello/api/v2/repositories_controller.rb +3 -2
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +10 -16
- data/app/controllers/katello/concerns/api/v2/multi_cv_params_handling.rb +24 -0
- data/app/controllers/katello/concerns/authorization/api/v2/content_views_controller.rb +2 -5
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +1 -1
- data/app/controllers/katello/concerns/registration_commands_controller_extensions.rb +1 -1
- data/app/helpers/katello/concerns/smart_proxy_helper_extensions.rb +5 -5
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +2 -2
- data/app/helpers/katello/katello_url_helper.rb +1 -1
- data/app/lib/actions/candlepin/product/content_create.rb +12 -1
- data/app/lib/actions/candlepin/product/content_update.rb +21 -4
- data/app/lib/actions/katello/activation_key/reassign.rb +4 -3
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +8 -3
- data/app/lib/actions/katello/capsule_content/update_content_counts.rb +21 -3
- data/app/lib/actions/katello/cdn_configuration/update.rb +1 -1
- data/app/lib/actions/katello/content_view/capsule_sync.rb +17 -1
- data/app/lib/actions/katello/content_view/incremental_updates.rb +1 -1
- data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +1 -1
- data/app/lib/actions/katello/content_view/remove.rb +8 -12
- data/app/lib/actions/katello/content_view_version/import.rb +1 -1
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +2 -2
- data/app/lib/actions/katello/flatpak/scan_remote.rb +62 -0
- data/app/lib/actions/katello/host/hypervisors.rb +1 -1
- data/app/lib/actions/katello/product/content_create.rb +28 -19
- data/app/lib/actions/katello/product/content_destroy.rb +6 -5
- data/app/lib/actions/katello/product/destroy.rb +1 -1
- data/app/lib/actions/katello/repository/clone_contents.rb +14 -0
- data/app/lib/actions/katello/repository/create.rb +24 -17
- data/app/lib/actions/katello/repository/create_container_push_root.rb +44 -0
- data/app/lib/actions/katello/repository/create_root.rb +5 -14
- data/app/lib/actions/katello/repository/destroy.rb +3 -3
- data/app/lib/actions/katello/repository/discover.rb +1 -1
- data/app/lib/actions/katello/repository/finish_upload.rb +13 -0
- data/app/lib/actions/katello/repository/import_upload.rb +1 -1
- data/app/lib/actions/katello/repository/sync.rb +16 -0
- data/app/lib/actions/katello/repository/update.rb +11 -20
- data/app/lib/actions/katello/repository/upload_files.rb +1 -1
- data/app/lib/actions/katello/repository_set/enable_repository.rb +1 -1
- data/app/lib/actions/katello/repository_set/scan_cdn.rb +1 -1
- data/app/lib/actions/katello/upstream_subscriptions/bind_entitlement.rb +1 -1
- data/app/lib/actions/pulp3/capsule_content/sync.rb +1 -1
- data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +6 -2
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/repository/create.rb +6 -1
- data/app/lib/actions/pulp3/orchestration/repository/trigger_update_repo_cert_guard.rb +1 -1
- data/app/lib/actions/pulp3/repository/initialize.rb +17 -0
- data/app/lib/actions/pulp3/repository/refresh_distribution.rb +1 -1
- data/app/lib/katello/api/constraints/register_with_activation_key_constraint.rb +11 -0
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +1 -1
- data/app/lib/katello/http_resource.rb +6 -6
- data/app/lib/katello/messaging/stomp_connection.rb +4 -4
- data/app/lib/katello/resources/candlepin/activation_key.rb +1 -1
- data/app/lib/katello/resources/candlepin/owner.rb +1 -1
- data/app/lib/katello/resources/candlepin/product.rb +1 -1
- data/app/lib/katello/resources/candlepin.rb +1 -1
- data/app/lib/katello/resources/cdn/katello_cdn.rb +3 -3
- data/app/lib/katello/resources/cdn.rb +1 -1
- data/app/lib/katello/resources/discovery/container.rb +5 -3
- data/app/lib/katello/resources/discovery/yum.rb +3 -1
- data/app/lib/katello/resources/registry.rb +0 -3
- data/app/lib/katello/util/candlepin_repository_checker.rb +2 -2
- data/app/lib/katello/util/cveak_migrator.rb +38 -0
- data/app/lib/katello/util/deb.rb +9 -0
- data/app/lib/katello/util/deduplication_migrator.rb +8 -8
- data/app/lib/katello/util/model.rb +2 -2
- data/app/lib/katello/util/search.rb +5 -5
- data/app/lib/katello/util/task_status.rb +19 -19
- data/app/lib/katello/util/url_matcher.rb +3 -3
- data/app/lib/katello/validators/content_view_environment_org_validator.rb +2 -1
- data/app/lib/katello/validators/katello_url_format_validator.rb +2 -2
- data/app/mailers/katello/errata_mailer.rb +1 -4
- data/app/models/katello/activation_key.rb +123 -27
- data/app/models/katello/alternate_content_source.rb +5 -5
- data/app/models/katello/authorization/activation_key.rb +1 -1
- data/app/models/katello/authorization/content_view_environment.rb +7 -0
- data/app/models/katello/cdn_configuration.rb +1 -1
- data/app/models/katello/concerns/content_facet_host_extensions.rb +24 -2
- data/app/models/katello/concerns/host_managed_extensions.rb +29 -22
- data/app/models/katello/concerns/organization_extensions.rb +4 -4
- data/app/models/katello/concerns/redhat_extensions.rb +1 -1
- data/app/models/katello/concerns/smart_proxy_extensions.rb +84 -39
- data/app/models/katello/content.rb +3 -3
- data/app/models/katello/content_view.rb +15 -18
- data/app/models/katello/content_view_environment.rb +56 -15
- data/app/models/katello/content_view_environment_activation_key.rb +20 -0
- data/app/models/katello/content_view_erratum_filter_rule.rb +1 -1
- data/app/models/katello/content_view_filter.rb +2 -2
- data/app/models/katello/content_view_history.rb +1 -1
- data/app/models/katello/content_view_repository.rb +1 -1
- data/app/models/katello/content_view_version.rb +3 -3
- data/app/models/katello/content_view_version_export_history.rb +2 -2
- data/app/models/katello/content_view_version_import_history.rb +1 -1
- data/app/models/katello/events/delete_latest_content_view_version.rb +1 -1
- data/app/models/katello/flatpak_remote.rb +11 -0
- data/app/models/katello/flatpak_remote_repository.rb +12 -0
- data/app/models/katello/flatpak_remote_repository_manifest.rb +10 -0
- data/app/models/katello/glue/candlepin/activation_key.rb +1 -1
- data/app/models/katello/glue/candlepin/candlepin_object.rb +1 -1
- data/app/models/katello/glue/candlepin/pool.rb +1 -1
- data/app/models/katello/glue/pulp/repos.rb +1 -1
- data/app/models/katello/host/content_facet.rb +33 -17
- data/app/models/katello/host/info_provider.rb +2 -4
- data/app/models/katello/host/subscription_facet.rb +3 -3
- data/app/models/katello/host_available_module_stream.rb +1 -1
- data/app/models/katello/installed_product.rb +2 -2
- data/app/models/katello/kt_environment.rb +11 -6
- data/app/models/katello/ping.rb +2 -3
- data/app/models/katello/repository.rb +40 -6
- data/app/models/katello/rhel_lifecycle_status.rb +10 -10
- data/app/models/katello/root_repository.rb +14 -18
- data/app/models/katello/task_status.rb +1 -1
- data/app/models/katello/upstream_pool.rb +2 -2
- data/app/presenters/katello/product_content_presenter.rb +2 -2
- data/app/presenters/katello/repository_presenter.rb +3 -3
- data/app/presenters/katello/sync_status_presenter.rb +3 -3
- data/app/services/cert/certs.rb +6 -2
- data/app/services/katello/candlepin_event_listener.rb +1 -1
- data/app/services/katello/event_monitor/poller_thread.rb +1 -1
- data/app/services/katello/event_queue.rb +1 -1
- data/app/services/katello/product_content_finder.rb +10 -10
- data/app/services/katello/product_content_importer.rb +1 -1
- data/app/services/katello/pulp3/alternate_content_source.rb +2 -2
- data/app/services/katello/pulp3/ansible_collection.rb +1 -1
- data/app/services/katello/pulp3/api/apt.rb +4 -0
- data/app/services/katello/pulp3/content.rb +1 -0
- data/app/services/katello/pulp3/content_view_version/export.rb +3 -10
- data/app/services/katello/pulp3/content_view_version/export_validator.rb +1 -1
- data/app/services/katello/pulp3/content_view_version/import.rb +2 -2
- data/app/services/katello/pulp3/content_view_version/import_gpg_keys.rb +1 -1
- data/app/services/katello/pulp3/content_view_version/importable_products.rb +2 -2
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +4 -4
- data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +2 -2
- data/app/services/katello/pulp3/deb.rb +35 -1
- data/app/services/katello/pulp3/docker_manifest.rb +1 -1
- data/app/services/katello/pulp3/docker_manifest_list.rb +6 -2
- data/app/services/katello/pulp3/docker_tag.rb +1 -1
- data/app/services/katello/pulp3/erratum.rb +2 -2
- data/app/services/katello/pulp3/file_unit.rb +1 -1
- data/app/services/katello/pulp3/generic_content_unit.rb +1 -1
- data/app/services/katello/pulp3/module_stream.rb +2 -2
- data/app/services/katello/pulp3/repository/ansible_collection.rb +1 -1
- data/app/services/katello/pulp3/repository/apt.rb +22 -16
- data/app/services/katello/pulp3/repository/docker.rb +2 -2
- data/app/services/katello/pulp3/repository/file.rb +1 -1
- data/app/services/katello/pulp3/repository/generic.rb +1 -1
- data/app/services/katello/pulp3/repository/yum.rb +7 -7
- data/app/services/katello/pulp3/repository.rb +15 -9
- data/app/services/katello/pulp3/repository_mirror.rb +3 -3
- data/app/services/katello/registration_manager.rb +23 -6
- data/app/services/katello/repository_type.rb +3 -3
- data/app/services/katello/smart_proxy_helper.rb +3 -3
- data/app/services/katello/ui_notifications/content_view/delete_latest_version_failure.rb +1 -1
- data/app/services/katello/ui_notifications/subscriptions/expire_soon.rb +3 -3
- data/app/services/katello/ui_notifications/subscriptions/manifest_expire_soon_warning.rb +3 -3
- data/app/services/katello/ui_notifications/task_notification.rb +2 -2
- data/app/services/katello/upstream_connection_checker.rb +1 -1
- data/app/views/foreman/job_templates/install_errata_by_search_query.erb +1 -1
- data/app/views/foreman/job_templates/install_errata_by_search_query_-_katello_ansible_default.erb +1 -1
- data/app/views/katello/api/v2/activation_keys/base.json.rabl +43 -8
- data/app/views/katello/api/v2/alternate_content_sources/base.json.rabl +1 -1
- data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +5 -5
- data/app/views/katello/api/v2/common/_metadata.json.rabl +1 -1
- data/app/views/katello/api/v2/content_credentials/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_facet/base.json.rabl +15 -6
- data/app/views/katello/api/v2/content_facet/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_environments/index.json.rabl +7 -0
- data/app/views/katello/api/v2/content_view_environments/show.json.rabl +33 -0
- data/app/views/katello/api/v2/content_view_filter_rules/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_filters/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +3 -3
- data/app/views/katello/api/v2/content_views/base.json.rabl +4 -3
- data/app/views/katello/api/v2/content_views/show.json.rabl +1 -2
- data/app/views/katello/api/v2/debs/backend.json.rabl +7 -0
- data/app/views/katello/api/v2/debs/base.json.rabl +4 -0
- data/app/views/katello/api/v2/debs/show.json.rabl +2 -0
- data/app/views/katello/api/v2/docker_manifest_lists/show.json.rabl +1 -0
- data/app/views/katello/api/v2/docker_tags/_base.json.rabl +2 -2
- data/app/views/katello/api/v2/environments/show.json.rabl +4 -4
- data/app/views/katello/api/v2/gpg_keys/show.json.rabl +1 -1
- data/app/views/katello/api/v2/host_collections/base.json.rabl +1 -1
- data/app/views/katello/api/v2/hosts/base.json.rabl +2 -2
- data/app/views/katello/api/v2/package_groups/base.json.rabl +2 -2
- data/app/views/katello/api/v2/products/show.json.rabl +2 -2
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +1 -1
- data/app/views/katello/api/v2/subscriptions/base.json.rabl +1 -1
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +3 -3
- data/app/views/katello/api/v2/sync_plans/show.json.rabl +1 -1
- data/app/views/katello/sync_management/index.html.erb +2 -2
- data/config/initializers/inflections.rb +11 -0
- data/config/katello.yaml.example +4 -10
- data/config/routes/api/registry.rb +0 -2
- data/config/routes/api/rhsm.rb +1 -4
- data/config/routes/api/v2.rb +2 -3
- data/db/migrate/20140716211853_repo_rename_feed_to_url.rb +1 -1
- data/db/migrate/20141003210742_add_docker_container_registry_url_to_providers.rb +1 -1
- data/db/migrate/20150224083608_remove_docker_registry_url.rb +1 -1
- data/db/migrate/20160808002834_add_files.rb +1 -1
- data/db/migrate/20161014133811_move_content_view_version_description_to_histories.rb +1 -1
- data/db/migrate/20200818192230_update_system_purpose_status.rb +1 -1
- data/db/migrate/20201012172713_remove_gpg_key_perms.rb +1 -1
- data/db/migrate/20210322142311_add_auth_url_token_to_root_repositories.rb +1 -1
- data/db/migrate/20211220185935_clean_duplicate_content_units.rb +2 -2
- data/db/migrate/20230717150442_change_change_content_source_job_template_name.rb +1 -1
- data/db/migrate/20240207191223_remove_entitlement_mode_host_statuses.rb +1 -1
- data/db/migrate/20240508100434_add_content_id_to_katello_repository.rb +5 -0
- data/db/migrate/20240730163043_add_content_view_environment_activation_key.rb +87 -0
- data/db/migrate/20240806130902_add_more_deb_fields.rb +15 -0
- data/db/migrate/20240903194428_add_priority_to_content_view_environment_activation_key.rb +5 -0
- data/db/migrate/20241007200316_add_fields_to_katello_docker_manifest_list.rb +8 -0
- data/db/migrate/20241007212705_add_bootc_facts_to_content_facet.rb +27 -0
- data/db/migrate/20241025151105_remove_pulp3_migrated_hrefs_from_content_tables.rb +10 -0
- data/db/migrate/20241030181402_create_katello_flatpak_tables.rb +41 -0
- data/db/seeds.d/106-mail_notifications.rb +9 -9
- data/db/seeds.d/108-subcription-bookmarks.rb +1 -1
- data/db/seeds.d/109-katello-notification-blueprints.rb +21 -21
- data/db/seeds.d/110-content-view-autopublish.rb +5 -5
- data/db/seeds.d/111-container-image-bookmarks.rb +1 -1
- data/db/seeds.d/111-upgrade_tasks.rb +1 -1
- data/engines/bastion/app/assets/javascripts/bastion/i18n/i18n.module.js +4 -0
- data/engines/bastion/lib/bastion/engine.rb +1 -1
- data/engines/bastion/lib/bastion.rb +1 -1
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-gettext/angular-gettext.js +5 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +16 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-info.html +29 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-repository-sets.html +13 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/views/activation-keys.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-host-collections-modal.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-host-collections-modal.html +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-modal-helper.service.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/debs.routes.js +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb-dependencies.html +54 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb-info.html +13 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb.html +8 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +11 -0
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/activation_keys.scss +1 -1
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +1 -1
- data/lib/katello/engine.rb +17 -15
- data/lib/katello/permission_creator.rb +51 -49
- data/lib/katello/permissions/host_permissions.rb +4 -4
- data/lib/katello/permissions/organization_permissions.rb +4 -4
- data/lib/katello/permissions/registry_permissions.rb +1 -1
- data/lib/katello/permissions/roles_permissions.rb +1 -1
- data/lib/katello/permissions/user_permissions.rb +1 -1
- data/lib/katello/plugin.rb +14 -8
- data/lib/katello/repository_types/docker.rb +4 -2
- data/lib/katello/repository_types/ostree.rb +5 -3
- data/lib/katello/repository_types/python.rb +1 -1
- data/lib/katello/repository_types/yum.rb +2 -1
- data/lib/katello/scheduled_jobs.rb +1 -1
- data/lib/katello/tasks/migrate_structure_content_for_deb.rake +105 -0
- data/lib/katello/tasks/receptor/extract_orgs.rake +1 -1
- data/lib/katello/tasks/reimport.rake +1 -1
- data/lib/katello/tasks/repository.rake +19 -9
- data/lib/katello/tasks/upgrades/4.1/reupdate_content_import_export_perms.rake +1 -1
- data/lib/katello/tasks/upgrades/4.3/fix_url_auth.rake +1 -1
- data/lib/katello/version.rb +1 -1
- data/locale/action_names.rb +92 -1
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +259 -28
- data/locale/bn_IN/katello.po +258 -27
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po +258 -27
- data/locale/cs/katello.po +258 -30
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +258 -27
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +259 -28
- data/locale/de_AT/katello.po +258 -27
- data/locale/de_DE/katello.po +258 -27
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po +258 -27
- data/locale/en/katello.po +258 -27
- data/locale/en_GB/katello.po +258 -27
- data/locale/en_US/katello.po +258 -27
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +259 -28
- data/locale/et_EE/katello.po +258 -27
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +259 -28
- data/locale/gl/katello.po +258 -27
- data/locale/gu/katello.po +258 -27
- data/locale/he_IL/katello.po +258 -27
- data/locale/hi/katello.po +258 -27
- data/locale/id/katello.po +258 -27
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +259 -28
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +259 -28
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +259 -28
- data/locale/katello.pot +1041 -696
- data/locale/kn/katello.po +258 -27
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +259 -28
- data/locale/ml_IN/katello.po +258 -27
- data/locale/mr/katello.po +258 -27
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po +258 -27
- data/locale/or/katello.po +258 -27
- data/locale/pa/katello.po +258 -27
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po +258 -27
- data/locale/pl_PL/katello.po +258 -27
- data/locale/pt/katello.po +258 -27
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +259 -28
- data/locale/ro/katello.po +258 -27
- data/locale/ro_RO/katello.po +258 -27
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +259 -28
- data/locale/sl/katello.po +258 -27
- data/locale/sv_SE/katello.po +258 -27
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +259 -28
- data/locale/ta_IN/katello.po +258 -27
- data/locale/te/katello.po +258 -27
- data/locale/tr/katello.po +258 -27
- data/locale/vi/katello.po +258 -27
- data/locale/vi_VN/katello.po +258 -27
- data/locale/zh/katello.po +258 -27
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +259 -28
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +259 -28
- data/vendor/assets/javascripts/katello/chosen.jquery.js +2 -2
- data/vendor/assets/javascripts/katello/jquery.ba-bbq.js +1 -1
- data/vendor/assets/javascripts/katello/jquery.hoverIntent.js +2 -2
- data/webpack/ForemanColumnExtensions/index.js +1 -1
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +113 -86
- data/webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js +7 -2
- data/webpack/components/extensions/HostDetails/Tabs/DebsTab/DebsTab.js +31 -4
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +1 -1
- data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +1 -7
- data/webpack/components/extensions/RegistrationCommands/helpers.js +15 -0
- data/webpack/components/extensions/RegistrationCommands/index.js +3 -9
- data/webpack/global_index.js +11 -4
- data/webpack/redux/actions/RedHatRepositories/helpers.js +8 -6
- data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.js +4 -0
- data/webpack/scenes/ActivationKeys/Details/components/CVEDetailsCard.js +37 -0
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +1 -2
- data/webpack/scenes/Hosts/ChangeContentSource/helpers.js +2 -8
- data/webpack/scenes/SmartProxy/ExpandableCvDetails.js +22 -2
- data/webpack/scenes/SmartProxy/ExpandedSmartProxyRepositories.js +39 -20
- data/webpack/scenes/SmartProxy/SmartProxyContentActions.js +2 -1
- data/webpack/scenes/SmartProxy/SmartProxyExpandableTable.js +6 -4
- data/webpack/scenes/SmartProxy/__tests__/SmartProxyContentTest.js +62 -0
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +6 -4
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +1 -1
- metadata +86 -76
- data/app/lib/katello/api/constraints/activation_key_constraint.rb +0 -7
- /data/app/lib/katello/{api → routing}/mapper_extensions.rb +0 -0
@@ -1,5 +1,6 @@
|
|
1
1
|
module Katello
|
2
2
|
module Host
|
3
|
+
# rubocop:disable Metrics/ClassLength
|
3
4
|
class ContentFacet < Katello::Model
|
4
5
|
audited :associated_with => :host
|
5
6
|
self.table_name = 'katello_content_facets'
|
@@ -46,6 +47,23 @@ module Katello
|
|
46
47
|
validates_with Katello::Validators::GeneratedContentViewValidator
|
47
48
|
validates_associated :content_view_environment_content_facets, :message => _("invalid: The content source must sync the lifecycle environment assigned to the host. See the logs for more information.")
|
48
49
|
validates :host, :presence => true, :allow_blank => false
|
50
|
+
validates :bootc_booted_digest, :bootc_available_digest, :bootc_staged_digest, :bootc_rollback_digest,
|
51
|
+
format: { with: /\Asha256:[A-Fa-f0-9]{64}\z/, message: "must be a valid sha256 digest", allow_nil: true }
|
52
|
+
|
53
|
+
scope :with_environments, ->(lifecycle_environments) do
|
54
|
+
joins(:content_view_environment_content_facets => :content_view_environment).
|
55
|
+
where("#{::Katello::ContentViewEnvironment.table_name}.environment_id" => lifecycle_environments)
|
56
|
+
end
|
57
|
+
|
58
|
+
scope :with_content_views, ->(content_views) do
|
59
|
+
joins(:content_view_environment_content_facets => :content_view_environment).
|
60
|
+
where("#{::Katello::ContentViewEnvironment.table_name}.content_view_id" => content_views)
|
61
|
+
end
|
62
|
+
|
63
|
+
scope :with_content_view_environments, ->(content_view_environments) do
|
64
|
+
joins(:content_view_environment_content_facets => :content_view_environment).
|
65
|
+
where("#{::Katello::ContentViewEnvironment.table_name}.id" => content_view_environments)
|
66
|
+
end
|
49
67
|
|
50
68
|
attr_accessor :cves_changed
|
51
69
|
|
@@ -72,6 +90,10 @@ module Katello
|
|
72
90
|
self.cves_changed = false
|
73
91
|
end
|
74
92
|
|
93
|
+
def image_mode_host?
|
94
|
+
bootc_booted_image.present?
|
95
|
+
end
|
96
|
+
|
75
97
|
def cves_changed?
|
76
98
|
cves_changed
|
77
99
|
end
|
@@ -111,6 +133,10 @@ module Katello
|
|
111
133
|
self.host&.update_candlepin_associations unless self.host&.new_record?
|
112
134
|
end
|
113
135
|
|
136
|
+
def content_view_environment_labels
|
137
|
+
content_view_environments.map(&:label).join(',')
|
138
|
+
end
|
139
|
+
|
114
140
|
# rubocop:disable Metrics/CyclomaticComplexity
|
115
141
|
def assign_single_environment(
|
116
142
|
content_view_id: nil, lifecycle_environment_id: nil, environment_id: nil,
|
@@ -148,10 +174,12 @@ module Katello
|
|
148
174
|
prefixes = %w(/pulp/deb/ /pulp/repos/ /pulp/content/)
|
149
175
|
relative_paths = []
|
150
176
|
|
151
|
-
# paths == ["/pulp/content/Default_Organization/Library/custom/Test_product/test2"
|
177
|
+
# paths == ["/pulp/content/Default_Organization/Library/custom/Test_product/test2",
|
178
|
+
# "/pulp/content/Org/Library/custom/Test_product/test2/%3Fcomp%3Dmain%26rel%3Dstable"]
|
152
179
|
paths.each do |path|
|
153
180
|
if (prefix = prefixes.find { |pre| path.start_with?(pre) })
|
154
|
-
|
181
|
+
# strip prefix and structured_apt postfix before adding to relative_paths
|
182
|
+
relative_paths << path.sub(prefix, '').sub(%r{/?(%3F|\?).*}, '')
|
155
183
|
else
|
156
184
|
Rails.logger.warn("System #{self.host.name} (#{self.host.id}) requested binding to repo with unknown prefix. #{path}")
|
157
185
|
end
|
@@ -193,7 +221,7 @@ module Katello
|
|
193
221
|
installable_hash = {
|
194
222
|
:security => installable_security_errata_count,
|
195
223
|
:bugfix => installable_bugfix_errata_count,
|
196
|
-
:enhancement => installable_enhancement_errata_count
|
224
|
+
:enhancement => installable_enhancement_errata_count,
|
197
225
|
}
|
198
226
|
installable_hash[:total] = installable_hash.values.inject(:+)
|
199
227
|
# same for applicable, but we need to get the counts from the db
|
@@ -201,13 +229,13 @@ module Katello
|
|
201
229
|
applicable_hash = {
|
202
230
|
:bugfix => applicable_errata_counts.values_at(*Katello::Erratum::BUGZILLA).compact.sum,
|
203
231
|
:security => applicable_errata_counts.values_at(*Katello::Erratum::SECURITY).compact.sum,
|
204
|
-
:enhancement => applicable_errata_counts.values_at(*Katello::Erratum::ENHANCEMENT).compact.sum
|
232
|
+
:enhancement => applicable_errata_counts.values_at(*Katello::Erratum::ENHANCEMENT).compact.sum,
|
205
233
|
}
|
206
234
|
applicable_hash[:total] = applicable_errata_counts.values.sum
|
207
235
|
|
208
236
|
# keeping installable at the top level for backward compatibility
|
209
237
|
installable_hash.merge({
|
210
|
-
:applicable => applicable_hash
|
238
|
+
:applicable => applicable_hash,
|
211
239
|
})
|
212
240
|
end
|
213
241
|
|
@@ -257,13 +285,6 @@ module Katello
|
|
257
285
|
relation.where(queries.join(" OR "))
|
258
286
|
end
|
259
287
|
|
260
|
-
def self.in_content_views_and_environments(content_views: nil, lifecycle_environments: nil)
|
261
|
-
relation = self.joins(:content_view_environment_content_facets => :content_view_environment)
|
262
|
-
relation = relation.where("#{::Katello::ContentViewEnvironment.table_name}.content_view_id" => content_views) if content_views
|
263
|
-
relation = relation.where("#{::Katello::ContentViewEnvironment.table_name}.environment_id" => lifecycle_environments) if lifecycle_environments
|
264
|
-
relation
|
265
|
-
end
|
266
|
-
|
267
288
|
def self.with_non_installable_errata(errata, hosts = nil)
|
268
289
|
content_facets = Katello::Host::ContentFacet.select(:id).where(:host_id => hosts)
|
269
290
|
reachable_repos = ::Katello::ContentFacetRepository.where(content_facet_id: content_facets).distinct.pluck(:repository_id)
|
@@ -348,11 +369,6 @@ module Katello
|
|
348
369
|
host.refresh_global_status!
|
349
370
|
end
|
350
371
|
|
351
|
-
# TODO: uncomment when we need to display multiple CVE names in the UI
|
352
|
-
# def content_view_environment_names
|
353
|
-
# content_view_environments.map(&:candlepin_name).join(', ')
|
354
|
-
# end
|
355
|
-
|
356
372
|
def self.joins_installable_relation(content_model, facet_join_model)
|
357
373
|
facet_repository = Katello::ContentFacetRepository.table_name
|
358
374
|
content_table = content_model.table_name
|
@@ -1,12 +1,10 @@
|
|
1
|
-
require 'host_info'
|
2
|
-
|
3
1
|
module Katello
|
4
2
|
module Host
|
5
3
|
class InfoProvider < ::HostInfo::Provider
|
6
4
|
def host_info
|
7
5
|
info = {}
|
8
6
|
info['parameters'] = {
|
9
|
-
'foreman_host_collections' => host.host_collections.map(&:name)
|
7
|
+
'foreman_host_collections' => host.host_collections.map(&:name),
|
10
8
|
}
|
11
9
|
|
12
10
|
if host.content_facet.present?
|
@@ -45,7 +43,7 @@ module Katello
|
|
45
43
|
'latest-version' => content_view.try(:latest_version),
|
46
44
|
'version' => content_version(content_view_environment).try(:version),
|
47
45
|
'published' => content_version(content_view_environment).try(:created_at).try(:time).to_s,
|
48
|
-
'components' => content_view_components(content_view_environment)
|
46
|
+
'components' => content_view_components(content_view_environment),
|
49
47
|
}
|
50
48
|
end
|
51
49
|
|
@@ -146,7 +146,7 @@ module Katello
|
|
146
146
|
:releaseVer => release_version,
|
147
147
|
:environments => self.candlepin_environments,
|
148
148
|
:installedProducts => self.installed_products.map(&:consumer_attributes),
|
149
|
-
:guestIds => virtual_guest_uuids
|
149
|
+
:guestIds => virtual_guest_uuids,
|
150
150
|
}
|
151
151
|
attrs[:facts] = facts if facts
|
152
152
|
HashWithIndifferentAccess.new(attrs)
|
@@ -158,7 +158,7 @@ module Katello
|
|
158
158
|
{ :id => cve.content_view.cp_environment_id(cve.lifecycle_environment) }
|
159
159
|
end
|
160
160
|
else
|
161
|
-
self.host.organization.default_content_view.cp_environment_id(self.host.organization.library)
|
161
|
+
[{ :id => self.host.organization.default_content_view.cp_environment_id(self.host.organization.library) }]
|
162
162
|
end
|
163
163
|
end
|
164
164
|
|
@@ -305,7 +305,7 @@ module Katello
|
|
305
305
|
# might make you think it was converted2rhel but not with satellite, that is why I have the tenary below.
|
306
306
|
facet = host.subscription_facet || host.build_subscription_facet
|
307
307
|
facet.attributes = {
|
308
|
-
convert2rhel_through_foreman: has_convert2rhel ? ::Foreman::Cast.to_bool(parser.facts['conversions.env.CONVERT2RHEL_THROUGH_FOREMAN']) : nil
|
308
|
+
convert2rhel_through_foreman: has_convert2rhel ? ::Foreman::Cast.to_bool(parser.facts['conversions.env.CONVERT2RHEL_THROUGH_FOREMAN']) : nil,
|
309
309
|
}.compact
|
310
310
|
facet.save unless facet.new_record?
|
311
311
|
end
|
@@ -22,7 +22,7 @@ module Katello
|
|
22
22
|
DISABLED => :disabled,
|
23
23
|
UNKNOWN => :unknown,
|
24
24
|
INSTALLED => :installed,
|
25
|
-
UPGRADABLE => :upgradable
|
25
|
+
UPGRADABLE => :upgradable,
|
26
26
|
}.with_indifferent_access
|
27
27
|
|
28
28
|
scoped_search :on => :name, :relation => :available_module_stream, :complete_value => true
|
@@ -11,7 +11,7 @@ module Katello
|
|
11
11
|
:arch => consumer_attributes['arch'],
|
12
12
|
:version => consumer_attributes['version'],
|
13
13
|
:name => consumer_attributes['productName'],
|
14
|
-
:cp_product_id => consumer_attributes['productId']
|
14
|
+
:cp_product_id => consumer_attributes['productId'],
|
15
15
|
}
|
16
16
|
Katello::Util::Support.active_record_retry do
|
17
17
|
unless self.where(attributes).exists?
|
@@ -26,7 +26,7 @@ module Katello
|
|
26
26
|
:arch => arch,
|
27
27
|
:version => version,
|
28
28
|
:productName => name,
|
29
|
-
:productId => cp_product_id
|
29
|
+
:productId => cp_product_id,
|
30
30
|
}
|
31
31
|
end
|
32
32
|
end
|
@@ -8,8 +8,6 @@ module Katello
|
|
8
8
|
include Ext::LabelFromName
|
9
9
|
|
10
10
|
belongs_to :organization, :class_name => "Organization", :inverse_of => :kt_environments
|
11
|
-
has_many :activation_keys, :class_name => "Katello::ActivationKey",
|
12
|
-
:dependent => :restrict_with_exception, :foreign_key => :environment_id
|
13
11
|
|
14
12
|
has_many :env_priors, :class_name => "Katello::EnvironmentPrior", :foreign_key => :environment_id, :dependent => :destroy
|
15
13
|
has_many :priors, :class_name => "Katello::KTEnvironment", :through => :env_priors, :source => :env_prior
|
@@ -30,14 +28,21 @@ module Katello
|
|
30
28
|
has_many :content_view_environments, :class_name => "Katello::ContentViewEnvironment",
|
31
29
|
:foreign_key => :environment_id, :inverse_of => :environment, :dependent => :destroy
|
32
30
|
has_many :content_view_environment_content_facets, :through => :content_view_environments,
|
33
|
-
:class_name => "Katello::ContentViewEnvironmentContentFacet"
|
34
|
-
|
31
|
+
:class_name => "Katello::ContentViewEnvironmentContentFacet"
|
32
|
+
|
35
33
|
has_many :content_facets, :through => :content_view_environment_content_facets,
|
36
|
-
:class_name => "Katello::Host::ContentFacet"
|
37
|
-
|
34
|
+
:class_name => "Katello::Host::ContentFacet"
|
35
|
+
|
38
36
|
has_many :content_views, :through => :content_view_environments
|
39
37
|
has_many :content_view_versions, :through => :content_view_environments, :inverse_of => :environments
|
40
38
|
|
39
|
+
has_many :content_view_environment_activation_keys, :through => :content_view_environments,
|
40
|
+
:class_name => "Katello::ContentViewEnvironmentActivationKey",
|
41
|
+
:dependent => :restrict_with_exception
|
42
|
+
|
43
|
+
has_many :activation_keys, :through => :content_view_environment_activation_keys,
|
44
|
+
:class_name => "Katello::ActivationKey"
|
45
|
+
|
41
46
|
has_many :hosts, :class_name => "::Host::Managed", :through => :content_facets,
|
42
47
|
:inverse_of => :lifecycle_environments
|
43
48
|
has_many :hostgroup_content_facets, :class_name => "Katello::Hostgroup::ContentFacet", :foreign_key => :lifecycle_environment_id,
|
data/app/models/katello/ping.rb
CHANGED
@@ -34,7 +34,7 @@ module Katello
|
|
34
34
|
def status
|
35
35
|
{
|
36
36
|
version: Katello::VERSION,
|
37
|
-
timeUTC: Time.now.getutc
|
37
|
+
timeUTC: Time.now.getutc,
|
38
38
|
}
|
39
39
|
end
|
40
40
|
|
@@ -252,12 +252,11 @@ module Katello
|
|
252
252
|
end
|
253
253
|
|
254
254
|
def backend_status(url, backend)
|
255
|
-
ca_file =
|
255
|
+
ca_file = ::Cert::Certs.backend_ca_cert_file(backend)
|
256
256
|
request_id = ::Logging.mdc['request']
|
257
257
|
|
258
258
|
options = {}
|
259
259
|
options[:ssl_ca_file] = ca_file unless ca_file.nil?
|
260
|
-
options[:verify_ssl] = SETTINGS[:katello][backend][:verify_ssl] if SETTINGS[:katello][backend].key?(:verify_ssl)
|
261
260
|
options[:headers] = { 'Correlation-ID' => request_id } if request_id
|
262
261
|
client = RestClient::Resource.new("#{url}/status/", options)
|
263
262
|
|
@@ -172,7 +172,7 @@ module Katello
|
|
172
172
|
scoped_search :on => :label, :relation => :root, :complete_value => true, :only_explicit => true
|
173
173
|
scoped_search :on => :content_label, :ext_method => :search_by_content_label, :default_operator => :like
|
174
174
|
|
175
|
-
delegate :product, :redhat?, :custom?, :to => :root
|
175
|
+
delegate :product, :redhat?, :custom?, :deb_using_structured_apt?, :to => :root
|
176
176
|
delegate :yum?, :docker?, :deb?, :file?, :ostree?, :ansible_collection?, :generic?, :to => :root
|
177
177
|
delegate :name, :label, :docker_upstream_name, :url, :download_concurrency, :to => :root
|
178
178
|
|
@@ -185,7 +185,6 @@ module Katello
|
|
185
185
|
:ansible_collection_requirements, :ansible_collection_auth_url, :ansible_collection_auth_token,
|
186
186
|
:http_proxy_policy, :http_proxy_id, :prevent_updates, :to => :root
|
187
187
|
|
188
|
-
delegate :content_id, to: :root, allow_nil: true
|
189
188
|
delegate :repository_type, to: :root
|
190
189
|
|
191
190
|
def self.exportable_types(format: ::Katello::Pulp3::ContentViewVersion::Export::IMPORTABLE)
|
@@ -211,6 +210,16 @@ module Katello
|
|
211
210
|
"#{path_prefix}/#{path}"
|
212
211
|
end
|
213
212
|
|
213
|
+
def content_id
|
214
|
+
# Currently deb content will store a content_id on each Repository, while all other content
|
215
|
+
# types will store one on the RootRepository.
|
216
|
+
self[:content_id] || root.content_id
|
217
|
+
end
|
218
|
+
|
219
|
+
def content
|
220
|
+
Katello::Content.find_by(:cp_content_id => self.content_id, :organization_id => self.product.organization_id)
|
221
|
+
end
|
222
|
+
|
214
223
|
def to_label
|
215
224
|
name
|
216
225
|
end
|
@@ -272,6 +281,10 @@ module Katello
|
|
272
281
|
self.content_view_version.content_view
|
273
282
|
end
|
274
283
|
|
284
|
+
def content_view_environment
|
285
|
+
self.content_view.content_view_environment(self.environment)
|
286
|
+
end
|
287
|
+
|
275
288
|
# Skip setting container name if the repository is not container type or
|
276
289
|
# if it's a library instance of a container-push repo, indicating that the container name is set by the user.
|
277
290
|
def skip_container_name?
|
@@ -634,7 +647,7 @@ module Katello
|
|
634
647
|
sp_history_args = {
|
635
648
|
:smart_proxy_id => smart_proxy.id,
|
636
649
|
:repository_id => self.id,
|
637
|
-
:started_at => Time.now
|
650
|
+
:started_at => Time.now,
|
638
651
|
}
|
639
652
|
sp_history = ::Katello::SmartProxySyncHistory.create sp_history_args
|
640
653
|
sp_history.save!
|
@@ -667,7 +680,7 @@ module Katello
|
|
667
680
|
::Actions::Katello::Repository::Sync.name,
|
668
681
|
::Actions::Katello::Repository::UploadFiles.name,
|
669
682
|
::Actions::Katello::Repository::RemoveContent.name,
|
670
|
-
::Actions::Katello::Repository::MetadataGenerate.name
|
683
|
+
::Actions::Katello::Repository::MetadataGenerate.name,
|
671
684
|
]
|
672
685
|
ForemanTasks::Task::DynflowTask.where(:label => blocking_task_labels)
|
673
686
|
.where.not(state: 'stopped')
|
@@ -785,7 +798,7 @@ module Katello
|
|
785
798
|
distribution_arch: self.distribution_arch,
|
786
799
|
distribution_family: self.distribution_family,
|
787
800
|
distribution_variant: self.distribution_variant,
|
788
|
-
distribution_bootable: self.distribution_bootable
|
801
|
+
distribution_bootable: self.distribution_bootable,
|
789
802
|
}
|
790
803
|
end
|
791
804
|
|
@@ -941,7 +954,7 @@ module Katello
|
|
941
954
|
product: repository.product,
|
942
955
|
lifecycle_environment: repository.environment,
|
943
956
|
content_view: repository.content_view_version.content_view,
|
944
|
-
content_view_version: repository.content_view_version
|
957
|
+
content_view_version: repository.content_view_version,
|
945
958
|
}
|
946
959
|
box = Safemode::Box.new(repository, allowed_methods)
|
947
960
|
erb = ERB.new(pattern)
|
@@ -1024,6 +1037,27 @@ module Katello
|
|
1024
1037
|
content_view.repositories.include? self
|
1025
1038
|
end
|
1026
1039
|
|
1040
|
+
def deb_content_url_options
|
1041
|
+
return '' unless version_href
|
1042
|
+
|
1043
|
+
components = deb_pulp_components.join(',')
|
1044
|
+
distributions = deb_pulp_distributions.join(',')
|
1045
|
+
"/?comp=#{components}&rel=#{distributions}"
|
1046
|
+
end
|
1047
|
+
|
1048
|
+
def deb_pulp_components(version_href = self.version_href)
|
1049
|
+
return [] if version_href.blank?
|
1050
|
+
|
1051
|
+
pulp_api = Katello::Pulp3::Repository.instance_for_type(self, SmartProxy.pulp_primary).api.content_release_components_api
|
1052
|
+
pulp_api.list({:repository_version => version_href}).results.map { |x| x.component }.uniq
|
1053
|
+
end
|
1054
|
+
|
1055
|
+
def deb_pulp_distributions(version_href = self.version_href)
|
1056
|
+
return [] if version_href.blank?
|
1057
|
+
pulp_api = Katello::Pulp3::Repository.instance_for_type(self, SmartProxy.pulp_primary).api.content_release_components_api
|
1058
|
+
pulp_api.list({:repository_version => version_href}).results.map { |x| x.distribution }.uniq
|
1059
|
+
end
|
1060
|
+
|
1027
1061
|
def sync_status
|
1028
1062
|
return latest_dynflow_sync
|
1029
1063
|
end
|
@@ -16,40 +16,40 @@ module Katello
|
|
16
16
|
'RHEL9' => {
|
17
17
|
'full_support' => end_of_day('2027-05-31'),
|
18
18
|
'maintenance_support' => end_of_day('2032-05-31'),
|
19
|
-
'extended_support' => end_of_day('2035-05-31')
|
19
|
+
'extended_support' => end_of_day('2035-05-31'),
|
20
20
|
},
|
21
21
|
'RHEL8' => {
|
22
22
|
'full_support' => end_of_day('2024-05-31'),
|
23
23
|
'maintenance_support' => end_of_day('2029-05-31'),
|
24
|
-
'extended_support' => end_of_day('2032-05-31')
|
24
|
+
'extended_support' => end_of_day('2032-05-31'),
|
25
25
|
},
|
26
26
|
'RHEL7' => {
|
27
27
|
'full_support' => end_of_day('2019-08-06'),
|
28
28
|
'maintenance_support' => end_of_day('2024-06-30'),
|
29
|
-
'extended_support' => end_of_day('2028-06-30')
|
29
|
+
'extended_support' => end_of_day('2028-06-30'),
|
30
30
|
},
|
31
31
|
'RHEL7 (System z (Structure A))' => {
|
32
32
|
'full_support' => end_of_day('2019-08-06'),
|
33
|
-
'maintenance_support' => end_of_day('2021-05-31')
|
33
|
+
'maintenance_support' => end_of_day('2021-05-31'),
|
34
34
|
},
|
35
35
|
'RHEL7 (ARM)' => {
|
36
36
|
'full_support' => end_of_day('2019-08-06'),
|
37
|
-
'maintenance_support' => end_of_day('2020-11-30')
|
37
|
+
'maintenance_support' => end_of_day('2020-11-30'),
|
38
38
|
},
|
39
39
|
'RHEL7 (POWER9)' => {
|
40
40
|
'full_support' => end_of_day('2019-08-06'),
|
41
|
-
'maintenance_support' => end_of_day('2021-05-31')
|
41
|
+
'maintenance_support' => end_of_day('2021-05-31'),
|
42
42
|
},
|
43
43
|
'RHEL6' => {
|
44
44
|
'full_support' => end_of_day('2016-05-10'),
|
45
45
|
'maintenance_support' => end_of_day('2020-11-30'),
|
46
|
-
'extended_support' => end_of_day('2024-06-30')
|
46
|
+
'extended_support' => end_of_day('2024-06-30'),
|
47
47
|
},
|
48
48
|
'RHEL5' => {
|
49
49
|
'full_support' => end_of_day('2013-01-08'),
|
50
50
|
'maintenance_support' => end_of_day('2017-03-31'),
|
51
|
-
'extended_support' => end_of_day('2020-11-30')
|
52
|
-
}
|
51
|
+
'extended_support' => end_of_day('2020-11-30'),
|
52
|
+
},
|
53
53
|
}.freeze
|
54
54
|
|
55
55
|
EOS_WARNING_THRESHOLD = 1.year
|
@@ -61,7 +61,7 @@ module Katello
|
|
61
61
|
approaching_end_of_maintenance: APPROACHING_END_OF_MAINTENANCE,
|
62
62
|
extended_support: EXTENDED_SUPPORT,
|
63
63
|
approaching_end_of_support: APPROACHING_END_OF_SUPPORT,
|
64
|
-
support_ended: SUPPORT_ENDED
|
64
|
+
support_ended: SUPPORT_ENDED,
|
65
65
|
}
|
66
66
|
|
67
67
|
map.default = UNKNOWN
|
@@ -23,7 +23,7 @@ module Katello
|
|
23
23
|
SKIPABLE_METADATA_TYPES = [Repository::YUM_TYPE, Repository::DEB_TYPE].freeze
|
24
24
|
|
25
25
|
CONTENT_ATTRIBUTE_RESTRICTIONS = {
|
26
|
-
:download_policy => [Repository::YUM_TYPE, Repository::DEB_TYPE, Repository::DOCKER_TYPE]
|
26
|
+
:download_policy => [Repository::YUM_TYPE, Repository::DEB_TYPE, Repository::DOCKER_TYPE],
|
27
27
|
}.freeze
|
28
28
|
|
29
29
|
MAX_EXPIRE_TIME = 7 * 24 * 60 * 60
|
@@ -67,7 +67,7 @@ module Katello
|
|
67
67
|
validates_lengths_from_database :except => [:label]
|
68
68
|
validates_with Validators::KatelloLabelFormatValidator, :attributes => :label
|
69
69
|
validates_with Validators::KatelloNameFormatValidator, :attributes => :name
|
70
|
-
validates_with Validators::
|
70
|
+
validates_with Validators::KatelloURLFormatValidator, :attributes => :url,
|
71
71
|
:nil_allowed => proc { |repo| repo.custom? || repo.organization.cdn_configuration.export_sync? },
|
72
72
|
:field_name => :url
|
73
73
|
validates_with Validators::RootRepositoryUniqueAttributeValidator, :attributes => :name
|
@@ -96,15 +96,15 @@ module Katello
|
|
96
96
|
validates :content_type, :inclusion => {
|
97
97
|
:in => ->(_) { Katello::RepositoryTypeManager.enabled_repository_types.keys },
|
98
98
|
:allow_blank => false,
|
99
|
-
:message => ->(_, _) { _("is not enabled. must be one of the following: %s") % Katello::RepositoryTypeManager.enabled_repository_types.keys.join(', ') }
|
99
|
+
:message => ->(_, _) { _("is not enabled. must be one of the following: %s") % Katello::RepositoryTypeManager.enabled_repository_types.keys.join(', ') },
|
100
100
|
}
|
101
101
|
validates :download_policy, inclusion: {
|
102
102
|
:in => DOWNLOAD_POLICIES,
|
103
|
-
:message => _("must be one of the following: %s") % DOWNLOAD_POLICIES.join(', ')
|
103
|
+
:message => _("must be one of the following: %s") % DOWNLOAD_POLICIES.join(', '),
|
104
104
|
}, if: :yum?
|
105
105
|
validates :http_proxy_policy, inclusion: {
|
106
106
|
:in => HTTP_PROXY_POLICIES,
|
107
|
-
:message => _("must be one of the following: %s") % HTTP_PROXY_POLICIES.join(', ')
|
107
|
+
:message => _("must be one of the following: %s") % HTTP_PROXY_POLICIES.join(', '),
|
108
108
|
}
|
109
109
|
|
110
110
|
validates :metadata_expire,
|
@@ -113,7 +113,7 @@ module Katello
|
|
113
113
|
less_than_or_equal_to: MAX_EXPIRE_TIME,
|
114
114
|
greater_than: 0,
|
115
115
|
allow_nil: true,
|
116
|
-
only_integer: true
|
116
|
+
only_integer: true,
|
117
117
|
}
|
118
118
|
|
119
119
|
validates :container_push_name_format, inclusion: { in: ['label', 'id'].freeze, allow_nil: true}
|
@@ -296,7 +296,7 @@ module Katello
|
|
296
296
|
if self.upstream_username.blank? && self.upstream_password.blank?
|
297
297
|
self.upstream_username = nil
|
298
298
|
self.upstream_password = nil
|
299
|
-
if !self.url.blank? && self.url.start_with?('uln')
|
299
|
+
if !self.url.blank? && self.url.start_with?('uln')
|
300
300
|
errors.add(:base, N_("Upstream username and upstream password cannot be blank for ULN repositories"))
|
301
301
|
end
|
302
302
|
return
|
@@ -333,7 +333,7 @@ module Katello
|
|
333
333
|
return if self.deb_releases.blank? && self.url.blank?
|
334
334
|
if self.deb_releases.blank?
|
335
335
|
errors.add(:base, N_("When \"Upstream URL\" is set, \"Releases/Distributions\" must also be set!"))
|
336
|
-
elsif self.url.blank?
|
336
|
+
elsif self.url.blank?
|
337
337
|
errors.add(:base, N_("When \"Releases/Distributions\" is set, \"Upstream URL\" must also be set!"))
|
338
338
|
end
|
339
339
|
end
|
@@ -370,10 +370,6 @@ module Katello
|
|
370
370
|
"#{organization.label} #{product.label} #{label}".gsub(/\s/, "_")
|
371
371
|
end
|
372
372
|
|
373
|
-
def content
|
374
|
-
Katello::Content.find_by(:cp_content_id => self.content_id, :organization_id => self.product.organization_id)
|
375
|
-
end
|
376
|
-
|
377
373
|
def docker?
|
378
374
|
self.content_type == Repository::DOCKER_TYPE
|
379
375
|
end
|
@@ -394,6 +390,10 @@ module Katello
|
|
394
390
|
self.content_type == Repository::DEB_TYPE
|
395
391
|
end
|
396
392
|
|
393
|
+
def deb_using_structured_apt?
|
394
|
+
self.deb? && !self.content_id
|
395
|
+
end
|
396
|
+
|
397
397
|
def ansible_collection?
|
398
398
|
self.content_type == Repository::ANSIBLE_COLLECTION_TYPE
|
399
399
|
end
|
@@ -420,12 +420,8 @@ module Katello
|
|
420
420
|
changeable_attributes.any? { |key| previous_changes.key?(key) }
|
421
421
|
end
|
422
422
|
|
423
|
-
def raw_content_path
|
424
|
-
self.content.content_url
|
425
|
-
end
|
426
|
-
|
427
423
|
def repo_mapper
|
428
|
-
@repo_mapper ||= Katello::Candlepin::RepositoryMapper.new(self.product, self.content, self.substitutions)
|
424
|
+
@repo_mapper ||= Katello::Candlepin::RepositoryMapper.new(self.product, self.library_instance.content, self.substitutions)
|
429
425
|
end
|
430
426
|
|
431
427
|
def calculate_updated_name
|
@@ -436,7 +432,7 @@ module Katello
|
|
436
432
|
def substitutions
|
437
433
|
{
|
438
434
|
:releasever => self.minor,
|
439
|
-
:basearch => self.arch
|
435
|
+
:basearch => self.arch,
|
440
436
|
}.compact
|
441
437
|
end
|
442
438
|
|
@@ -24,7 +24,7 @@ module Katello
|
|
24
24
|
{
|
25
25
|
pools: pools,
|
26
26
|
total: total,
|
27
|
-
subtotal: pools.count
|
27
|
+
subtotal: pools.count,
|
28
28
|
}
|
29
29
|
end
|
30
30
|
|
@@ -59,7 +59,7 @@ module Katello
|
|
59
59
|
consumed: 'consumed',
|
60
60
|
product_name: 'productName',
|
61
61
|
product_id: 'productId',
|
62
|
-
subscription_id: 'subscriptionId'
|
62
|
+
subscription_id: 'subscriptionId',
|
63
63
|
}
|
64
64
|
end
|
65
65
|
|
@@ -29,12 +29,12 @@ module Katello
|
|
29
29
|
if overidden_value.nil?
|
30
30
|
{
|
31
31
|
status: enabled ? "enabled" : "disabled",
|
32
|
-
overridden: false
|
32
|
+
overridden: false,
|
33
33
|
}
|
34
34
|
else
|
35
35
|
{
|
36
36
|
status: overidden_value ? "enabled" : "disabled",
|
37
|
-
overridden: true
|
37
|
+
overridden: true,
|
38
38
|
}
|
39
39
|
end
|
40
40
|
end
|
@@ -14,12 +14,12 @@ module Katello
|
|
14
14
|
{
|
15
15
|
:content_view_version => {
|
16
16
|
:id => repository.content_view_version.id,
|
17
|
-
:name => repository.content_view_version.name
|
17
|
+
:name => repository.content_view_version.name,
|
18
18
|
},
|
19
19
|
:environment => {
|
20
20
|
:id => repository.environment.id,
|
21
|
-
:name => repository.environment.name
|
22
|
-
}
|
21
|
+
:name => repository.environment.name,
|
22
|
+
},
|
23
23
|
}
|
24
24
|
end
|
25
25
|
end
|
@@ -8,7 +8,7 @@ module Katello
|
|
8
8
|
:never_synced => _("Never Synced"),
|
9
9
|
:running => _("Running"),
|
10
10
|
:canceled => _("Canceled"),
|
11
|
-
:paused => _("Paused")
|
11
|
+
:paused => _("Paused"),
|
12
12
|
}.with_indifferent_access
|
13
13
|
|
14
14
|
def initialize(repo, task)
|
@@ -34,7 +34,7 @@ module Katello
|
|
34
34
|
:display_size => display_output,
|
35
35
|
:size => display_output,
|
36
36
|
:is_running => @task.pending && @task.state != 'paused',
|
37
|
-
:error_details => @task.errors
|
37
|
+
:error_details => @task.errors,
|
38
38
|
}
|
39
39
|
end
|
40
40
|
|
@@ -47,7 +47,7 @@ module Katello
|
|
47
47
|
:product_id => repo.product.id,
|
48
48
|
:progress => {},
|
49
49
|
:state => format_state(OpenStruct.new(:state => state)),
|
50
|
-
:raw_state => state
|
50
|
+
:raw_state => state,
|
51
51
|
}
|
52
52
|
end
|
53
53
|
|
data/app/services/cert/certs.rb
CHANGED
@@ -9,7 +9,7 @@ module Cert
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def self.candlepin_client_ca_cert
|
12
|
-
File.read(
|
12
|
+
File.read(backend_ca_cert_file(:candlepin))
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.ssl_client_cert
|
@@ -28,10 +28,14 @@ module Cert
|
|
28
28
|
Setting[:ssl_priv_key]
|
29
29
|
end
|
30
30
|
|
31
|
+
def self.backend_ca_cert_file(backend)
|
32
|
+
SETTINGS.dig(:katello, backend, :ca_cert_file) || Setting[:ssl_ca_file]
|
33
|
+
end
|
34
|
+
|
31
35
|
def self.verify_ueber_cert(organization)
|
32
36
|
ueber_cert = OpenSSL::X509::Certificate.new(self.ueber_cert(organization)[:cert])
|
33
37
|
cert_store = OpenSSL::X509::Store.new
|
34
|
-
cert_store.add_file
|
38
|
+
cert_store.add_file backend_ca_cert_file(:candlepin)
|
35
39
|
organization.regenerate_ueber_cert unless cert_store.verify ueber_cert
|
36
40
|
end
|
37
41
|
end
|