katello 4.0.3 → 4.1.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/hosts/host_and_hostgroup_edit.js +0 -33
- data/app/assets/stylesheets/katello/contents.scss +1 -1
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +5 -11
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +2 -9
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +10 -24
- data/app/controllers/katello/api/v2/api_controller.rb +15 -3
- data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +1 -8
- data/app/controllers/katello/api/v2/content_exports_controller.rb +1 -14
- data/app/controllers/katello/api/v2/content_imports_controller.rb +38 -15
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +22 -1
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +6 -1
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +2 -59
- data/app/controllers/katello/api/v2/content_views_controller.rb +3 -58
- data/app/controllers/katello/api/v2/host_errata_controller.rb +7 -6
- data/app/controllers/katello/api/v2/host_packages_controller.rb +4 -4
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +18 -22
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +16 -16
- data/app/controllers/katello/api/v2/organizations_controller.rb +2 -1
- data/app/controllers/katello/api/v2/package_groups_controller.rb +4 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +13 -12
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +50 -4
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +7 -1
- data/app/controllers/katello/concerns/api/api_controller.rb +10 -0
- data/app/controllers/katello/concerns/api/v2/registration_commands_controller_extensions.rb +46 -0
- data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +8 -0
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +31 -22
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +0 -8
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +1 -1
- data/app/controllers/katello/concerns/registration_commands_controller_extensions.rb +34 -0
- data/app/helpers/katello/katello_urls_helper.rb +23 -0
- data/app/lib/actions/candlepin/owner/import.rb +10 -3
- data/app/lib/actions/candlepin/product/content_update.rb +1 -1
- data/app/lib/actions/foreman/environment/destroy.rb +2 -2
- data/app/lib/actions/katello/agent_action.rb +1 -6
- data/app/lib/actions/katello/capsule_content/refresh_repos.rb +0 -7
- data/app/lib/actions/katello/capsule_content/sync.rb +1 -1
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +1 -2
- data/app/lib/actions/katello/content_view/add_to_environment.rb +9 -7
- data/app/lib/actions/katello/content_view/incremental_updates.rb +3 -10
- data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +2 -3
- data/app/lib/actions/katello/content_view/promote_to_environment.rb +1 -4
- data/app/lib/actions/katello/content_view/publish.rb +21 -31
- data/app/lib/actions/katello/content_view_environment/destroy.rb +0 -5
- data/app/lib/actions/katello/content_view_version/auto_create_products.rb +22 -0
- data/app/lib/actions/katello/content_view_version/auto_create_repositories.rb +22 -0
- data/app/lib/actions/katello/content_view_version/destroy.rb +0 -10
- data/app/lib/actions/katello/content_view_version/export.rb +20 -22
- data/app/lib/actions/katello/content_view_version/import.rb +27 -13
- data/app/lib/actions/katello/content_view_version/import_library.rb +4 -2
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +12 -67
- data/app/lib/actions/katello/content_view_version/republish_repositories.rb +0 -4
- data/app/lib/actions/katello/content_view_version/reset_content_view_repositories_from_metadata.rb +11 -0
- data/app/lib/actions/katello/foreman/content_update.rb +0 -3
- data/app/lib/actions/katello/host/auto_attach_subscriptions.rb +0 -4
- data/app/lib/actions/katello/organization/manifest_import.rb +7 -1
- data/app/lib/actions/katello/organization/manifest_refresh.rb +28 -7
- data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +2 -2
- data/app/lib/actions/katello/product/create.rb +0 -1
- data/app/lib/actions/katello/repository/check_matching_content.rb +4 -3
- data/app/lib/actions/katello/repository/destroy.rb +1 -1
- data/app/lib/actions/katello/repository/discover.rb +1 -1
- data/app/lib/actions/katello/repository/filtered_index_content.rb +1 -4
- data/app/lib/actions/katello/repository/import_upload.rb +0 -1
- data/app/lib/actions/katello/repository/update.rb +0 -1
- data/app/lib/actions/middleware/record_smart_proxy_sync_history.rb +0 -5
- data/app/lib/actions/pulp/repository/create.rb +1 -7
- data/app/lib/actions/pulp/repository/distributor_publish.rb +2 -10
- data/app/lib/actions/pulp/repository/sync.rb +1 -3
- data/app/lib/actions/pulp3/capsule_content/refresh_content_guard.rb +17 -0
- data/app/lib/actions/pulp3/content_guard/refresh.rb +10 -6
- data/app/lib/actions/pulp3/content_view_version/create_export_history.rb +57 -0
- data/app/lib/actions/pulp3/content_view_version/create_import_history.rb +34 -0
- data/app/lib/actions/pulp3/orchestration/content_view_version/copy_version_units_to_library.rb +2 -3
- data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +34 -51
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +2 -2
- data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +13 -1
- data/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/repository/sync.rb +1 -0
- data/app/lib/actions/pulp3/repository/refresh_remote.rb +17 -0
- data/app/lib/katello/agent/client_message_handler.rb +3 -11
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +117 -3
- data/app/lib/katello/errors.rb +6 -11
- data/app/lib/katello/event_daemon/monitor.rb +0 -1
- data/app/lib/katello/event_daemon/runner.rb +2 -2
- data/app/lib/katello/event_daemon/services/agent_event_receiver.rb +10 -6
- data/app/lib/katello/http_resource.rb +1 -6
- data/app/lib/katello/logging.rb +11 -6
- data/app/lib/katello/qpid/connection.rb +1 -3
- data/app/lib/katello/repo_discovery.rb +15 -1
- data/app/lib/katello/resources/candlepin/owner.rb +3 -2
- data/app/lib/katello/resources/candlepin/pool.rb +6 -2
- data/app/lib/katello/resources/candlepin.rb +10 -0
- data/app/lib/katello/util/package.rb +1 -1
- data/app/lib/katello/util/pulpcore_content_filters.rb +1 -1
- data/app/lib/katello/validators/hostgroup_kickstart_repository_validator.rb +0 -6
- data/app/models/katello/authorization/content_view.rb +8 -0
- data/app/models/katello/authorization/content_view_version_import_history.rb +11 -0
- data/app/models/katello/concerns/content_facet_host_extensions.rb +1 -1
- data/app/models/katello/concerns/content_view_filter_rule_common.rb +2 -2
- data/app/models/katello/concerns/host_managed_extensions.rb +1 -32
- data/app/models/katello/concerns/hostgroup_extensions.rb +2 -9
- data/app/models/katello/concerns/http_proxy_extensions.rb +2 -4
- data/app/models/katello/concerns/location_extensions.rb +2 -25
- data/app/models/katello/concerns/operatingsystem_extensions.rb +0 -2
- data/app/models/katello/concerns/organization_extensions.rb +4 -18
- data/app/models/katello/concerns/redhat_extensions.rb +10 -18
- data/app/models/katello/concerns/smart_proxy_extensions.rb +6 -31
- data/app/models/katello/content_view.rb +17 -113
- data/app/models/katello/content_view_component.rb +5 -0
- data/app/models/katello/content_view_docker_filter_rule.rb +1 -0
- data/app/models/katello/content_view_package_filter_rule.rb +4 -0
- data/app/models/katello/content_view_package_group_filter.rb +1 -0
- data/app/models/katello/content_view_repository.rb +4 -5
- data/app/models/katello/content_view_version.rb +9 -33
- data/app/models/katello/content_view_version_export_history.rb +18 -4
- data/app/models/katello/content_view_version_import_history.rb +42 -0
- data/app/models/katello/erratum.rb +1 -1
- data/app/models/katello/events/delete_pool.rb +19 -0
- data/app/models/katello/glue/candlepin/environment.rb +7 -0
- data/app/models/katello/glue/candlepin/owner.rb +12 -1
- data/app/models/katello/glue/candlepin/pool.rb +42 -25
- data/app/models/katello/glue/provider.rb +3 -6
- data/app/models/katello/glue/pulp/repo.rb +19 -9
- data/app/models/katello/host/content_facet.rb +1 -0
- data/app/models/katello/host/subscription_facet.rb +3 -1
- data/app/models/katello/kt_environment.rb +0 -6
- data/app/models/katello/package_group.rb +4 -0
- data/app/models/katello/ping.rb +15 -4
- data/app/models/katello/pool.rb +9 -0
- data/app/models/katello/product.rb +0 -6
- data/app/models/katello/product_content.rb +3 -1
- data/app/models/katello/pulp_sync_status.rb +0 -10
- data/app/models/katello/repository.rb +20 -35
- data/app/models/katello/root_repository.rb +0 -5
- data/app/models/katello/subscription.rb +10 -0
- data/app/models/katello/sync_plan.rb +7 -0
- data/app/models/setting/content.rb +7 -8
- data/app/presenters/katello/content_view_version_compare_presenter.rb +2 -6
- data/app/presenters/katello/product_content_presenter.rb +3 -5
- data/app/services/cert/certs.rb +3 -7
- data/app/services/katello/applicability/applicable_content_helper.rb +1 -2
- data/app/services/katello/candlepin/event_handler.rb +22 -22
- data/app/services/katello/candlepin/message_handler.rb +24 -15
- data/app/services/katello/content_view_manager.rb +24 -0
- data/app/services/katello/event_monitor/poller_thread.rb +25 -20
- data/app/services/katello/managed_content_medium_provider.rb +4 -0
- data/app/services/katello/organization_creator.rb +120 -0
- data/app/services/katello/product_content_finder.rb +5 -1
- data/app/services/katello/pulp/pulp_content_unit.rb +6 -6
- data/app/services/katello/pulp/smart_proxy_repository.rb +2 -17
- data/app/services/katello/pulp3/api/ansible_collection.rb +14 -2
- data/app/services/katello/pulp3/api/apt.rb +1 -1
- data/app/services/katello/pulp3/api/content_guard.rb +6 -40
- data/app/services/katello/pulp3/api/core.rb +27 -2
- data/app/services/katello/pulp3/api/docker.rb +1 -1
- data/app/services/katello/pulp3/api/file.rb +5 -1
- data/app/services/katello/pulp3/api/yum.rb +9 -1
- data/app/services/katello/pulp3/content_view_version/export.rb +18 -40
- data/app/services/katello/pulp3/content_view_version/import.rb +75 -30
- data/app/services/katello/pulp3/content_view_version/import_gpg_keys.rb +32 -0
- data/app/services/katello/pulp3/content_view_version/import_validator.rb +53 -21
- data/app/services/katello/pulp3/content_view_version/importable_products.rb +47 -0
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +52 -0
- data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +99 -0
- data/app/services/katello/pulp3/pulp_content_unit.rb +1 -1
- data/app/services/katello/pulp3/repository/ansible_collection.rb +5 -1
- data/app/services/katello/pulp3/repository/apt.rb +2 -1
- data/app/services/katello/pulp3/repository/yum.rb +0 -16
- data/app/services/katello/pulp3/repository.rb +20 -1
- data/app/services/katello/pulp3/rpm.rb +5 -1
- data/app/services/katello/pulp3/task.rb +12 -5
- data/app/services/katello/pulp3/task_group.rb +10 -5
- data/app/services/katello/smart_proxy_helper.rb +1 -8
- data/app/services/katello/ui_notifications/pulp/proxy_disk_space.rb +0 -1
- data/app/services/katello/ui_notifications/system_error.rb +25 -0
- data/app/views/katello/api/v2/content_view_components/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_filters/show.json.rabl +0 -1
- data/app/views/katello/api/v2/{puppet_modules → content_view_version_import_histories}/index.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_version_import_histories/show.json.rabl +14 -0
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +2 -2
- data/app/views/katello/api/v2/content_view_versions/show.json.rabl +0 -7
- data/app/views/katello/api/v2/content_views/base.json.rabl +20 -9
- data/app/views/katello/api/v2/environments/show.json.rabl +0 -1
- data/app/views/katello/api/v2/package_groups/index.json.rabl +4 -0
- data/app/views/katello/api/v2/repositories/base.json.rabl +0 -1
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repository_sets/index.json.rabl +4 -1
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +22 -0
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +1 -1
- data/app/views/overrides/activation_keys/_host_media_type_select.html.erb +1 -1
- data/app/views/overrides/smart_proxies/_download_policy.erb +1 -1
- data/config/initializers/monkeys.rb +0 -1
- data/config/katello.yaml.example +0 -1
- data/config/routes/api/v2.rb +9 -21
- data/config/routes/overrides.rb +1 -2
- data/db/migrate/20140422000001_update_products_add_organization.rb +3 -2
- data/db/migrate/20160701180402_add_sortable_version_to_puppet_modules.rb +2 -0
- data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +1 -1
- data/db/migrate/20210119162528_delete_puppet_and_ostree_repos.rb +14 -20
- data/db/migrate/20210224160921_remove_disabled_products_from_sync_plans.rb +6 -0
- data/db/migrate/20210302165636_remove_katello_puppet_modules.rb +62 -0
- data/db/migrate/20210309160925_create_katello_content_view_version_import_histories.rb +13 -0
- data/db/migrate/20210318204533_add_import_type_to_import_histories.rb +8 -0
- data/db/migrate/20210319123300_add_foreign_keys_to_import_export_histories.rb +6 -0
- data/db/migrate/20210322142311_add_auth_url_token_to_root_repositories.rb +6 -0
- data/db/migrate/20210331180353_katello_pool_organization_id_not_nullable.rb +16 -0
- data/db/migrate/20210409033915_add_created_in_katello_to_taxonomy.rb +9 -0
- data/db/seeds.d/101-locations.rb +0 -3
- data/db/seeds.d/102-organizations.rb +1 -5
- data/db/seeds.d/109-katello-notification-blueprints.rb +12 -0
- data/db/seeds.d/111-upgrade_tasks.rb +3 -2
- data/engines/bastion/vendor/assets/javascripts/bastion/angular/angular.js +325 -156
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-animate/angular-animate.js +3 -3
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-resource/angular-resource.js +3 -3
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-route/angular-route.js +3 -3
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-sanitize/angular-sanitize.js +21 -43
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +9 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-repository-sets.html +2 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +11 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +18 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html +10 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-actions.controller.js +5 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js +7 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +7 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +7 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +14 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js +0 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-repository-sets.controller.js +9 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-repository-sets.html +2 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +3 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-view.factory.js +0 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +0 -56
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-available-content-views.html +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-content-views-list.html +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +2 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-info.html +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +2 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +0 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/content.service.js +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js +0 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/environments.html +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +21 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +71 -311
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +0 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +13 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +21 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repositories.routes.js +0 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +0 -6
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +3 -3
- data/lib/katello/engine.rb +16 -15
- data/lib/katello/middleware/organization_created_enforcer.rb +22 -0
- data/lib/katello/permission_creator.rb +12 -28
- data/lib/katello/permissions/host_permissions.rb +3 -2
- data/lib/katello/plugin.rb +6 -19
- data/lib/katello/repository_types/ansible_collection.rb +1 -1
- data/lib/katello/repository_types/deb.rb +1 -1
- data/lib/katello/repository_types/docker.rb +1 -1
- data/lib/katello/repository_types/file.rb +1 -1
- data/lib/katello/repository_types/yum.rb +1 -1
- data/lib/katello/tasks/clean_backend_objects.rake +25 -0
- data/lib/katello/tasks/jenkins.rake +6 -0
- data/lib/katello/tasks/receptor/extract_orgs.rake +1 -3
- data/lib/katello/tasks/reimport.rake +0 -1
- data/lib/katello/tasks/repository.rake +0 -30
- data/lib/katello/tasks/update_subscription_facet_backend_data.rake +3 -3
- data/lib/katello/tasks/upgrades/4.0/remove_ostree_puppet_content.rake +2 -4
- data/lib/katello/tasks/upgrades/4.1/fix_invalid_pools.rake +62 -0
- data/lib/katello/tasks/upgrades/4.1/sync_noarch_content.rake +15 -0
- data/lib/katello/version.rb +1 -1
- data/lib/katello.rb +1 -1
- data/locale/action_names.rb +65 -63
- data/locale/bn/katello.edit.po +1357 -1606
- data/locale/bn/katello.po +465 -744
- data/locale/cs/katello.edit.po +1213 -1087
- data/locale/cs/katello.po +307 -219
- data/locale/de/katello.edit.po +1498 -1520
- data/locale/de/katello.po +589 -625
- data/locale/en/katello.edit.po +1198 -1074
- data/locale/en/katello.po +304 -213
- data/locale/es/katello.edit.po +2344 -2304
- data/locale/es/katello.po +1407 -1407
- data/locale/fr/katello.edit.po +2720 -2642
- data/locale/fr/katello.po +1703 -1750
- data/locale/gu/katello.edit.po +1546 -1797
- data/locale/gu/katello.po +654 -935
- data/locale/hi/katello.edit.po +1545 -1793
- data/locale/hi/katello.po +653 -931
- data/locale/it/katello.edit.po +1323 -1310
- data/locale/it/katello.po +407 -409
- data/locale/ja/katello.edit.po +2645 -2557
- data/locale/ja/katello.po +1646 -1664
- data/locale/katello.pot +1435 -1289
- data/locale/kn/katello.edit.po +1546 -1795
- data/locale/kn/katello.po +654 -933
- data/locale/ko/katello.edit.po +1464 -1449
- data/locale/ko/katello.po +554 -554
- data/locale/mr/katello.edit.po +1545 -1758
- data/locale/mr/katello.po +653 -896
- data/locale/or/katello.edit.po +1546 -1795
- data/locale/or/katello.po +654 -933
- data/locale/pa/katello.edit.po +1541 -1775
- data/locale/pa/katello.po +649 -913
- data/locale/pt/katello.edit.po +1289 -1255
- data/locale/pt/katello.po +398 -394
- data/locale/pt_BR/katello.edit.po +2370 -2315
- data/locale/pt_BR/katello.po +1435 -1421
- data/locale/ru/katello.edit.po +1611 -1608
- data/locale/ru/katello.po +704 -716
- data/locale/ta/katello.edit.po +1358 -1605
- data/locale/ta/katello.po +465 -742
- data/locale/te/katello.edit.po +1545 -1792
- data/locale/te/katello.po +653 -930
- data/locale/zh_CN/katello.edit.po +3052 -2930
- data/locale/zh_CN/katello.po +2055 -2039
- data/locale/zh_TW/katello.edit.po +1571 -1669
- data/locale/zh_TW/katello.po +649 -777
- data/package.json +2 -2
- data/webpack/{scenes/ContentViews/Details/Repositories/RepoAddedStatus.js → components/AddedStatusLabel.js} +5 -5
- data/webpack/components/RoutedTabs/RoutedTabs.js +91 -0
- data/webpack/components/RoutedTabs/__tests__/RoutedTabs.test.js +32 -0
- data/webpack/components/RoutedTabs/index.js +4 -0
- data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageConstants.js +2 -0
- data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js +21 -0
- data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageSelectors.js +21 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/ActivationKeys.test.js +18 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/Force.test.js +9 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/IgnoreSubmanErrors.test.js +9 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/LifeCycleEnvironment.test.js +11 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/ActivationKeys.test.js.snap +58 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/Force.test.js.snap +25 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/IgnoreSubmanErrors.test.js.snap +25 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/LifeCycleEnvironment.test.js.snap +27 -0
- data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +99 -0
- data/webpack/components/extensions/RegistrationCommands/fields/Force.js +38 -0
- data/webpack/components/extensions/RegistrationCommands/fields/IgnoreSubmanErrors.js +38 -0
- data/webpack/components/extensions/RegistrationCommands/fields/LifecycleEnvironment.js +56 -0
- data/webpack/components/extensions/RegistrationCommands/index.js +81 -0
- data/webpack/components/pf3Table/formatters/EntitlementsInlineEditFormatter.js +23 -24
- data/webpack/components/pf3Table/formatters/__tests__/__snapshots__/EntitlementsInlineEditFormatter.test.js.snap +3 -1
- data/webpack/components/pf3Table/formatters/entitlementsValueFormatter.js +16 -0
- data/webpack/containers/Application/overrides.scss +3 -0
- data/webpack/fills_index.js +3 -0
- data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +0 -2
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +8 -1
- data/webpack/scenes/ContentViews/Copy/__tests__/contentViewCopyResult.fixtures.json +1 -3
- data/webpack/scenes/ContentViews/Create/__tests__/contentViewCreateResult.fixtures.json +1 -3
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentEnvironments.js +28 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentVersion.js +45 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +124 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.fixtures.json +161 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +163 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/unpublishedCVComponents.fixtures.json +64 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +67 -7
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +61 -4
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +34 -11
- data/webpack/scenes/ContentViews/Details/Filters/CVFilterDetailType.js +33 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +117 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +115 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentType.js +7 -10
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetails.js +49 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +56 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +3 -17
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +116 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/allFilterPackageGroups.fixtures.json +69 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetail.fixtures.json +103 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +116 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterDetail.fixtures.json +147 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterRules.fixtures.json +30 -0
- data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +136 -0
- data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.fixtures.json +370 -0
- data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +94 -0
- data/webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js +0 -1
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +106 -13
- data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +11 -5
- data/webpack/scenes/ContentViews/Details/Repositories/RepoIcon.js +5 -1
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +138 -0
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +0 -2
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewRepoAdd.fixture.json +57 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +73 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionEnvironments.js +31 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.js +64 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.scss +8 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionPackages.js +0 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +105 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +728 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +154 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/emptyCVVersion.fixtures.json +13 -0
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +3 -1
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetails.fixtures.json +0 -2
- data/webpack/scenes/ContentViews/Table/ContentViewVersionCell.js +33 -0
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +17 -22
- data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +51 -102
- data/webpack/scenes/ContentViews/__tests__/basicContentViews.fixtures.js +5 -3
- data/webpack/scenes/ContentViews/__tests__/contentViewList.fixtures.json +30 -5
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +95 -0
- data/webpack/scenes/ContentViews/components/ContentViewIcon.js +11 -5
- data/webpack/scenes/ContentViews/components/EnvironmentLabels.js +16 -0
- data/webpack/scenes/ContentViews/components/IconWithCount.js +1 -1
- data/webpack/scenes/ContentViews/components/InactiveText.js +15 -0
- data/webpack/scenes/ContentViews/expansions/DetailsExpansion.js +19 -1
- data/webpack/scenes/Subscriptions/Details/SubscriptionPurposeAttributes.js +1 -1
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailInfo.test.js.snap +1 -1
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +3 -3
- data/webpack/scenes/Subscriptions/Details/__tests__/subscriptionDetails.fixtures.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +17 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +2 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +144 -0
- data/webpack/scenes/Tasks/helpers.js +2 -2
- data/webpack/test-utils/react-testing-lib-wrapper.js +11 -3
- data/webpack/utils/__tests__/useParamsWithHash.test.js +22 -0
- data/webpack/utils/helpers.js +2 -0
- data/webpack/utils/paramsFromHash.js +16 -0
- data/webpack/utils/useUrlParams.js +14 -0
- metadata +122 -206
- data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +0 -82
- data/app/controllers/katello/api/v2/puppet_modules_controller.rb +0 -19
- data/app/controllers/katello/concerns/registration_controller_extensions.rb +0 -16
- data/app/helpers/katello/concerns/hosts_and_hostgroups_helper_extensions.rb +0 -20
- data/app/lib/actions/candlepin/owner/create.rb +0 -16
- data/app/lib/actions/katello/content_view_puppet_environment/clear.rb +0 -11
- data/app/lib/actions/katello/content_view_puppet_environment/clone.rb +0 -78
- data/app/lib/actions/katello/content_view_puppet_environment/clone_content_for_version.rb +0 -20
- data/app/lib/actions/katello/content_view_puppet_environment/create.rb +0 -34
- data/app/lib/actions/katello/content_view_puppet_environment/create_for_version.rb +0 -23
- data/app/lib/actions/katello/content_view_puppet_environment/destroy.rb +0 -28
- data/app/lib/actions/katello/content_view_puppet_module/destroy.rb +0 -46
- data/app/lib/actions/katello/environment/library_create.rb +0 -35
- data/app/lib/actions/katello/organization/create.rb +0 -38
- data/app/lib/actions/pulp/content_view_puppet_environment/copy_contents.rb +0 -36
- data/app/lib/actions/pulp/content_view_puppet_environment/index_content.rb +0 -19
- data/app/lib/actions/pulp/repository/presenters/puppet_presenter.rb +0 -54
- data/app/lib/actions/pulp3/content_migration.rb +0 -31
- data/app/lib/actions/pulp3/content_migration_presenter.rb +0 -59
- data/app/lib/actions/pulp3/content_migration_reset.rb +0 -22
- data/app/lib/katello/foreman.rb +0 -32
- data/app/lib/katello/mapping.rb +0 -31
- data/app/lib/katello/util/hostgroup_facets_helper.rb +0 -126
- data/app/lib/katello/validators/content_view_puppet_module_validator.rb +0 -32
- data/app/models/katello/concerns/environment_extensions.rb +0 -74
- data/app/models/katello/content_view_puppet_environment.rb +0 -116
- data/app/models/katello/content_view_puppet_environment_puppet_module.rb +0 -11
- data/app/models/katello/content_view_puppet_module.rb +0 -63
- data/app/models/katello/puppet_module.rb +0 -77
- data/app/models/katello/repository_puppet_module.rb +0 -7
- data/app/services/katello/pulp/puppet_module.rb +0 -21
- data/app/services/katello/pulp/repository/puppet.rb +0 -68
- data/app/services/katello/pulp3/migration.rb +0 -329
- data/app/services/katello/pulp3/migration_plan.rb +0 -178
- data/app/services/katello/pulp3/migration_switchover.rb +0 -126
- data/app/services/katello/puppet_class_importer_extensions.rb +0 -32
- data/app/views/foreman/hosts/_registration.html.erb +0 -12
- data/app/views/katello/api/v2/activation_keys/product_content.json.rabl +0 -30
- data/app/views/katello/api/v2/content_view_puppet_modules/create.json.rabl +0 -3
- data/app/views/katello/api/v2/content_view_puppet_modules/index.json.rabl +0 -7
- data/app/views/katello/api/v2/content_view_puppet_modules/show.json.rabl +0 -9
- data/app/views/katello/api/v2/content_views/puppet_modules.json.rabl +0 -7
- data/app/views/katello/api/v2/host_subscriptions/content_override.json.rabl +0 -3
- data/app/views/katello/api/v2/host_subscriptions/product_content.json.rabl +0 -29
- data/app/views/katello/api/v2/puppet_modules/backend.json.rabl +0 -7
- data/app/views/katello/api/v2/puppet_modules/base.json.rabl +0 -9
- data/app/views/katello/api/v2/puppet_modules/compare.json.rabl +0 -10
- data/app/views/katello/api/v2/puppet_modules/name.json.rabl +0 -3
- data/app/views/katello/api/v2/puppet_modules/names.json.rabl +0 -7
- data/app/views/katello/api/v2/puppet_modules/show.json.rabl +0 -4
- data/db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb +0 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register-client.directive.js +0 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register-os-client.directive.js +0 -17
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register.controller.js +0 -44
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html +0 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-deb-client.html +0 -38
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-oracle-client.html +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-sles-client.html +0 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-puppet-modules.controller.js +0 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-names.controller.js +0 -45
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-versions.controller.js +0 -61
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module.factory.js +0 -23
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-modules.controller.js +0 -74
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-names.html +0 -57
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-versions.html +0 -64
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-modules.html +0 -54
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-puppet-modules.html +0 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-puppet-modules.html +0 -25
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +0 -6903
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +0 -7094
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +0 -7303
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +0 -6895
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +0 -6865
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +0 -6720
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +0 -7077
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +0 -6832
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +0 -6766
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +0 -6703
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-puppet-modules.html +0 -66
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-content-views.controller.js +0 -44
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-repositories.controller.js +0 -36
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module.controller.js +0 -34
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-content-views.html +0 -41
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-info.html +0 -32
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-repositories.html +0 -52
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module.html +0 -37
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-module.factory.js +0 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.controller.js +0 -35
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.module.js +0 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.routes.js +0 -71
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/views/puppet-modules.html +0 -47
- data/lib/katello/repository_types/puppet.rb +0 -5
- data/lib/katello/tasks/fix_hostgroup_facets.rake +0 -8
- data/lib/katello/tasks/pulp3_content_switchover.rake +0 -32
- data/lib/katello/tasks/pulp3_migration.rake +0 -41
- data/lib/katello/tasks/pulp3_migration_abort.rake +0 -22
- data/lib/katello/tasks/pulp3_migration_reset.rake +0 -26
- data/lib/katello/tasks/pulp3_migration_stats.rake +0 -41
- data/lib/katello/tasks/pulp3_post_migration_check.rake +0 -51
- data/lib/monkeys/passenger_tee_input.rb +0 -20
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/webpack/components/TabWrapper/TabWrapper.js +0 -26
- data/webpack/components/TabWrapper/index.js +0 -3
- data/webpack/components/TabbedView/TabbedView.js +0 -38
- data/webpack/components/TabbedView/TabbedView.scss +0 -3
- data/webpack/components/TabbedView/index.js +0 -3
- data/webpack/scenes/ContentViews/expansions/EnvironmentsExpansion.js +0 -19
- data/webpack/scenes/ContentViews/expansions/VersionsExpansion.js +0 -11
@@ -3,6 +3,7 @@ module Katello
|
|
3
3
|
module ContentViewVersion
|
4
4
|
class Export
|
5
5
|
include ImportExportCommon
|
6
|
+
attr_reader :smart_proxy, :content_view_version, :destination_server, :from_content_view_version
|
6
7
|
|
7
8
|
def initialize(smart_proxy:,
|
8
9
|
content_view_version: nil,
|
@@ -23,21 +24,21 @@ module Katello
|
|
23
24
|
end
|
24
25
|
|
25
26
|
def repositories(fetch_all: false)
|
26
|
-
repos = if
|
27
|
-
|
27
|
+
repos = if content_view_version.default?
|
28
|
+
content_view_version.repositories.exportable
|
28
29
|
else
|
29
|
-
|
30
|
+
content_view_version.archived_repos.exportable
|
30
31
|
end
|
31
32
|
if fetch_all
|
32
33
|
repos
|
33
34
|
else
|
34
|
-
repos.
|
35
|
+
repos.immediate_or_none
|
35
36
|
end
|
36
37
|
end
|
37
38
|
|
38
39
|
def generate_exporter_path
|
39
|
-
export_path = "#{
|
40
|
-
"#{
|
40
|
+
export_path = "#{content_view_version.content_view}/#{content_view_version.version}/#{destination_server}/#{date_dir}".gsub(/\s/, '_')
|
41
|
+
"#{content_view_version.organization.label}/#{export_path}"
|
41
42
|
end
|
42
43
|
|
43
44
|
def date_dir
|
@@ -53,8 +54,8 @@ module Katello
|
|
53
54
|
def create_export(exporter_href, chunk_size: nil)
|
54
55
|
options = { versions: version_hrefs }
|
55
56
|
options[:chunk_size] = "#{chunk_size}MB" if chunk_size
|
56
|
-
if
|
57
|
-
from_exporter = Export.new(smart_proxy:
|
57
|
+
if from_content_view_version
|
58
|
+
from_exporter = Export.new(smart_proxy: smart_proxy, content_view_version: from_content_view_version)
|
58
59
|
start_versions = from_exporter.version_hrefs
|
59
60
|
|
60
61
|
# current_cvv - cvv_from , i.e. repos in current cvv that are not in from
|
@@ -92,7 +93,7 @@ module Katello
|
|
92
93
|
|
93
94
|
def validate!(fail_on_missing_content: true, validate_incremental: true)
|
94
95
|
validate_repositories_immediate! if fail_on_missing_content
|
95
|
-
validate_incremental_export! if validate_incremental &&
|
96
|
+
validate_incremental_export! if validate_incremental && !from_content_view_version.blank?
|
96
97
|
end
|
97
98
|
|
98
99
|
def validate_repositories_immediate!
|
@@ -102,14 +103,14 @@ module Katello
|
|
102
103
|
" it contains repositories without the 'immediate' download policy."\
|
103
104
|
" Update the download policy and sync affected repositories. Once synced republish the content view"\
|
104
105
|
" and export the generated version. \n %{repos}" %
|
105
|
-
{ content_view:
|
106
|
-
current:
|
106
|
+
{ content_view: content_view_version.content_view.name,
|
107
|
+
current: content_view_version.version,
|
107
108
|
repos: self.class.generate_product_repo_strings(repositories: non_immediate_repos)})
|
108
109
|
end
|
109
110
|
end
|
110
111
|
|
111
112
|
def validate_incremental_export!
|
112
|
-
from_exporter = Export.new(smart_proxy:
|
113
|
+
from_exporter = Export.new(smart_proxy: smart_proxy, content_view_version: from_content_view_version)
|
113
114
|
|
114
115
|
from_exporter_repos = generate_repo_mapping(from_exporter.repositories(fetch_all: true))
|
115
116
|
to_exporter_repos = generate_repo_mapping(repositories(fetch_all: true))
|
@@ -120,9 +121,9 @@ module Katello
|
|
120
121
|
|
121
122
|
if invalid_repos_exist
|
122
123
|
fail _("The exported Content View Version '%{content_view} %{current}' cannot be incrementally updated from version '%{from}'."\
|
123
|
-
" Please do a full export." % { content_view:
|
124
|
-
current:
|
125
|
-
from:
|
124
|
+
" Please do a full export." % { content_view: content_view_version.content_view.name,
|
125
|
+
current: content_view_version.version,
|
126
|
+
from: from_content_view_version.version})
|
126
127
|
end
|
127
128
|
end
|
128
129
|
|
@@ -137,36 +138,13 @@ module Katello
|
|
137
138
|
end
|
138
139
|
|
139
140
|
def generate_metadata
|
140
|
-
|
141
|
-
repository_mapping: {},
|
142
|
-
content_view: @content_view_version.content_view.name,
|
143
|
-
content_view_version: @content_view_version.slice(:major, :minor),
|
144
|
-
incremental: @from_content_view_version.present?
|
145
|
-
}
|
146
|
-
|
147
|
-
unless @from_content_view_version.blank?
|
148
|
-
ret[:from_content_view_version] = {
|
149
|
-
major: @from_content_view_version.major,
|
150
|
-
minor: @from_content_view_version.minor
|
151
|
-
}
|
152
|
-
end
|
153
|
-
|
154
|
-
repositories.each do |repo|
|
155
|
-
next if repo.version_href.blank?
|
156
|
-
pulp3_repo = fetch_repository_info(repo.version_href).name
|
157
|
-
ret[:repository_mapping][pulp3_repo] = {
|
158
|
-
repository: repo.root.name,
|
159
|
-
product: repo.root.product.name,
|
160
|
-
redhat: repo.redhat?
|
161
|
-
}
|
162
|
-
end
|
163
|
-
ret
|
141
|
+
MetadataGenerator.new(export_service: self).generate!
|
164
142
|
end
|
165
143
|
|
166
144
|
def self.find_library_export_view(create_by_default: false,
|
167
145
|
destination_server:,
|
168
146
|
organization:)
|
169
|
-
name =
|
147
|
+
name = ::Katello::ContentView::EXPORT_LIBRARY
|
170
148
|
name += "-#{destination_server}" unless destination_server.blank?
|
171
149
|
select_method = create_by_default ? :first_or_create : :first
|
172
150
|
::Katello::ContentView.where(name: name, organization: organization).send(select_method)
|
@@ -13,10 +13,10 @@ module Katello
|
|
13
13
|
|
14
14
|
def repository_mapping
|
15
15
|
mapping = {}
|
16
|
-
@metadata[:
|
16
|
+
@metadata[:repositories].each do |key, value|
|
17
17
|
repo = @content_view_version.importable_repositories.joins(:root, :product).
|
18
|
-
where("#{::Katello::Product.table_name}" => {:
|
19
|
-
"#{::Katello::RootRepository.table_name}" => {:
|
18
|
+
where("#{::Katello::Product.table_name}" => {:label => value[:product][:label]},
|
19
|
+
"#{::Katello::RootRepository.table_name}" => {:label => value[:label]}).first
|
20
20
|
next unless repo&.version_href
|
21
21
|
repo_info = fetch_repository_info(repo.version_href)
|
22
22
|
mapping[key] = repo_info.name
|
@@ -43,8 +43,59 @@ module Katello
|
|
43
43
|
api.importer_api.delete(importer_href)
|
44
44
|
end
|
45
45
|
|
46
|
-
def self.check!(content_view:, metadata:, path:)
|
47
|
-
ImportValidator.new(
|
46
|
+
def self.check!(content_view:, metadata:, path:, smart_proxy:)
|
47
|
+
ImportValidator.new(smart_proxy: smart_proxy,
|
48
|
+
content_view: content_view,
|
49
|
+
metadata: metadata,
|
50
|
+
path: path).check!
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.create_or_update_gpg!(organization:, params:)
|
54
|
+
return if params.blank?
|
55
|
+
gpg = organization.gpg_keys.find_by(:name => params[:name])
|
56
|
+
if gpg
|
57
|
+
gpg.update!(params.except(:name))
|
58
|
+
else
|
59
|
+
gpg = organization.gpg_keys.create!(params)
|
60
|
+
end
|
61
|
+
gpg
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.metadata_map(metadata, product_only: false, custom_only: false)
|
65
|
+
# Create a map that looks like -> {[product, repo]: {name: 'Foo Repo', label:.....}}
|
66
|
+
# these values should be curated from the metadata.
|
67
|
+
metadata_map = {}
|
68
|
+
metadata[:repositories].values.each do |repo|
|
69
|
+
next if custom_only && repo[:redhat]
|
70
|
+
if product_only
|
71
|
+
metadata_map[repo[:product][:label]] = repo[:product]
|
72
|
+
else
|
73
|
+
metadata_map[[repo[:product][:label], repo[:label]]] = repo
|
74
|
+
end
|
75
|
+
end
|
76
|
+
metadata_map
|
77
|
+
end
|
78
|
+
|
79
|
+
def self.intersecting_repos_library_and_metadata(organization:, metadata:)
|
80
|
+
# Returns repositories in library that are part of the metadata
|
81
|
+
# In other words if metadata had repos {label:foo, product: bar}
|
82
|
+
# this would match it to the repo with the label foo and product bar
|
83
|
+
# in the library.
|
84
|
+
queries = metadata_map(metadata).keys.map do |product_label, repo_label|
|
85
|
+
repositories_in_library(organization).
|
86
|
+
where("#{Katello::Product.table_name}.label": product_label,
|
87
|
+
"#{Katello::RootRepository.table_name}.label": repo_label)
|
88
|
+
end
|
89
|
+
queries.inject(&:or)
|
90
|
+
end
|
91
|
+
|
92
|
+
def self.repositories_in_library(organization)
|
93
|
+
Katello::Repository.
|
94
|
+
in_default_view.
|
95
|
+
exportable.
|
96
|
+
joins(:product => :provider, :content_view_version => :content_view).
|
97
|
+
joins(:root).
|
98
|
+
where("#{::Katello::ContentView.table_name}.organization_id": organization)
|
48
99
|
end
|
49
100
|
|
50
101
|
def self.reset_content_view_repositories_from_metadata!(content_view:, metadata:)
|
@@ -56,35 +107,29 @@ module Katello
|
|
56
107
|
# 3) Adds the repositories matched from the dump
|
57
108
|
# The main intent of this method is to assume that the user intends for the
|
58
109
|
# content view to exaclty look like what is specified in metadata
|
110
|
+
repo_ids = intersecting_repos_library_and_metadata(organization: content_view.organization,
|
111
|
+
metadata: metadata).
|
112
|
+
pluck("#{Katello::Repository.table_name}.id")
|
113
|
+
content_view.update!(repository_ids: repo_ids)
|
114
|
+
end
|
59
115
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
pluck("#{::Katello::Repository.table_name}.id",
|
67
|
-
"#{::Katello::RootRepository.table_name}.name",
|
68
|
-
"#{::Katello::Product.table_name}.name",
|
69
|
-
"#{::Katello::Provider.table_name}.provider_type"
|
70
|
-
)
|
71
|
-
repos_in_library_map = {}
|
72
|
-
# repos_in_library_map is going to look like {['repo1', 'product1', false] => 100, ['repo1', 'product1', true] => 200 }
|
73
|
-
repos_in_library.each do |id, repo, product, provider_type|
|
74
|
-
repos_in_library_map[[repo, product, provider_type == Katello::Provider::REDHAT]] = id
|
116
|
+
def self.find_or_create_import_view(organization:, metadata:, library: false)
|
117
|
+
if library
|
118
|
+
metadata = { name: ::Katello::ContentView::IMPORT_LIBRARY,
|
119
|
+
label: ::Katello::ContentView::IMPORT_LIBRARY,
|
120
|
+
description: "Content View used for importing library"
|
121
|
+
}
|
75
122
|
end
|
76
123
|
|
77
|
-
|
78
|
-
|
124
|
+
cv = ::Katello::ContentView.find_by(label: metadata[:label],
|
125
|
+
organization: organization,
|
126
|
+
import_only: true)
|
127
|
+
if cv.blank?
|
128
|
+
::Katello::ContentView.create!(metadata.merge(organization: organization, import_only: true))
|
129
|
+
else
|
130
|
+
cv.update!(description: cv_metadata[:description]) if cv.description != metadata[:description]
|
131
|
+
cv
|
79
132
|
end
|
80
|
-
content_view.update!(repository_ids: repo_ids)
|
81
|
-
end
|
82
|
-
|
83
|
-
def self.find_or_create_library_import_view(organization)
|
84
|
-
name = ::Katello::ContentView::IMPORT_LIBRARY
|
85
|
-
::Katello::ContentView.where(name: name,
|
86
|
-
organization: organization,
|
87
|
-
import_only: true).first_or_create
|
88
133
|
end
|
89
134
|
end
|
90
135
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Katello
|
2
|
+
module Pulp3
|
3
|
+
module ContentViewVersion
|
4
|
+
class ImportGpgKeys
|
5
|
+
attr_accessor :organization, :metadata
|
6
|
+
|
7
|
+
def initialize(organization:, metadata:)
|
8
|
+
self.organization = organization
|
9
|
+
self.metadata = metadata
|
10
|
+
end
|
11
|
+
|
12
|
+
def create_or_update_gpg!(params)
|
13
|
+
return if params.blank?
|
14
|
+
gpg = organization.gpg_keys.find_by(:name => params[:name])
|
15
|
+
if gpg
|
16
|
+
gpg.update!(params.except(:name))
|
17
|
+
else
|
18
|
+
gpg = organization.gpg_keys.create!(params)
|
19
|
+
end
|
20
|
+
gpg
|
21
|
+
end
|
22
|
+
|
23
|
+
def import!
|
24
|
+
return if metadata[:gpg_keys].blank?
|
25
|
+
metadata[:gpg_keys].values.each do |gpg|
|
26
|
+
create_or_update_gpg!(gpg)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -2,19 +2,33 @@ module Katello
|
|
2
2
|
module Pulp3
|
3
3
|
module ContentViewVersion
|
4
4
|
class ImportValidator
|
5
|
-
attr_accessor :metadata, :path, :content_view
|
6
|
-
|
5
|
+
attr_accessor :metadata, :path, :content_view, :smart_proxy
|
6
|
+
|
7
|
+
delegate :organization, :to => :content_view
|
8
|
+
|
9
|
+
def initialize(content_view:, path:, metadata:, smart_proxy:)
|
7
10
|
self.content_view = content_view
|
8
11
|
self.path = path
|
9
12
|
self.metadata = metadata
|
13
|
+
self.smart_proxy = smart_proxy
|
10
14
|
end
|
11
15
|
|
12
16
|
def check!
|
17
|
+
ensure_pulp_importable!
|
13
18
|
unless content_view.default?
|
14
19
|
ensure_importing_cvv_does_not_exist!
|
15
20
|
ensure_from_cvv_exists!
|
16
21
|
end
|
17
|
-
|
22
|
+
ensure_metadata_matches_repos_in_library!
|
23
|
+
ensure_redhat_repositories_metadata_are_in_the_library!
|
24
|
+
end
|
25
|
+
|
26
|
+
def ensure_pulp_importable!
|
27
|
+
api = ::Katello::Pulp3::Api::Core.new(@smart_proxy).importer_check_api
|
28
|
+
response = api.pulp_import_check_post(toc: "#{@path}/#{@metadata[:toc]}")
|
29
|
+
unless response.toc.is_valid
|
30
|
+
fail response.toc.messages.join("\n")
|
31
|
+
end
|
18
32
|
end
|
19
33
|
|
20
34
|
def ensure_importing_cvv_does_not_exist!
|
@@ -43,21 +57,42 @@ module Katello
|
|
43
57
|
end
|
44
58
|
end
|
45
59
|
|
46
|
-
def
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
"#{::Katello::RootRepository.table_name}.name",
|
55
|
-
"#{::Katello::Provider.table_name}.provider_type"
|
56
|
-
)
|
60
|
+
def repos_in_library
|
61
|
+
::Katello::Pulp3::ContentViewVersion::Import.
|
62
|
+
repositories_in_library(content_view.organization)
|
63
|
+
end
|
64
|
+
|
65
|
+
def metadata_map
|
66
|
+
@metadata_map ||= ::Katello::Pulp3::ContentViewVersion::Import.metadata_map(metadata)
|
67
|
+
end
|
57
68
|
|
69
|
+
def ensure_metadata_matches_repos_in_library!
|
70
|
+
interested_repos = ::Katello::Pulp3::ContentViewVersion::Import.
|
71
|
+
intersecting_repos_library_and_metadata(organization: organization,
|
72
|
+
metadata: metadata)
|
73
|
+
bad_repos = interested_repos.select do |repo|
|
74
|
+
repo_in_metadata = metadata_map[[repo.product.label, repo.label]]
|
75
|
+
repo.redhat? != repo_in_metadata[:redhat] ||
|
76
|
+
repo.slice(:name, :label, :content_type) != repo_in_metadata.slice(:name, :label, :content_type)
|
77
|
+
end
|
78
|
+
|
79
|
+
if bad_repos.any?
|
80
|
+
repos_to_report = bad_repos.map { |repo| [repo.product.label, repo.label] }
|
81
|
+
fail _("The following repositories provided in the import metadata have an incorrect content type or provider type. "\
|
82
|
+
"Make sure the export and import repositories are of the same type before importing\n "\
|
83
|
+
"%{repos}" % { content_view: content_view.name,
|
84
|
+
repos: generate_product_repo_i18n_string(repos_to_report).join("")}
|
85
|
+
)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
def ensure_redhat_repositories_metadata_are_in_the_library!
|
58
90
|
# repos_in_library look like [["prod1", "repo1", "Anonymous"], ["prod2", "repo2", "Red Hat"]]
|
59
|
-
|
60
|
-
|
91
|
+
rh_repos_in_library = repos_in_library.redhat
|
92
|
+
product_repos_in_library = rh_repos_in_library.map { |repo| [repo.product.label, repo.label] }
|
93
|
+
product_repos_in_metadata = metadata[:repositories].values.map { |repo| [repo[:product][:label], repo[:label]] if repo[:redhat] }
|
94
|
+
product_repos_in_metadata.compact!
|
95
|
+
|
61
96
|
# product_repos_in_library & product_repos_in_metadata look like [["prod1", "repo1", false], ["prod2", "repo2", false]]
|
62
97
|
product_repos_not_in_library = product_repos_in_metadata - product_repos_in_library
|
63
98
|
unless product_repos_not_in_library.blank?
|
@@ -71,11 +106,8 @@ module Katello
|
|
71
106
|
|
72
107
|
def generate_product_repo_i18n_string(product_repos)
|
73
108
|
# product_repos look like [["prod1", "repo1", false], ["prod2", "repo2", false]]
|
74
|
-
product_repos.map do |product, repo
|
75
|
-
|
76
|
-
_("\n* Product = '%{product}', Repository = '%{repository}', Repository Type = '%{repo_type}'" % { product: product,
|
77
|
-
repository: repo,
|
78
|
-
repo_type: repo_type})
|
109
|
+
product_repos.map do |product, repo|
|
110
|
+
_("\n* Product = '%{product}', Repository = '%{repository}'" % { product: product, repository: repo })
|
79
111
|
end
|
80
112
|
end
|
81
113
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Katello
|
2
|
+
module Pulp3
|
3
|
+
module ContentViewVersion
|
4
|
+
class ImportableProducts
|
5
|
+
attr_accessor :creatable, :updatable, :organization, :metadata
|
6
|
+
|
7
|
+
def initialize(organization:, metadata:)
|
8
|
+
self.organization = organization
|
9
|
+
self.metadata = metadata
|
10
|
+
self.creatable = []
|
11
|
+
self.updatable = []
|
12
|
+
end
|
13
|
+
|
14
|
+
def products_in_library
|
15
|
+
# Get the product labels in library
|
16
|
+
return @products_in_library unless @products_in_library.blank?
|
17
|
+
@products_in_library = Set.new(::Katello::Product.in_org(organization).custom.pluck(:label))
|
18
|
+
end
|
19
|
+
|
20
|
+
def generate!
|
21
|
+
# This returns a 2 different list of importable products
|
22
|
+
# creatable: products that are part of the metadata but not in the library.
|
23
|
+
# They are ready to be created
|
24
|
+
# updatable: products that are both in the metadata and library.
|
25
|
+
# These may contain updates to the product and hence ready to be updated.
|
26
|
+
metadata[:products].each do |product_label, params|
|
27
|
+
next if params[:redhat]
|
28
|
+
if params[:gpg_key].blank?
|
29
|
+
params[:gpg_key_id] = nil
|
30
|
+
else
|
31
|
+
params[:gpg_key_id] = organization.gpg_keys.find_by(name: params[:gpg_key][:name]).id
|
32
|
+
end
|
33
|
+
params = params.except(:gpg_key, :redhat)
|
34
|
+
if products_in_library.include? product_label
|
35
|
+
# add to the update list if product is already available
|
36
|
+
product = ::Katello::Product.in_org(organization).find_by(label: product_label)
|
37
|
+
updatable << { product: product, options: params.except(:name, :label) }
|
38
|
+
else
|
39
|
+
# add to the create list if its a new product
|
40
|
+
creatable << { product: ::Katello::Product.new(params) }
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module Katello
|
2
|
+
module Pulp3
|
3
|
+
module ContentViewVersion
|
4
|
+
class ImportableRepositories
|
5
|
+
attr_accessor :creatable, :updatable, :organization, :metadata
|
6
|
+
|
7
|
+
def initialize(organization:, metadata:)
|
8
|
+
self.organization = organization
|
9
|
+
self.metadata = metadata
|
10
|
+
self.creatable = []
|
11
|
+
self.updatable = []
|
12
|
+
end
|
13
|
+
|
14
|
+
def repositories_in_library
|
15
|
+
return @repositories_in_library unless @repositories_in_library.blank?
|
16
|
+
|
17
|
+
# fetch a list of [product, repo] pairs for every non-redhat library repo
|
18
|
+
product_repos_in_library = Import.repositories_in_library(organization).custom.
|
19
|
+
pluck("#{Katello::Product.table_name}.label",
|
20
|
+
"#{Katello::RootRepository.table_name}.label")
|
21
|
+
@repositories_in_library = Set.new(product_repos_in_library.compact)
|
22
|
+
end
|
23
|
+
|
24
|
+
def generate!
|
25
|
+
# This set's up a 2 different list of importable root repositories
|
26
|
+
# creatable: repos that are part of the metadata but not in the library.
|
27
|
+
# They are ready to be created
|
28
|
+
# updatable: repo that are both in the metadata and library.
|
29
|
+
# These may contain updates to the repo and hence ready to be updated.
|
30
|
+
metadata_map = Import.metadata_map(metadata, custom_only: true)
|
31
|
+
metadata_map.keys.each do |product_label, repo_label|
|
32
|
+
product = Katello::Product.in_org(organization).find_by(label: product_label)
|
33
|
+
fail _("Unable to find product '%s' in organization '%s'" % [product_label, organization.name]) if product.blank?
|
34
|
+
params = metadata_map[[product_label, repo_label]]
|
35
|
+
if params[:gpg_key].blank?
|
36
|
+
params[:gpg_key_id] = nil
|
37
|
+
else
|
38
|
+
params[:gpg_key_id] = organization.gpg_keys.find_by(name: params[:gpg_key][:name]).id
|
39
|
+
end
|
40
|
+
params = params.except(:redhat, :product, :gpg_key)
|
41
|
+
if repositories_in_library.include? [product_label, repo_label]
|
42
|
+
repo = ::Katello::RootRepository.find_by(product: product, label: repo_label)
|
43
|
+
updatable << { repository: repo, options: params.except(:label, :name, :content_type) }
|
44
|
+
else
|
45
|
+
creatable << { repository: product.add_repo(params) }
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
module Katello
|
2
|
+
module Pulp3
|
3
|
+
module ContentViewVersion
|
4
|
+
class MetadataGenerator
|
5
|
+
attr_accessor :export_service, :gpg_keys, :products
|
6
|
+
|
7
|
+
delegate :repositories, :content_view_version, :from_content_view_version, :to => :export_service
|
8
|
+
delegate :content_view, :to => :content_view_version
|
9
|
+
delegate :organization, :to => :content_view
|
10
|
+
|
11
|
+
def initialize(export_service:)
|
12
|
+
self.export_service = export_service
|
13
|
+
self.gpg_keys = {}
|
14
|
+
self.products = {}
|
15
|
+
end
|
16
|
+
|
17
|
+
def generate!
|
18
|
+
ret = { organization: organization.name,
|
19
|
+
repositories: {},
|
20
|
+
content_view: content_view.slice(:name, :label, :description),
|
21
|
+
content_view_version: content_view_version.slice(:major, :minor, :description),
|
22
|
+
incremental: from_content_view_version.present?
|
23
|
+
}
|
24
|
+
|
25
|
+
unless from_content_view_version.blank?
|
26
|
+
ret[:from_content_view_version] = from_content_view_version.slice(:major, :minor)
|
27
|
+
end
|
28
|
+
repositories.each do |repo|
|
29
|
+
next if repo.version_href.blank?
|
30
|
+
pulp3_repo = export_service.fetch_repository_info(repo.version_href).name
|
31
|
+
ret[:repositories][pulp3_repo] = generate_repository_metadata(repo)
|
32
|
+
end
|
33
|
+
|
34
|
+
zip_products(ret[:repositories].values)
|
35
|
+
|
36
|
+
zip_gpg_keys(ret[:repositories].values)
|
37
|
+
zip_gpg_keys(products.values)
|
38
|
+
|
39
|
+
ret[:products] = products
|
40
|
+
ret[:gpg_keys] = gpg_keys
|
41
|
+
ret
|
42
|
+
end
|
43
|
+
|
44
|
+
def generate_repository_metadata(repo)
|
45
|
+
repo.slice(:name, :label, :description, :arch, :content_type, :unprotected,
|
46
|
+
:checksum_type, :os_versions, :major, :minor).
|
47
|
+
merge(product: generate_product_metadata(repo.product),
|
48
|
+
gpg_key: generate_gpg_metadata(repo.gpg_key),
|
49
|
+
redhat: repo.redhat?)
|
50
|
+
end
|
51
|
+
|
52
|
+
def generate_product_metadata(product)
|
53
|
+
product.slice(:name, :label, :description).
|
54
|
+
merge(gpg_key: generate_gpg_metadata(product.gpg_key),
|
55
|
+
redhat: product.redhat?)
|
56
|
+
end
|
57
|
+
|
58
|
+
def generate_gpg_metadata(gpg)
|
59
|
+
return {} if gpg.blank?
|
60
|
+
gpg.slice(:name, :content_type, :content)
|
61
|
+
end
|
62
|
+
|
63
|
+
def zip_gpg_keys(entities)
|
64
|
+
# this goes through each repo/product
|
65
|
+
# identifies gpg keys
|
66
|
+
# updates the gpg_keys map if necessary
|
67
|
+
# replaces the value of gpg_key by just the name
|
68
|
+
# For example:
|
69
|
+
# Input: {label: 'repo', gpg_key: {name: 'who', content: 'great'}}
|
70
|
+
# Output: {label: 'repo', gpg_key: {name: 'who'}}
|
71
|
+
entities.each do |entity|
|
72
|
+
gpg = entity[:gpg_key]
|
73
|
+
unless gpg.blank? || gpg_keys.key?(gpg[:name])
|
74
|
+
gpg_keys[gpg[:name]] = gpg
|
75
|
+
end
|
76
|
+
entity[:gpg_key] = gpg.slice(:name)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def zip_products(repos)
|
81
|
+
# this goes through each repo
|
82
|
+
# identifies product
|
83
|
+
# updates the products map if necessary
|
84
|
+
# replaces the value of product by just the label
|
85
|
+
# For example:
|
86
|
+
# Input: {label: 'repo', product: {name: 'prod', label: 'foo', description: 'great'}}
|
87
|
+
# Output: {label: 'repo', product: {label: 'foo'}}
|
88
|
+
repos.each do |repo|
|
89
|
+
product = repo[:product]
|
90
|
+
unless products.key?(product[:label])
|
91
|
+
products[product[:label]] = product
|
92
|
+
end
|
93
|
+
repo[:product] = product.slice(:label)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -59,7 +59,7 @@ module Katello
|
|
59
59
|
|
60
60
|
def self.pulp_units_batch_for_repo(repository, options = {})
|
61
61
|
fetch_identifiers = options.fetch(:fetch_identifiers, false)
|
62
|
-
page_size = options.fetch(:page_size,
|
62
|
+
page_size = options.fetch(:page_size, Setting[:bulk_load_size])
|
63
63
|
repository_version_href = repository.version_href
|
64
64
|
page_opts = { "offset" => 0, repository_version: repository_version_href, limit: page_size }
|
65
65
|
page_opts[:fields] = self.const_get(:PULP_INDEXED_FIELDS).join(",") if self.constants.include?(:PULP_INDEXED_FIELDS)
|
@@ -8,7 +8,11 @@ module Katello
|
|
8
8
|
if root.url.blank?
|
9
9
|
super
|
10
10
|
else
|
11
|
-
common_remote_options.merge(url: root.url
|
11
|
+
common_remote_options.merge(url: root.url,
|
12
|
+
requirements_file: root.ansible_collection_requirements.blank? ? nil : root.ansible_collection_requirements,
|
13
|
+
auth_url: root.ansible_collection_auth_url,
|
14
|
+
token: root.ansible_collection_auth_token,
|
15
|
+
tls_validation: root.verify_ssl_on_sync)
|
12
16
|
end
|
13
17
|
end
|
14
18
|
|
@@ -27,7 +27,8 @@ module Katello
|
|
27
27
|
popts = super(repository_version)
|
28
28
|
popts.merge!(
|
29
29
|
{
|
30
|
-
structured
|
30
|
+
# structured is not necessary for subscription-manager
|
31
|
+
#structured: true, # publish real suites (e.g. 'stable')
|
31
32
|
simple: true # publish all into 'default'-suite
|
32
33
|
}
|
33
34
|
)
|
@@ -207,22 +207,6 @@ module Katello
|
|
207
207
|
tasks
|
208
208
|
end
|
209
209
|
|
210
|
-
def copy_all(source_repository, mirror: false)
|
211
|
-
if mirror
|
212
|
-
data = PulpRpmClient::RepositoryAddRemoveContent.new(
|
213
|
-
base_version: source_repository.version_href)
|
214
|
-
|
215
|
-
[api.repositories_api.modify(repository_reference.repository_href, data)]
|
216
|
-
else
|
217
|
-
data = PulpRpmClient::Copy.new
|
218
|
-
data.config = [{
|
219
|
-
source_repo_version: source_repository.version_href,
|
220
|
-
dest_repo: repository_reference.repository_href
|
221
|
-
}]
|
222
|
-
[api.copy_api.copy_content(data)]
|
223
|
-
end
|
224
|
-
end
|
225
|
-
|
226
210
|
def remove_all_content_from_repo(repo_href)
|
227
211
|
data = PulpRpmClient::RepositoryAddRemoveContent.new(
|
228
212
|
remove_content_units: ['*'])
|