katello 4.14.0 → 4.15.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/common/chosen.jquery.js +3 -3
- data/app/assets/javascripts/katello/common/env_select_scroll.js +3 -3
- data/app/assets/javascripts/katello/common/katello.js +8 -7
- data/app/assets/javascripts/katello/common/katello_object.js +3 -3
- data/app/assets/javascripts/katello/common/menu.js +7 -7
- data/app/assets/javascripts/katello/hosts/host_and_hostgroup_edit.js +6 -6
- data/app/assets/javascripts/katello/locale/bn/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/ca/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/cs/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/de/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/el/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/en/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/en_US/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/es/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/fr/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/gl/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/gu/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/hi/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/id/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/it/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/ja/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/ka/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/kn/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/ko/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/mr/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/or/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/pa/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/pl/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/pt/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/ro/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/ru/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/sl/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/ta/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/te/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/tr/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/vi/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/zh/katello.js +258 -27
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +259 -28
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +259 -28
- data/app/assets/javascripts/katello/organizations/download_certificate.js +1 -1
- data/app/assets/javascripts/katello/sync_management/sync_management.js +22 -18
- data/app/assets/javascripts/katello/widgets/env_content_view_selector.js +5 -5
- data/app/assets/javascripts/katello/widgets/path_selector.js +6 -6
- data/app/assets/javascripts/katello/widgets/subpanel_new.js +1 -1
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +7 -7
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +6 -1
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +131 -59
- data/app/controllers/katello/api/v2/api_controller.rb +1 -1
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +21 -10
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_environments_controller.rb +54 -0
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +3 -3
- data/app/controllers/katello/api/v2/content_views_controller.rb +1 -1
- data/app/controllers/katello/api/v2/environments_controller.rb +1 -1
- data/app/controllers/katello/api/v2/exports_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_collections_controller.rb +2 -2
- data/app/controllers/katello/api/v2/host_contents_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_errata_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -4
- data/app/controllers/katello/api/v2/organizations_controller.rb +2 -1
- data/app/controllers/katello/api/v2/repositories_controller.rb +3 -2
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +10 -16
- data/app/controllers/katello/concerns/api/v2/multi_cv_params_handling.rb +24 -0
- data/app/controllers/katello/concerns/authorization/api/v2/content_views_controller.rb +2 -5
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +1 -1
- data/app/controllers/katello/concerns/registration_commands_controller_extensions.rb +1 -1
- data/app/helpers/katello/concerns/smart_proxy_helper_extensions.rb +5 -5
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +2 -2
- data/app/helpers/katello/katello_url_helper.rb +1 -1
- data/app/lib/actions/candlepin/product/content_create.rb +12 -1
- data/app/lib/actions/candlepin/product/content_update.rb +21 -4
- data/app/lib/actions/katello/activation_key/reassign.rb +4 -3
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +8 -3
- data/app/lib/actions/katello/capsule_content/update_content_counts.rb +21 -3
- data/app/lib/actions/katello/cdn_configuration/update.rb +1 -1
- data/app/lib/actions/katello/content_view/capsule_sync.rb +17 -1
- data/app/lib/actions/katello/content_view/incremental_updates.rb +1 -1
- data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +1 -1
- data/app/lib/actions/katello/content_view/remove.rb +8 -12
- data/app/lib/actions/katello/content_view_version/import.rb +1 -1
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +2 -2
- data/app/lib/actions/katello/flatpak/scan_remote.rb +62 -0
- data/app/lib/actions/katello/host/hypervisors.rb +1 -1
- data/app/lib/actions/katello/product/content_create.rb +28 -19
- data/app/lib/actions/katello/product/content_destroy.rb +6 -5
- data/app/lib/actions/katello/product/destroy.rb +1 -1
- data/app/lib/actions/katello/repository/clone_contents.rb +14 -0
- data/app/lib/actions/katello/repository/create.rb +24 -17
- data/app/lib/actions/katello/repository/create_container_push_root.rb +44 -0
- data/app/lib/actions/katello/repository/create_root.rb +5 -14
- data/app/lib/actions/katello/repository/destroy.rb +3 -3
- data/app/lib/actions/katello/repository/discover.rb +1 -1
- data/app/lib/actions/katello/repository/finish_upload.rb +13 -0
- data/app/lib/actions/katello/repository/import_upload.rb +1 -1
- data/app/lib/actions/katello/repository/sync.rb +16 -0
- data/app/lib/actions/katello/repository/update.rb +11 -20
- data/app/lib/actions/katello/repository/upload_files.rb +1 -1
- data/app/lib/actions/katello/repository_set/enable_repository.rb +1 -1
- data/app/lib/actions/katello/repository_set/scan_cdn.rb +1 -1
- data/app/lib/actions/katello/upstream_subscriptions/bind_entitlement.rb +1 -1
- data/app/lib/actions/pulp3/capsule_content/sync.rb +1 -1
- data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +6 -2
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/repository/create.rb +6 -1
- data/app/lib/actions/pulp3/orchestration/repository/trigger_update_repo_cert_guard.rb +1 -1
- data/app/lib/actions/pulp3/repository/initialize.rb +17 -0
- data/app/lib/actions/pulp3/repository/refresh_distribution.rb +1 -1
- data/app/lib/katello/api/constraints/register_with_activation_key_constraint.rb +11 -0
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +1 -1
- data/app/lib/katello/http_resource.rb +6 -6
- data/app/lib/katello/messaging/stomp_connection.rb +4 -4
- data/app/lib/katello/resources/candlepin/activation_key.rb +1 -1
- data/app/lib/katello/resources/candlepin/owner.rb +1 -1
- data/app/lib/katello/resources/candlepin/product.rb +1 -1
- data/app/lib/katello/resources/candlepin.rb +1 -1
- data/app/lib/katello/resources/cdn/katello_cdn.rb +3 -3
- data/app/lib/katello/resources/cdn.rb +1 -1
- data/app/lib/katello/resources/discovery/container.rb +5 -3
- data/app/lib/katello/resources/discovery/yum.rb +3 -1
- data/app/lib/katello/resources/registry.rb +0 -3
- data/app/lib/katello/util/candlepin_repository_checker.rb +2 -2
- data/app/lib/katello/util/cveak_migrator.rb +38 -0
- data/app/lib/katello/util/deb.rb +9 -0
- data/app/lib/katello/util/deduplication_migrator.rb +8 -8
- data/app/lib/katello/util/model.rb +2 -2
- data/app/lib/katello/util/search.rb +5 -5
- data/app/lib/katello/util/task_status.rb +19 -19
- data/app/lib/katello/util/url_matcher.rb +3 -3
- data/app/lib/katello/validators/content_view_environment_org_validator.rb +2 -1
- data/app/lib/katello/validators/katello_url_format_validator.rb +2 -2
- data/app/mailers/katello/errata_mailer.rb +1 -4
- data/app/models/katello/activation_key.rb +123 -27
- data/app/models/katello/alternate_content_source.rb +5 -5
- data/app/models/katello/authorization/activation_key.rb +1 -1
- data/app/models/katello/authorization/content_view_environment.rb +7 -0
- data/app/models/katello/cdn_configuration.rb +1 -1
- data/app/models/katello/concerns/content_facet_host_extensions.rb +24 -2
- data/app/models/katello/concerns/host_managed_extensions.rb +29 -22
- data/app/models/katello/concerns/organization_extensions.rb +4 -4
- data/app/models/katello/concerns/redhat_extensions.rb +1 -1
- data/app/models/katello/concerns/smart_proxy_extensions.rb +84 -39
- data/app/models/katello/content.rb +3 -3
- data/app/models/katello/content_view.rb +15 -18
- data/app/models/katello/content_view_environment.rb +56 -15
- data/app/models/katello/content_view_environment_activation_key.rb +20 -0
- data/app/models/katello/content_view_erratum_filter_rule.rb +1 -1
- data/app/models/katello/content_view_filter.rb +2 -2
- data/app/models/katello/content_view_history.rb +1 -1
- data/app/models/katello/content_view_repository.rb +1 -1
- data/app/models/katello/content_view_version.rb +3 -3
- data/app/models/katello/content_view_version_export_history.rb +2 -2
- data/app/models/katello/content_view_version_import_history.rb +1 -1
- data/app/models/katello/events/delete_latest_content_view_version.rb +1 -1
- data/app/models/katello/flatpak_remote.rb +11 -0
- data/app/models/katello/flatpak_remote_repository.rb +12 -0
- data/app/models/katello/flatpak_remote_repository_manifest.rb +10 -0
- data/app/models/katello/glue/candlepin/activation_key.rb +1 -1
- data/app/models/katello/glue/candlepin/candlepin_object.rb +1 -1
- data/app/models/katello/glue/candlepin/pool.rb +1 -1
- data/app/models/katello/glue/pulp/repos.rb +1 -1
- data/app/models/katello/host/content_facet.rb +33 -17
- data/app/models/katello/host/info_provider.rb +2 -4
- data/app/models/katello/host/subscription_facet.rb +3 -3
- data/app/models/katello/host_available_module_stream.rb +1 -1
- data/app/models/katello/installed_product.rb +2 -2
- data/app/models/katello/kt_environment.rb +11 -6
- data/app/models/katello/ping.rb +2 -3
- data/app/models/katello/repository.rb +40 -6
- data/app/models/katello/rhel_lifecycle_status.rb +10 -10
- data/app/models/katello/root_repository.rb +14 -18
- data/app/models/katello/task_status.rb +1 -1
- data/app/models/katello/upstream_pool.rb +2 -2
- data/app/presenters/katello/product_content_presenter.rb +2 -2
- data/app/presenters/katello/repository_presenter.rb +3 -3
- data/app/presenters/katello/sync_status_presenter.rb +3 -3
- data/app/services/cert/certs.rb +6 -2
- data/app/services/katello/candlepin_event_listener.rb +1 -1
- data/app/services/katello/event_monitor/poller_thread.rb +1 -1
- data/app/services/katello/event_queue.rb +1 -1
- data/app/services/katello/product_content_finder.rb +10 -10
- data/app/services/katello/product_content_importer.rb +1 -1
- data/app/services/katello/pulp3/alternate_content_source.rb +2 -2
- data/app/services/katello/pulp3/ansible_collection.rb +1 -1
- data/app/services/katello/pulp3/api/apt.rb +4 -0
- data/app/services/katello/pulp3/content.rb +1 -0
- data/app/services/katello/pulp3/content_view_version/export.rb +3 -10
- data/app/services/katello/pulp3/content_view_version/export_validator.rb +1 -1
- data/app/services/katello/pulp3/content_view_version/import.rb +2 -2
- data/app/services/katello/pulp3/content_view_version/import_gpg_keys.rb +1 -1
- data/app/services/katello/pulp3/content_view_version/importable_products.rb +2 -2
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +4 -4
- data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +2 -2
- data/app/services/katello/pulp3/deb.rb +35 -1
- data/app/services/katello/pulp3/docker_manifest.rb +1 -1
- data/app/services/katello/pulp3/docker_manifest_list.rb +6 -2
- data/app/services/katello/pulp3/docker_tag.rb +1 -1
- data/app/services/katello/pulp3/erratum.rb +2 -2
- data/app/services/katello/pulp3/file_unit.rb +1 -1
- data/app/services/katello/pulp3/generic_content_unit.rb +1 -1
- data/app/services/katello/pulp3/module_stream.rb +2 -2
- data/app/services/katello/pulp3/repository/ansible_collection.rb +1 -1
- data/app/services/katello/pulp3/repository/apt.rb +22 -16
- data/app/services/katello/pulp3/repository/docker.rb +2 -2
- data/app/services/katello/pulp3/repository/file.rb +1 -1
- data/app/services/katello/pulp3/repository/generic.rb +1 -1
- data/app/services/katello/pulp3/repository/yum.rb +7 -7
- data/app/services/katello/pulp3/repository.rb +15 -9
- data/app/services/katello/pulp3/repository_mirror.rb +3 -3
- data/app/services/katello/registration_manager.rb +23 -6
- data/app/services/katello/repository_type.rb +3 -3
- data/app/services/katello/smart_proxy_helper.rb +3 -3
- data/app/services/katello/ui_notifications/content_view/delete_latest_version_failure.rb +1 -1
- data/app/services/katello/ui_notifications/subscriptions/expire_soon.rb +3 -3
- data/app/services/katello/ui_notifications/subscriptions/manifest_expire_soon_warning.rb +3 -3
- data/app/services/katello/ui_notifications/task_notification.rb +2 -2
- data/app/services/katello/upstream_connection_checker.rb +1 -1
- data/app/views/foreman/job_templates/install_errata_by_search_query.erb +1 -1
- data/app/views/foreman/job_templates/install_errata_by_search_query_-_katello_ansible_default.erb +1 -1
- data/app/views/katello/api/v2/activation_keys/base.json.rabl +43 -8
- data/app/views/katello/api/v2/alternate_content_sources/base.json.rabl +1 -1
- data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +5 -5
- data/app/views/katello/api/v2/common/_metadata.json.rabl +1 -1
- data/app/views/katello/api/v2/content_credentials/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_facet/base.json.rabl +15 -6
- data/app/views/katello/api/v2/content_facet/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_environments/index.json.rabl +7 -0
- data/app/views/katello/api/v2/content_view_environments/show.json.rabl +33 -0
- data/app/views/katello/api/v2/content_view_filter_rules/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_filters/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +3 -3
- data/app/views/katello/api/v2/content_views/base.json.rabl +4 -3
- data/app/views/katello/api/v2/content_views/show.json.rabl +1 -2
- data/app/views/katello/api/v2/debs/backend.json.rabl +7 -0
- data/app/views/katello/api/v2/debs/base.json.rabl +4 -0
- data/app/views/katello/api/v2/debs/show.json.rabl +2 -0
- data/app/views/katello/api/v2/docker_manifest_lists/show.json.rabl +1 -0
- data/app/views/katello/api/v2/docker_tags/_base.json.rabl +2 -2
- data/app/views/katello/api/v2/environments/show.json.rabl +4 -4
- data/app/views/katello/api/v2/gpg_keys/show.json.rabl +1 -1
- data/app/views/katello/api/v2/host_collections/base.json.rabl +1 -1
- data/app/views/katello/api/v2/hosts/base.json.rabl +2 -2
- data/app/views/katello/api/v2/package_groups/base.json.rabl +2 -2
- data/app/views/katello/api/v2/products/show.json.rabl +2 -2
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +1 -1
- data/app/views/katello/api/v2/subscriptions/base.json.rabl +1 -1
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +3 -3
- data/app/views/katello/api/v2/sync_plans/show.json.rabl +1 -1
- data/app/views/katello/sync_management/index.html.erb +2 -2
- data/config/initializers/inflections.rb +11 -0
- data/config/katello.yaml.example +4 -10
- data/config/routes/api/registry.rb +0 -2
- data/config/routes/api/rhsm.rb +1 -4
- data/config/routes/api/v2.rb +2 -3
- data/db/migrate/20140716211853_repo_rename_feed_to_url.rb +1 -1
- data/db/migrate/20141003210742_add_docker_container_registry_url_to_providers.rb +1 -1
- data/db/migrate/20150224083608_remove_docker_registry_url.rb +1 -1
- data/db/migrate/20160808002834_add_files.rb +1 -1
- data/db/migrate/20161014133811_move_content_view_version_description_to_histories.rb +1 -1
- data/db/migrate/20200818192230_update_system_purpose_status.rb +1 -1
- data/db/migrate/20201012172713_remove_gpg_key_perms.rb +1 -1
- data/db/migrate/20210322142311_add_auth_url_token_to_root_repositories.rb +1 -1
- data/db/migrate/20211220185935_clean_duplicate_content_units.rb +2 -2
- data/db/migrate/20230717150442_change_change_content_source_job_template_name.rb +1 -1
- data/db/migrate/20240207191223_remove_entitlement_mode_host_statuses.rb +1 -1
- data/db/migrate/20240508100434_add_content_id_to_katello_repository.rb +5 -0
- data/db/migrate/20240730163043_add_content_view_environment_activation_key.rb +87 -0
- data/db/migrate/20240806130902_add_more_deb_fields.rb +15 -0
- data/db/migrate/20240903194428_add_priority_to_content_view_environment_activation_key.rb +5 -0
- data/db/migrate/20241007200316_add_fields_to_katello_docker_manifest_list.rb +8 -0
- data/db/migrate/20241007212705_add_bootc_facts_to_content_facet.rb +27 -0
- data/db/migrate/20241025151105_remove_pulp3_migrated_hrefs_from_content_tables.rb +10 -0
- data/db/migrate/20241030181402_create_katello_flatpak_tables.rb +41 -0
- data/db/seeds.d/106-mail_notifications.rb +9 -9
- data/db/seeds.d/108-subcription-bookmarks.rb +1 -1
- data/db/seeds.d/109-katello-notification-blueprints.rb +21 -21
- data/db/seeds.d/110-content-view-autopublish.rb +5 -5
- data/db/seeds.d/111-container-image-bookmarks.rb +1 -1
- data/db/seeds.d/111-upgrade_tasks.rb +1 -1
- data/engines/bastion/app/assets/javascripts/bastion/i18n/i18n.module.js +4 -0
- data/engines/bastion/lib/bastion/engine.rb +1 -1
- data/engines/bastion/lib/bastion.rb +1 -1
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-gettext/angular-gettext.js +5 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +16 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-info.html +29 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-repository-sets.html +13 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/views/activation-keys.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-host-collections-modal.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-host-collections-modal.html +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-modal-helper.service.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/debs.routes.js +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb-dependencies.html +54 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb-info.html +13 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb.html +8 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +11 -0
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/activation_keys.scss +1 -1
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +1 -1
- data/lib/katello/engine.rb +17 -15
- data/lib/katello/permission_creator.rb +51 -49
- data/lib/katello/permissions/host_permissions.rb +4 -4
- data/lib/katello/permissions/organization_permissions.rb +4 -4
- data/lib/katello/permissions/registry_permissions.rb +1 -1
- data/lib/katello/permissions/roles_permissions.rb +1 -1
- data/lib/katello/permissions/user_permissions.rb +1 -1
- data/lib/katello/plugin.rb +14 -8
- data/lib/katello/repository_types/docker.rb +4 -2
- data/lib/katello/repository_types/ostree.rb +5 -3
- data/lib/katello/repository_types/python.rb +1 -1
- data/lib/katello/repository_types/yum.rb +2 -1
- data/lib/katello/scheduled_jobs.rb +1 -1
- data/lib/katello/tasks/migrate_structure_content_for_deb.rake +105 -0
- data/lib/katello/tasks/receptor/extract_orgs.rake +1 -1
- data/lib/katello/tasks/reimport.rake +1 -1
- data/lib/katello/tasks/repository.rake +19 -9
- data/lib/katello/tasks/upgrades/4.1/reupdate_content_import_export_perms.rake +1 -1
- data/lib/katello/tasks/upgrades/4.3/fix_url_auth.rake +1 -1
- data/lib/katello/version.rb +1 -1
- data/locale/action_names.rb +92 -1
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +259 -28
- data/locale/bn_IN/katello.po +258 -27
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po +258 -27
- data/locale/cs/katello.po +258 -30
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +258 -27
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +259 -28
- data/locale/de_AT/katello.po +258 -27
- data/locale/de_DE/katello.po +258 -27
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po +258 -27
- data/locale/en/katello.po +258 -27
- data/locale/en_GB/katello.po +258 -27
- data/locale/en_US/katello.po +258 -27
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +259 -28
- data/locale/et_EE/katello.po +258 -27
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +259 -28
- data/locale/gl/katello.po +258 -27
- data/locale/gu/katello.po +258 -27
- data/locale/he_IL/katello.po +258 -27
- data/locale/hi/katello.po +258 -27
- data/locale/id/katello.po +258 -27
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +259 -28
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +259 -28
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +259 -28
- data/locale/katello.pot +1041 -696
- data/locale/kn/katello.po +258 -27
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +259 -28
- data/locale/ml_IN/katello.po +258 -27
- data/locale/mr/katello.po +258 -27
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po +258 -27
- data/locale/or/katello.po +258 -27
- data/locale/pa/katello.po +258 -27
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po +258 -27
- data/locale/pl_PL/katello.po +258 -27
- data/locale/pt/katello.po +258 -27
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +259 -28
- data/locale/ro/katello.po +258 -27
- data/locale/ro_RO/katello.po +258 -27
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +259 -28
- data/locale/sl/katello.po +258 -27
- data/locale/sv_SE/katello.po +258 -27
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +259 -28
- data/locale/ta_IN/katello.po +258 -27
- data/locale/te/katello.po +258 -27
- data/locale/tr/katello.po +258 -27
- data/locale/vi/katello.po +258 -27
- data/locale/vi_VN/katello.po +258 -27
- data/locale/zh/katello.po +258 -27
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +259 -28
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +259 -28
- data/vendor/assets/javascripts/katello/chosen.jquery.js +2 -2
- data/vendor/assets/javascripts/katello/jquery.ba-bbq.js +1 -1
- data/vendor/assets/javascripts/katello/jquery.hoverIntent.js +2 -2
- data/webpack/ForemanColumnExtensions/index.js +1 -1
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +113 -86
- data/webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js +7 -2
- data/webpack/components/extensions/HostDetails/Tabs/DebsTab/DebsTab.js +31 -4
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +1 -1
- data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +1 -7
- data/webpack/components/extensions/RegistrationCommands/helpers.js +15 -0
- data/webpack/components/extensions/RegistrationCommands/index.js +3 -9
- data/webpack/global_index.js +11 -4
- data/webpack/redux/actions/RedHatRepositories/helpers.js +8 -6
- data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.js +4 -0
- data/webpack/scenes/ActivationKeys/Details/components/CVEDetailsCard.js +37 -0
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +1 -2
- data/webpack/scenes/Hosts/ChangeContentSource/helpers.js +2 -8
- data/webpack/scenes/SmartProxy/ExpandableCvDetails.js +22 -2
- data/webpack/scenes/SmartProxy/ExpandedSmartProxyRepositories.js +39 -20
- data/webpack/scenes/SmartProxy/SmartProxyContentActions.js +2 -1
- data/webpack/scenes/SmartProxy/SmartProxyExpandableTable.js +6 -4
- data/webpack/scenes/SmartProxy/__tests__/SmartProxyContentTest.js +62 -0
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +6 -4
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +1 -1
- metadata +86 -76
- data/app/lib/katello/api/constraints/activation_key_constraint.rb +0 -7
- /data/app/lib/katello/{api → routing}/mapper_extensions.rb +0 -0
@@ -0,0 +1,54 @@
|
|
1
|
+
module Katello
|
2
|
+
class Api::V2::ContentViewEnvironmentsController < Api::V2::ApiController
|
3
|
+
before_action :find_optional_organization, :only => [:index, :auto_complete_search]
|
4
|
+
before_action :find_environment
|
5
|
+
before_action :find_content_view
|
6
|
+
before_action :find_activation_key
|
7
|
+
before_action :find_host
|
8
|
+
|
9
|
+
resource_description do
|
10
|
+
api_version "v2"
|
11
|
+
end
|
12
|
+
|
13
|
+
api :GET, "/content_view_environments", N_("List content view environments")
|
14
|
+
param :organization_id, :number, :desc => N_("organization identifier"), :required => false
|
15
|
+
param :lifecycle_environment_id, :number, :desc => N_("environment identifier"), :required => false
|
16
|
+
param :content_view_id, :number, :desc => N_("Content view identifier"), :required => false
|
17
|
+
param :activation_key_id, :number, :desc => N_("Activation key identifier"), :required => false
|
18
|
+
param :host_id, :number, :desc => N_("Host identifier"), :required => false
|
19
|
+
param_group :search, Api::V2::ApiController
|
20
|
+
def index
|
21
|
+
respond(:collection => scoped_search(index_relation.distinct, :id, :asc, resource_class: ContentViewEnvironment))
|
22
|
+
end
|
23
|
+
|
24
|
+
def index_relation
|
25
|
+
content_view_environments = ContentViewEnvironment.readable.non_generated
|
26
|
+
content_view_environments = content_view_environments.in_organization(@organization) if @organization
|
27
|
+
content_view_environments = content_view_environments.where(environment: @environment) if @environment
|
28
|
+
content_view_environments = content_view_environments.where(content_view: @content_view) if @content_view
|
29
|
+
content_view_environments = content_view_environments.where(id: @activation_key.content_view_environments) if @activation_key
|
30
|
+
content_view_environments = content_view_environments.where(id: @host.content_view_environments) if @host
|
31
|
+
content_view_environments
|
32
|
+
end
|
33
|
+
|
34
|
+
def find_environment
|
35
|
+
return unless params.key?(:lifecycle_environment_id)
|
36
|
+
@environment = KTEnvironment.readable.find(params[:lifecycle_environment_id])
|
37
|
+
end
|
38
|
+
|
39
|
+
def find_content_view
|
40
|
+
return unless params.key?(:content_view_id)
|
41
|
+
@content_view = ContentView.readable.find(params[:content_view_id])
|
42
|
+
end
|
43
|
+
|
44
|
+
def find_activation_key
|
45
|
+
return unless params.key?(:activation_key_id)
|
46
|
+
@activation_key = ActivationKey.readable.find(params[:activation_key_id])
|
47
|
+
end
|
48
|
+
|
49
|
+
def find_host
|
50
|
+
return unless params.key?(:host_id)
|
51
|
+
@host = ::Host::Managed.authorized("view_hosts").find(params[:host_id])
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -28,7 +28,7 @@ module Katello
|
|
28
28
|
add_scoped_search_description_for(ContentViewVersion)
|
29
29
|
def index
|
30
30
|
options = {
|
31
|
-
:includes => [:content_view, :environments, :composite_content_views, :history => :task]
|
31
|
+
:includes => [:content_view, :environments, :composite_content_views, :history => :task],
|
32
32
|
}
|
33
33
|
respond(:collection => scoped_search(index_relation.distinct, :version, :desc, options))
|
34
34
|
end
|
@@ -200,7 +200,7 @@ Alternatively, use the 'force' parameter to regenerate metadata locally. New ver
|
|
200
200
|
list.each do |combination|
|
201
201
|
version_environment = {
|
202
202
|
:content_view_version => ContentViewVersion.find(combination[:content_view_version_id]),
|
203
|
-
:environments => KTEnvironment.where(:id => combination[:environment_ids])
|
203
|
+
:environments => KTEnvironment.where(:id => combination[:environment_ids]),
|
204
204
|
}
|
205
205
|
|
206
206
|
view = version_environment[:content_view_version].content_view
|
@@ -230,7 +230,7 @@ Alternatively, use the 'force' parameter to regenerate metadata locally. New ver
|
|
230
230
|
component.composites.select { |c| c.environments.any? }.map do |composite|
|
231
231
|
{
|
232
232
|
:content_view_version => composite,
|
233
|
-
:environments => composite.environments
|
233
|
+
:environments => composite.environments,
|
234
234
|
}
|
235
235
|
end
|
236
236
|
end
|
@@ -21,7 +21,7 @@ module Katello
|
|
21
21
|
syncable_repos: ::Katello::Repository.exportable_types(
|
22
22
|
format: ::Katello::Pulp3::ContentViewVersion::Export::SYNCABLE).join(", "),
|
23
23
|
importable_repos: ::Katello::Repository.exportable_types(
|
24
|
-
format: ::Katello::Pulp3::ContentViewVersion::Export::IMPORTABLE).join(", ")
|
24
|
+
format: ::Katello::Pulp3::ContentViewVersion::Export::IMPORTABLE).join(", "),
|
25
25
|
}),
|
26
26
|
:required => false
|
27
27
|
end
|
@@ -8,7 +8,7 @@ module Katello
|
|
8
8
|
:destroy,
|
9
9
|
:add_hosts,
|
10
10
|
:remove_hosts,
|
11
|
-
:hosts
|
11
|
+
:hosts,
|
12
12
|
]
|
13
13
|
before_action :find_readable_activation_key, :only => [:index]
|
14
14
|
before_action :find_editable_host, :only => [:index]
|
@@ -187,7 +187,7 @@ module Katello
|
|
187
187
|
:description,
|
188
188
|
:max_hosts,
|
189
189
|
:unlimited_hosts,
|
190
|
-
{ :host_ids => [] }
|
190
|
+
{ :host_ids => [] },
|
191
191
|
]
|
192
192
|
params.fetch(:host_collection).permit(*attrs)
|
193
193
|
end
|
@@ -3,7 +3,7 @@ module Katello
|
|
3
3
|
def_param_group :content_facet_attributes do
|
4
4
|
param :content_view_id, Integer, :desc => N_("Id of the single content view to be associated with the host.")
|
5
5
|
param :lifecycle_environment_id, Integer, :desc => N_("Id of the single lifecycle environment to be associated with the host.")
|
6
|
-
param :content_view_environments, Array, :desc => N_("Comma-separated list of
|
6
|
+
param :content_view_environments, Array, :desc => N_("Comma-separated list of content view environment labels to be associated with the host,"\
|
7
7
|
" in the format of 'lifecycle_environment_label/content_view_label'."\
|
8
8
|
" Ignored if content_view_environment_ids is specified, or if content_view_id and lifecycle_environment_id are specified."\
|
9
9
|
" Requires allow_multiple_content_views setting to be on.")
|
@@ -6,7 +6,7 @@ module Katello
|
|
6
6
|
TYPES_FROM_PARAMS = {
|
7
7
|
bugfix: Katello::Erratum::BUGZILLA, # ['bugfix', 'recommended']
|
8
8
|
security: Katello::Erratum::SECURITY, # ['security']
|
9
|
-
enhancement: Katello::Erratum::ENHANCEMENT # ['enhancement', 'optional']
|
9
|
+
enhancement: Katello::Erratum::ENHANCEMENT, # ['enhancement', 'optional']
|
10
10
|
}.freeze
|
11
11
|
|
12
12
|
before_action :find_host, only: :index
|
@@ -260,7 +260,7 @@ module Katello
|
|
260
260
|
@content_overrides = content_labels.map do |label|
|
261
261
|
{ content_label: label,
|
262
262
|
value: Foreman::Cast.to_bool(params[:content_overrides_search][:enabled]),
|
263
|
-
remove: Foreman::Cast.to_bool(params[:content_overrides_search][:remove])
|
263
|
+
remove: Foreman::Cast.to_bool(params[:content_overrides_search][:remove]),
|
264
264
|
}
|
265
265
|
end
|
266
266
|
else
|
@@ -232,10 +232,7 @@ module Katello
|
|
232
232
|
version_environment[:environments] << cve.environment unless version_environment[:environments].include?(cve.environment)
|
233
233
|
version_environment[:next_version] ||= version.next_incremental_version
|
234
234
|
version_environment[:content_host_count] ||= 0
|
235
|
-
version_environment[:content_host_count] += content_facets.
|
236
|
-
content_views: [cve.content_view],
|
237
|
-
lifecycle_environments: [cve.environment]
|
238
|
-
).count
|
235
|
+
version_environment[:content_host_count] += content_facets.with_content_view_environments(cve).count
|
239
236
|
|
240
237
|
if version.content_view.composite?
|
241
238
|
version_environment[:components] = version.components_needing_errata(@errata)
|
@@ -50,6 +50,7 @@ module Katello
|
|
50
50
|
param :id, :number, :desc => N_("organization ID"), :required => true
|
51
51
|
def show
|
52
52
|
@render_template = 'katello/api/v2/organizations/show'
|
53
|
+
@organization.manifest_expiration_date(cached: false) if params[:force_manifest_expire_cache]
|
53
54
|
super
|
54
55
|
end
|
55
56
|
|
@@ -133,7 +134,7 @@ module Katello
|
|
133
134
|
response = {
|
134
135
|
:results => available_releases,
|
135
136
|
:total => available_releases.size,
|
136
|
-
:subtotal => available_releases.size
|
137
|
+
:subtotal => available_releases.size,
|
137
138
|
}
|
138
139
|
respond_for_index :collection => response
|
139
140
|
end
|
@@ -350,7 +350,7 @@ Alternatively, use the 'force' parameter to regenerate metadata locally. On the
|
|
350
350
|
sync_options = {
|
351
351
|
:skip_metadata_check => ::Foreman::Cast.to_bool(params[:skip_metadata_check]),
|
352
352
|
:validate_contents => ::Foreman::Cast.to_bool(params[:validate_contents]),
|
353
|
-
:incremental => ::Foreman::Cast.to_bool(params[:incremental])
|
353
|
+
:incremental => ::Foreman::Cast.to_bool(params[:incremental]),
|
354
354
|
}
|
355
355
|
|
356
356
|
if @repository.url.blank?
|
@@ -515,7 +515,7 @@ Alternatively, use the 'force' parameter to regenerate metadata locally. On the
|
|
515
515
|
upload_args = {
|
516
516
|
content_type: params[:content_type],
|
517
517
|
generate_metadata: generate_metadata,
|
518
|
-
sync_capsule: sync_capsule
|
518
|
+
sync_capsule: sync_capsule,
|
519
519
|
}
|
520
520
|
upload_args.merge!(generic_content_type_import_upload_args)
|
521
521
|
|
@@ -650,6 +650,7 @@ Alternatively, use the 'force' parameter to regenerate metadata locally. On the
|
|
650
650
|
root.deb_releases = repo_params[:deb_releases] if repo_params[:deb_releases]
|
651
651
|
root.deb_components = repo_params[:deb_components] if repo_params[:deb_components]
|
652
652
|
root.deb_architectures = repo_params[:deb_architectures] if repo_params[:deb_architectures]
|
653
|
+
root.content_id = 'INITIAL_DUMMY_VALUE' unless Setting['deb_enable_structured_apt']
|
653
654
|
end
|
654
655
|
|
655
656
|
if root.ansible_collection?
|
@@ -3,6 +3,7 @@ module Katello
|
|
3
3
|
module Api::V2::HostsControllerExtensions
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
include ForemanTasks::Triggers
|
6
|
+
include Katello::Concerns::Api::V2::MultiCVParamsHandling
|
6
7
|
|
7
8
|
module Overrides
|
8
9
|
def action_permission
|
@@ -45,23 +46,16 @@ module Katello
|
|
45
46
|
content_facet_attributes = params.dig(:host, :content_facet_attributes)
|
46
47
|
return if content_facet_attributes.blank? || @host&.content_facet.blank? ||
|
47
48
|
(cve_params[:content_view_id].present? && cve_params[:lifecycle_environment_id].present?)
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
end
|
58
|
-
if cve_params[:content_view_environment_ids].present?
|
59
|
-
new_cves = cve_params[:content_view_environment_ids].map do |id|
|
60
|
-
::Katello::ContentViewEnvironment.find_by(id: id)
|
61
|
-
end
|
49
|
+
cves = ::Katello::ContentViewEnvironment.fetch_content_view_environments(
|
50
|
+
labels: cve_params[:content_view_environments],
|
51
|
+
ids: cve_params[:content_view_environment_ids],
|
52
|
+
organization: @organization || @host&.organization)
|
53
|
+
if cves.present?
|
54
|
+
@host.content_facet.content_view_environments = cves
|
55
|
+
else
|
56
|
+
handle_errors(labels: cve_params[:content_view_environments],
|
57
|
+
ids: cve_params[:content_view_environment_ids])
|
62
58
|
end
|
63
|
-
|
64
|
-
@host.content_facet.content_view_environments = new_cves.compact if new_cves.present?
|
65
59
|
end
|
66
60
|
|
67
61
|
def cve_params
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Katello
|
2
|
+
module Concerns
|
3
|
+
module Api::V2::MultiCVParamsHandling
|
4
|
+
extend ActiveSupport::Concern
|
5
|
+
include ::Katello::Api::V2::ErrorHandling
|
6
|
+
|
7
|
+
def handle_errors(labels: [], ids: [])
|
8
|
+
if labels.present?
|
9
|
+
fail HttpErrors::UnprocessableEntity, "No content view environments found with names: #{labels.join(',')}"
|
10
|
+
elsif ids.present?
|
11
|
+
fail HttpErrors::UnprocessableEntity, "No content view environments found with ids: #{ids}"
|
12
|
+
end
|
13
|
+
rescue HttpErrors::UnprocessableEntity => e
|
14
|
+
respond_for_exception(
|
15
|
+
e,
|
16
|
+
:status => :unprocessable_entity,
|
17
|
+
:text => e.message,
|
18
|
+
:errors => [e.message],
|
19
|
+
:with_logging => true
|
20
|
+
)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -118,10 +118,7 @@ module Katello
|
|
118
118
|
# and also ensure that the environments have the remove permission
|
119
119
|
return deny_access unless KTEnvironment.promotable.where(:id => env_ids).count == env_ids.size && view.promotable_or_removable?
|
120
120
|
|
121
|
-
total_count = Katello::Host::ContentFacet.
|
122
|
-
:content_views => [view],
|
123
|
-
:lifecycle_environments => ::Katello::KTEnvironment.where(id: env_ids)
|
124
|
-
).count
|
121
|
+
total_count = Katello::Host::ContentFacet.with_content_views(view).with_environments(env_ids).count
|
125
122
|
if total_count > 0
|
126
123
|
unless options[:system_content_view_id] && options[:system_environment_id]
|
127
124
|
fail _("Unable to reassign content hosts. Please provide system_content_view_id and system_environment_id.")
|
@@ -135,7 +132,7 @@ module Katello
|
|
135
132
|
end
|
136
133
|
end
|
137
134
|
|
138
|
-
if Katello::ActivationKey.
|
135
|
+
if Katello::ActivationKey.with_content_views(view).with_environments(env_ids).count > 0
|
139
136
|
# if we are reassigning activation key environments/ cv
|
140
137
|
# make sure the activation key using present environments or cv are editable.
|
141
138
|
unless options[:key_content_view_id] && options[:key_environment_id]
|
@@ -7,7 +7,7 @@ module Katello
|
|
7
7
|
aks = ActivationKey.authorized(:view_activation_keys)
|
8
8
|
.where(organization_id: registration_params[:organization_id])
|
9
9
|
.order(:name)
|
10
|
-
.map { |ak| { name: ak.name,
|
10
|
+
.map { |ak| { name: ak.name, cves: ak.content_view_environments.map(&:label).join(', ') } }
|
11
11
|
|
12
12
|
lces = KTEnvironment.readable
|
13
13
|
.where(organization_id: registration_params[:organization_id])
|
@@ -29,20 +29,20 @@ module Katello
|
|
29
29
|
policies = [
|
30
30
|
{
|
31
31
|
:name => _("On Demand"),
|
32
|
-
:label => ::Katello::RootRepository::DOWNLOAD_ON_DEMAND
|
32
|
+
:label => ::Katello::RootRepository::DOWNLOAD_ON_DEMAND,
|
33
33
|
},
|
34
34
|
{
|
35
35
|
:name => _("Immediate"),
|
36
|
-
:label => ::Katello::RootRepository::DOWNLOAD_IMMEDIATE
|
36
|
+
:label => ::Katello::RootRepository::DOWNLOAD_IMMEDIATE,
|
37
37
|
},
|
38
38
|
{
|
39
39
|
:name => _("Streamed"),
|
40
|
-
:label => SmartProxy::DOWNLOAD_STREAMED
|
40
|
+
:label => SmartProxy::DOWNLOAD_STREAMED,
|
41
41
|
},
|
42
42
|
{
|
43
43
|
:name => _("Inherit from Repository"),
|
44
|
-
:label => SmartProxy::DOWNLOAD_INHERIT
|
45
|
-
}
|
44
|
+
:label => SmartProxy::DOWNLOAD_INHERIT,
|
45
|
+
},
|
46
46
|
]
|
47
47
|
|
48
48
|
policies.map { |p| OpenStruct.new(p) }
|
@@ -315,7 +315,7 @@ module Katello
|
|
315
315
|
"/content_hosts/#{host.id}",
|
316
316
|
:title => _("Host content and subscription details"),
|
317
317
|
:class => 'btn btn-default'),
|
318
|
-
:priority => 900
|
318
|
+
:priority => 900,
|
319
319
|
}]
|
320
320
|
end
|
321
321
|
|
@@ -331,7 +331,7 @@ module Katello
|
|
331
331
|
icons = {
|
332
332
|
green: "#{colour} host-status pficon pficon-ok status-ok",
|
333
333
|
yellow: "#{colour} host-status pficon pficon-info status-warn",
|
334
|
-
red: "#{colour} host-status pficon pficon-error-circle-o status-error"
|
334
|
+
red: "#{colour} host-status pficon pficon-error-circle-o status-error",
|
335
335
|
}
|
336
336
|
|
337
337
|
"<span class=\"#{icons[colour]}\"></span>".html_safe
|
@@ -10,13 +10,24 @@ module Actions
|
|
10
10
|
param :content_url
|
11
11
|
param :owner
|
12
12
|
param :os_versions
|
13
|
+
param :repository_id
|
13
14
|
end
|
14
15
|
|
15
16
|
def run
|
17
|
+
content_url = input[:content_url]
|
18
|
+
if input[:type] == ::Katello::Repository::DEB_TYPE
|
19
|
+
# We must retrieve the repository in the run phase, so the latest Pulp version_href is
|
20
|
+
# already set. This is needed to retrieve the latest repository.deb_content_url_options!
|
21
|
+
repository = ::Katello::Repository.find(input[:repository_id])
|
22
|
+
if repository.deb_using_structured_apt?
|
23
|
+
content_url += repository.deb_content_url_options
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
16
27
|
output[:response] = ::Katello::Resources::Candlepin::Content.
|
17
28
|
create(input[:owner],
|
18
29
|
name: input[:name],
|
19
|
-
contentUrl:
|
30
|
+
contentUrl: content_url,
|
20
31
|
type: input[:type],
|
21
32
|
arches: input[:arches],
|
22
33
|
label: input[:label],
|
@@ -3,7 +3,7 @@ module Actions
|
|
3
3
|
module Product
|
4
4
|
class ContentUpdate < Candlepin::Abstract
|
5
5
|
input_format do
|
6
|
-
param :
|
6
|
+
param :repository_id
|
7
7
|
param :name
|
8
8
|
param :type
|
9
9
|
param :arches
|
@@ -15,12 +15,20 @@ module Actions
|
|
15
15
|
param :metadata_expire
|
16
16
|
end
|
17
17
|
|
18
|
-
def
|
18
|
+
def finalize
|
19
|
+
content_url = input[:content_url]
|
20
|
+
# We must retrieve the repository in the finalize phase, because Katello::Product::ContentCreate
|
21
|
+
# only updates the repository.content_id in the finalize phase!
|
22
|
+
repository = ::Katello::Repository.find(input[:repository_id])
|
23
|
+
if repository.deb_using_structured_apt?
|
24
|
+
content_url += repository.deb_content_url_options
|
25
|
+
end
|
26
|
+
|
19
27
|
output[:response] = ::Katello::Resources::Candlepin::Content.
|
20
28
|
update(input[:owner],
|
21
|
-
id:
|
29
|
+
id: repository.content_id,
|
22
30
|
name: input[:name],
|
23
|
-
contentUrl:
|
31
|
+
contentUrl: content_url,
|
24
32
|
gpgUrl: input[:gpg_key_url] || '', #candlepin ignores nil
|
25
33
|
type: input[:type],
|
26
34
|
arches: input[:arches] || '',
|
@@ -28,6 +36,15 @@ module Actions
|
|
28
36
|
label: input[:label],
|
29
37
|
metadataExpire: input[:metadata_expire] || 1,
|
30
38
|
vendor: ::Katello::Provider::CUSTOM)
|
39
|
+
|
40
|
+
repository.content.update!(
|
41
|
+
name: input[:name],
|
42
|
+
content_url: content_url,
|
43
|
+
content_type: input[:type],
|
44
|
+
label: input[:label],
|
45
|
+
gpg_url: input[:gpg_key_url],
|
46
|
+
vendor: ::Katello::Provider::CUSTOM
|
47
|
+
)
|
31
48
|
end
|
32
49
|
end
|
33
50
|
end
|
@@ -3,9 +3,10 @@ module Actions
|
|
3
3
|
module ActivationKey
|
4
4
|
class Reassign < Actions::Base
|
5
5
|
def plan(activation_key, content_view_id, environment_id)
|
6
|
-
activation_key.
|
7
|
-
|
8
|
-
|
6
|
+
activation_key.assign_single_environment(
|
7
|
+
content_view: ::Katello::ContentView.find(content_view_id),
|
8
|
+
lifecycle_environment: ::Katello::KTEnvironment.find(environment_id)
|
9
|
+
)
|
9
10
|
end
|
10
11
|
end
|
11
12
|
end
|
@@ -5,7 +5,11 @@ module Actions
|
|
5
5
|
# rubocop:disable Metrics/MethodLength
|
6
6
|
execution_plan_hooks.use :update_content_counts, :on => :success
|
7
7
|
def plan(smart_proxy, options = {})
|
8
|
-
plan_self(:smart_proxy_id => smart_proxy.id
|
8
|
+
plan_self(:smart_proxy_id => smart_proxy.id,
|
9
|
+
:environment_id => options[:environment_id],
|
10
|
+
:content_view_id => options[:content_view_id],
|
11
|
+
:repository_id => options[:repository_id],
|
12
|
+
:skip_content_counts_update => options[:skip_content_counts_update])
|
9
13
|
action_subject(smart_proxy)
|
10
14
|
environment = options[:environment]
|
11
15
|
content_view = options[:content_view]
|
@@ -69,9 +73,10 @@ module Actions
|
|
69
73
|
end
|
70
74
|
|
71
75
|
def update_content_counts(_execution_plan)
|
72
|
-
if Setting[:automatic_content_count_updates]
|
76
|
+
if Setting[:automatic_content_count_updates] && !input[:skip_content_counts_update]
|
73
77
|
smart_proxy = ::SmartProxy.unscoped.find(input[:smart_proxy_id])
|
74
|
-
|
78
|
+
options = {environment_id: input[:environment_id], content_view_id: input[:content_view_id], repository_id: input[:repository_id]}
|
79
|
+
::ForemanTasks.async_task(::Actions::Katello::CapsuleContent::UpdateContentCounts, smart_proxy, options)
|
75
80
|
else
|
76
81
|
Rails.logger.info "Skipping content counts update as automatic content count updates are disabled. To enable automatic content count updates, set the 'automatic_content_count_updates' setting to true.
|
77
82
|
To update content counts manually, run the 'Update Content Counts' action."
|
@@ -2,8 +2,9 @@ module Actions
|
|
2
2
|
module Katello
|
3
3
|
module CapsuleContent
|
4
4
|
class UpdateContentCounts < Actions::EntryAction
|
5
|
-
def plan(smart_proxy)
|
6
|
-
|
5
|
+
def plan(smart_proxy, options = {})
|
6
|
+
input[:options] = options
|
7
|
+
plan_self(:smart_proxy_id => smart_proxy.id, environment_id: options[:environment_id], content_view_id: options[:content_view_id], repository_id: options[:repository_id])
|
7
8
|
end
|
8
9
|
|
9
10
|
def humanized_name
|
@@ -12,7 +13,24 @@ module Actions
|
|
12
13
|
|
13
14
|
def run
|
14
15
|
smart_proxy = ::SmartProxy.unscoped.find(input[:smart_proxy_id])
|
15
|
-
|
16
|
+
env = find_env(input[:environment_id])
|
17
|
+
content_view = find_content_view(input[:content_view_id])
|
18
|
+
repository = find_repository(input[:repository_id])
|
19
|
+
smart_proxy.update_content_counts!(environment: env,
|
20
|
+
content_view: content_view,
|
21
|
+
repository: repository)
|
22
|
+
end
|
23
|
+
|
24
|
+
def find_env(environment_id)
|
25
|
+
::Katello::KTEnvironment.find_by(id: environment_id) if environment_id
|
26
|
+
end
|
27
|
+
|
28
|
+
def find_content_view(content_view_id)
|
29
|
+
::Katello::ContentView.find_by(id: content_view_id) if content_view_id
|
30
|
+
end
|
31
|
+
|
32
|
+
def find_repository(repository_id)
|
33
|
+
::Katello::Repository.find_by(id: repository_id) if repository_id
|
16
34
|
end
|
17
35
|
|
18
36
|
def rescue_strategy
|
@@ -21,7 +21,7 @@ module Actions
|
|
21
21
|
full_path = if cdn_configuration.redhat_cdn? || cdn_configuration.custom_cdn?
|
22
22
|
root.product.repo_url(root.library_instance.generate_content_path)
|
23
23
|
elsif cdn_configuration.network_sync?
|
24
|
-
resource.repository_url(content_label: root.content.label, arch: root.arch, major: root.major, minor: root.minor)
|
24
|
+
resource.repository_url(content_label: root.library_instance.content.label, arch: root.arch, major: root.major, minor: root.minor)
|
25
25
|
end
|
26
26
|
plan_action(::Actions::Katello::Repository::Update, root, url: full_path)
|
27
27
|
end
|
@@ -12,9 +12,25 @@ module Actions
|
|
12
12
|
smart_proxies = SmartProxy.unscoped.with_environment(environment).select { |sp| sp.authorized?(:manage_capsule_content) && sp.authorized?(:view_capsule_content) }
|
13
13
|
unless smart_proxies.blank?
|
14
14
|
plan_action(::Actions::BulkAction, ::Actions::Katello::CapsuleContent::Sync, smart_proxies.sort,
|
15
|
-
:content_view_id => content_view.id, :environment_id => environment.id)
|
15
|
+
:content_view_id => content_view.id, :environment_id => environment.id, :skip_content_counts_update => true)
|
16
16
|
end
|
17
17
|
end
|
18
|
+
#For Content view triggered capsule sync, we need to update content counts in one action in finalize, instead of one action per CV, per env, per smart proxy
|
19
|
+
plan_self(:content_view_id => content_view.id, :environment_id => environment.id)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def finalize
|
24
|
+
if Setting[:automatic_content_count_updates]
|
25
|
+
environment = ::Katello::KTEnvironment.find(input[:environment_id])
|
26
|
+
smart_proxies = SmartProxy.unscoped.with_environment(environment).select { |sp| sp.authorized?(:manage_capsule_content) && sp.authorized?(:view_capsule_content) }
|
27
|
+
options = {environment_id: input[:environment_id], content_view_id: input[:content_view_id]}
|
28
|
+
smart_proxies.each do |smart_proxy|
|
29
|
+
::ForemanTasks.async_task(::Actions::Katello::CapsuleContent::UpdateContentCounts, smart_proxy, options)
|
30
|
+
end
|
31
|
+
else
|
32
|
+
Rails.logger.info "Skipping content counts update as automatic content count updates are disabled. To enable automatic content count updates, set the 'automatic_content_count_updates' setting to true.
|
33
|
+
To update content counts manually, run the 'Update Content Counts' action."
|
18
34
|
end
|
19
35
|
end
|
20
36
|
end
|
@@ -83,7 +83,7 @@ module Actions
|
|
83
83
|
output[:changed_content] = input[:version_outputs].map do |version_output|
|
84
84
|
{
|
85
85
|
:content_view_version => {:id => version_output[:version_id]},
|
86
|
-
:added_units => version_output[:output][:added_units]
|
86
|
+
:added_units => version_output[:output][:added_units],
|
87
87
|
}
|
88
88
|
end
|
89
89
|
end
|
@@ -6,7 +6,7 @@ module Actions
|
|
6
6
|
HUMANIZED_TYPES = {
|
7
7
|
::Katello::Erratum::CONTENT_TYPE => "Errata",
|
8
8
|
::Katello::ModuleStream::CONTENT_TYPE => "Module Streams",
|
9
|
-
::Katello::Rpm::CONTENT_TYPE => "Packages"
|
9
|
+
::Katello::Rpm::CONTENT_TYPE => "Packages",
|
10
10
|
}.freeze
|
11
11
|
|
12
12
|
def humanized_output
|