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
@@ -12,6 +12,7 @@ module Katello
|
|
12
12
|
before_action :find_content_view_version, :only => [:index, :auto_complete_search]
|
13
13
|
before_action :find_filter, :find_filter_rule, :only => [:index, :auto_complete_search]
|
14
14
|
before_action :find_content_resource, :only => [:show]
|
15
|
+
before_action :check_show_all_and_available_params, only: [:index]
|
15
16
|
end
|
16
17
|
|
17
18
|
extend ::Apipie::DSL::Concern
|
@@ -27,6 +28,7 @@ module Katello
|
|
27
28
|
param :repository_id, :number, :desc => N_("repository identifier")
|
28
29
|
param :environment_id, :number, :desc => N_("environment identifier")
|
29
30
|
param :ids, Array, :desc => N_("ids to filter content by")
|
31
|
+
param :include_filter_ids, :bool, desc: N_("Includes associated content view filter ids in response")
|
30
32
|
param_group :search, ::Katello::Api::V2::ApiController
|
31
33
|
def index
|
32
34
|
sort_by, sort_order, options = sort_options
|
@@ -70,7 +72,9 @@ module Katello
|
|
70
72
|
end
|
71
73
|
|
72
74
|
param :available_for, :string, :desc => N_("Return content that can be added to the specified object. The values 'content_view_version' and 'content_view_filter are supported.")
|
73
|
-
param :
|
75
|
+
param :show_all_for, :bool,
|
76
|
+
:desc => N_("Returns content that can be both added and is currently added to the object. The value 'content_view_filter' is supported")
|
77
|
+
param :filterId, :integer, :desc => N_("Content View Filter id"), deprecated: true
|
74
78
|
def index_relation
|
75
79
|
if @version && params[:available_for] == "content_view_version" && self.respond_to?(:available_for_content_view_version)
|
76
80
|
collection = self.available_for_content_view_version(@version)
|
@@ -81,19 +85,7 @@ module Katello
|
|
81
85
|
|
82
86
|
collection = filter_by_repos(repos, collection)
|
83
87
|
collection = filter_by_ids(params[:ids], collection) if params[:ids]
|
84
|
-
|
85
|
-
@filter = ContentViewFilter.find(params[:filterId]) if params[:filterId]
|
86
|
-
if params[:available_for] == "content_view_filter" && self.respond_to?(:available_for_content_view_filter)
|
87
|
-
collection = self.available_for_content_view_filter(@filter, collection) if @filter
|
88
|
-
else
|
89
|
-
# Filtering by the CV filter rule makes filtering by the CV filter redundant, keeping these
|
90
|
-
# exclusive to keep the queries simple.
|
91
|
-
if @filter_rule
|
92
|
-
collection = filter_by_content_view_filter_rule(@filter_rule, collection)
|
93
|
-
elsif @filter
|
94
|
-
collection = filter_by_content_view_filter(@filter, collection)
|
95
|
-
end
|
96
|
-
end
|
88
|
+
collection = handle_cv_filter(collection, @filter, @filter_rule, params) if @filter || @filter_rule
|
97
89
|
|
98
90
|
collection = self.custom_index_relation(collection) if self.respond_to?(:custom_index_relation)
|
99
91
|
collection
|
@@ -127,11 +119,7 @@ module Katello
|
|
127
119
|
repos = Repository.readable
|
128
120
|
repos = repos.where(:id => @repo) if @repo
|
129
121
|
repos = repos.where(:id => Repository.readable.in_organization(@organization)) if @organization
|
130
|
-
if @environment
|
131
|
-
# if the environment is not library and this is for puppet modules,
|
132
|
-
# we can skip environment filter, as those would be associated to
|
133
|
-
# content view puppet environments and handled by the puppet modules
|
134
|
-
# controller.
|
122
|
+
if @environment&.library?
|
135
123
|
repos = repos.where(:id => @environment.repositories)
|
136
124
|
end
|
137
125
|
repos
|
@@ -197,7 +185,7 @@ module Katello
|
|
197
185
|
|
198
186
|
def find_filter
|
199
187
|
# TODO: in v2.rb some routes use "filters", others use "content_view_filters"
|
200
|
-
filter_id = params[:content_view_filter_id] || params[:filter_id]
|
188
|
+
filter_id = params[:content_view_filter_id] || params[:filter_id] || params[:filterId]
|
201
189
|
|
202
190
|
if filter_id
|
203
191
|
scoped = ContentViewFilter.all
|
@@ -223,6 +211,12 @@ module Katello
|
|
223
211
|
end
|
224
212
|
end
|
225
213
|
|
214
|
+
def check_show_all_and_available_params
|
215
|
+
if params[:show_all_for] && params[:available_for]
|
216
|
+
fail HttpErrors::BadRequest, _("params 'show_all_for' and 'available_for' must be used independently")
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
226
220
|
def resource_class
|
227
221
|
"Katello::#{controller_name.classify}".constantize
|
228
222
|
end
|
@@ -251,8 +245,6 @@ module Katello
|
|
251
245
|
_("Source RPM")
|
252
246
|
when "Katello::PackageGroup"
|
253
247
|
_("Package Group")
|
254
|
-
when "Katello::PuppetModule"
|
255
|
-
_("Puppet Module")
|
256
248
|
when "Katello::DockerManifest"
|
257
249
|
_("Container Image Manifest")
|
258
250
|
when "Katello::DockerMetaTag"
|
@@ -280,6 +272,23 @@ module Katello
|
|
280
272
|
{content: resource_name, id: params[:id]}
|
281
273
|
end
|
282
274
|
end
|
275
|
+
|
276
|
+
def handle_cv_filter(collection, filter, filter_rule, params)
|
277
|
+
if params[:show_all_for] == "content_view_filter" && self.respond_to?(:all_for_content_view_filter)
|
278
|
+
collection = self.all_for_content_view_filter(filter, collection)
|
279
|
+
elsif params[:available_for] == "content_view_filter" && self.respond_to?(:available_for_content_view_filter)
|
280
|
+
collection = self.available_for_content_view_filter(filter, collection)
|
281
|
+
else
|
282
|
+
# Filtering by the CV filter rule makes filtering by the CV filter redundant, keeping these
|
283
|
+
# exclusive to keep the queries simple.
|
284
|
+
if filter_rule
|
285
|
+
collection = filter_by_content_view_filter_rule(filter_rule, collection)
|
286
|
+
elsif filter
|
287
|
+
collection = filter_by_content_view_filter(filter, collection)
|
288
|
+
end
|
289
|
+
end
|
290
|
+
collection
|
291
|
+
end
|
283
292
|
end
|
284
293
|
end
|
285
294
|
end
|
@@ -50,14 +50,6 @@ module Katello
|
|
50
50
|
redirect_to(foreman_tasks_task_path(task.id))
|
51
51
|
end
|
52
52
|
|
53
|
-
def puppet_environment_for_content_view
|
54
|
-
view = Katello::ContentView.find(params[:content_view_id])
|
55
|
-
environment = Katello::KTEnvironment.find(params[:lifecycle_environment_id])
|
56
|
-
version = view.version(environment)
|
57
|
-
cvpe = Katello::ContentViewPuppetEnvironment.where(:environment_id => environment, :content_view_version_id => version).first
|
58
|
-
render :json => cvpe.nil? ? nil : {:name => cvpe.puppet_environment.name, :id => cvpe.puppet_environment.id}
|
59
|
-
end
|
60
|
-
|
61
53
|
def content_hosts
|
62
54
|
respond_to do |format|
|
63
55
|
format.csv do
|
@@ -30,7 +30,7 @@ module Katello
|
|
30
30
|
if taxonomy_class == Organization
|
31
31
|
begin
|
32
32
|
@taxonomy = Organization.new(resource_params)
|
33
|
-
|
33
|
+
::Katello::OrganizationCreator.new(@taxonomy).create!
|
34
34
|
@taxonomy.reload
|
35
35
|
switch_taxonomy
|
36
36
|
if @count_nil_hosts > 0
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Katello
|
2
|
+
module Concerns
|
3
|
+
module RegistrationCommandsControllerExtensions
|
4
|
+
extend ActiveSupport::Concern
|
5
|
+
|
6
|
+
def plugin_data
|
7
|
+
aks = ActivationKey.authorized(:view_activation_keys)
|
8
|
+
.where(organization_id: registration_params[:organization_id])
|
9
|
+
.order(:name)
|
10
|
+
.map { |ak| { name: ak.name, lce: ak.environment&.name } }
|
11
|
+
|
12
|
+
lces = KTEnvironment.readable
|
13
|
+
.where(organization_id: registration_params[:organization_id])
|
14
|
+
.order(:name)
|
15
|
+
|
16
|
+
data = { activationKeys: aks, lifeCycleEnvironments: lces }
|
17
|
+
|
18
|
+
if registration_params[:hostgroup_id].present?
|
19
|
+
host_group = ::Hostgroup.authorized(:view_hostgroups).find(registration_params[:hostgroup_id])
|
20
|
+
data[:hostGroupActivationKeys] = host_group.params['kt_activation_keys']
|
21
|
+
data[:hostGroupEnvironment] = host_group.lifecycle_environment&.name
|
22
|
+
end
|
23
|
+
|
24
|
+
super.merge(data)
|
25
|
+
end
|
26
|
+
|
27
|
+
def registration_args
|
28
|
+
args = super
|
29
|
+
args['activation_keys'] = args['activation_keys'].join(',') if args['activation_keys']
|
30
|
+
args
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -2,10 +2,27 @@ require 'uri'
|
|
2
2
|
|
3
3
|
module Katello
|
4
4
|
module KatelloUrlsHelper
|
5
|
+
extend ApipieDSL::Module
|
6
|
+
|
7
|
+
apipie :class, 'Helper macros related to content to use within a template' do
|
8
|
+
name 'Content helpers'
|
9
|
+
sections only: %w[all reports provisioning jobs partition_tables]
|
10
|
+
end
|
11
|
+
|
12
|
+
apipie :method, 'Returns Foreman URL based on settings' do
|
13
|
+
optional :schema, String, desc: 'Optional URL schema'
|
14
|
+
returns String, desc: 'Foreman URL based on settings and schema if provided'
|
15
|
+
end
|
5
16
|
def foreman_settings_url(schema = 'http')
|
6
17
|
::Setting[:foreman_url].sub(%r|^.*?:|, "#{schema}:")
|
7
18
|
end
|
8
19
|
|
20
|
+
apipie :method, 'Returns subscription manager configuration URL' do
|
21
|
+
optional :host, 'Host::Managed', desc: "The host that will be making the request (URL will be of that host's smart proxy)", default: nil
|
22
|
+
optional :rpm, [true, false], desc: 'When true, the returned URL will lead to the configuration as an RPM package. When false, the URL will lead to the plain-text configuration script', default: true
|
23
|
+
keyword :hostname, String, desc: 'Override the hostname in the URL with the specified hostname', default: nil
|
24
|
+
returns String, desc: 'Subscription manager configuration URL based on provided arguments'
|
25
|
+
end
|
9
26
|
def subscription_manager_configuration_url(host = nil, rpm = true, hostname: nil)
|
10
27
|
prefix = if hostname
|
11
28
|
"http://#{hostname}"
|
@@ -20,6 +37,12 @@ module Katello
|
|
20
37
|
"#{prefix}/pub/#{config}"
|
21
38
|
end
|
22
39
|
|
40
|
+
apipie :method, 'Generates an absolute path to the file' do
|
41
|
+
required :content_path, String, desc: "Relative path to the file or it's name"
|
42
|
+
optional :schema, String, desc: 'Optional URL schema for the content source', default: 'http'
|
43
|
+
optional :content_type, String, desc: 'Content type', default: 'repos'
|
44
|
+
returns String, desc: 'Absolute path to a file'
|
45
|
+
end
|
23
46
|
def repository_url(content_path, _content_type = nil, schema = 'http')
|
24
47
|
return content_path if content_path =~ %r|^([\w\-\+]+)://|
|
25
48
|
url = if @host.content_source
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Actions
|
2
2
|
module Candlepin
|
3
3
|
module Owner
|
4
|
-
class Import < Candlepin::
|
4
|
+
class Import < Candlepin::AbstractAsyncTask
|
5
5
|
input_format do
|
6
6
|
param :label
|
7
7
|
param :path
|
@@ -9,9 +9,16 @@ module Actions
|
|
9
9
|
param :upstream
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
12
|
+
def invoke_external_task
|
13
13
|
options = input.slice(:force, :upstream)
|
14
|
-
|
14
|
+
::Katello::Resources::Candlepin::Owner.import(input[:label], input[:path], options)
|
15
|
+
end
|
16
|
+
|
17
|
+
def humanized_output
|
18
|
+
result_data = output[:task]&.[]('resultData')
|
19
|
+
return '' if result_data&.[]('status').blank?
|
20
|
+
"Candlepin job status: #{result_data['status']}\n
|
21
|
+
Message: #{result_data['statusMessage']}"
|
15
22
|
end
|
16
23
|
end
|
17
24
|
end
|
@@ -22,7 +22,7 @@ module Actions
|
|
22
22
|
contentUrl: input[:content_url],
|
23
23
|
gpgUrl: input[:gpg_key_url] || '', #candlepin ignores nil
|
24
24
|
type: input[:type],
|
25
|
-
arches: input[:arches],
|
25
|
+
arches: input[:arches] || '',
|
26
26
|
requiredTags: input[:os_versions],
|
27
27
|
label: input[:label],
|
28
28
|
metadataExpire: 1,
|
@@ -5,13 +5,13 @@ module Actions
|
|
5
5
|
def plan(environment)
|
6
6
|
if environment.hosts.count > 0
|
7
7
|
names = environment.hosts.limit(5).pluck(:name).join(', ')
|
8
|
-
fail _("The
|
8
|
+
fail _("The environment %{name} is in use by %{count} Host(s) including %{names}") %
|
9
9
|
{:name => environment.name, :names => names, :count => environment.hosts.count}
|
10
10
|
end
|
11
11
|
|
12
12
|
if environment.hostgroups.count > 0
|
13
13
|
names = environment.hostgroups.limit(5).pluck(:name).join(', ')
|
14
|
-
fail _("The
|
14
|
+
fail _("The environment %{name} is in use by %{count} Host Group(s) including %{names}") %
|
15
15
|
{:name => environment.name, :names => names, :count => environment.hostgroups.count}
|
16
16
|
end
|
17
17
|
|
@@ -83,12 +83,7 @@ module Actions
|
|
83
83
|
end
|
84
84
|
|
85
85
|
unless history.finished?
|
86
|
-
|
87
|
-
# only fail for finish_timeout unless the actual duration has elapsed
|
88
|
-
finish_limit = history.accepted_at + finish_timeout
|
89
|
-
if finish_limit < DateTime.now
|
90
|
-
fail _("Host did not finish content action in %s seconds. The task has been cancelled.") % finish_timeout
|
91
|
-
end
|
86
|
+
fail _("Host did not finish content action in %s seconds. The task has been cancelled.") % finish_timeout
|
92
87
|
end
|
93
88
|
end
|
94
89
|
|
@@ -25,10 +25,6 @@ module Actions
|
|
25
25
|
tasks = []
|
26
26
|
environment = ::Katello::KTEnvironment.find_by(:id => input[:environment_id]) if input[:environment_id]
|
27
27
|
repository = ::Katello::Repository.find_by(:id => input[:repository_id]) if input[:repository_id]
|
28
|
-
if repository.nil? && input[:repository_id]
|
29
|
-
repository = ::Katello::ContentViewPuppetEnvironment.find(input[:repository_id])
|
30
|
-
repository = repository.nonpersisted_repository
|
31
|
-
end
|
32
28
|
content_view = ::Katello::ContentView.find_by(:id => input[:content_view_id]) if input[:content_view_id]
|
33
29
|
smart_proxy = SmartProxy.unscoped.find(input[:smart_proxy_id])
|
34
30
|
smart_proxy_helper = ::Katello::SmartProxyHelper.new(smart_proxy)
|
@@ -39,9 +35,6 @@ module Actions
|
|
39
35
|
|
40
36
|
list_of_repos_to_sync = smart_proxy_helper.combined_repos_available_to_capsule(environment, content_view, repository)
|
41
37
|
list_of_repos_to_sync.each do |repo|
|
42
|
-
if repo.is_a?(Katello::ContentViewPuppetEnvironment)
|
43
|
-
repo = repo.nonpersisted_repository
|
44
|
-
end
|
45
38
|
next unless act_on_repo?(repo, smart_proxy)
|
46
39
|
|
47
40
|
pulp_repo = repo.backend_service(smart_proxy)
|
@@ -39,7 +39,7 @@ module Actions
|
|
39
39
|
end
|
40
40
|
|
41
41
|
if smart_proxy.has_feature?(SmartProxy::PULP3_FEATURE)
|
42
|
-
plan_action(Actions::Pulp3::
|
42
|
+
plan_action(Actions::Pulp3::CapsuleContent::RefreshContentGuard, smart_proxy)
|
43
43
|
plan_action(Actions::Pulp3::Orchestration::Repository::RefreshRepos, smart_proxy, refresh_options)
|
44
44
|
end
|
45
45
|
plan_action(SyncCapsule, smart_proxy, refresh_options)
|
@@ -93,14 +93,13 @@ module Actions
|
|
93
93
|
end
|
94
94
|
else
|
95
95
|
repositories = smart_proxy_helper.repositories_available_to_capsule(environment, content_view).by_rpm_count
|
96
|
-
puppet_envs = smart_proxy_helper.puppet_environments_available_to_capsule(environment, content_view)
|
97
96
|
repositories_to_skip = []
|
98
97
|
if skip_metatadata_check
|
99
98
|
smart_proxy_helper.clear_smart_proxy_sync_histories repositories
|
100
99
|
else
|
101
100
|
repositories_to_skip = ::Katello::Repository.synced_on_capsule smart_proxy
|
102
101
|
end
|
103
|
-
repositories - repositories_to_skip
|
102
|
+
repositories - repositories_to_skip
|
104
103
|
end
|
105
104
|
end
|
106
105
|
|
@@ -3,13 +3,15 @@ module Actions
|
|
3
3
|
module ContentView
|
4
4
|
class AddToEnvironment < Actions::Base
|
5
5
|
def plan(content_view_version, environment)
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
cve = ::Katello::ContentViewManager.add_version_to_environment(
|
7
|
+
content_view_version: content_view_version,
|
8
|
+
environment: environment
|
9
|
+
)
|
10
|
+
|
11
|
+
::Katello::ContentViewManager.create_candlepin_environment(
|
12
|
+
content_view_environment: cve
|
13
|
+
)
|
14
|
+
|
13
15
|
content_view_version.save!
|
14
16
|
end
|
15
17
|
end
|
@@ -25,7 +25,7 @@ module Actions
|
|
25
25
|
end
|
26
26
|
|
27
27
|
if composite_version_environments.any?
|
28
|
-
handle_composites(old_new_version_map, composite_version_environments, output_for_version_ids, description
|
28
|
+
handle_composites(old_new_version_map, composite_version_environments, output_for_version_ids, description)
|
29
29
|
end
|
30
30
|
|
31
31
|
if hosts.any? && !content[:errata_ids].blank?
|
@@ -37,7 +37,7 @@ module Actions
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
def handle_composites(old_new_version_map, composite_version_environments, output_for_version_ids, description
|
40
|
+
def handle_composites(old_new_version_map, composite_version_environments, output_for_version_ids, description)
|
41
41
|
concurrence do
|
42
42
|
composite_version_environments.each do |version_environment|
|
43
43
|
composite_version = version_environment[:content_view_version]
|
@@ -50,8 +50,7 @@ module Actions
|
|
50
50
|
end
|
51
51
|
|
52
52
|
action = plan_action(ContentViewVersion::IncrementalUpdate, composite_version, environments,
|
53
|
-
:new_components => new_components, :description => description
|
54
|
-
:content => {:puppet_module_ids => puppet_module_ids})
|
53
|
+
:new_components => new_components, :description => description)
|
55
54
|
unless SmartProxy.pulp_primary.pulp3_repository_type_support?("yum")
|
56
55
|
output_for_version_ids << {:version_id => action.new_content_view_version.id, :output => action.output}
|
57
56
|
end
|
@@ -84,7 +83,6 @@ module Actions
|
|
84
83
|
total_count[:errata_count] = added_units[:erratum].try(:count)
|
85
84
|
total_count[:modulemd_count] = added_units[:modulemd].try(:count)
|
86
85
|
total_count[:rpm_count] = added_units[:rpm].try(:count)
|
87
|
-
total_count[:puppet_module_count] = added_units[:puppet_module].try(:count)
|
88
86
|
end
|
89
87
|
end
|
90
88
|
end
|
@@ -128,11 +126,6 @@ module Actions
|
|
128
126
|
rpm = _(" %{package_count} Package(s)" % {:package_count => total_count[:rpm_count]})
|
129
127
|
content << rpm
|
130
128
|
end
|
131
|
-
if total_count[:puppet_module_count] && total_count[:puppet_module_count] > 0
|
132
|
-
puppet_module = _(" %{puppet_module_count} Puppet Module(s)" %
|
133
|
-
{:puppet_module_count => total_count[:puppet_module_count]})
|
134
|
-
content << puppet_module
|
135
|
-
end
|
136
129
|
content
|
137
130
|
end
|
138
131
|
|
@@ -6,8 +6,7 @@ module Actions
|
|
6
6
|
HUMANIZED_TYPES = {
|
7
7
|
::Katello::Erratum::CONTENT_TYPE => "Errata",
|
8
8
|
::Katello::ModuleStream::CONTENT_TYPE => "Module Streams",
|
9
|
-
::Katello::Rpm::CONTENT_TYPE => "Packages"
|
10
|
-
::Katello::PuppetModule::CONTENT_TYPE => "Puppet Modules"
|
9
|
+
::Katello::Rpm::CONTENT_TYPE => "Packages"
|
11
10
|
}.freeze
|
12
11
|
|
13
12
|
def humanized_output
|
@@ -26,7 +25,7 @@ module Actions
|
|
26
25
|
if cvv
|
27
26
|
humanized_lines << "Content View: #{cvv.content_view.name} version #{cvv.version}"
|
28
27
|
humanized_lines << _("Added Content:")
|
29
|
-
[::Katello::Erratum, ::Katello::ModuleStream, ::Katello::Rpm
|
28
|
+
[::Katello::Erratum, ::Katello::ModuleStream, ::Katello::Rpm].each do |content_type|
|
30
29
|
unless output[:added_units][content_type::CONTENT_TYPE].blank?
|
31
30
|
humanized_lines << " #{HUMANIZED_TYPES[content_type::CONTENT_TYPE]}:"
|
32
31
|
humanized_lines += output[:added_units][content_type::CONTENT_TYPE].sort.map { |unit| " #{unit}" }
|
@@ -13,15 +13,12 @@ module Actions
|
|
13
13
|
sequence do
|
14
14
|
plan_action(ContentView::AddToEnvironment, version, environment)
|
15
15
|
concurrence do
|
16
|
-
version.archived_repos.
|
16
|
+
version.archived_repos.each do |repository|
|
17
17
|
sequence do
|
18
18
|
plan_action(Repository::CloneToEnvironment, repository, environment)
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
plan_action(ContentViewPuppetEnvironment::Clone, version, :environment => environment,
|
23
|
-
:puppet_modules_present => version.promote_puppet_environment?)
|
24
|
-
|
25
22
|
repos_to_delete(version, environment).each do |repo|
|
26
23
|
plan_action(Repository::Destroy, repo, :skip_environment_update => true)
|
27
24
|
end
|
@@ -48,24 +48,20 @@ module Actions
|
|
48
48
|
sequence do
|
49
49
|
plan_action(ContentView::AddToEnvironment, version, library) unless options[:skip_promotion]
|
50
50
|
repository_mapping = plan_action(ContentViewVersion::CreateRepos, version, source_repositories).repository_mapping
|
51
|
-
|
52
51
|
# Split Pulp 3 Yum repos out of the repository_mapping. Only Pulp 3 RPM plugin has multi repo copy support.
|
53
52
|
separated_repo_map = separated_repo_mapping(repository_mapping)
|
54
53
|
|
55
|
-
if
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
else
|
61
|
-
plan_action(Repository::MultiCloneToVersion, separated_repo_map[:pulp3_yum], version)
|
62
|
-
end
|
54
|
+
if options[:importing]
|
55
|
+
handle_import(version, options.slice(:path, :metadata))
|
56
|
+
elsif separated_repo_map[:pulp3_yum].keys.flatten.present? &&
|
57
|
+
SmartProxy.pulp_primary.pulp3_support?(separated_repo_map[:pulp3_yum].keys.flatten.first)
|
58
|
+
plan_action(Repository::MultiCloneToVersion, separated_repo_map[:pulp3_yum], version)
|
63
59
|
end
|
64
60
|
|
65
61
|
concurrence do
|
66
62
|
source_repositories.each do |repositories|
|
67
63
|
sequence do
|
68
|
-
if repositories.present? && separated_repo_map[:other].keys.include?(repositories)
|
64
|
+
if !options[:importing] && repositories.present? && separated_repo_map[:other].keys.include?(repositories)
|
69
65
|
plan_action(Repository::CloneToVersion, repositories, version, repository_mapping[repositories],
|
70
66
|
:repos_units => options[:repos_units])
|
71
67
|
end
|
@@ -78,14 +74,6 @@ module Actions
|
|
78
74
|
end
|
79
75
|
end
|
80
76
|
|
81
|
-
if SmartProxy.pulp_primary.has_feature?(SmartProxy::PULP_FEATURE)
|
82
|
-
has_modules = content_view.publish_puppet_environment?
|
83
|
-
plan_action(ContentViewPuppetEnvironment::CreateForVersion, version)
|
84
|
-
unless options[:skip_promotion]
|
85
|
-
plan_action(ContentViewPuppetEnvironment::Clone, version, :environment => library,
|
86
|
-
:puppet_modules_present => has_modules)
|
87
|
-
end
|
88
|
-
end
|
89
77
|
plan_action(Candlepin::Environment::SetContent, content_view, library, content_view.content_view_environment(library)) unless options[:skip_promotion]
|
90
78
|
plan_action(Katello::Foreman::ContentUpdate, library, content_view) unless options[:skip_promotion]
|
91
79
|
plan_action(ContentView::ErrataMail, content_view, library) unless options[:skip_promotion]
|
@@ -147,14 +135,6 @@ module Actions
|
|
147
135
|
rescue ::Katello::Errors::CapsuleCannotBeReached # skip any capsules that cannot be connected to
|
148
136
|
end
|
149
137
|
|
150
|
-
def content_view_version_id
|
151
|
-
input['content_view_version_id']
|
152
|
-
end
|
153
|
-
|
154
|
-
def content_view_version_name
|
155
|
-
input['content_view_version_name']
|
156
|
-
end
|
157
|
-
|
158
138
|
private
|
159
139
|
|
160
140
|
def include_other_components(override_components, content_view)
|
@@ -199,15 +179,25 @@ module Actions
|
|
199
179
|
end
|
200
180
|
|
201
181
|
def handle_import(version, path:, metadata:)
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
182
|
+
sequence do
|
183
|
+
plan_action(::Actions::Pulp3::Orchestration::ContentViewVersion::Import, version, path: path, metadata: metadata)
|
184
|
+
plan_action(::Actions::Pulp3::Orchestration::ContentViewVersion::CopyVersionUnitsToLibrary, version)
|
185
|
+
concurrence do
|
186
|
+
version.importable_repositories.pluck(:id).each do |id|
|
187
|
+
plan_action(Katello::Repository::IndexContent, id: id)
|
188
|
+
end
|
207
189
|
end
|
208
190
|
end
|
209
191
|
end
|
210
192
|
|
193
|
+
def content_view_version_id
|
194
|
+
input['content_view_version_id']
|
195
|
+
end
|
196
|
+
|
197
|
+
def content_view_version_name
|
198
|
+
input['content_view_version_name']
|
199
|
+
end
|
200
|
+
|
211
201
|
apipie :class, "A class representing #{self} object" do
|
212
202
|
desc 'This object is available as **@object** variable in
|
213
203
|
webhook templates when a corresponding event occures.
|
@@ -18,11 +18,6 @@ module Actions
|
|
18
18
|
plan_action(Repository::Destroy, repo, skip_environment_update: true)
|
19
19
|
end
|
20
20
|
end
|
21
|
-
|
22
|
-
if (puppet_env = content_view.puppet_env(environment))
|
23
|
-
plan_action(Actions::Foreman::Environment::Destroy, puppet_env.puppet_environment) if puppet_env.puppet_environment
|
24
|
-
plan_action(ContentViewPuppetEnvironment::Destroy, puppet_env) unless organization_destroy
|
25
|
-
end
|
26
21
|
end
|
27
22
|
plan_action(Candlepin::Environment::Destroy, cp_id: cv_env.cp_id) unless organization_destroy
|
28
23
|
plan_self(:id => cv_env.id)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Actions
|
2
|
+
module Katello
|
3
|
+
module ContentViewVersion
|
4
|
+
class AutoCreateProducts < Actions::Base
|
5
|
+
def plan(organization:, metadata:)
|
6
|
+
helper = ::Katello::Pulp3::ContentViewVersion::ImportableProducts.
|
7
|
+
new(organization: organization,
|
8
|
+
metadata: metadata)
|
9
|
+
helper.generate!
|
10
|
+
concurrence do
|
11
|
+
helper.creatable.each do |product|
|
12
|
+
plan_action(::Actions::Katello::Product::Create, product[:product], organization)
|
13
|
+
end
|
14
|
+
helper.updatable.each do |product|
|
15
|
+
plan_action(::Actions::Katello::Product::Update, product[:product], product[:options])
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Actions
|
2
|
+
module Katello
|
3
|
+
module ContentViewVersion
|
4
|
+
class AutoCreateRepositories < Actions::Base
|
5
|
+
def plan(organization:, metadata:)
|
6
|
+
helper = ::Katello::Pulp3::ContentViewVersion::ImportableRepositories.
|
7
|
+
new(organization: organization,
|
8
|
+
metadata: metadata)
|
9
|
+
helper.generate!
|
10
|
+
sequence do
|
11
|
+
helper.creatable.each do |root|
|
12
|
+
plan_action(::Actions::Katello::Repository::CreateRoot, root[:repository])
|
13
|
+
end
|
14
|
+
helper.updatable.each do |root|
|
15
|
+
plan_action(::Actions::Katello::Repository::Update, root[:repository], root[:options])
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -8,22 +8,12 @@ module Actions
|
|
8
8
|
destroy_env_content = !options.fetch(:skip_destroy_env_content, false)
|
9
9
|
repos = destroy_env_content ? version.repositories : version.archived_repos
|
10
10
|
|
11
|
-
puppet_envs = []
|
12
|
-
if destroy_env_content
|
13
|
-
puppet_envs = version.content_view_puppet_environments
|
14
|
-
elsif version.archive_puppet_environment
|
15
|
-
puppet_envs = [version.archive_puppet_environment]
|
16
|
-
end
|
17
|
-
|
18
11
|
sequence do
|
19
12
|
concurrence do
|
20
13
|
repos.each do |repo|
|
21
14
|
repo_options = options.clone
|
22
15
|
plan_action(Repository::Destroy, repo, repo_options)
|
23
16
|
end
|
24
|
-
puppet_envs.each do |cvpe|
|
25
|
-
plan_action(ContentViewPuppetEnvironment::Destroy, cvpe) unless version.default?
|
26
|
-
end
|
27
17
|
end
|
28
18
|
end
|
29
19
|
|