katello 4.15.0 → 4.16.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/katello_object.js +2 -2
- data/app/assets/javascripts/katello/locale/bn/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/ca/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/cs/katello.js +521 -536
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +253 -268
- data/app/assets/javascripts/katello/locale/de/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +249 -264
- data/app/assets/javascripts/katello/locale/el/katello.js +251 -266
- data/app/assets/javascripts/katello/locale/en/katello.js +253 -268
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +263 -278
- data/app/assets/javascripts/katello/locale/en_US/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/es/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/fr/katello.js +250 -265
- data/app/assets/javascripts/katello/locale/gl/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/gu/katello.js +249 -264
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +249 -264
- data/app/assets/javascripts/katello/locale/hi/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/id/katello.js +261 -275
- data/app/assets/javascripts/katello/locale/it/katello.js +252 -267
- data/app/assets/javascripts/katello/locale/ja/katello.js +250 -265
- data/app/assets/javascripts/katello/locale/ka/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/kn/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/ko/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/mr/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +252 -267
- data/app/assets/javascripts/katello/locale/or/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/pa/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/pl/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/pt/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/ro/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/ru/katello.js +253 -268
- data/app/assets/javascripts/katello/locale/sl/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/ta/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/te/katello.js +248 -263
- data/app/assets/javascripts/katello/locale/tr/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/vi/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/zh/katello.js +247 -262
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +250 -265
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +255 -270
- data/app/assets/javascripts/katello/sync_management/sync_management.js +16 -2
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +33 -9
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +4 -9
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +2 -1
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +3 -1
- data/app/controllers/katello/api/v2/content_views_controller.rb +4 -1
- data/app/controllers/katello/api/v2/environments_controller.rb +4 -0
- data/app/controllers/katello/api/v2/errata_controller.rb +12 -1
- data/app/controllers/katello/api/v2/flatpak_remote_repositories_controller.rb +81 -0
- data/app/controllers/katello/api/v2/flatpak_remotes_controller.rb +86 -0
- data/app/controllers/katello/api/v2/host_bootc_images_controller.rb +71 -0
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +4 -6
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +3 -5
- data/app/controllers/katello/api/v2/repositories_controller.rb +18 -3
- data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +0 -8
- data/app/controllers/katello/concerns/api/v2/http_proxies_controller_extensions.rb +17 -0
- data/app/controllers/katello/concerns/http_proxies_controller_extensions.rb +20 -0
- data/app/controllers/katello/sync_management_controller.rb +6 -2
- data/app/helpers/katello/content_source_helper.rb +8 -1
- data/app/helpers/katello/content_view_helper.rb +3 -1
- data/app/lib/actions/candlepin/activation_key/create.rb +1 -3
- data/app/lib/actions/candlepin/activation_key/update.rb +1 -3
- data/app/lib/actions/candlepin/environment/set_content.rb +17 -4
- data/app/lib/actions/katello/activation_key/create.rb +1 -2
- data/app/lib/actions/katello/activation_key/update.rb +2 -4
- data/app/lib/actions/katello/capsule_content/refresh_repos.rb +7 -1
- data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +3 -2
- data/app/lib/actions/katello/content_view/publish.rb +7 -2
- data/app/lib/actions/katello/content_view_environment/reassign_objects.rb +11 -2
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +31 -22
- data/app/lib/actions/katello/flatpak/mirror_remote_repository.rb +30 -0
- data/app/lib/actions/katello/flatpak/scan_remote.rb +17 -12
- data/app/lib/actions/katello/host/update_system_purpose.rb +1 -6
- data/app/lib/actions/pulp3/orchestration/repository/import_upload.rb +18 -2
- data/app/lib/actions/pulp3/repository/multi_copy_units.rb +4 -0
- data/app/lib/katello/api/v2/rendering.rb +2 -1
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +3 -4
- data/app/lib/katello/concerns/bookmark_controller_validator_extensions.rb +13 -0
- data/app/lib/katello/resources/candlepin/activation_key.rb +3 -5
- data/app/lib/katello/resources/candlepin/product.rb +2 -1
- data/app/lib/katello/util/cveak_migrator.rb +3 -2
- data/app/lib/katello/validators/alternate_content_source_path_validator.rb +2 -2
- data/app/lib/katello/validators/container_image_name_validator.rb +1 -1
- data/app/lib/katello/validators/content_validator.rb +1 -1
- data/app/lib/katello/validators/content_view_environment_coherent_default_validator.rb +2 -2
- data/app/lib/katello/validators/content_view_environment_org_validator.rb +2 -2
- data/app/lib/katello/validators/content_view_environment_validator.rb +3 -3
- data/app/lib/katello/validators/content_view_erratum_filter_rule_validator.rb +12 -12
- data/app/lib/katello/validators/content_view_filter_version_validator.rb +1 -1
- data/app/lib/katello/validators/generated_content_view_validator.rb +1 -1
- data/app/lib/katello/validators/gpg_key_content_type_validator.rb +2 -2
- data/app/lib/katello/validators/gpg_key_content_validator.rb +5 -5
- data/app/lib/katello/validators/katello_label_format_validator.rb +4 -4
- data/app/lib/katello/validators/katello_name_format_validator.rb +2 -2
- data/app/lib/katello/validators/katello_url_format_validator.rb +1 -1
- data/app/lib/katello/validators/library_presence_validator.rb +1 -1
- data/app/lib/katello/validators/no_trailing_space_validator.rb +1 -1
- data/app/lib/katello/validators/non_library_environment_validator.rb +1 -1
- data/app/lib/katello/validators/not_in_library_validator.rb +1 -1
- data/app/lib/katello/validators/path_descendents_validator.rb +1 -1
- data/app/lib/katello/validators/prior_validator.rb +1 -1
- data/app/lib/katello/validators/product_unique_attribute_validator.rb +1 -1
- data/app/lib/katello/validators/repo_disablement_validator.rb +2 -2
- data/app/lib/katello/validators/root_repository_unique_attribute_validator.rb +1 -1
- data/app/lib/katello/validators/self_reference_environment_validator.rb +1 -1
- data/app/lib/katello/validators/unique_field_in_org.rb +1 -1
- data/app/models/katello/activation_key.rb +6 -17
- data/app/models/katello/authorization/flatpak_remote.rb +33 -0
- data/app/models/katello/concerns/content_facet_host_extensions.rb +2 -1
- data/app/models/katello/concerns/host_managed_extensions.rb +8 -5
- data/app/models/katello/concerns/http_proxy_extensions.rb +4 -0
- data/app/models/katello/concerns/smart_proxy_extensions.rb +30 -6
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +0 -8
- data/app/models/katello/content_view.rb +4 -2
- data/app/models/katello/content_view_erratum_filter.rb +18 -2
- data/app/models/katello/content_view_version.rb +6 -0
- data/app/models/katello/docker_manifest.rb +8 -0
- data/app/models/katello/docker_manifest_list.rb +8 -0
- data/app/models/katello/erratum.rb +8 -2
- data/app/models/katello/flatpak_remote.rb +16 -0
- data/app/models/katello/flatpak_remote_repository.rb +18 -0
- data/app/models/katello/flatpak_remote_repository_manifest.rb +4 -0
- data/app/models/katello/glue/candlepin/pool.rb +1 -1
- data/app/models/katello/glue/pulp/repos.rb +12 -1
- data/app/models/katello/host/content_facet.rb +42 -3
- data/app/models/katello/host/subscription_facet.rb +4 -12
- data/app/models/katello/repository.rb +21 -8
- data/app/models/katello/rhel_lifecycle_status.rb +6 -0
- data/app/models/katello/root_repository.rb +6 -8
- data/app/models/katello/upstream_pool.rb +1 -0
- data/app/overrides/add_organization_attributes.rb +6 -0
- data/app/services/katello/product_content_finder.rb +2 -1
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +1 -1
- data/app/services/katello/pulp3/docker_manifest.rb +3 -2
- data/app/services/katello/pulp3/docker_manifest_list.rb +3 -2
- data/app/services/katello/pulp3/repository/ansible_collection.rb +8 -1
- data/app/services/katello/pulp3/repository/apt.rb +16 -18
- data/app/services/katello/pulp3/repository/file.rb +4 -2
- data/app/services/katello/pulp3/repository.rb +4 -0
- data/app/services/katello/pulp3/task.rb +2 -2
- data/app/views/foreman/job_templates/bootc_action.erb +26 -0
- data/app/views/foreman/job_templates/bootc_rollback.erb +13 -0
- data/app/views/foreman/job_templates/bootc_status.erb +13 -0
- data/app/views/foreman/job_templates/bootc_switch.erb +13 -0
- data/app/views/foreman/job_templates/bootc_upgrade.erb +13 -0
- data/app/views/foreman/job_templates/flatpak_install.erb +23 -0
- data/app/views/foreman/job_templates/flatpak_login_action.erb +30 -0
- data/app/views/foreman/job_templates/flatpak_setup.erb +27 -0
- 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/foreman/job_templates/resolve_traces_-_katello_ansible_default.erb +1 -1
- data/app/views/foreman/job_templates/update_packages_by_search_query_-_katello_ansible_default.erb +1 -1
- data/app/views/katello/api/v2/activation_keys/base.json.rabl +0 -4
- data/app/views/katello/api/v2/content_facet/base.json.rabl +2 -1
- data/app/views/katello/api/v2/content_view_filter_rules/show.json.rabl +1 -0
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +5 -1
- data/app/views/katello/api/v2/docker_manifest_lists/show.json.rabl +1 -1
- data/app/views/katello/api/v2/docker_manifests/show.json.rabl +1 -1
- data/app/views/katello/api/v2/flatpak_remote_repositories/base.json.rabl +4 -0
- data/app/views/katello/api/v2/flatpak_remote_repositories/index.json.rabl +7 -0
- data/app/views/katello/api/v2/flatpak_remote_repositories/show.json.rabl +13 -0
- data/app/views/katello/api/v2/flatpak_remotes/base.json.rabl +5 -0
- data/app/views/katello/api/v2/flatpak_remotes/index.json.rabl +8 -0
- data/app/views/katello/api/v2/flatpak_remotes/permissions.json.rabl +11 -0
- data/app/views/katello/api/v2/flatpak_remotes/show.json.rabl +3 -0
- data/app/views/katello/api/v2/hosts/base.json.rabl +0 -8
- data/app/views/katello/api/v2/hosts/os_attributes.json.rabl +13 -0
- data/app/views/katello/api/v2/http_proxies/show.json.rabl +1 -0
- data/app/views/katello/api/v2/repositories/base.json.rabl +1 -0
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -0
- data/app/views/katello/api/v2/subscription_facet/base.json.rabl +0 -4
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +1 -1
- data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +10 -4
- data/app/views/overrides/http_proxies/_update_setting_input.html.erb +18 -0
- data/app/views/overrides/organizations/_step_1_override.html.erb +5 -0
- data/config/initializers/monkeys.rb +0 -1
- data/config/initializers/pagelets.rb +6 -0
- data/config/routes/api/registry.rb +1 -0
- data/config/routes/api/v2.rb +21 -0
- data/config/routes/overrides.rb +1 -0
- data/config/routes.rb +2 -0
- data/db/migrate/20190605014649_add_purpose_addons.rb +0 -12
- data/db/migrate/20200213184848_create_evr_type.rb +126 -1
- data/db/migrate/20200818192230_update_system_purpose_status.rb +0 -1
- data/db/migrate/20240207191223_remove_entitlement_mode_host_statuses.rb +0 -1
- data/db/migrate/20240924161240_katello_recreate_evr_constructs.rb +160 -0
- data/db/migrate/20241022121706_add_sync_dependencies_option.rb +5 -0
- data/db/migrate/20241101144625_remove_system_purpose_addons.rb +9 -0
- data/db/migrate/20241107002541_add_registry_url_to_katello_flatpak_remotes.rb +5 -0
- data/db/migrate/20241112145802_add_manifest_entity_to_content_facets.rb +7 -0
- data/db/migrate/20241120213713_add_allow_other_types_to_content_view_erratum_filter_rules.rb +6 -0
- data/db/migrate/20241206183052_add_content_type_to_container_manifests_and_lists.rb +9 -0
- data/db/seeds.d/75-job_templates.rb +5 -1
- data/engines/bastion/vendor/assets/javascripts/bastion/angular/angular.js +2 -2
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-bootstrap/ui-bootstrap-tpls.js +3 -3
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-bootstrap/ui-bootstrap.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details-info.controller.js +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +1 -41
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-info.html +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/subscription-add-or-remove.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-system-purpose-modal.controller.js +1 -41
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-traces-modal.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html +0 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +1 -35
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-provisioning-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/debs.controller.js +46 -22
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/deb-content-views.controller.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/views/debs.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-content-views.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-details.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-errata.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata-tasks-list.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +85 -29
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn_IN.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ca.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/cs_CZ.po +341 -96
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +31 -54
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_AT.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_DE.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/el.po +341 -96
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_GB.po +349 -104
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_US.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +33 -56
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/et_EE.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +80 -68
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gl.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gu.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/he_IL.po +339 -111
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/hi.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/id.po +379 -130
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +342 -103
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +70 -83
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ka.po +84 -90
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/kn.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +130 -138
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ml_IN.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/mr.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/nl_NL.po +343 -97
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/or.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pa.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl_PL.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +40 -63
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro_RO.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +343 -102
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sl.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sv_SE.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta_IN.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/te.po +340 -95
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/tr.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi_VN.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh.po +338 -93
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +70 -83
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +362 -105
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +29 -29
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/package-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-advanced-sync-modal.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-sync-plan-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +24 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-tasks.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +21 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-info.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-tasks.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/views/discovery-create.html +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/views/discovery.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/partials/product-table-sync-status.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-start-date.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/views/sync-plans.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/tasks-table.directive.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/task-details.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-index.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-table.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/user-tasks-table.html +1 -1
- data/lib/katello/engine.rb +6 -0
- data/lib/katello/permission_creator.rb +37 -0
- data/lib/katello/permissions/host_permissions.rb +2 -0
- data/lib/katello/permissions/registry_permissions.rb +1 -0
- data/lib/katello/plugin.rb +18 -1
- data/lib/katello/repository_types/docker.rb +0 -1
- data/lib/katello/repository_types/python.rb +1 -1
- data/lib/katello/version.rb +1 -1
- data/lib/katello.rb +2 -0
- data/locale/Makefile +20 -24
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +248 -263
- data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn_IN/katello.po +247 -262
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po +247 -262
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/katello.po +524 -799
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +254 -269
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +248 -263
- data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_AT/katello.po +247 -262
- data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_DE/katello.po +250 -265
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po +252 -267
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/katello.po +257 -271
- data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_GB/katello.po +264 -279
- data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_US/katello.po +247 -262
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +248 -263
- data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
- data/locale/et_EE/katello.po +247 -262
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +250 -265
- data/locale/gl/LC_MESSAGES/katello.mo +0 -0
- data/locale/gl/katello.po +247 -262
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/katello.po +250 -265
- data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
- data/locale/he_IL/katello.po +249 -264
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/katello.po +248 -263
- data/locale/id/LC_MESSAGES/katello.mo +0 -0
- data/locale/id/katello.po +264 -275
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +254 -270
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +250 -265
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +247 -262
- data/locale/katello.pot +1216 -1215
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/katello.po +248 -263
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +248 -263
- data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ml_IN/katello.po +247 -262
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/katello.po +248 -263
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po +254 -268
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/katello.po +248 -263
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/katello.po +248 -263
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po +249 -264
- data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl_PL/katello.po +247 -262
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/katello.po +248 -263
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +248 -263
- data/locale/ro/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro/katello.po +247 -262
- data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro_RO/katello.po +247 -262
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +255 -270
- data/locale/sl/LC_MESSAGES/katello.mo +0 -0
- data/locale/sl/katello.po +247 -262
- data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
- data/locale/sv_SE/katello.po +249 -264
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +248 -263
- data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta_IN/katello.po +247 -262
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/katello.po +248 -263
- data/locale/tr/LC_MESSAGES/katello.mo +0 -0
- data/locale/tr/katello.po +247 -262
- data/locale/vi/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi/katello.po +247 -262
- data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi_VN/katello.po +247 -262
- data/locale/zh/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh/katello.po +247 -262
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +250 -265
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +257 -272
- data/webpack/ForemanColumnExtensions/index.js +73 -3
- data/webpack/ForemanColumnExtensions/index.scss +9 -0
- data/webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js +1 -0
- data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.js +1 -1
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeCard.js +1 -20
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeEditModal.js +3 -61
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/__tests__/SystemPurposeCard.test.js +0 -5
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/__tests__/SystemPurposeEditModal.test.js +0 -5
- data/webpack/components/extensions/HostDetails/DetailsTabCards/ImageModeCard.js +87 -0
- data/webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js +28 -2
- data/webpack/components/extensions/HostDetails/Tabs/DebsTab/DebInstallModal.js +1 -1
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +2 -2
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +1 -1
- data/webpack/components/extensions/Hosts/FontAwesomeImageModeIcon.js +55 -0
- data/webpack/containers/Application/config.js +5 -0
- data/webpack/global_index.js +3 -1
- data/webpack/redux/actions/RedHatRepositories/helpers.js +9 -0
- data/webpack/scenes/BootedContainerImages/BootedContainerImagesConstants.js +5 -0
- data/webpack/scenes/BootedContainerImages/BootedContainerImagesPage.js +242 -0
- data/webpack/scenes/BootedContainerImages/__tests__/bootedContainerImages.fixtures.js +42 -0
- data/webpack/scenes/BootedContainerImages/__tests__/bootedContainerImagesPage.test.js +233 -0
- data/webpack/scenes/BootedContainerImages/index.js +4 -0
- data/webpack/scenes/ContentViews/Delete/__tests__/affectedHosts.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +39 -7
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +13 -2
- data/webpack/scenes/ContentViews/Details/Filters/CVFilterDetailType.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataDateFilterContent.test.js +1 -0
- data/webpack/scenes/ContentViews/Details/Repositories/RepoIcon.js +4 -2
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/hosts.fixtures.json +1 -2
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignActivationKeysForm.js +20 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignHostsForm.js +20 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionRemoveReview.js +128 -18
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvAffectedActivationKeys.fixture.json +0 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvAffectedHosts.fixture.json +1 -2
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvVersionRemove.test.js +6 -4
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +5 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +6 -1
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +1 -1
- data/webpack/scenes/ContentViews/expansions/DetailsExpansion.js +5 -1
- data/webpack/scenes/SmartProxy/ExpandableCvDetails.js +4 -2
- data/webpack/scenes/SmartProxy/__tests__/SmartProxyContentTest.js +38 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionPurposeAttributes.js +0 -1
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailInfo.test.js.snap +0 -10
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +0 -3
- data/webpack/scenes/Subscriptions/Details/__tests__/subscriptionDetails.fixtures.js +0 -1
- metadata +61 -58
- data/app/models/katello/activation_key_purpose_addon.rb +0 -6
- data/app/models/katello/purpose_addon.rb +0 -11
- data/app/models/katello/subscription_facet_purpose_addon.rb +0 -6
- data/lib/monkeys/fx_sqlite_skip.rb +0 -13
- data/locale/action_names.rb +0 -181
- 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
@@ -33,6 +33,7 @@ module Katello
|
|
33
33
|
before_create :associate_default_locations
|
34
34
|
before_create :associate_lifecycle_environments
|
35
35
|
before_validation :set_default_download_policy
|
36
|
+
after_update :refresh_smart_proxy_sync_histories
|
36
37
|
|
37
38
|
lazy_accessor :pulp_repositories, :initializer => lambda { |_s| pulp_node.extensions.repository.retrieve_all }
|
38
39
|
|
@@ -131,9 +132,13 @@ module Katello
|
|
131
132
|
SmartProxy.joins(:smart_proxy_alternate_content_sources).where('katello_smart_proxy_alternate_content_sources.smart_proxy_id' => self.id)
|
132
133
|
end
|
133
134
|
|
134
|
-
def
|
135
|
+
def registration_url
|
135
136
|
url = self.setting('Registration', 'registration_url').presence || self.url
|
136
|
-
URI
|
137
|
+
URI(url)
|
138
|
+
end
|
139
|
+
|
140
|
+
def registration_host
|
141
|
+
registration_url.host
|
137
142
|
end
|
138
143
|
|
139
144
|
def load_balanced?
|
@@ -171,10 +176,10 @@ module Katello
|
|
171
176
|
end
|
172
177
|
|
173
178
|
def initialize_content_counts(reset: false)
|
174
|
-
if reset
|
179
|
+
if reset || content_counts.empty?
|
175
180
|
{ content_view_versions: {} }.with_indifferent_access
|
176
181
|
else
|
177
|
-
|
182
|
+
content_counts.deep_dup.with_indifferent_access
|
178
183
|
end
|
179
184
|
end
|
180
185
|
|
@@ -182,7 +187,9 @@ module Katello
|
|
182
187
|
repo_mirror_service = repo.backend_service(self).with_mirror_adapter
|
183
188
|
repo_content_counts = repo_mirror_service.latest_content_counts
|
184
189
|
translated_counts = translate_counts(repo, repo_mirror_service, repo_content_counts)
|
185
|
-
content_counts[:content_view_versions][repo.content_view_version_id.to_s]
|
190
|
+
if content_counts[:content_view_versions][repo.content_view_version_id.to_s].empty?
|
191
|
+
content_counts[:content_view_versions][repo.content_view_version_id.to_s] = { repositories: {}}.with_indifferent_access
|
192
|
+
end
|
186
193
|
content_counts[:content_view_versions][repo.content_view_version_id.to_s][:repositories][repo.id.to_s] = translated_counts
|
187
194
|
end
|
188
195
|
|
@@ -465,6 +472,9 @@ module Katello
|
|
465
472
|
end
|
466
473
|
|
467
474
|
def remove_lifecycle_environment(environment)
|
475
|
+
smart_proxy_helper = ::Katello::SmartProxyHelper.new(self)
|
476
|
+
repos = smart_proxy_helper.repositories_available_to_capsule(environment)
|
477
|
+
smart_proxy_helper.clear_smart_proxy_sync_histories(repos) unless repos.empty?
|
468
478
|
self.lifecycle_environments.find(environment.id)
|
469
479
|
unless self.lifecycle_environments.destroy(environment)
|
470
480
|
fail _("Could not remove the lifecycle environment from the smart proxy")
|
@@ -473,6 +483,16 @@ module Katello
|
|
473
483
|
raise _("Lifecycle environment was not attached to the smart proxy; therefore, no changes were made.")
|
474
484
|
end
|
475
485
|
|
486
|
+
def refresh_smart_proxy_sync_histories
|
487
|
+
smart_proxy_helper = ::Katello::SmartProxyHelper.new(self)
|
488
|
+
repos = smart_proxy_helper.repositories_available_to_capsule.select(:id)
|
489
|
+
if repos.size == 0
|
490
|
+
self.smart_proxy_sync_histories.delete_all
|
491
|
+
else
|
492
|
+
self.smart_proxy_sync_histories.where.not(repository_id: repos).delete_all
|
493
|
+
end
|
494
|
+
end
|
495
|
+
|
476
496
|
def available_lifecycle_environments(organization_id = nil)
|
477
497
|
scope = Katello::KTEnvironment.not_in_capsule(self)
|
478
498
|
scope = scope.where(organization_id: organization_id) if organization_id
|
@@ -598,12 +618,16 @@ module Katello
|
|
598
618
|
URI(setting(SmartProxy::PULP3_FEATURE, 'content_app_url'))
|
599
619
|
end
|
600
620
|
|
621
|
+
def load_balancer_pulp_content_url
|
622
|
+
URI::HTTPS.build(host: registration_url.host, path: pulp_content_url.path)
|
623
|
+
end
|
624
|
+
|
601
625
|
def audit_capsule_sync
|
602
626
|
write_audit(action: "sync capsule", comment: _('Successfully synced capsule.'), audited_changes: {})
|
603
627
|
end
|
604
628
|
|
605
629
|
class ::SmartProxy::Jail < ::Safemode::Jail
|
606
|
-
allow :rhsm_url, :pulp_content_url
|
630
|
+
allow :rhsm_url, :pulp_content_url, :load_balancer_pulp_content_url, :registration_url
|
607
631
|
end
|
608
632
|
end
|
609
633
|
end
|
@@ -14,7 +14,6 @@ module Katello
|
|
14
14
|
|
15
15
|
has_many :activation_keys, :through => :subscription_facet
|
16
16
|
has_many :pools, :through => :subscription_facet
|
17
|
-
has_many :purpose_addons, :through => :subscription_facet
|
18
17
|
has_many :subscriptions, :through => :pools
|
19
18
|
has_one :rhel_lifecycle_status_object, :class_name => 'Katello::RhelLifecycleStatus', :foreign_key => 'host_id', :dependent => :destroy
|
20
19
|
has_one :hypervisor_host, :through => :subscription_facet
|
@@ -38,7 +37,6 @@ module Katello
|
|
38
37
|
scoped_search :on => :id, :relation => :pools, :rename => :subscription_id, :complete_value => true, :ext_method => :find_by_subscription_id, :only_explicit => true
|
39
38
|
scoped_search :on => :purpose_role, :rename => :role, :relation => :subscription_facet, :complete_value => true
|
40
39
|
scoped_search :on => :purpose_usage, :rename => :usage, :relation => :subscription_facet, :complete_value => true
|
41
|
-
scoped_search :on => :name, :rename => :addon, :relation => :purpose_addons, :complete_value => true, :ext_method => :find_by_purpose_addon
|
42
40
|
before_update :update_candlepin_associations, if: -> { subscription_facet.try(:backend_update_needed?) }
|
43
41
|
end
|
44
42
|
|
@@ -81,12 +79,6 @@ module Katello
|
|
81
79
|
::Katello::RhelLifecycleStatus.status_map
|
82
80
|
end
|
83
81
|
|
84
|
-
def find_by_purpose_addon(_key, operator, value)
|
85
|
-
conditions = sanitize_sql_for_conditions(["#{Katello::PurposeAddon.table_name}.name #{operator} ?", value_to_sql(operator, value)])
|
86
|
-
hosts = ::Host::Managed.joins(:purpose_addons).where(conditions)
|
87
|
-
return_hosts(hosts)
|
88
|
-
end
|
89
|
-
|
90
82
|
def find_by_activation_key(_key, operator, value)
|
91
83
|
conditions = sanitize_sql_for_conditions(["#{Katello::ActivationKey.table_name}.name #{operator} ?", value_to_sql(operator, value)])
|
92
84
|
hosts = ::Host::Managed.joins(:activation_keys).where(conditions)
|
@@ -112,7 +112,7 @@ module Katello
|
|
112
112
|
scoped_search :on => :name, :complete_value => true
|
113
113
|
scoped_search :on => :organization_id, :complete_value => true, :only_explicit => true, :validator => ScopedSearch::Validators::INTEGER
|
114
114
|
scoped_search :on => :label, :complete_value => true
|
115
|
-
scoped_search :on => :composite, :complete_value => true
|
115
|
+
scoped_search :on => :composite, :complete_value => { :true => true, :false => false }
|
116
116
|
scoped_search :on => :generated_for, :complete_value => true
|
117
117
|
scoped_search :on => :default # just for ordering
|
118
118
|
scoped_search :on => :name, :complete_value => true,
|
@@ -342,7 +342,9 @@ module Katello
|
|
342
342
|
end
|
343
343
|
|
344
344
|
def latest_version_env
|
345
|
-
|
345
|
+
environments = organization.readable_promotion_paths.flatten
|
346
|
+
environments.insert(0, organization.library)
|
347
|
+
environments.intersection(latest_version_object.try(:environments) || [])
|
346
348
|
end
|
347
349
|
|
348
350
|
def last_task
|
@@ -92,9 +92,21 @@ module Katello
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def types_clause
|
95
|
+
# Create an array to store output clauses for quick type filtering later
|
96
|
+
conditions = []
|
97
|
+
|
98
|
+
# Add clauses for types in the filter
|
95
99
|
types = erratum_rules.first.types
|
96
|
-
|
97
|
-
|
100
|
+
conditions << errata_types_in(types) unless types.blank?
|
101
|
+
|
102
|
+
# Add clauses for 'other' types
|
103
|
+
conditions << errata_types_not_in(Erratum::TYPES) if erratum_rules.first.allow_other_types?
|
104
|
+
|
105
|
+
# Reduce the array of clauses to a single clause and return
|
106
|
+
return if conditions.empty?
|
107
|
+
conditions.reduce(nil) do |combined_clause, condition|
|
108
|
+
combined_clause ? combined_clause.or(condition) : condition
|
109
|
+
end
|
98
110
|
end
|
99
111
|
|
100
112
|
def filter_by_id?
|
@@ -105,6 +117,10 @@ module Katello
|
|
105
117
|
erratum_arel[:errata_type].in(types)
|
106
118
|
end
|
107
119
|
|
120
|
+
def errata_types_not_in(types)
|
121
|
+
erratum_arel[:errata_type].not_in(types)
|
122
|
+
end
|
123
|
+
|
108
124
|
def errata_in(ids)
|
109
125
|
erratum_arel[:errata_id].in(ids)
|
110
126
|
end
|
@@ -108,6 +108,12 @@ module Katello
|
|
108
108
|
name
|
109
109
|
end
|
110
110
|
|
111
|
+
def sorted_organization_readable_environments
|
112
|
+
organization_readable_environments = organization.readable_promotion_paths.flatten
|
113
|
+
organization_readable_environments.insert(0, organization.library)
|
114
|
+
organization_readable_environments.intersection(environments)
|
115
|
+
end
|
116
|
+
|
111
117
|
def self.contains_file(file_unit_id)
|
112
118
|
where(id: Katello::Repository.where(id: Katello::RepositoryFileUnit.where(file_unit_id: file_unit_id).select(:repository_id)).select(:content_view_version_id))
|
113
119
|
end
|
@@ -5,13 +5,21 @@ module Katello
|
|
5
5
|
has_many :docker_manifest_list_manifests, :class_name => "Katello::DockerManifestListManifest",
|
6
6
|
:dependent => :delete_all, :inverse_of => :docker_manifest
|
7
7
|
has_many :docker_manifest_lists, :through => :docker_manifest_list_manifests, :inverse_of => :docker_manifests
|
8
|
+
has_many :content_facets, :class_name => "::Katello::Host::ContentFacet", :as => :manifest_entity, :dependent => :nullify
|
9
|
+
has_many :hosts, :class_name => "::Host::Managed", :through => :content_facets, :inverse_of => :docker_manifest
|
8
10
|
|
9
11
|
CONTENT_TYPE = "docker_manifest".freeze
|
10
12
|
|
13
|
+
scope :bootable, -> { where(:is_bootable => true) }
|
14
|
+
scope :flatpak, -> { where(:is_flatpak => true) }
|
15
|
+
|
11
16
|
scoped_search :relation => :docker_tags, :on => :name, :rename => :tag, :complete_value => true
|
12
17
|
scoped_search :on => :digest, :rename => :digest, :complete_value => true, :only_explicit => true
|
13
18
|
scoped_search :on => :schema_version, :rename => :schema_version, :complete_value => true, :only_explicit => true
|
14
19
|
scoped_search :relation => :docker_manifest_lists, :on => :digest, :rename => :manifest_list_digest, :complete_value => true, :only_explicit => true
|
20
|
+
scoped_search :on => :is_bootable, :rename => :bootable, :complete_value => true, :only_explicit => true
|
21
|
+
scoped_search :on => :is_flatpak, :rename => :flatpak, :complete_value => true, :only_explicit => true
|
22
|
+
scoped_search :on => :content_type, :complete_value => true, :only_explicit => true
|
15
23
|
|
16
24
|
def self.default_sort
|
17
25
|
order(:schema_version)
|
@@ -6,12 +6,20 @@ module Katello
|
|
6
6
|
has_many :docker_manifest_list_manifests, :class_name => "Katello::DockerManifestListManifest",
|
7
7
|
:dependent => :delete_all, :inverse_of => :docker_manifest_list
|
8
8
|
has_many :docker_manifests, :through => :docker_manifest_list_manifests, :inverse_of => :docker_manifest_lists
|
9
|
+
has_many :content_facets, :class_name => "::Katello::Host::ContentFacet", :as => :manifest_entity, :dependent => :nullify
|
10
|
+
has_many :hosts, :class_name => "::Host::Managed", :through => :content_facets, :inverse_of => :docker_manifest_list
|
9
11
|
|
10
12
|
CONTENT_TYPE = "docker_manifest_list".freeze
|
11
13
|
|
14
|
+
scope :bootable, -> { where(:is_bootable => true) }
|
15
|
+
scope :flatpak, -> { where(:is_flatpak => true) }
|
16
|
+
|
12
17
|
scoped_search :relation => :docker_tags, :on => :name, :rename => :tag, :complete_value => true
|
13
18
|
scoped_search :on => :digest, :rename => :digest, :complete_value => true, :only_explicit => true
|
14
19
|
scoped_search :on => :schema_version, :rename => :schema_version, :complete_value => true, :only_explicit => true
|
20
|
+
scoped_search :on => :is_bootable, :rename => :bootable, :complete_value => true, :only_explicit => true
|
21
|
+
scoped_search :on => :is_flatpak, :rename => :flatpak, :complete_value => true, :only_explicit => true
|
22
|
+
scoped_search :on => :content_type, :complete_value => true, :only_explicit => true
|
15
23
|
|
16
24
|
def self.default_sort
|
17
25
|
order(:schema_version)
|
@@ -48,8 +48,14 @@ module Katello
|
|
48
48
|
:validator => ->(value) { ['true', 'false'].include?(value.downcase) },
|
49
49
|
:operators => ["="]
|
50
50
|
|
51
|
-
def self.of_type(type)
|
52
|
-
|
51
|
+
def self.of_type(type, include_other = false)
|
52
|
+
if include_other
|
53
|
+
where.not(
|
54
|
+
:errata_type => [Erratum::SECURITY, Erratum::BUGZILLA, Erratum::ENHANCEMENT].flatten
|
55
|
+
).or(where(:errata_type => type))
|
56
|
+
else
|
57
|
+
where(:errata_type => type)
|
58
|
+
end
|
53
59
|
end
|
54
60
|
|
55
61
|
scope :security, -> { of_type(Erratum::SECURITY) }
|
@@ -1,5 +1,8 @@
|
|
1
1
|
module Katello
|
2
2
|
class FlatpakRemote < Katello::Model
|
3
|
+
include Authorization::FlatpakRemote
|
4
|
+
include ForemanTasks::Concerns::ActionSubject
|
5
|
+
|
3
6
|
has_many :remote_repositories, dependent: :destroy, class_name: 'Katello::FlatpakRemoteRepository'
|
4
7
|
has_many :remote_repository_manifests, through: :remote_repositories, source: :remote_repository_manifests
|
5
8
|
belongs_to :organization, inverse_of: :flatpak_remotes
|
@@ -7,5 +10,18 @@ module Katello
|
|
7
10
|
validates :name, presence: true
|
8
11
|
validates :url, presence: true
|
9
12
|
validates :organization_id, presence: true
|
13
|
+
validates :name, :uniqueness => {:scope => :organization_id}
|
14
|
+
|
15
|
+
scope :seeded, -> { where(:seeded => true) }
|
16
|
+
|
17
|
+
scoped_search :on => :name, :complete_value => true
|
18
|
+
scoped_search :on => :organization_id, :complete_value => true, :only_explicit => true, :validator => ScopedSearch::Validators::INTEGER
|
19
|
+
scoped_search :on => :url, :complete_value => true
|
20
|
+
scoped_search :on => :seeded, :complete_value => true
|
21
|
+
scoped_search :on => :registry_url, :complete_value => true
|
22
|
+
|
23
|
+
def self.humanize_class_name(_name = nil)
|
24
|
+
_("Flatpak Remotes")
|
25
|
+
end
|
10
26
|
end
|
11
27
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
module Katello
|
2
2
|
class FlatpakRemoteRepository < Katello::Model
|
3
|
+
include Ext::LabelFromName
|
4
|
+
|
3
5
|
belongs_to :flatpak_remote, inverse_of: :remote_repositories
|
4
6
|
has_many :remote_repository_manifests, dependent: :destroy, class_name: 'Katello::FlatpakRemoteRepositoryManifest'
|
5
7
|
|
@@ -7,6 +9,22 @@ module Katello
|
|
7
9
|
validates :name, presence: true
|
8
10
|
validates :label, presence: true
|
9
11
|
|
12
|
+
scoped_search :on => :name, :complete_value => true
|
13
|
+
scoped_search :on => :label, :complete_value => true
|
14
|
+
scoped_search :on => :flatpak_remote_id, :complete_value => true, :only_explicit => true, :validator => ScopedSearch::Validators::INTEGER
|
15
|
+
|
10
16
|
alias_attribute :manifests, :remote_repository_manifests
|
17
|
+
|
18
|
+
def self.readable
|
19
|
+
where(flatpak_remote_id: FlatpakRemote.readable)
|
20
|
+
end
|
21
|
+
|
22
|
+
def manifest_dependencies
|
23
|
+
FlatpakRemoteRepositoryManifest.where(flatpak_ref: self.manifests&.select(:runtime))
|
24
|
+
end
|
25
|
+
|
26
|
+
def repository_dependencies
|
27
|
+
manifest_dependencies&.map(&:remote_repository)
|
28
|
+
end
|
11
29
|
end
|
12
30
|
end
|
@@ -6,5 +6,9 @@ module Katello
|
|
6
6
|
inverse_of: :remote_repository_manifests
|
7
7
|
validates :flatpak_remote_repository_id, presence: true
|
8
8
|
validates :name, presence: true
|
9
|
+
|
10
|
+
def runtime_dependency
|
11
|
+
FlatpakRemoteRepositoryManifest.where(flatpak_ref: self.runtime)
|
12
|
+
end
|
9
13
|
end
|
10
14
|
end
|
@@ -10,7 +10,7 @@ module Katello
|
|
10
10
|
lazy_accessor :subscription_facts, :initializer => lambda { |_s| self.subscription ? self.subscription.attributes : {} }
|
11
11
|
|
12
12
|
lazy_accessor :pool_derived, :owner, :source_pool_id, :virt_limit, :arch, :description, :product_family,
|
13
|
-
:variant, :suggested_quantity, :support_type, :product_id, :type, :upstream_entitlement_id, :roles, :usage,
|
13
|
+
:variant, :suggested_quantity, :support_type, :product_id, :type, :upstream_entitlement_id, :roles, :usage,
|
14
14
|
:initializer => :pool_facts
|
15
15
|
|
16
16
|
lazy_accessor :name, :support_level, :org, :sockets, :cores, :instance_multiplier,
|
@@ -50,7 +50,18 @@ module Katello
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def last_sync_audit
|
53
|
-
|
53
|
+
repository_ids = self.repositories.pluck(:id)
|
54
|
+
return nil if repository_ids.blank?
|
55
|
+
|
56
|
+
Audited::Audit
|
57
|
+
.where(
|
58
|
+
auditable_id: repository_ids,
|
59
|
+
auditable_type: Katello::Repository.name,
|
60
|
+
action: "sync"
|
61
|
+
)
|
62
|
+
.order(created_at: :desc)
|
63
|
+
.limit(1)
|
64
|
+
.first
|
54
65
|
end
|
55
66
|
|
56
67
|
def last_sync
|
@@ -15,9 +15,20 @@ module Katello
|
|
15
15
|
ALL_TRACER_PACKAGE_NAMES = [ "python-#{HOST_TOOLS_TRACER_PACKAGE_NAME}",
|
16
16
|
"python3-#{HOST_TOOLS_TRACER_PACKAGE_NAME}",
|
17
17
|
HOST_TOOLS_TRACER_PACKAGE_NAME ].freeze
|
18
|
+
BOOTC_FIELD_FACT_NAMES = [
|
19
|
+
"bootc.booted.image",
|
20
|
+
"bootc.booted.digest",
|
21
|
+
"bootc.staged.image",
|
22
|
+
"bootc.staged.digest",
|
23
|
+
"bootc.rollback.image",
|
24
|
+
"bootc.rollback.digest",
|
25
|
+
"bootc.available.image",
|
26
|
+
"bootc.available.digest",
|
27
|
+
].freeze
|
18
28
|
|
19
29
|
belongs_to :kickstart_repository, :class_name => "::Katello::Repository", :inverse_of => :kickstart_content_facets
|
20
30
|
belongs_to :content_source, :class_name => "::SmartProxy", :inverse_of => :content_facets
|
31
|
+
belongs_to :manifest_entity, :polymorphic => true, :optional => true, :inverse_of => :content_facets
|
21
32
|
|
22
33
|
has_many :content_view_environment_content_facets, :class_name => "Katello::ContentViewEnvironmentContentFacet", :dependent => :destroy, :inverse_of => :content_facet
|
23
34
|
has_many :content_view_environments, :through => :content_view_environment_content_facets,
|
@@ -48,7 +59,7 @@ module Katello
|
|
48
59
|
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.")
|
49
60
|
validates :host, :presence => true, :allow_blank => false
|
50
61
|
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",
|
62
|
+
format: { with: /\Asha256:[A-Fa-f0-9]{64}\z/, message: "must be a valid sha256 digest", allow_blank: true }
|
52
63
|
|
53
64
|
scope :with_environments, ->(lifecycle_environments) do
|
54
65
|
joins(:content_view_environment_content_facets => :content_view_environment).
|
@@ -125,7 +136,7 @@ module Katello
|
|
125
136
|
def content_view_environments=(new_cves)
|
126
137
|
if new_cves.length > 1 && !Setting['allow_multiple_content_views']
|
127
138
|
fail ::Katello::Errors::MultiEnvironmentNotSupportedError,
|
128
|
-
_("Assigning a host to multiple content view environments is not enabled.")
|
139
|
+
_("Assigning a host to multiple content view environments is not enabled. To enable, set the allow_multiple_content_views setting.")
|
129
140
|
end
|
130
141
|
super(new_cves)
|
131
142
|
Katello::ContentViewEnvironmentContentFacet.reprioritize_for_content_facet(self, new_cves)
|
@@ -308,6 +319,34 @@ module Katello
|
|
308
319
|
Katello::Host::ContentFacet.where(id: non_installable_errata)
|
309
320
|
end
|
310
321
|
|
322
|
+
def self.populate_fields_from_facts(host, parser, _type, _source_proxy)
|
323
|
+
return if host.content_facet.blank?
|
324
|
+
facet = host.content_facet || host.build_content_facet
|
325
|
+
attrs_to_add = {}
|
326
|
+
BOOTC_FIELD_FACT_NAMES.each do |fact_name|
|
327
|
+
fact_value = parser.facts[fact_name]
|
328
|
+
field_name = fact_name.tr(".", "_")
|
329
|
+
attrs_to_add[field_name] = fact_value # overwrite with nil if fact is not present
|
330
|
+
end
|
331
|
+
if attrs_to_add['bootc_booted_digest'].present?
|
332
|
+
manifest_entity = find_manifest_entity(digest: attrs_to_add['bootc_booted_digest'])
|
333
|
+
if manifest_entity.present?
|
334
|
+
attrs_to_add['manifest_entity_type'] = manifest_entity.model_name.name
|
335
|
+
attrs_to_add['manifest_entity_id'] = manifest_entity.id
|
336
|
+
else
|
337
|
+
# remove the association if the manifest entity is not found
|
338
|
+
attrs_to_add['manifest_entity_type'] = nil
|
339
|
+
attrs_to_add['manifest_entity_id'] = nil
|
340
|
+
end
|
341
|
+
end
|
342
|
+
facet.assign_attributes(attrs_to_add)
|
343
|
+
facet.save unless facet.new_record?
|
344
|
+
end
|
345
|
+
|
346
|
+
def self.find_manifest_entity(digest:)
|
347
|
+
::Katello::DockerManifestList.find_by(digest: digest) || ::Katello::DockerManifest.find_by(digest: digest)
|
348
|
+
end
|
349
|
+
|
311
350
|
def self.with_applicable_errata(errata)
|
312
351
|
self.joins(:applicable_errata).where("#{Katello::Erratum.table_name}.id" => errata)
|
313
352
|
end
|
@@ -414,7 +453,7 @@ module Katello
|
|
414
453
|
:errata_counts, :id, :kickstart_repository, :kickstart_repository_id, :kickstart_repository_name,
|
415
454
|
:upgradable_deb_count, :upgradable_module_stream_count, :upgradable_rpm_count, :uuid,
|
416
455
|
:installable_security_errata_count, :installable_bugfix_errata_count, :installable_enhancement_errata_count,
|
417
|
-
:single_content_view, :single_lifecycle_environment
|
456
|
+
:single_content_view, :single_lifecycle_environment, :content_view_environment_labels
|
418
457
|
end
|
419
458
|
end
|
420
459
|
end
|
@@ -12,9 +12,6 @@ module Katello
|
|
12
12
|
has_many :subscription_facet_activation_keys, :class_name => "Katello::SubscriptionFacetActivationKey", :dependent => :destroy, :inverse_of => :subscription_facet
|
13
13
|
has_many :activation_keys, :through => :subscription_facet_activation_keys, :class_name => "Katello::ActivationKey"
|
14
14
|
|
15
|
-
has_many :subscription_facet_purpose_addons, :class_name => "Katello::SubscriptionFacetPurposeAddon", :dependent => :destroy, :inverse_of => :subscription_facet
|
16
|
-
has_many :purpose_addons, :class_name => "Katello::PurposeAddon", :through => :subscription_facet_purpose_addons
|
17
|
-
|
18
15
|
has_many :subscription_facet_pools, :class_name => "Katello::SubscriptionFacetPool", :dependent => :delete_all, :inverse_of => :subscription_facet
|
19
16
|
has_many :pools, :through => :subscription_facet_pools, :class_name => "Katello::Pool"
|
20
17
|
|
@@ -27,9 +24,7 @@ module Katello
|
|
27
24
|
|
28
25
|
DEFAULT_TYPE = 'system'.freeze
|
29
26
|
|
30
|
-
accepts_nested_attributes_for :installed_products
|
31
|
-
|
32
|
-
dirty_has_many_associations :purpose_addons
|
27
|
+
accepts_nested_attributes_for :installed_products
|
33
28
|
|
34
29
|
attr_accessor :facts
|
35
30
|
|
@@ -63,9 +58,6 @@ module Katello
|
|
63
58
|
self.update_installed_products(consumer_params['installedProducts']) if consumer_params.key?('installedProducts')
|
64
59
|
self.purpose_role = consumer_params['role'] unless consumer_params['role'].nil?
|
65
60
|
self.purpose_usage = consumer_params['usage'] unless consumer_params['usage'].nil?
|
66
|
-
unless consumer_params['addOns'].nil?
|
67
|
-
self.purpose_addon_ids = consumer_params['addOns'].map { |addon_name| ::Katello::PurposeAddon.find_or_create_by(name: addon_name).id }
|
68
|
-
end
|
69
61
|
|
70
62
|
unless consumer_params['releaseVer'].nil?
|
71
63
|
release = consumer_params['releaseVer']
|
@@ -141,7 +133,6 @@ module Katello
|
|
141
133
|
:autoheal => autoheal,
|
142
134
|
:usage => purpose_usage,
|
143
135
|
:role => purpose_role,
|
144
|
-
:addOns => purpose_addons.pluck(:name),
|
145
136
|
:serviceLevel => service_level,
|
146
137
|
:releaseVer => release_version,
|
147
138
|
:environments => self.candlepin_environments,
|
@@ -283,7 +274,7 @@ module Katello
|
|
283
274
|
end
|
284
275
|
|
285
276
|
def backend_update_needed?
|
286
|
-
%w(release_version service_level autoheal purpose_role purpose_usage
|
277
|
+
%w(release_version service_level autoheal purpose_role purpose_usage).each do |method|
|
287
278
|
if self.send("#{method}_changed?")
|
288
279
|
Rails.logger.debug("backend_update_needed: subscription facet #{method} changed")
|
289
280
|
return true
|
@@ -302,10 +293,11 @@ module Katello
|
|
302
293
|
return unless host.subscription_facet || has_convert2rhel
|
303
294
|
# Add in custom convert2rhel fact if system was converted using convert2rhel through Katello
|
304
295
|
# We want the value nil unless the custom fact is present otherwise we get a 0 in the database which if debugging
|
305
|
-
# might make you think it was converted2rhel but not with satellite, that is why I have the
|
296
|
+
# might make you think it was converted2rhel but not with satellite, that is why I have the ternary below.
|
306
297
|
facet = host.subscription_facet || host.build_subscription_facet
|
307
298
|
facet.attributes = {
|
308
299
|
convert2rhel_through_foreman: has_convert2rhel ? ::Foreman::Cast.to_bool(parser.facts['conversions.env.CONVERT2RHEL_THROUGH_FOREMAN']) : nil,
|
300
|
+
|
309
301
|
}.compact
|
310
302
|
facet.save unless facet.new_record?
|
311
303
|
end
|
@@ -357,6 +357,13 @@ module Katello
|
|
357
357
|
end
|
358
358
|
end
|
359
359
|
|
360
|
+
def full_gpg_key_path(smart_proxy = nil, force_http = false)
|
361
|
+
return if self.root.gpg_key.try(:content).blank?
|
362
|
+
pulp_uri = URI.parse(smart_proxy ? smart_proxy.url : ::SmartProxy.pulp_primary.url)
|
363
|
+
scheme = force_http ? 'http' : 'https'
|
364
|
+
"#{scheme}://#{pulp_uri.host.downcase}#{gpg_key_content_api_repository_url(self, :only_path => true)}"
|
365
|
+
end
|
366
|
+
|
360
367
|
def product_type
|
361
368
|
redhat? ? "redhat" : "custom"
|
362
369
|
end
|
@@ -556,9 +563,9 @@ module Katello
|
|
556
563
|
view = self.content_view.label
|
557
564
|
product = self.product.label
|
558
565
|
env = cve.label.split('/').first
|
559
|
-
"#{org}
|
566
|
+
"#{org}/#{env.downcase}/#{view}/#{product}/#{self.root.label}"
|
560
567
|
else
|
561
|
-
"#{org}
|
568
|
+
"#{org}/#{self.content_view.label}/#{self.content_view_version.version}/#{self.root.product.label}/#{self.root.label}"
|
562
569
|
end
|
563
570
|
end
|
564
571
|
|
@@ -697,7 +704,7 @@ module Katello
|
|
697
704
|
.uniq
|
698
705
|
.map { |task| "- #{Setting['foreman_url']}/foreman_tasks/tasks/#{task&.id}" }
|
699
706
|
.join("\n")
|
700
|
-
fail _("
|
707
|
+
fail _("Repository #{self.label} has pending tasks in associated content views. Please wait for the tasks: " + errored_tasks +
|
701
708
|
" to complete before proceeding.")
|
702
709
|
end
|
703
710
|
end
|
@@ -936,9 +943,9 @@ module Katello
|
|
936
943
|
# the container provided. Branches numbered as ordered below.
|
937
944
|
#
|
938
945
|
# 1 - Render promotion pattern (or env pattern if no promo pattern)
|
939
|
-
# 2 - <org label
|
940
|
-
# 3 - <org label
|
941
|
-
# 4 - <org label
|
946
|
+
# 2 - <org label>/<product label>/<repo label>
|
947
|
+
# 3 - <org label>/<env label>/<cv label>/<product label>/<repo label>
|
948
|
+
# 4 - <org label>/<cv label>/<cvv label>/<product label>/<repo label>
|
942
949
|
is_pattern_provided = pattern.present?
|
943
950
|
env_exists = repository.environment.present?
|
944
951
|
is_env_pattern_provided = env_exists && repository.environment.registry_name_pattern.present?
|
@@ -967,7 +974,7 @@ module Katello
|
|
967
974
|
else
|
968
975
|
items = [repository.organization.label, repository.content_view.label, repository.content_view_version.version, repository.product.label, repository.label]
|
969
976
|
end
|
970
|
-
Repository.clean_container_name(items.compact.join("
|
977
|
+
Repository.clean_container_name(items.compact.join("/"))
|
971
978
|
end
|
972
979
|
|
973
980
|
def self.clean_container_name(name)
|
@@ -1052,10 +1059,16 @@ module Katello
|
|
1052
1059
|
pulp_api.list({:repository_version => version_href}).results.map { |x| x.component }.uniq
|
1053
1060
|
end
|
1054
1061
|
|
1062
|
+
def deb_sanitize_pulp_distribution(distribution)
|
1063
|
+
return "flat-repo" if distribution == "/"
|
1064
|
+
return distribution.chomp("/") if distribution&.end_with?("/")
|
1065
|
+
distribution
|
1066
|
+
end
|
1067
|
+
|
1055
1068
|
def deb_pulp_distributions(version_href = self.version_href)
|
1056
1069
|
return [] if version_href.blank?
|
1057
1070
|
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
|
1071
|
+
pulp_api.list({:repository_version => version_href}).results.map { |x| deb_sanitize_pulp_distribution(x.distribution) }.uniq
|
1059
1072
|
end
|
1060
1073
|
|
1061
1074
|
def sync_status
|
@@ -13,6 +13,9 @@ module Katello
|
|
13
13
|
end
|
14
14
|
|
15
15
|
RHEL_EOS_SCHEDULE = { # dates that each support category ends
|
16
|
+
'RHEL10' => {
|
17
|
+
'full_support' => nil,
|
18
|
+
},
|
16
19
|
'RHEL9' => {
|
17
20
|
'full_support' => end_of_day('2027-05-31'),
|
18
21
|
'maintenance_support' => end_of_day('2032-05-31'),
|
@@ -74,6 +77,7 @@ module Katello
|
|
74
77
|
|
75
78
|
def self.lifecycles_expire_soon
|
76
79
|
expiring = RHEL_EOS_SCHEDULE.collect do |index, schedules|
|
80
|
+
next if schedules['full_support'].blank?
|
77
81
|
expire_soon = schedules.except("full_support").select { |_k, v| (Time.now.utc..Time.now.utc + EOS_WARNING_THRESHOLD).cover?(v) }
|
78
82
|
{index => expire_soon} if expire_soon.present?
|
79
83
|
end
|
@@ -98,6 +102,8 @@ module Katello
|
|
98
102
|
extended_support_end_date = RHEL_EOS_SCHEDULE[release]['extended_support']
|
99
103
|
|
100
104
|
case
|
105
|
+
when full_support_end_date.blank?
|
106
|
+
return FULL_SUPPORT
|
101
107
|
when Date.today <= full_support_end_date
|
102
108
|
return FULL_SUPPORT
|
103
109
|
when Date.today <= maintenance_support_end_date
|
@@ -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, Repository::FILE_TYPE],
|
27
27
|
}.freeze
|
28
28
|
|
29
29
|
MAX_EXPIRE_TIME = 7 * 24 * 60 * 60
|
@@ -39,7 +39,8 @@ module Katello
|
|
39
39
|
RHEL7 = 'rhel-7'.freeze
|
40
40
|
RHEL8 = 'rhel-8'.freeze
|
41
41
|
RHEL9 = 'rhel-9'.freeze
|
42
|
-
|
42
|
+
RHEL10 = 'rhel-10'.freeze
|
43
|
+
ALLOWED_OS_VERSIONS = [RHEL6, RHEL7, RHEL8, RHEL9, RHEL10].freeze
|
43
44
|
|
44
45
|
MIRRORING_POLICY_ADDITIVE = 'additive'.freeze
|
45
46
|
MIRRORING_POLICY_CONTENT = 'mirror_content_only'.freeze
|
@@ -218,12 +219,6 @@ module Katello
|
|
218
219
|
::Host.joins(:content_facet => :bound_repositories).where("#{Katello::Repository.table_name}.root_id" => self.select(:id))
|
219
220
|
end
|
220
221
|
|
221
|
-
def ensure_no_download_policy
|
222
|
-
if !yum? && download_policy.present?
|
223
|
-
errors.add(:download_policy, _("cannot be set for non-yum repositories."))
|
224
|
-
end
|
225
|
-
end
|
226
|
-
|
227
222
|
def ensure_no_checksum_on_demand
|
228
223
|
if checksum_type.present? && download_policy == DOWNLOAD_ON_DEMAND
|
229
224
|
errors.add(:checksum_type, _("Checksum type cannot be set for yum repositories with on demand download policy."))
|
@@ -343,6 +338,9 @@ module Katello
|
|
343
338
|
unless yum?
|
344
339
|
errors.add(:retain_package_versions_count, N_("is only allowed for Yum repositories."))
|
345
340
|
end
|
341
|
+
if yum? && self.mirroring_policy != MIRRORING_POLICY_ADDITIVE
|
342
|
+
errors.add(:retain_package_versions_count, N_("cannot be set for repositories without 'Additive' mirroring policy."))
|
343
|
+
end
|
346
344
|
if self.retain_package_versions_count.to_i < 0
|
347
345
|
errors.add(:retain_package_versions_count, N_("must not be a negative value."))
|
348
346
|
end
|