katello 4.14.1 → 4.15.0.rc2
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 +9 -9
- 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/generic_content_units_controller.rb +2 -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 +1 -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 -15
- 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/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 +36 -38
- data/app/models/katello/concerns/host_managed_extensions.rb +19 -8
- 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 +2 -2
- 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/resolve_traces.erb +8 -1
- data/app/views/foreman/job_templates/resolve_traces_-_katello_ansible_default.erb +4 -3
- data/app/views/foreman/job_templates/restart_services.erb +11 -3
- data/app/views/foreman/job_templates/restart_services_-_katello_ansible_default.erb +4 -3
- 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 +3 -3
- data/app/views/katello/api/v2/content_views/show.json.rabl +1 -1
- 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/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/lib/bastion/engine.rb +1 -1
- data/engines/bastion/lib/bastion.rb +1 -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/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/new-repository.controller.js +2 -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/LC_MESSAGES/katello.mo +0 -0
- 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/LC_MESSAGES/katello.mo +0 -0
- 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/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_AT/katello.po +258 -27
- data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
- 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/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/katello.po +258 -27
- data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_GB/katello.po +258 -27
- data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
- 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/LC_MESSAGES/katello.mo +0 -0
- 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/LC_MESSAGES/katello.mo +0 -0
- data/locale/gl/katello.po +258 -27
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/katello.po +258 -27
- data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
- data/locale/he_IL/katello.po +258 -27
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/katello.po +258 -27
- data/locale/id/LC_MESSAGES/katello.mo +0 -0
- 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/LC_MESSAGES/katello.mo +0 -0
- 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/LC_MESSAGES/katello.mo +0 -0
- data/locale/ml_IN/katello.po +258 -27
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- 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/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/katello.po +258 -27
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- 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/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl_PL/katello.po +258 -27
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- 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/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro/katello.po +258 -27
- data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
- 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/LC_MESSAGES/katello.mo +0 -0
- data/locale/sl/katello.po +258 -27
- data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
- 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/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta_IN/katello.po +258 -27
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/katello.po +258 -27
- data/locale/tr/LC_MESSAGES/katello.mo +0 -0
- data/locale/tr/katello.po +258 -27
- data/locale/vi/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi/katello.po +258 -27
- data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi_VN/katello.po +258 -27
- data/locale/zh/LC_MESSAGES/katello.mo +0 -0
- 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 +2 -0
- 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
- metadata +134 -76
- data/app/lib/katello/api/constraints/activation_key_constraint.rb +0 -7
- /data/app/lib/katello/{api → routing}/mapper_extensions.rb +0 -0
@@ -119,11 +119,13 @@ module Actions
|
|
119
119
|
end
|
120
120
|
all_cv_envs = combined_cv_envs(cv_envs, versions)
|
121
121
|
|
122
|
-
if all_cv_envs.flat_map(&:hosts).any? &&
|
122
|
+
if all_cv_envs.flat_map(&:hosts).any? && !cve_exists?(options[:system_environment_id],
|
123
|
+
options[:system_content_view_id])
|
123
124
|
fail _("Unable to reassign systems. Please check system_content_view_id and system_environment_id.")
|
124
125
|
end
|
125
126
|
|
126
|
-
if all_cv_envs.flat_map(&:activation_keys).any? &&
|
127
|
+
if all_cv_envs.flat_map(&:activation_keys).any? && !cve_exists?(options[:key_environment_id],
|
128
|
+
options[:key_content_view_id])
|
127
129
|
fail _("Unable to reassign activation_keys. Please check activation_key_content_view_id and activation_key_environment_id.")
|
128
130
|
end
|
129
131
|
end
|
@@ -132,16 +134,10 @@ module Actions
|
|
132
134
|
(cv_envs + versions.flat_map(&:content_view_environments)).uniq
|
133
135
|
end
|
134
136
|
|
135
|
-
def
|
136
|
-
::Katello::ContentViewEnvironment.where(:environment_id =>
|
137
|
-
:content_view_id =>
|
138
|
-
).
|
139
|
-
end
|
140
|
-
|
141
|
-
def activation_key_cve(options)
|
142
|
-
::Katello::ContentViewEnvironment.where(:environment_id => options[:key_environment_id],
|
143
|
-
:content_view_id => options[:key_content_view_id]
|
144
|
-
).first
|
137
|
+
def cve_exists?(environment_id, content_view_id)
|
138
|
+
::Katello::ContentViewEnvironment.where(:environment_id => environment_id,
|
139
|
+
:content_view_id => content_view_id
|
140
|
+
).exists?
|
145
141
|
end
|
146
142
|
end
|
147
143
|
end
|
@@ -40,7 +40,7 @@ module Actions
|
|
40
40
|
importing: !metadata_map.syncable_format?,
|
41
41
|
syncable: metadata_map.syncable_format?,
|
42
42
|
major: metadata_map.content_view_version.major,
|
43
|
-
minor: metadata_map.content_view_version.minor
|
43
|
+
minor: metadata_map.content_view_version.minor,
|
44
44
|
})
|
45
45
|
plan_self(content_view_id: import.content_view.id)
|
46
46
|
end
|
@@ -8,7 +8,7 @@ module Actions
|
|
8
8
|
HUMANIZED_TYPES = {
|
9
9
|
::Katello::Erratum::CONTENT_TYPE => "Errata",
|
10
10
|
::Katello::Rpm::CONTENT_TYPE => "Packages",
|
11
|
-
::Katello::Deb::CONTENT_TYPE => "Deb Packages"
|
11
|
+
::Katello::Deb::CONTENT_TYPE => "Deb Packages",
|
12
12
|
}.freeze
|
13
13
|
|
14
14
|
def humanized_name
|
@@ -217,7 +217,7 @@ module Actions
|
|
217
217
|
content = { ::Katello::Erratum::CONTENT_TYPE => [],
|
218
218
|
::Katello::Rpm::CONTENT_TYPE => [],
|
219
219
|
::Katello::ModuleStream::CONTENT_TYPE => [],
|
220
|
-
::Katello::Deb::CONTENT_TYPE => []
|
220
|
+
::Katello::Deb::CONTENT_TYPE => [],
|
221
221
|
}
|
222
222
|
|
223
223
|
base_repos = ::Katello::ContentViewVersion.find(input[:old_version]).repositories
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
require 'uri'
|
3
|
+
module Actions
|
4
|
+
module Katello
|
5
|
+
module Flatpak
|
6
|
+
class ScanRemote < Actions::EntryAction
|
7
|
+
def plan(remote, _args = {})
|
8
|
+
url = format_url(remote.url)
|
9
|
+
plan_self({:remote_id => remote.id, :url => url})
|
10
|
+
end
|
11
|
+
|
12
|
+
def run
|
13
|
+
remote = ::Katello::FlatpakRemote.find(input[:remote_id])
|
14
|
+
url = input[:url]
|
15
|
+
request_params = {
|
16
|
+
method: :get,
|
17
|
+
headers: { accept: :json },
|
18
|
+
url: url,
|
19
|
+
}
|
20
|
+
results = RestClient::Request.execute(request_params)
|
21
|
+
results = JSON.parse(results)
|
22
|
+
repositories = results['Results']
|
23
|
+
repositories.each do |repository|
|
24
|
+
remote_repository = remote.remote_repositories.find_or_initialize_by(name: repository['Name'])
|
25
|
+
remote_repository.label = remote.name + '-' + repository['Name']
|
26
|
+
remote_repository.flatpak_remote = remote
|
27
|
+
remote_repository.save!
|
28
|
+
repository['Images'].each do |image|
|
29
|
+
remote_repository_manifest = remote_repository.manifests.find_or_initialize_by(digest: image['Digest'])
|
30
|
+
remote_repository_manifest.flatpak_remote_repository_id = remote_repository.id
|
31
|
+
remote_repository_manifest.name = image['Labels']['name']
|
32
|
+
remote_repository_manifest.tags = image['Tags']
|
33
|
+
remote_repository_manifest.application = image['Labels']['org.flatpak.ref'].start_with?('app/')
|
34
|
+
remote_repository_manifest.flatpak_ref = image['Labels']['org.flatpak.ref']
|
35
|
+
remote_repository_manifest.runtime = extract_runtime_from_metadata(image['Labels']['org.flatpak.metadata'])
|
36
|
+
remote_repository_manifest.save!
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def extract_runtime_from_metadata(metadata)
|
44
|
+
match = metadata.match(/^runtime=(.*)$/)
|
45
|
+
match ? "runtime/" + match[1] : nil
|
46
|
+
end
|
47
|
+
|
48
|
+
def format_url(url)
|
49
|
+
unless url.ends_with?('/index/static?')
|
50
|
+
url += '/index/static?'
|
51
|
+
end
|
52
|
+
params = [
|
53
|
+
['tag', 'latest'],
|
54
|
+
['label:org.flatpak.ref:exists', '1'],
|
55
|
+
]
|
56
|
+
encoded_params = params.map { |k, v| "#{CGI.escape(k.to_s)}=#{CGI.escape(v.to_s)}" }
|
57
|
+
"#{url}#{encoded_params.sort.join('&')}"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -4,51 +4,60 @@ module Actions
|
|
4
4
|
class ContentCreate < Actions::Base
|
5
5
|
middleware.use Actions::Middleware::RemoteAction
|
6
6
|
|
7
|
-
def plan(
|
7
|
+
def plan(repository)
|
8
|
+
root = repository.root
|
8
9
|
sequence do
|
9
|
-
if
|
10
|
+
if repository.content_id.nil? || repository.content_id == 'INITIAL_DUMMY_VALUE'
|
10
11
|
content_create = plan_action(Candlepin::Product::ContentCreate,
|
11
|
-
|
12
|
+
repository_id: repository.id,
|
13
|
+
owner: root.organization.label,
|
12
14
|
name: root.name,
|
13
15
|
type: root.content_type,
|
14
16
|
arches: root.format_arches,
|
15
17
|
label: root.custom_content_label,
|
16
|
-
|
17
|
-
|
18
|
+
content_url: root.custom_content_path,
|
19
|
+
os_versions: root.os_versions&.join(','))
|
18
20
|
content_id = content_create.output[:response][:id]
|
19
21
|
plan_action(Candlepin::Product::ContentAdd, owner: root.product.organization.label,
|
20
22
|
product_id: root.product.cp_id,
|
21
23
|
content_id: content_id)
|
22
24
|
|
23
25
|
else
|
24
|
-
content_id =
|
26
|
+
content_id = repository.content_id
|
25
27
|
end
|
26
28
|
|
29
|
+
plan_self(root_repository_id: root.id, repository_id: repository.id, content_id: content_id)
|
30
|
+
|
27
31
|
if root.gpg_key
|
28
32
|
plan_action(Candlepin::Product::ContentUpdate,
|
29
|
-
|
30
|
-
|
31
|
-
name:
|
32
|
-
type:
|
33
|
-
arches:
|
34
|
-
label:
|
35
|
-
content_url:
|
36
|
-
gpg_key_url:
|
33
|
+
repository_id: repository.id,
|
34
|
+
owner: root.organization.label,
|
35
|
+
name: root.name,
|
36
|
+
type: root.content_type,
|
37
|
+
arches: root.format_arches,
|
38
|
+
label: root.custom_content_label,
|
39
|
+
content_url: root.custom_content_path,
|
40
|
+
gpg_key_url: root.library_instance.yum_gpg_key_url)
|
37
41
|
end
|
38
|
-
|
39
|
-
plan_self(root_repository_id: root.id, content_id: content_id)
|
40
42
|
end
|
41
43
|
end
|
42
44
|
|
43
45
|
def finalize
|
44
46
|
root = ::Katello::RootRepository.find(input[:root_repository_id])
|
45
|
-
root.
|
47
|
+
content_url = root.custom_content_path
|
48
|
+
if root.deb_using_structured_apt?
|
49
|
+
repository = ::Katello::Repository.find(input[:repository_id])
|
50
|
+
content_url += repository.deb_content_url_options
|
51
|
+
repository.update(:content_id => input[:content_id])
|
52
|
+
else
|
53
|
+
root.update(:content_id => input[:content_id])
|
54
|
+
end
|
46
55
|
|
47
|
-
content = ::Katello::Content.where(organization_id: root.product.organization_id, cp_content_id:
|
56
|
+
content = ::Katello::Content.where(organization_id: root.product.organization_id, cp_content_id: input[:content_id]).first_or_create do |new_content|
|
48
57
|
new_content.name = root.name
|
49
58
|
new_content.content_type = root.content_type
|
50
59
|
new_content.label = root.custom_content_label
|
51
|
-
new_content.content_url =
|
60
|
+
new_content.content_url = content_url
|
52
61
|
new_content.vendor = ::Katello::Provider::CUSTOM
|
53
62
|
end
|
54
63
|
|
@@ -2,22 +2,23 @@ module Actions
|
|
2
2
|
module Katello
|
3
3
|
module Product
|
4
4
|
class ContentDestroy < Actions::Base
|
5
|
-
def plan(
|
5
|
+
def plan(repository)
|
6
|
+
root_repository = repository.root
|
6
7
|
fail _("Cannot delete redhat product content") if root_repository.product.redhat?
|
7
8
|
sequence do
|
8
9
|
plan_action(Candlepin::Product::ContentRemove,
|
9
10
|
owner: root_repository.product.organization.label,
|
10
11
|
product_id: root_repository.product.cp_id,
|
11
|
-
content_id:
|
12
|
+
content_id: repository.content_id)
|
12
13
|
|
13
|
-
katello_content_id =
|
14
|
+
katello_content_id = repository.content&.id
|
14
15
|
::Katello::ProductContent.where(product_id: root_repository.product_id,
|
15
16
|
content_id: katello_content_id).destroy_all
|
16
17
|
|
17
|
-
if root_repository.repositories.count <= 1
|
18
|
+
if root_repository.repositories.count <= 1 || repository.deb_using_structured_apt?
|
18
19
|
plan_action(Candlepin::Product::ContentDestroy,
|
19
20
|
owner: root_repository.product.organization.label,
|
20
|
-
content_id:
|
21
|
+
content_id: repository.content_id)
|
21
22
|
|
22
23
|
::Katello::Content.find_by_id(katello_content_id)&.destroy!
|
23
24
|
end
|
@@ -65,7 +65,7 @@ module Actions
|
|
65
65
|
if repo.root.repositories.where.not(id: repo.id).empty? &&
|
66
66
|
!repo.redhat? &&
|
67
67
|
!skip_environment_update
|
68
|
-
plan_action(::Actions::Katello::Product::ContentDestroy, repo
|
68
|
+
plan_action(::Actions::Katello::Product::ContentDestroy, repo)
|
69
69
|
end
|
70
70
|
end
|
71
71
|
end
|
@@ -25,6 +25,20 @@ module Actions
|
|
25
25
|
|
26
26
|
index_options = {id: new_repository.id, force_index: true}
|
27
27
|
index_options[:source_repository_id] = source_repositories.first.id if source_repositories.count == 1 && filters.empty? && rpm_filenames.nil?
|
28
|
+
|
29
|
+
if new_repository.deb_using_structured_apt? && generate_metadata
|
30
|
+
plan_action(Candlepin::Product::ContentUpdate,
|
31
|
+
owner: new_repository.organization.label,
|
32
|
+
repository_id: new_repository.id,
|
33
|
+
name: new_repository.root.name,
|
34
|
+
type: new_repository.root.content_type,
|
35
|
+
arches: new_repository.root.format_arches,
|
36
|
+
label: new_repository.root.custom_content_label,
|
37
|
+
content_url: new_repository.root.custom_content_path,
|
38
|
+
gpg_key_url: new_repository.yum_gpg_key_url,
|
39
|
+
metadata_expire: new_repository.root.metadata_expire)
|
40
|
+
end
|
41
|
+
|
28
42
|
plan_action(Katello::Repository::IndexContent, index_options)
|
29
43
|
end
|
30
44
|
end
|
@@ -2,41 +2,38 @@ module Actions
|
|
2
2
|
module Katello
|
3
3
|
module Repository
|
4
4
|
class Create < Actions::EntryAction
|
5
|
-
# rubocop:disable Metrics/MethodLength, Metrics/CyclomaticComplexity
|
5
|
+
# rubocop:disable Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
6
6
|
def plan(repository, args = {})
|
7
7
|
clone = args[:clone] || false
|
8
8
|
force_repo_create = args[:force_repo_create] || false
|
9
9
|
repository.save!
|
10
|
-
root = repository.root
|
11
10
|
|
12
11
|
action_subject(repository)
|
13
12
|
|
14
|
-
org = repository.organization
|
15
13
|
sequence do
|
16
14
|
# Container push repositories will already be in pulp. The version_href is
|
17
15
|
# directly updated after a push.
|
18
|
-
unless root.is_container_push && repository.in_default_view?
|
16
|
+
unless repository.root.is_container_push && repository.in_default_view?
|
19
17
|
create_action = plan_action(Pulp3::Orchestration::Repository::Create,
|
20
18
|
repository, SmartProxy.pulp_primary, force_repo_create)
|
21
19
|
return if create_action.error
|
22
20
|
end
|
23
21
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
end
|
22
|
+
content_id = false
|
23
|
+
if !clone && repository.product.redhat?
|
24
|
+
content_id = repository.content_id
|
25
|
+
elsif create_content?(repository, clone)
|
26
|
+
content_create = plan_action(Katello::Product::ContentCreate, repository)
|
27
|
+
content_id = content_create.input[:content_id]
|
28
|
+
end
|
29
|
+
|
30
|
+
if !clone && content_id
|
31
|
+
view_env = repository.organization.default_content_view.content_view_environment(repository.organization.library)
|
32
|
+
plan_action(Actions::Candlepin::Environment::AddContentToEnvironment, :view_env_cp_id => view_env.cp_id, :content_id => content_id)
|
36
33
|
end
|
37
34
|
|
38
35
|
# Container push repos do not need metadata generation or ACS (they do not sync)
|
39
|
-
unless root.is_container_push && repository.in_default_view?
|
36
|
+
unless repository.root.is_container_push && repository.in_default_view?
|
40
37
|
concurrence do
|
41
38
|
plan_self(:repository_id => repository.id, :clone => clone)
|
42
39
|
if !clone && repository.url.present? && !repository.url.start_with?('uln')
|
@@ -65,6 +62,16 @@ module Actions
|
|
65
62
|
def humanized_name
|
66
63
|
_("Create")
|
67
64
|
end
|
65
|
+
|
66
|
+
def create_content?(repository, clone)
|
67
|
+
if repository.deb_using_structured_apt?
|
68
|
+
return true
|
69
|
+
elsif clone || repository.content
|
70
|
+
return false
|
71
|
+
else
|
72
|
+
return true
|
73
|
+
end
|
74
|
+
end
|
68
75
|
end
|
69
76
|
end
|
70
77
|
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Actions
|
2
|
+
module Katello
|
3
|
+
module Repository
|
4
|
+
class CreateContainerPushRoot < Actions::EntryAction
|
5
|
+
def plan(root, relative_path = nil)
|
6
|
+
repository = ::Katello::Repository.new(:environment => root.organization.library, :content_view_version => root.organization.library.default_content_view_version, :root => root)
|
7
|
+
#Container push may concurrently call root add several times before the db can update.
|
8
|
+
# If the root already exists, we can skip the creation of the root and repository.
|
9
|
+
# We acquire a lock on the product to ensure that the root is not created multiple times by different workers.
|
10
|
+
|
11
|
+
root.product.with_lock do
|
12
|
+
begin
|
13
|
+
root.save!
|
14
|
+
rescue ActiveRecord::RecordInvalid => e
|
15
|
+
if root.is_container_push && e.message.include?("Name has already been taken for this product")
|
16
|
+
Rails.logger.debug("Skipping root repository creation as container push root repository already exists: #{root.container_push_name}")
|
17
|
+
return
|
18
|
+
end
|
19
|
+
raise e
|
20
|
+
end
|
21
|
+
repository.container_repository_name = relative_path if root.docker? && root.is_container_push
|
22
|
+
repository.relative_path = relative_path || repository.custom_repo_path
|
23
|
+
begin
|
24
|
+
repository.save!
|
25
|
+
rescue ActiveRecord::RecordInvalid => e
|
26
|
+
if root.is_container_push && e.message.include?("Container Repository Name") && e.message.include?("conflicts with an existing repository")
|
27
|
+
Rails.logger.debug("Skipping repository creation as container push repository already exists: #{root.container_push_name}")
|
28
|
+
return
|
29
|
+
end
|
30
|
+
raise e
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
action_subject(repository)
|
35
|
+
plan_action(::Actions::Katello::Repository::Create, repository)
|
36
|
+
end
|
37
|
+
|
38
|
+
def humanized_name
|
39
|
+
_("Create Container Push Repository Root")
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -2,23 +2,13 @@ module Actions
|
|
2
2
|
module Katello
|
3
3
|
module Repository
|
4
4
|
class CreateRoot < Actions::EntryAction
|
5
|
-
def plan(root
|
6
|
-
|
7
|
-
root.save!
|
8
|
-
rescue ActiveRecord::RecordInvalid => e
|
9
|
-
if root.is_container_push && e.message.include?("Container Repository Name") && e.message.include?("conflicts with an existing repository")
|
10
|
-
logger.warn("Skipping repository creation as container push repository already exists: #{root.container_push_name}")
|
11
|
-
return
|
12
|
-
end
|
13
|
-
raise e
|
14
|
-
end
|
5
|
+
def plan(root)
|
6
|
+
root.save!
|
15
7
|
repository = ::Katello::Repository.new(:environment => root.organization.library,
|
16
|
-
|
17
|
-
|
18
|
-
repository.
|
19
|
-
repository.relative_path = relative_path || repository.custom_repo_path
|
8
|
+
:content_view_version => root.organization.library.default_content_view_version,
|
9
|
+
:root => root)
|
10
|
+
repository.relative_path = repository.custom_repo_path
|
20
11
|
repository.save!
|
21
|
-
|
22
12
|
action_subject(repository)
|
23
13
|
plan_action(::Actions::Katello::Repository::Create, repository)
|
24
14
|
end
|
@@ -90,9 +90,9 @@ module Actions
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def handle_custom_content(repository, remove_from_content_view_versions)
|
93
|
-
#if this is the last instance of a custom repo, destroy the content
|
94
|
-
if remove_from_content_view_versions || repository.root.repositories.where.not(id: repository.id).empty?
|
95
|
-
plan_action(::Actions::Katello::Product::ContentDestroy, repository
|
93
|
+
#if this is the last instance of a custom repo or a deb repo using structured APT, destroy the content
|
94
|
+
if remove_from_content_view_versions || repository.root.repositories.where.not(id: repository.id).empty? || repository.deb_using_structured_apt?
|
95
|
+
plan_action(::Actions::Katello::Product::ContentDestroy, repository)
|
96
96
|
end
|
97
97
|
end
|
98
98
|
|
@@ -15,6 +15,19 @@ module Actions
|
|
15
15
|
generate_metadata = options.fetch(:generate_metadata, true)
|
16
16
|
plan_action(Katello::Repository::MetadataGenerate, repository, :dependency => import_upload_task, :force_publication => true) if generate_metadata
|
17
17
|
|
18
|
+
if repository.deb_using_structured_apt? && generate_metadata
|
19
|
+
plan_action(::Actions::Candlepin::Product::ContentUpdate,
|
20
|
+
owner: repository.organization.label,
|
21
|
+
repository_id: repository.id,
|
22
|
+
name: repository.root.name,
|
23
|
+
type: repository.root.content_type,
|
24
|
+
arches: repository.root.format_arches,
|
25
|
+
label: repository.root.custom_content_label,
|
26
|
+
content_url: repository.root.custom_content_path,
|
27
|
+
gpg_key_url: repository.yum_gpg_key_url,
|
28
|
+
metadata_expire: repository.root.metadata_expire)
|
29
|
+
end
|
30
|
+
|
18
31
|
recent_range = 5.minutes.ago.utc.iso8601
|
19
32
|
plan_action(Katello::Repository::FilteredIndexContent,
|
20
33
|
id: repository.id,
|
@@ -46,6 +46,7 @@ module Actions
|
|
46
46
|
pulp_sync_options)
|
47
47
|
output = sync_action.output
|
48
48
|
|
49
|
+
update_deb_content(repo)
|
49
50
|
plan_action(Katello::Repository::IndexContent, :id => repo.id, :force_index => skip_metadata_check)
|
50
51
|
plan_action(Katello::Foreman::ContentUpdate, repo.environment, repo.content_view, repo)
|
51
52
|
plan_action(Katello::Repository::FetchPxeFiles, :id => repo.id)
|
@@ -94,6 +95,21 @@ module Actions
|
|
94
95
|
Helpers::Presenter::Delegated.new(self, found)
|
95
96
|
end
|
96
97
|
|
98
|
+
def update_deb_content(repo)
|
99
|
+
return unless repo.deb_using_structured_apt?
|
100
|
+
|
101
|
+
plan_action(::Actions::Candlepin::Product::ContentUpdate,
|
102
|
+
owner: repo.organization.label,
|
103
|
+
repository_id: repo.id,
|
104
|
+
name: repo.root.name,
|
105
|
+
type: repo.root.content_type,
|
106
|
+
arches: repo.root.format_arches,
|
107
|
+
label: repo.root.custom_content_label,
|
108
|
+
content_url: repo.root.custom_content_path,
|
109
|
+
gpg_key_url: repo.yum_gpg_key_url,
|
110
|
+
metadata_expire: repo.root.metadata_expire)
|
111
|
+
end
|
112
|
+
|
97
113
|
def rescue_strategy
|
98
114
|
Dynflow::Action::Rescue::Skip
|
99
115
|
end
|
@@ -4,7 +4,6 @@ module Actions
|
|
4
4
|
module Katello
|
5
5
|
module Repository
|
6
6
|
class Update < Actions::EntryAction
|
7
|
-
# rubocop:disable Metrics/MethodLength
|
8
7
|
def plan(root, repo_params)
|
9
8
|
repository = root.library_instance
|
10
9
|
action_subject root.library_instance
|
@@ -20,27 +19,19 @@ module Actions
|
|
20
19
|
root.update!(repo_params)
|
21
20
|
|
22
21
|
if update_content?(repository)
|
23
|
-
content = root.content
|
24
|
-
|
25
22
|
plan_action(::Actions::Candlepin::Product::ContentUpdate,
|
26
|
-
:
|
27
|
-
:
|
28
|
-
:
|
29
|
-
:
|
30
|
-
:
|
31
|
-
:
|
32
|
-
:
|
33
|
-
:
|
34
|
-
:
|
35
|
-
:
|
36
|
-
)
|
37
|
-
|
38
|
-
content.update!(name: root.name,
|
39
|
-
content_url: root.custom_content_path,
|
40
|
-
content_type: repository.content_type,
|
41
|
-
label: content.label,
|
42
|
-
gpg_url: repository.yum_gpg_key_url)
|
23
|
+
owner: repository.organization.label,
|
24
|
+
repository_id: repository.id,
|
25
|
+
name: root.name,
|
26
|
+
type: root.content_type,
|
27
|
+
arches: root.format_arches,
|
28
|
+
label: repository.content.label,
|
29
|
+
content_url: root.custom_content_path,
|
30
|
+
gpg_key_url: repository.yum_gpg_key_url,
|
31
|
+
os_versions: root.os_versions&.join(','),
|
32
|
+
metadata_expire: root.metadata_expire)
|
43
33
|
end
|
34
|
+
|
44
35
|
if root.pulp_update_needed?
|
45
36
|
sequence do
|
46
37
|
plan_action(::Actions::Pulp3::Orchestration::Repository::Update,
|
@@ -14,7 +14,7 @@ module Actions
|
|
14
14
|
def invoke_external_task
|
15
15
|
repo = ::Katello::Repository.find(input[:repository_id])
|
16
16
|
sync_options = {}
|
17
|
-
sync_options[:optimize] =
|
17
|
+
sync_options[:optimize] = !input[:options].fetch(:skip_metadata_check, false)
|
18
18
|
output[:pulp_tasks] = repo.backend_service(smart_proxy).with_mirror_adapter.sync(sync_options)
|
19
19
|
end
|
20
20
|
|
@@ -9,7 +9,7 @@ module Actions
|
|
9
9
|
chunk_size: nil,
|
10
10
|
from_history: nil,
|
11
11
|
fail_on_missing_content: false,
|
12
|
-
format: ::Katello::Pulp3::ContentViewVersion::Export::IMPORTABLE
|
12
|
+
format: ::Katello::Pulp3::ContentViewVersion::Export::IMPORTABLE,
|
13
13
|
}.merge(opts)
|
14
14
|
action_subject(organization)
|
15
15
|
validate_repositories_immediate!(organization) if options[:fail_on_missing_content]
|
@@ -6,7 +6,12 @@ module Actions
|
|
6
6
|
def plan(repository, smart_proxy, force = false)
|
7
7
|
sequence do
|
8
8
|
create_action = plan_action(Actions::Pulp3::Repository::Create, repository, smart_proxy, force)
|
9
|
-
|
9
|
+
if repository.deb? && repository.library_instance?
|
10
|
+
response = plan_action(Pulp3::Repository::Initialize, repository, smart_proxy)
|
11
|
+
plan_action(Actions::Pulp3::Repository::SaveVersion, repository, tasks: response.output[:pulp_tasks])
|
12
|
+
else
|
13
|
+
plan_action(Actions::Pulp3::Repository::SaveVersion, repository, repository_details: create_action.output[:response])
|
14
|
+
end
|
10
15
|
|
11
16
|
if repository.content_view.default? || !smart_proxy.pulp_primary?
|
12
17
|
plan_action(Actions::Pulp3::Repository::CreateRemote, repository, smart_proxy)
|