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
@@ -124,7 +124,7 @@ KT.content = (function () {
|
|
124
124
|
KT.content.select_repo();
|
125
125
|
},
|
126
126
|
select_none = function () {
|
127
|
-
$("#products_table").find("input[type=checkbox]").
|
127
|
+
$("#products_table").find("input[type=checkbox]").prop("checked", false);
|
128
128
|
KT.content.select_repo();
|
129
129
|
},
|
130
130
|
select_repo = function () {
|
@@ -185,7 +185,7 @@ KT.content = (function () {
|
|
185
185
|
expand_all = function () {
|
186
186
|
var sync_toggle = $("#sync_toggle");
|
187
187
|
if ($(sync_toggle).is(":checked")) {
|
188
|
-
$(sync_toggle).
|
188
|
+
$(sync_toggle).prop("checked", false);
|
189
189
|
KT.content.showAll();
|
190
190
|
}
|
191
191
|
$("#products_table")
|
@@ -387,6 +387,20 @@ $("#sync_product_form")
|
|
387
387
|
if ($("input[name='repoids[]']:checked").length === 0) {
|
388
388
|
return false;
|
389
389
|
}
|
390
|
+
})
|
391
|
+
.on("ajax:error", function (event, response) {
|
392
|
+
let errorMessage = localize("error");
|
393
|
+
if (response && response.responseJSON && response.responseJSON.error) {
|
394
|
+
errorMessage = response.responseJSON.error;
|
395
|
+
}
|
396
|
+
if (window.tfm && window.tfm.toastNotifications) {
|
397
|
+
window.tfm.toastNotifications.notify({
|
398
|
+
message: errorMessage,
|
399
|
+
type: "danger",
|
400
|
+
});
|
401
|
+
} else {
|
402
|
+
alert(errorMessage);
|
403
|
+
}
|
390
404
|
});
|
391
405
|
|
392
406
|
$("#sync_toggle").on("change", function () {
|
@@ -5,7 +5,7 @@ module Katello
|
|
5
5
|
before_action :confirm_settings
|
6
6
|
skip_before_action :authorize
|
7
7
|
before_action :optional_authorize, only: [:token, :catalog]
|
8
|
-
before_action :registry_authorize, except: [:token, :v1_search, :catalog]
|
8
|
+
before_action :registry_authorize, except: [:token, :v1_search, :catalog, :static_index]
|
9
9
|
before_action :authorize_repository_read, only: [:pull_manifest, :tags_list, :check_blob, :pull_blob]
|
10
10
|
before_action :container_push_prop_validation, only: [:start_upload_blob, :upload_blob, :finish_upload_blob, :push_manifest]
|
11
11
|
before_action :create_container_repo_if_needed, only: [:start_upload_blob, :upload_blob, :finish_upload_blob, :push_manifest]
|
@@ -481,14 +481,18 @@ module Katello
|
|
481
481
|
if !require_user_authorization?
|
482
482
|
personal_token = OpenStruct.new(token: 'unauthenticated', issued_at: Time.now, expires_at: 3.minutes.from_now)
|
483
483
|
else
|
484
|
-
|
485
|
-
|
486
|
-
personal_token
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
484
|
+
PersonalAccessToken.transaction do
|
485
|
+
personal_token = PersonalAccessToken.where(user_id: User.current.id, name: 'registry').first
|
486
|
+
if personal_token.nil?
|
487
|
+
personal_token = PersonalAccessToken.new(user: User.current, name: 'registry', expires_at: 6.minutes.from_now)
|
488
|
+
personal_token.generate_token
|
489
|
+
personal_token.save!
|
490
|
+
else
|
491
|
+
personal_token.expires_at = 6.minutes.from_now
|
492
|
+
personal_token.save!
|
493
|
+
end
|
494
|
+
rescue ActiveRecord::RecordInvalid
|
495
|
+
personal_token = PersonalAccessToken.where(user_id: User.current.id, name: 'registry').reload.first
|
492
496
|
end
|
493
497
|
end
|
494
498
|
|
@@ -806,5 +810,25 @@ module Katello
|
|
806
810
|
def item_not_found(item)
|
807
811
|
render_podman_error("NAME_UNKNOWN", _("%s was not found!") % item, :not_found)
|
808
812
|
end
|
813
|
+
|
814
|
+
def static_index
|
815
|
+
host_ip = request.remote_ip
|
816
|
+
host = ::Host.joins(:primary_interface).where("nics.ip = :host_ip OR nics.ip6 = :host_ip", host_ip: host_ip)&.first
|
817
|
+
flatpak_index = (redirect_client { Resources::Registry::Proxy.get(@_request.fullpath, headers) })
|
818
|
+
flatpak_index_json = JSON.parse(flatpak_index)
|
819
|
+
# Filter out repositories if it's a registered host
|
820
|
+
if host&.content_view_environments&.any?
|
821
|
+
# host.update(flatpak_index: flatpak_index) Will this help??
|
822
|
+
repos = host.content_view_environments.flat_map do |cve|
|
823
|
+
cve.content_view_version.repositories
|
824
|
+
end
|
825
|
+
available_container_repo_names = repos.map(&:container_repository_name)
|
826
|
+
flatpak_index_json['Results'] = flatpak_index_json['Results'].select do |result|
|
827
|
+
available_container_repo_names.include?(result['Name'])
|
828
|
+
end
|
829
|
+
end
|
830
|
+
# Otherwise just return unfiltered pulp flatpak index
|
831
|
+
render json: flatpak_index_json
|
832
|
+
end
|
809
833
|
end
|
810
834
|
end
|
@@ -447,7 +447,7 @@ module Katello
|
|
447
447
|
end
|
448
448
|
|
449
449
|
def rhsm_params
|
450
|
-
params.slice(:name, :type, :facts, :installedProducts, :autoheal, :releaseVer, :usage, :role, :
|
450
|
+
params.slice(:name, :type, :facts, :installedProducts, :autoheal, :releaseVer, :usage, :role, :serviceLevel, :uuid, :capabilities, :guestIds, :lastCheckin).to_h
|
451
451
|
end
|
452
452
|
|
453
453
|
def logger
|
@@ -13,7 +13,7 @@ module Katello
|
|
13
13
|
before_action :verify_simple_content_access_disabled, :only => [:add_subscriptions]
|
14
14
|
before_action :validate_release_version, :only => [:create, :update]
|
15
15
|
|
16
|
-
wrap_parameters :include => (ActivationKey.attribute_names + %w(host_collection_ids service_level auto_attach purpose_role purpose_usage
|
16
|
+
wrap_parameters :include => (ActivationKey.attribute_names + %w(host_collection_ids service_level auto_attach purpose_role purpose_usage content_view_environments))
|
17
17
|
|
18
18
|
def_param_group :activation_key do
|
19
19
|
param :organization_id, :number, :desc => N_("organization identifier"), :required => true
|
@@ -25,11 +25,10 @@ module Katello
|
|
25
25
|
param :auto_attach, :bool, :desc => N_("auto attach subscriptions upon registration"), deprecated: true
|
26
26
|
param :purpose_usage, String, :desc => N_("Sets the system purpose usage")
|
27
27
|
param :purpose_role, String, :desc => N_("Sets the system purpose usage")
|
28
|
-
param :purpose_addons, Array, :desc => N_("Sets the system add-ons")
|
29
28
|
|
30
29
|
param :environment, Hash, :desc => N_("Hash containing the Id of the single lifecycle environment to be associated with the activation key."), deprecated: true
|
31
|
-
param :content_view_id, Integer, :desc => N_("Id of the single content view to be associated with the activation key.")
|
32
|
-
param :environment_id, Integer, :desc => N_("Id of the single lifecycle environment to be associated with the activation key.")
|
30
|
+
param :content_view_id, Integer, :desc => N_("Id of the single content view to be associated with the activation key."), :allow_nil => true
|
31
|
+
param :environment_id, Integer, :desc => N_("Id of the single lifecycle environment to be associated with the activation key."), :allow_nil => true
|
33
32
|
param :content_view_environments, Array, :desc => N_("Comma-separated list of content view environment labels to be associated with the activation key,"\
|
34
33
|
" in the format of 'lifecycle_environment_label/content_view_label'."\
|
35
34
|
" Ignored if content_view_environment_ids is specified, or if content_view_id and lifecycle_environment_id are specified."\
|
@@ -314,7 +313,7 @@ module Katello
|
|
314
313
|
|
315
314
|
def find_content_view_environments
|
316
315
|
@content_view_environments = []
|
317
|
-
if params[:environment_id] || params[:environment]
|
316
|
+
if (params[:environment_id] || params[:environment]) || (params[:content_view_id] || params[:content_view])
|
318
317
|
find_cve_for_single
|
319
318
|
elsif params_likely_not_from_angularjs? && (params[:content_view_environments] || params[:content_view_environment_ids])
|
320
319
|
@content_view_environments = ::Katello::ContentViewEnvironment.fetch_content_view_environments(
|
@@ -385,7 +384,6 @@ module Katello
|
|
385
384
|
:unlimited_hosts,
|
386
385
|
:purpose_role,
|
387
386
|
:purpose_usage,
|
388
|
-
:purpose_addon_ids,
|
389
387
|
:content_overrides => [],
|
390
388
|
:host_collection_ids => [],
|
391
389
|
:content_view_environments => [],
|
@@ -396,9 +394,6 @@ module Katello
|
|
396
394
|
key_params = permitted_params.except(:environment_id, :content_view_id,
|
397
395
|
:content_view_environments, :content_view_environment_ids)
|
398
396
|
|
399
|
-
unless params[:purpose_addons].nil?
|
400
|
-
key_params[:purpose_addon_ids] = params[:purpose_addons].map { |addon| ::Katello::PurposeAddon.find_or_create_by(name: addon).id }
|
401
|
-
end
|
402
397
|
unlimited = params[:activation_key].try(:[], :unlimited_hosts)
|
403
398
|
max_hosts = params[:activation_key].try(:[], :max_hosts)
|
404
399
|
|
@@ -12,9 +12,10 @@ module Katello
|
|
12
12
|
param :repository_id, :number, :required => true, :desc => N_("repository id")
|
13
13
|
param :size, :number, :required => true, :desc => N_("Size of file to upload")
|
14
14
|
param :checksum, String, :required => false, :desc => N_("Checksum of file to upload")
|
15
|
-
param :content_type, RepositoryTypeManager.uploadable_content_types(false).map(&:label), :required => false, :desc => N_("content type ('deb', '
|
15
|
+
param :content_type, RepositoryTypeManager.uploadable_content_types(false).map(&:label), :required => false, :desc => N_("content type ('deb', 'file', 'ostree_ref', 'rpm', 'srpm')")
|
16
16
|
def create
|
17
17
|
fail Katello::Errors::InvalidRepositoryContent, _("Cannot upload Ansible collections.") if @repository.ansible_collection?
|
18
|
+
fail Katello::Errors::InvalidRepositoryContent, _("Cannot upload container content via Hammer/API. Use podman push instead.") if @repository.docker?
|
18
19
|
content_type = params[:content_type] || ::Katello::RepositoryTypeManager.find(@repository.content_type)&.default_managed_content_type&.label
|
19
20
|
RepositoryTypeManager.check_content_matches_repo_type!(@repository, content_type)
|
20
21
|
if ::Katello::RepositoryTypeManager.generic_content_type?(content_type)
|
@@ -40,6 +40,7 @@ module Katello
|
|
40
40
|
param :types, Array, :desc => N_("erratum: types (enhancement, bugfix, security)")
|
41
41
|
param :date_type, String, :desc => N_("erratum: search using the 'Issued On' or 'Updated On' column of the errata. Values are 'issued'/'updated'")
|
42
42
|
param :module_stream_ids, Array, :desc => N_("module stream ids")
|
43
|
+
param :allow_other_types, :bool, :desc => N_("erratum: allow types not matching a valid errata type")
|
43
44
|
def create
|
44
45
|
rule_clazz = ContentViewFilter.rule_class_for(@filter)
|
45
46
|
|
@@ -89,6 +90,7 @@ module Katello
|
|
89
90
|
param :start_date, String, :desc => N_("erratum: start date (YYYY-MM-DD)")
|
90
91
|
param :end_date, String, :desc => N_("erratum: end date (YYYY-MM-DD)")
|
91
92
|
param :types, Array, :desc => N_("erratum: types (enhancement, bugfix, security)")
|
93
|
+
param :allow_other_types, :bool, :desc => N_("erratum: allow types not matching a valid errata type")
|
92
94
|
def update
|
93
95
|
update_params = rule_params
|
94
96
|
update_params[:name] = update_params[:name].first if update_params[:name]
|
@@ -136,7 +138,7 @@ module Katello
|
|
136
138
|
|
137
139
|
@rule_params ||= params.fetch(:content_view_filter_rule, {}).
|
138
140
|
permit(:uuid, :version, :min_version, :max_version, :architecture,
|
139
|
-
:errata_id, :start_date, :end_date, :date_type,
|
141
|
+
:errata_id, :start_date, :end_date, :date_type, :allow_other_types,
|
140
142
|
:types => [], :module_stream_ids => [], :errata_ids => [], name: [])
|
141
143
|
end
|
142
144
|
|
@@ -288,7 +288,10 @@ module Katello
|
|
288
288
|
if (!@content_view || !@content_view.composite?)
|
289
289
|
attrs.push({:repository_ids => []}, :repository_ids)
|
290
290
|
end
|
291
|
-
params.require(:content_view).permit(*attrs).to_h
|
291
|
+
result = params.require(:content_view).permit(*attrs).to_h
|
292
|
+
# sanitize repository_ids to be a list of integers
|
293
|
+
result[:repository_ids] = result[:repository_ids].compact.map(&:to_i) if result[:repository_ids].present?
|
294
|
+
result
|
292
295
|
end
|
293
296
|
|
294
297
|
def find_environment
|
@@ -84,6 +84,10 @@ module Katello
|
|
84
84
|
ID of an environment that is prior to the new environment in the chain. It has to be
|
85
85
|
either the ID of Library or the ID of an environment at the end of a chain.
|
86
86
|
DESC
|
87
|
+
param :path_id, Integer, :desc => <<-DESC
|
88
|
+
If you are adding an environment to an existing path after Library, pass the ID of the environment that is the current successor of Library in the path.
|
89
|
+
It has to be the id of the old environment following library in this path.
|
90
|
+
DESC
|
87
91
|
def create
|
88
92
|
create_params = environment_params
|
89
93
|
create_params[:label] = labelize_params(create_params)
|
@@ -59,9 +59,20 @@ module Katello
|
|
59
59
|
fail HttpErrors::UnprocessableEntity, msg
|
60
60
|
end
|
61
61
|
|
62
|
+
custom_index_relation_handle_type_and_time(collection)
|
63
|
+
end
|
64
|
+
|
65
|
+
def custom_index_relation_handle_type_and_time(collection)
|
62
66
|
collection = collection.where("#{date_type} >= ?", params[:start_date]) if params[:start_date]
|
63
67
|
collection = collection.where("#{date_type} <= ?", params[:end_date]) if params[:end_date]
|
64
|
-
|
68
|
+
if params[:types]
|
69
|
+
include_other = params[:types]&.include?('other')
|
70
|
+
params[:types]&.delete('other')
|
71
|
+
collection = collection.of_type(
|
72
|
+
params[:types],
|
73
|
+
include_other
|
74
|
+
)
|
75
|
+
end
|
65
76
|
collection
|
66
77
|
end
|
67
78
|
|
@@ -0,0 +1,81 @@
|
|
1
|
+
module Katello
|
2
|
+
class Api::V2::FlatpakRemoteRepositoriesController < Katello::Api::V2::ApiController
|
3
|
+
include Katello::Concerns::FilteredAutoCompleteSearch
|
4
|
+
|
5
|
+
before_action :find_remote_repository, :except => [:index, :auto_complete_search]
|
6
|
+
before_action :find_optional_organization, :only => [:index, :auto_complete_search]
|
7
|
+
before_action :find_product, :only => [:mirror]
|
8
|
+
|
9
|
+
resource_description do
|
10
|
+
name 'Flatpak Remote Repositories'
|
11
|
+
end
|
12
|
+
|
13
|
+
def_param_group :flatpak_remote_repositories do
|
14
|
+
param :name, String, :desc => N_("Name of the flatpak remote repository")
|
15
|
+
param :label, String, :desc => N_("Label of the flatpak remote")
|
16
|
+
end
|
17
|
+
|
18
|
+
api :GET, "/organizations/:organization_id/flatpak_remote_repositories", N_("List flatpak remote repositories")
|
19
|
+
api :GET, "/flatpak_remotes/:flatpak_remote_id/flatpak_remote_repositories", N_("List flatpak remote's repositories")
|
20
|
+
param :organization_id, :number, :desc => N_("organization identifier")
|
21
|
+
param :flatpak_remote_id, :number, :desc => N_("ID of flatpak remote to show repositories of"), :required => true
|
22
|
+
param_group :flatpak_remote_repositories
|
23
|
+
param_group :search, Api::V2::ApiController
|
24
|
+
add_scoped_search_description_for(FlatpakRemoteRepository)
|
25
|
+
def index
|
26
|
+
respond(:collection => scoped_search(index_relation, :name, :asc))
|
27
|
+
end
|
28
|
+
|
29
|
+
def index_relation
|
30
|
+
query = FlatpakRemoteRepository.readable
|
31
|
+
query = index_remote_relation(query)
|
32
|
+
query = query.where(name: params[:name]) if params[:name]
|
33
|
+
query = query.where(label: params[:label]) if params[:label]
|
34
|
+
query
|
35
|
+
end
|
36
|
+
|
37
|
+
def index_remote_relation(query)
|
38
|
+
query = query.joins(:flatpak_remote).where("#{FlatpakRemote.table_name}.organization_id" => @organization) if @organization
|
39
|
+
if params[:flatpak_remote_id]
|
40
|
+
query.where(flatpak_remote_id: params[:flatpak_remote_id])
|
41
|
+
else
|
42
|
+
query
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
api :GET, "/flatpak_remote_repositories/:id", N_("Show a flatpak remote repository")
|
47
|
+
param :id, :number, :desc => N_("Flatpak remote repository numeric identifier"), :required => true
|
48
|
+
param :manifests, :boolean, :desc => N_("Include manifests"), :required => false
|
49
|
+
def show
|
50
|
+
respond :resource => @flatpak_remote_repository
|
51
|
+
end
|
52
|
+
|
53
|
+
api :POST, "/flatpak_remote_repositories/:id/mirror", N_("Mirror a flatpak remote repository")
|
54
|
+
param :id, :number, :desc => N_("Flatpak remote repository numeric identifier"), :required => true
|
55
|
+
param :product_id, :number, :desc => N_("Product ID to mirror the remote repository to"), :required => true
|
56
|
+
def mirror
|
57
|
+
task = async_task(::Actions::Katello::Flatpak::MirrorRemoteRepository, @flatpak_remote_repository, @product)
|
58
|
+
respond_for_async :resource => task
|
59
|
+
end
|
60
|
+
|
61
|
+
def default_sort
|
62
|
+
%w(name asc)
|
63
|
+
end
|
64
|
+
|
65
|
+
def flatpak_remote_repository_params
|
66
|
+
params.require(:flatpak_remote_repository).permit(:name, :label, :flatpak_remote_id)
|
67
|
+
end
|
68
|
+
|
69
|
+
def find_remote_repository
|
70
|
+
@flatpak_remote_repository = FlatpakRemoteRepository.find(params[:id])
|
71
|
+
throw_resource_not_found(name: 'flatpak_remote_repository', id: params[:id]) unless @flatpak_remote_repository
|
72
|
+
@flatpak_remote_repository
|
73
|
+
end
|
74
|
+
|
75
|
+
def find_product
|
76
|
+
@product = Product.editable.find(params[:product_id])
|
77
|
+
throw_resource_not_found(name: 'product', id: params[:product_id]) unless @product
|
78
|
+
@product
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
module Katello
|
2
|
+
class Api::V2::FlatpakRemotesController < Katello::Api::V2::ApiController
|
3
|
+
include Katello::Concerns::FilteredAutoCompleteSearch
|
4
|
+
|
5
|
+
before_action :find_authorized_katello_resource, :except => [:index, :create, :auto_complete_search]
|
6
|
+
before_action :find_optional_organization, :only => [:index, :auto_complete_search]
|
7
|
+
|
8
|
+
resource_description do
|
9
|
+
name 'Flatpak Remotes'
|
10
|
+
end
|
11
|
+
|
12
|
+
def_param_group :flatpak_remote do
|
13
|
+
param :description, String, :desc => N_("Description of the flatpak remote"), :required => false
|
14
|
+
param :username, String, :desc => N_("Username for the flatpak remote"), :required => false
|
15
|
+
param :token, String, :desc => N_("Token/password for the flatpak remote"), :required => false
|
16
|
+
end
|
17
|
+
|
18
|
+
api :GET, "/organizations/:organization_id/flatpak_remotes", N_("List flatpak remotes")
|
19
|
+
api :GET, "/flatpak_remotes", N_("List flatpak remotes")
|
20
|
+
param :organization_id, :number, :desc => N_("organization identifier"), :required => false
|
21
|
+
param :name, String, :desc => N_("Name of the flatpak remote"), :required => false
|
22
|
+
param_group :search, Api::V2::ApiController
|
23
|
+
add_scoped_search_description_for(FlatpakRemote)
|
24
|
+
def index
|
25
|
+
respond(:collection => scoped_search(index_relation, :name, :asc))
|
26
|
+
end
|
27
|
+
|
28
|
+
def index_relation
|
29
|
+
remotes = FlatpakRemote.readable
|
30
|
+
remotes = remotes.where(organization_id: @organization.id) if @organization
|
31
|
+
remotes = remotes.where(name: params[:name]) if params[:name]
|
32
|
+
remotes = remotes.where(label: params[:label]) if params[:label]
|
33
|
+
remotes
|
34
|
+
end
|
35
|
+
|
36
|
+
api :GET, "/flatpak_remotes/:id", N_("Show a flatpak remote")
|
37
|
+
api :GET, "/organizations/:organization_id/flatpak_remotes/:id", N_("Show a flatpak remote")
|
38
|
+
param :id, :number, :desc => N_("Flatpak remote numeric identifier"), :required => true
|
39
|
+
param :organization_id, :number, :desc => N_("organization identifier")
|
40
|
+
def show
|
41
|
+
respond :resource => @flatpak_remote
|
42
|
+
end
|
43
|
+
|
44
|
+
api :POST, "/flatpak_remotes", N_("Create a flatpak remote")
|
45
|
+
param :name, String, :desc => N_("name"), :required => true
|
46
|
+
param :url, String, :desc => N_("Base URL of the flatpak registry index, ex: https://flatpaks.redhat.io/rhel/ , https://registry.fedoraproject.org/."), :required => true
|
47
|
+
param :organization_id, :number, :desc => N_("organization identifier"), :required => true
|
48
|
+
param_group :flatpak_remote
|
49
|
+
def create
|
50
|
+
flatpak_remote = FlatpakRemote.new(flatpak_remote_params)
|
51
|
+
flatpak_remote.save!
|
52
|
+
respond_for_create(resource: flatpak_remote)
|
53
|
+
end
|
54
|
+
|
55
|
+
api :PUT, "/flatpak_remotes/:id", N_("Update a flatpak remote")
|
56
|
+
param_group :flatpak_remote
|
57
|
+
param :id, :number, :desc => N_("Flatpak remote numeric identifier"), :required => true
|
58
|
+
param :name, String, :desc => N_("name")
|
59
|
+
param :url, String, :desc => N_("Base URL of the flatpak registry index, ex: https://flatpaks.redhat.io/rhel/ , https://registry.fedoraproject.org/.")
|
60
|
+
def update
|
61
|
+
@flatpak_remote.update!(flatpak_remote_params)
|
62
|
+
respond_for_show(:resource => @flatpak_remote)
|
63
|
+
end
|
64
|
+
|
65
|
+
api :DELETE, "/flatpak_remotes/:id", N_("Delete a flatpak remote")
|
66
|
+
param :id, :number, :desc => N_("Flatpak remote numeric identifier"), :required => true
|
67
|
+
def destroy
|
68
|
+
@flatpak_remote.destroy
|
69
|
+
end
|
70
|
+
|
71
|
+
api :POST, "/flatpak_remotes/:id/scan", N_("Scan a flatpak remote")
|
72
|
+
param :id, :number, :desc => N_("Flatpak remote numeric identifier"), :required => true
|
73
|
+
def scan
|
74
|
+
task = async_task(::Actions::Katello::Flatpak::ScanRemote, @flatpak_remote)
|
75
|
+
respond_for_async :resource => task
|
76
|
+
end
|
77
|
+
|
78
|
+
def default_sort
|
79
|
+
%w(name asc)
|
80
|
+
end
|
81
|
+
|
82
|
+
def flatpak_remote_params
|
83
|
+
params.require(:flatpak_remote).permit(:name, :url, :description, :organization_id, :username, :token)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
module Katello
|
2
|
+
class Api::V2::HostBootcImagesController < Api::V2::ApiController
|
3
|
+
include Katello::Concerns::FilteredAutoCompleteSearch
|
4
|
+
|
5
|
+
resource_description do
|
6
|
+
api_version 'v2'
|
7
|
+
api_base_url "/api"
|
8
|
+
end
|
9
|
+
|
10
|
+
api :GET, "/hosts/bootc_images", N_("List booted bootc container images for hosts")
|
11
|
+
param_group :search, Api::V2::ApiController
|
12
|
+
def bootc_images
|
13
|
+
params[:sort_by] ||= 'bootc_booted_image'
|
14
|
+
params[:sort_order] ||= 'asc'
|
15
|
+
if params[:order]
|
16
|
+
params[:order] = "#{params[:order].split(' ')[0]} #{sanitize_sort_order(params[:order].split(' ')[1])}"
|
17
|
+
else
|
18
|
+
params[:order] = "#{params[:sort_by]} #{sanitize_sort_order(params[:sort_order])}"
|
19
|
+
end
|
20
|
+
per_page = params[:per_page].present? ? params[:per_page].to_i : Setting[:entries_per_page]
|
21
|
+
page = params[:page].present? ? params[:page].to_i : 1
|
22
|
+
|
23
|
+
bootc_image_map = bootc_host_image_map
|
24
|
+
paged_images = bootc_image_map.to_a.paginate(page: page, per_page: per_page)
|
25
|
+
results = paged_images.collect { |image| { bootc_booted_image: image[0], digests: image[1] } }
|
26
|
+
render json: {
|
27
|
+
total: bootc_image_map.size,
|
28
|
+
page: page,
|
29
|
+
per_page: per_page,
|
30
|
+
subtotal: bootc_image_map.size,
|
31
|
+
sort: {
|
32
|
+
by: params[:sort_by],
|
33
|
+
order: params[:sort_order],
|
34
|
+
},
|
35
|
+
results: results,
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
def sanitize_sort_order(sort_order)
|
42
|
+
if sort_order.present? && ['asc', 'desc'].include?(sort_order.downcase)
|
43
|
+
sort_order.downcase
|
44
|
+
else
|
45
|
+
'asc'
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def index_relation
|
50
|
+
query = resource_class.authorized(:view_hosts).distinct
|
51
|
+
query.joins(:content_facet).where.not(bootc_booted_image: nil, bootc_booted_digest: nil)
|
52
|
+
query
|
53
|
+
end
|
54
|
+
|
55
|
+
def resource_class
|
56
|
+
::Host::Managed
|
57
|
+
end
|
58
|
+
|
59
|
+
def bootc_host_image_map
|
60
|
+
content_facets = ::Katello::Host::ContentFacet.where(host_id: ::Host::Managed.joins(:content_facet).search_for(params[:search]).pluck(:id))
|
61
|
+
aggregate_bootc_data = content_facets.where.not(bootc_booted_image: nil, bootc_booted_digest: nil).
|
62
|
+
select(:bootc_booted_image, :bootc_booted_digest, 'COUNT(hosts.id) as host_count').
|
63
|
+
joins(:host).group(:bootc_booted_image, :bootc_booted_digest).order(params[:order])
|
64
|
+
bootc_image_map = Hash.new { |h, k| h[k] = [] }
|
65
|
+
aggregate_bootc_data.each do |host_image|
|
66
|
+
bootc_image_map[host_image.bootc_booted_image] << { bootc_booted_digest: host_image.bootc_booted_digest, host_count: host_image.host_count.to_i }
|
67
|
+
end
|
68
|
+
bootc_image_map
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -20,7 +20,6 @@ module Katello
|
|
20
20
|
param :autoheal, :bool, :desc => N_("Sets whether the Host will autoheal subscriptions upon checkin")
|
21
21
|
param :purpose_usage, String, :desc => N_("Sets the system purpose usage")
|
22
22
|
param :purpose_role, String, :desc => N_("Sets the system purpose usage")
|
23
|
-
param :purpose_addons, Array, :desc => N_("Sets the system add-ons")
|
24
23
|
param :service_level, String, :desc => N_("Service level to be used for autoheal")
|
25
24
|
param :hypervisor_guest_uuids, Array, :desc => N_("List of hypervisor guest uuids")
|
26
25
|
param :installed_products_attributes, Array, :desc => N_("List of products installed on the host") do
|
@@ -91,7 +90,7 @@ module Katello
|
|
91
90
|
host.reload
|
92
91
|
::Katello::Host::SubscriptionFacet.update_facts(host, rhsm_params[:facts]) unless rhsm_params[:facts].blank?
|
93
92
|
|
94
|
-
respond_for_show(:resource => host, :
|
93
|
+
respond_for_show(:resource => host, :full_template => 'katello/api/v2/hosts/show')
|
95
94
|
end
|
96
95
|
|
97
96
|
def params_to_rhsm_params
|
@@ -99,7 +98,6 @@ module Katello
|
|
99
98
|
rhsm_params[:releaseVer] = params['release_version'] if params['release_version']
|
100
99
|
rhsm_params[:usage] = params['purpose_usage'] if params['purpose_usage']
|
101
100
|
rhsm_params[:role] = params['purpose_role'] if params['purpose_role']
|
102
|
-
rhsm_params[:addOns] = params['purpose_addons'] if params['purpose_addons']
|
103
101
|
rhsm_params[:serviceLevel] = params['service_level'] if params['service_level']
|
104
102
|
rhsm_params[:guestIds] = params['hypervisor_guest_uuids'] if params[:hypervisor_guest_uuids]
|
105
103
|
rhsm_params[:type] = Katello::Candlepin::Consumer::SYSTEM
|
@@ -186,7 +184,7 @@ module Katello
|
|
186
184
|
validate_content_overrides_enabled(override_params)
|
187
185
|
end
|
188
186
|
sync_task(::Actions::Katello::Host::UpdateContentOverrides, @host, content_override_values, false)
|
189
|
-
fetch_product_content
|
187
|
+
fetch_product_content(!params.dig(:content_overrides_search, :search).nil? && Foreman::Cast.to_bool(params.dig(:content_overrides_search, :limit_to_env)))
|
190
188
|
end
|
191
189
|
|
192
190
|
api :GET, "/hosts/:host_id/subscriptions/available_release_versions", N_("Show releases available for the content host")
|
@@ -205,8 +203,8 @@ module Katello
|
|
205
203
|
|
206
204
|
private
|
207
205
|
|
208
|
-
def fetch_product_content
|
209
|
-
content_finder = ProductContentFinder.new(:consumable => @host.subscription_facet)
|
206
|
+
def fetch_product_content(limit_to_env = false)
|
207
|
+
content_finder = ProductContentFinder.new(:match_environment => limit_to_env, :consumable => @host.subscription_facet)
|
210
208
|
content = content_finder.presenter_with_overrides(@host.subscription_facet.candlepin_consumer.content_overrides)
|
211
209
|
respond_with_template_collection("index", 'repository_sets', :collection => full_result_response(content))
|
212
210
|
end
|
@@ -188,7 +188,7 @@ module Katello
|
|
188
188
|
param_group :bulk_params
|
189
189
|
def traces
|
190
190
|
collection = scoped_search(Katello::HostTracer.where(host_id: @hosts.pluck(:id)), 'application', 'desc', resource_class: Katello::HostTracer)
|
191
|
-
respond_for_index(:collection => collection, :
|
191
|
+
respond_for_index(:collection => collection, :full_template => 'katello/api/v2/host_tracer/index')
|
192
192
|
end
|
193
193
|
|
194
194
|
api :PUT, "/hosts/bulk/resolve_traces", N_("Resolve traces for one or more hosts")
|
@@ -205,14 +205,12 @@ module Katello
|
|
205
205
|
param :service_level, String, :desc => N_("Service level of host")
|
206
206
|
param :purpose_role, String, :desc => N_("Role of host")
|
207
207
|
param :purpose_usage, String, :desc => N_("Usage of host")
|
208
|
-
param :purpose_addons, Array, :desc => N_("Sets the system add-ons")
|
209
208
|
def system_purpose
|
210
209
|
task = async_task(::Actions::BulkAction, ::Actions::Katello::Host::UpdateSystemPurpose,
|
211
210
|
@hosts,
|
212
211
|
params[:service_level],
|
213
212
|
params[:purpose_role],
|
214
|
-
params[:purpose_usage]
|
215
|
-
params[:purpose_addons])
|
213
|
+
params[:purpose_usage])
|
216
214
|
|
217
215
|
respond_for_async :resource => task
|
218
216
|
end
|
@@ -255,7 +253,7 @@ module Katello
|
|
255
253
|
options[:resource_class] = Katello::ModuleStream
|
256
254
|
host_module_streams = Katello::ModuleStream.available_for_hosts(@hosts)
|
257
255
|
respond_for_index(collection: scoped_search(host_module_streams, :name, :asc, options),
|
258
|
-
|
256
|
+
full_template: 'katello/api/v2/module_streams/name_streams')
|
259
257
|
end
|
260
258
|
|
261
259
|
api :PUT, "/hosts/bulk/change_content_source", N_("Update the content source for specified hosts and generate the reconfiguration script")
|
@@ -52,7 +52,7 @@ Pass [] to make repo available for clients regardless of OS version. Maximum len
|
|
52
52
|
param :docker_upstream_name, String, :desc => N_("Name of the upstream docker repository")
|
53
53
|
param :include_tags, Array, :desc => N_("Comma-separated list of tags to sync for a container image repository")
|
54
54
|
param :exclude_tags, Array, :desc => N_("Comma-separated list of tags to exclude when syncing a container image repository. Default: any tag ending in \"-source\"")
|
55
|
-
param :download_policy, ["immediate", "on_demand"], :desc => N_("download policy for
|
55
|
+
param :download_policy, ["immediate", "on_demand"], :desc => N_("download policy for deb, docker, file and yum repos (either 'immediate' or 'on_demand')")
|
56
56
|
param :download_concurrency, :number, :desc => N_("Used to determine download concurrency of the repository in pulp3. Use value less than 20. Defaults to 10")
|
57
57
|
param :mirroring_policy, Katello::RootRepository::MIRRORING_POLICIES, :desc => N_("Policy to set for mirroring content. Must be one of %s.") % RootRepository::MIRRORING_POLICIES
|
58
58
|
param :verify_ssl_on_sync, :bool, :desc => N_("if true, Katello will verify the upstream url's SSL certifcates are signed by a trusted CA")
|
@@ -307,6 +307,10 @@ Pass [] to make repo available for clients regardless of OS version. Maximum len
|
|
307
307
|
repo_params[:ssl_client_cert] = ssl_client_cert
|
308
308
|
repo_params[:ssl_client_key] = ssl_client_key
|
309
309
|
|
310
|
+
if repo_params[:package_types]
|
311
|
+
repo_params[:package_types] = repo_params[:package_types].map(& :strip)
|
312
|
+
end
|
313
|
+
|
310
314
|
root = construct_repo_from_params(repo_params)
|
311
315
|
sync_task(::Actions::Katello::Repository::CreateRoot, root)
|
312
316
|
@repository = root.reload.library_instance
|
@@ -395,6 +399,10 @@ Alternatively, use the 'force' parameter to regenerate metadata locally. On the
|
|
395
399
|
fail "Do not include the username/password in the URL. Use the username/password settings instead."
|
396
400
|
end
|
397
401
|
|
402
|
+
if repo_params[:package_types]
|
403
|
+
repo_params[:package_types] = repo_params[:package_types].map(& :strip)
|
404
|
+
end
|
405
|
+
|
398
406
|
if @repository.generic?
|
399
407
|
generic_remote_options = generic_remote_options_hash(repo_params)
|
400
408
|
repo_params[:generic_remote_options] = generic_remote_options.to_json
|
@@ -403,6 +411,13 @@ Alternatively, use the 'force' parameter to regenerate metadata locally. On the
|
|
403
411
|
end
|
404
412
|
end
|
405
413
|
|
414
|
+
additive_policy = ::Katello::RootRepository::MIRRORING_POLICY_ADDITIVE
|
415
|
+
is_repo_param_additive = repo_params[:mirroring_policy] == additive_policy
|
416
|
+
is_root_additive = @repository.root.mirroring_policy == additive_policy
|
417
|
+
|
418
|
+
if @repository.yum? && !(is_repo_param_additive || is_root_additive)
|
419
|
+
repo_params[:retain_package_versions_count] = nil
|
420
|
+
end
|
406
421
|
sync_task(::Actions::Katello::Repository::Update, @repository.root, repo_params)
|
407
422
|
respond_for_show(:resource => @repository)
|
408
423
|
end
|
@@ -580,7 +595,7 @@ Alternatively, use the 'force' parameter to regenerate metadata locally. On the
|
|
580
595
|
keys = [:download_policy, :mirroring_policy, :sync_policy, :arch, :verify_ssl_on_sync, :upstream_password,
|
581
596
|
:upstream_username, :download_concurrency, :metadata_expire,
|
582
597
|
{:os_versions => []}, :deb_releases, :deb_components, :deb_architectures, :description,
|
583
|
-
:http_proxy_policy, :http_proxy_id, :retain_package_versions_count, {:ignorable_content => []}
|
598
|
+
:http_proxy_policy, :http_proxy_id, :retain_package_versions_count, {:ignorable_content => []}, :sync_dependencies
|
584
599
|
]
|
585
600
|
keys += [{:include_tags => []}, {:exclude_tags => []}, :docker_upstream_name] if params[:action] == 'create' || @repository&.docker?
|
586
601
|
keys += [:upstream_authentication_token] if params[:action] == 'create' || @repository&.yum?
|
@@ -620,7 +635,7 @@ Alternatively, use the 'force' parameter to regenerate metadata locally. On the
|
|
620
635
|
root = @product.add_repo(repo_params.slice(:label, :name, :description, :url, :content_type, :arch, :unprotected,
|
621
636
|
:gpg_key, :ssl_ca_cert, :ssl_client_cert, :ssl_client_key,
|
622
637
|
:checksum_type, :download_policy, :http_proxy_policy,
|
623
|
-
:metadata_expire).to_h.with_indifferent_access)
|
638
|
+
:metadata_expire, :sync_dependencies).to_h.with_indifferent_access)
|
624
639
|
root.verify_ssl_on_sync = ::Foreman::Cast.to_bool(repo_params[:verify_ssl_on_sync]) if repo_params.key?(:verify_ssl_on_sync)
|
625
640
|
root.mirroring_policy = repo_params[:mirroring_policy] || Katello::RootRepository::MIRRORING_POLICY_CONTENT
|
626
641
|
root.upstream_username = repo_params[:upstream_username] if repo_params.key?(:upstream_username)
|
@@ -18,7 +18,6 @@ module Katello
|
|
18
18
|
|
19
19
|
included do
|
20
20
|
prepend Overrides
|
21
|
-
before_action :purpose_addon_params, only: [:create, :update]
|
22
21
|
before_action :set_content_view_environments, only: [:create, :update]
|
23
22
|
|
24
23
|
def destroy
|
@@ -35,13 +34,6 @@ module Katello
|
|
35
34
|
render(:locals => { :resource => @host }, :template => 'katello/api/v2/hosts/show', :status => :ok)
|
36
35
|
end
|
37
36
|
|
38
|
-
def purpose_addon_params
|
39
|
-
addons = params.dig(:host, :subscription_facet_attributes, :purpose_addons)
|
40
|
-
return if addons.nil?
|
41
|
-
params[:host][:subscription_facet_attributes][:purpose_addon_ids] = addons.map { |addon_name| ::Katello::PurposeAddon.find_or_create_by(name: addon_name).id }
|
42
|
-
params[:host][:subscription_facet_attributes].delete(:purpose_addons)
|
43
|
-
end
|
44
|
-
|
45
37
|
def set_content_view_environments
|
46
38
|
content_facet_attributes = params.dig(:host, :content_facet_attributes)
|
47
39
|
return if content_facet_attributes.blank? || @host&.content_facet.blank? ||
|