katello 3.8.1 → 3.9.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/README.md +7 -7
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +16 -9
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
- data/app/controllers/katello/api/v2/api_controller.rb +20 -22
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +5 -1
- data/app/controllers/katello/api/v2/content_view_histories_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +12 -12
- data/app/controllers/katello/api/v2/content_views_controller.rb +15 -1
- data/app/controllers/katello/api/v2/host_errata_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +12 -4
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +12 -0
- data/app/controllers/katello/api/v2/module_streams_controller.rb +49 -0
- data/app/controllers/katello/api/v2/organizations_controller.rb +3 -1
- data/app/controllers/katello/api/v2/package_groups_controller.rb +1 -1
- data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +5 -4
- data/app/controllers/katello/api/v2/products_controller.rb +1 -1
- data/app/controllers/katello/api/v2/puppet_modules_controller.rb +5 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +80 -84
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +18 -7
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +2 -6
- data/app/controllers/katello/api/v2/sync_plans_controller.rb +13 -24
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +12 -5
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +2 -5
- data/app/controllers/katello/react_controller.rb +2 -0
- data/app/controllers/katello/remote_execution_controller.rb +16 -5
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +0 -2
- data/app/lib/actions/candlepin/import_pool_handler.rb +40 -15
- data/app/lib/actions/katello/capsule_content/create_repos.rb +1 -0
- data/app/lib/actions/katello/content_view/publish.rb +21 -2
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +1 -1
- data/app/lib/actions/katello/environment/destroy.rb +2 -3
- data/app/lib/actions/katello/environment/publish_repositories.rb +1 -1
- data/app/lib/actions/katello/event_queue/monitor.rb +9 -15
- data/app/lib/actions/katello/event_queue/poller_thread.rb +24 -1
- data/app/lib/actions/katello/event_queue/suspended_action.rb +2 -2
- data/app/lib/actions/katello/host/hypervisors_update.rb +82 -22
- data/app/lib/actions/katello/organization/manifest_refresh.rb +1 -1
- data/app/lib/actions/katello/product/content_create.rb +30 -38
- data/app/lib/actions/katello/product/content_destroy.rb +11 -12
- data/app/lib/actions/katello/product/create.rb +0 -1
- data/app/lib/actions/katello/product/update.rb +0 -2
- data/app/lib/actions/katello/repository/clear.rb +2 -0
- data/app/lib/actions/katello/repository/clone_to_environment.rb +0 -2
- data/app/lib/actions/katello/repository/clone_to_version.rb +15 -3
- data/app/lib/actions/katello/repository/clone_yum_content.rb +21 -2
- data/app/lib/actions/katello/repository/clone_yum_metadata.rb +1 -1
- data/app/lib/actions/katello/repository/correct_checksum.rb +5 -5
- data/app/lib/actions/katello/repository/create.rb +7 -7
- data/app/lib/actions/katello/repository/create_root.rb +22 -0
- data/app/lib/actions/katello/repository/destroy.rb +11 -6
- data/app/lib/actions/katello/repository/discover.rb +5 -3
- data/app/lib/actions/katello/repository/export.rb +1 -1
- data/app/lib/actions/katello/repository/fetch_pxe_files.rb +13 -27
- data/app/lib/actions/katello/repository/index_module_streams.rb +16 -0
- data/app/lib/actions/katello/repository/metadata_generate.rb +1 -1
- data/app/lib/actions/katello/repository/sync.rb +0 -2
- data/app/lib/actions/katello/repository/update.rb +15 -28
- data/app/lib/actions/katello/repository_set/disable_repository.rb +5 -13
- data/app/lib/actions/katello/repository_set/enable_repository.rb +3 -16
- data/app/lib/actions/katello/repository_set/scan_cdn.rb +4 -32
- data/app/lib/actions/katello/sync_plan/run.rb +37 -0
- data/app/lib/actions/pulp/abstract.rb +7 -2
- data/app/lib/actions/pulp/abstract_async_task.rb +1 -0
- data/app/lib/actions/pulp/consumer/generate_applicability.rb +1 -0
- data/app/lib/actions/pulp/repository/copy_module_default.rb +11 -0
- data/app/lib/actions/pulp/repository/copy_module_stream.rb +11 -0
- data/app/lib/actions/pulp/repository/create.rb +2 -0
- data/app/lib/actions/pulp/repository/distributor_publish.rb +3 -2
- data/app/lib/actions/pulp/repository/remove_module_default.rb +11 -0
- data/app/lib/actions/pulp/repository/remove_module_stream.rb +11 -0
- data/app/lib/actions/pulp/repository/sync.rb +6 -19
- data/app/lib/actions/pulp/repository/update_importer.rb +9 -7
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +42 -0
- data/app/lib/katello/concerns/renderer_extensions.rb +6 -4
- data/app/lib/katello/http_resource.rb +5 -1
- data/app/lib/katello/repo_discovery.rb +6 -2
- data/app/lib/katello/resources/candlepin/consumer.rb +18 -1
- data/app/lib/katello/resources/candlepin/owner.rb +9 -0
- data/app/lib/katello/resources/candlepin/pool.rb +2 -2
- data/app/lib/katello/validators/root_repository_unique_attribute_validator.rb +13 -0
- data/app/models/katello/authorization/product.rb +3 -4
- data/app/models/katello/authorization/repository.rb +4 -4
- data/app/models/katello/candlepin/repository_mapper.rb +12 -26
- data/app/models/katello/concerns/audit_search.rb +13 -0
- data/app/models/katello/concerns/content_facet_host_extensions.rb +1 -1
- data/app/models/katello/concerns/content_view_filter_rule_common.rb +1 -0
- data/app/models/katello/concerns/host_managed_extensions.rb +68 -2
- data/app/models/katello/concerns/hostgroup_extensions.rb +13 -0
- data/app/models/katello/concerns/location_extensions.rb +3 -3
- data/app/models/katello/concerns/organization_extensions.rb +7 -3
- data/app/models/katello/concerns/pulp_database_unit.rb +1 -0
- data/app/models/katello/concerns/recurring_logic_extensions.rb +11 -0
- data/app/models/katello/concerns/redhat_extensions.rb +0 -25
- data/app/models/katello/concerns/search_by_repository_name.rb +21 -0
- data/app/models/katello/concerns/setting_extensions.rb +1 -1
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +43 -0
- data/app/models/katello/content.rb +7 -3
- data/app/models/katello/content_view.rb +4 -4
- data/app/models/katello/content_view_component.rb +1 -1
- data/app/models/katello/content_view_history.rb +1 -0
- data/app/models/katello/content_view_version.rb +14 -2
- data/app/models/katello/docker_manifest_list.rb +1 -1
- data/app/models/katello/docker_meta_tag.rb +11 -2
- data/app/models/katello/docker_tag.rb +1 -1
- data/app/models/katello/erratum.rb +6 -0
- data/app/models/katello/file_unit.rb +0 -1
- data/app/models/katello/glue/candlepin/owner.rb +1 -0
- data/app/models/katello/glue/candlepin/pool.rb +1 -2
- data/app/models/katello/glue/candlepin/product.rb +0 -4
- data/app/models/katello/glue/candlepin/repository.rb +0 -21
- data/app/models/katello/glue/provider.rb +4 -2
- data/app/models/katello/glue/pulp/repo.rb +10 -173
- data/app/models/katello/glue/pulp/repos.rb +2 -112
- data/app/models/katello/gpg_key.rb +6 -14
- data/app/models/katello/host/content_facet.rb +1 -1
- data/app/models/katello/host/subscription_facet.rb +32 -8
- data/app/models/katello/kt_environment.rb +9 -29
- data/app/models/katello/module_profile.rb +6 -0
- data/app/models/katello/module_profile_rpm.rb +5 -0
- data/app/models/katello/module_stream.rb +112 -0
- data/app/models/katello/module_stream_artifact.rb +5 -0
- data/app/models/katello/ostree_branch.rb +0 -1
- data/app/models/katello/package_group.rb +1 -1
- data/app/models/katello/pool.rb +4 -0
- data/app/models/katello/product.rb +18 -21
- data/app/models/katello/product_content.rb +2 -2
- data/app/models/katello/puppet_module.rb +1 -0
- data/app/models/katello/purpose_addons_status.rb +50 -0
- data/app/models/katello/purpose_role_status.rb +50 -0
- data/app/models/katello/purpose_sla_status.rb +48 -0
- data/app/models/katello/purpose_status.rb +56 -0
- data/app/models/katello/purpose_usage_status.rb +50 -0
- data/app/models/katello/repository.rb +116 -280
- data/app/models/katello/repository_module_stream.rb +7 -0
- data/app/models/katello/root_repository.rb +262 -0
- data/app/models/katello/subscription_status.rb +1 -1
- data/app/models/katello/sync_plan.rb +93 -40
- data/app/presenters/katello/content_view_version_compare_presenter.rb +7 -2
- data/app/services/katello/candlepin/consumer.rb +25 -0
- data/app/services/katello/candlepin/message_handler.rb +18 -2
- data/app/services/katello/managed_content_medium_provider.rb +27 -0
- data/app/services/katello/product_content_finder.rb +3 -3
- data/app/services/katello/pulp/module_stream.rb +9 -0
- data/app/services/katello/pulp/repository.rb +22 -0
- data/app/services/katello/pulp/srpm.rb +1 -1
- data/app/services/katello/pxe_files_downloader.rb +41 -0
- data/app/services/katello/registration_manager.rb +5 -0
- data/app/views/katello/api/v2/content_facet/show.json.rabl +0 -4
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +12 -2
- data/app/views/katello/api/v2/debs/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/docker_manifest_lists/compare.json.rabl +10 -0
- data/app/views/katello/api/v2/environments/show.json.rabl +1 -0
- data/app/views/katello/api/v2/hosts/host_collections.json.rabl +3 -0
- data/app/views/katello/api/v2/module_streams/base.json.rabl +4 -0
- data/app/views/katello/api/v2/module_streams/index.json.rabl +7 -0
- data/app/views/katello/api/v2/module_streams/name_stream.json.rabl +3 -0
- data/app/views/katello/api/v2/module_streams/name_streams.json.rabl +7 -0
- data/app/views/katello/api/v2/module_streams/show.json.rabl +21 -0
- data/app/views/katello/api/v2/organizations/show.json.rabl +4 -1
- data/app/views/katello/api/v2/products/base.json.rabl +1 -1
- data/app/views/katello/api/v2/repositories/base.json.rabl +23 -10
- data/app/views/katello/api/v2/repositories/show.json.rabl +47 -38
- data/app/views/katello/api/v2/smart_proxies/download_policy.json.rabl +1 -0
- data/app/views/katello/api/v2/subscription_facet/base.json.rabl +1 -1
- data/app/views/katello/api/v2/sync_plans/show.json.rabl +2 -1
- data/app/views/katello/layouts/react.html.erb +1 -0
- data/config/katello.yaml.example +1 -2
- data/config/routes.rb +5 -0
- data/config/routes/api/v2.rb +12 -1
- data/config/routes/overrides.rb +1 -0
- data/db/migrate/20150114225023_add_upstream_name_to_repository.rb +7 -2
- data/db/migrate/20170208215148_add_docker_repo_name.rb +10 -1
- data/db/migrate/20180326190408_move_subscription_products.rb +2 -0
- data/db/migrate/20180622105300_add_docker_tags_whitelist_to_repository.rb +9 -0
- data/db/migrate/20180725083800_change_repository_password_length.rb +5 -0
- data/db/migrate/20180806205420_add_index_to_content_view_version.rb +5 -0
- data/db/migrate/20180807145652_create_katello_module_streams.rb +88 -0
- data/db/migrate/20180807164405_remove_repository_cp_label.rb +5 -0
- data/db/migrate/20180808013432_add_system_purpose_attrs.rb +39 -0
- data/db/migrate/20180814202747_add_recurring_logic_to_sync_plan.rb +12 -0
- data/db/migrate/20180816142044_add_description_to_katello_module_streams.rb +6 -0
- data/db/migrate/20180821144248_add_cron_logic_to_sync_plans.rb +5 -0
- data/db/migrate/20180828161400_remove_join_table_for_role_and_usage.rb +20 -0
- data/db/migrate/20180917173645_add_source_repo_checksum_type_to_katello_repositories.rb +1 -1
- data/db/migrate/20180920123913_drop_repo_module_streams_timestamp_not_null.rb +7 -0
- data/db/migrate/20180920171008_change_repository_password_to_text.rb +17 -0
- data/db/migrate/20180920214134_create_repository_root.rb +142 -0
- data/db/seeds.d/111-container-image-bookmarks.rb +19 -0
- data/db/seeds.d/111-upgrade_tasks.rb +9 -0
- data/db/seeds.d/150-module_job_templates.rb +12 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/module-stream-actions.service.js +26 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/subscription-add-or-remove.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-module-streams-modal.controller.js +60 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-host-bulk-module-streams-modal.html +70 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +16 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-repository-sets-modal.html +1 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-modal-helper.service.js +11 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js +8 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js +14 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js +48 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-module-streams.html +68 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +15 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +59 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +81 -27
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-provisioning-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-repositories.service.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-repositories.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/new/content-view-new.controller.js +7 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/new/views/content-view-new.html +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +38 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-module-streams.html +8 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-ostree-branches.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-package-groups.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-packages.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-yum.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +7 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/docker-tags.controller.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/content.service.js +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-module-streams.html +38 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js +11 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/environments.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum-repositories.controller.js +6 -22
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-repositories.html +7 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-details.controller.js +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-info.html +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/module-streams/module-stream.factory.js +27 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/module-streams/module-streams.module.js +15 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/module-streams/views/partials/module-streams-table.html +25 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/package-repositories.controller.js +6 -22
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/package-repositories.html +7 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/repositories-filters.service.js +89 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js +4 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +15 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.filter.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +15 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +36 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-module-streams.html +17 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repositories.routes.js +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/discovery.controller.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/views/discovery.html +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/new/new-sync-plan-modal.controller.js +6 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/repository-set.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details-info.controller.js +20 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html +23 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/new/new-sync-plan.controller.js +10 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/new/views/new-sync-plan-form.html +11 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plan-helper.service.js +3 -3
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/bastion_katello.scss +5 -1
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +2 -2
- data/lib/katello/engine.rb +7 -12
- data/lib/katello/permission_creator.rb +5 -1
- data/lib/katello/permissions/host_permissions.rb +1 -0
- data/lib/katello/plugin.rb +38 -14
- data/lib/katello/tasks/clean_backend_objects.rake +7 -3
- data/lib/katello/tasks/reimport.rake +1 -0
- data/lib/katello/tasks/repository.rake +11 -8
- data/lib/katello/tasks/upgrades/3.9/migrate_sync_plans.rake +29 -0
- data/lib/katello/version.rb +1 -1
- data/package.json +11 -7
- data/webpack/__mocks__/foremanReact/common/I18n.js +5 -0
- data/webpack/components/MultiSelect/index.js +15 -3
- data/webpack/components/PaginationRow/index.js +1 -1
- data/webpack/components/Search/__snapshots__/Search.test.js.snap +1 -0
- data/webpack/components/Search/index.js +5 -1
- data/webpack/components/SelectOrg/SetOrganization.js +2 -1
- data/webpack/components/WithOrganization/__snapshots__/withOrganization.test.js.snap +41 -0
- data/webpack/components/WithOrganization/withOrganization.js +42 -10
- data/webpack/components/WithOrganization/withOrganization.test.js +26 -0
- data/webpack/containers/Application/Headers.js +11 -0
- data/webpack/containers/Application/Routes.js +1 -1
- data/webpack/containers/Application/config.js +23 -7
- data/webpack/containers/Application/withHeaders.js +15 -0
- data/webpack/move_to_foreman/common/helpers.js +72 -8
- data/webpack/move_to_foreman/components/common/ConfirmDialog/ConfirmDialog.js +1 -0
- data/webpack/move_to_foreman/components/common/Dialog/Dialog.js +1 -0
- data/webpack/move_to_foreman/components/common/EmptyState/index.js +1 -0
- data/webpack/move_to_foreman/components/common/ModalProgressBar/ModalProgressBar.js +1 -1
- data/webpack/move_to_foreman/components/common/table/formatters/selectionCellFormatter.js +1 -0
- data/webpack/move_to_pf/OptionTooltip/OptionTooltip.scss +20 -0
- data/webpack/move_to_pf/OptionTooltip/__tests__/OptionTooltip.test.js +32 -0
- data/webpack/move_to_pf/OptionTooltip/__tests__/__snapshots__/OptionTooltip.test.js.snap +84 -0
- data/webpack/move_to_pf/OptionTooltip/index.js +83 -0
- data/webpack/move_to_pf/TypeAhead/TypeAhead.js +15 -2
- data/webpack/move_to_pf/react-bootstrap-select/index.js +10 -4
- data/webpack/move_to_pf/test-utils/testHelpers.js +14 -2
- data/webpack/redux/actions/RedHatRepositories/enabled.js +29 -3
- data/webpack/redux/actions/RedHatRepositories/helpers.js +1 -1
- data/webpack/redux/actions/RedHatRepositories/repositorySetRepositories.js +27 -0
- data/webpack/redux/consts.js +8 -0
- data/webpack/redux/reducers/RedHatRepositories/__tests__/enabled.test.js +62 -0
- data/webpack/redux/reducers/RedHatRepositories/{repositorySetRepositories.test.js → __tests__/repositorySetRepositories.test.js} +31 -3
- data/webpack/redux/reducers/RedHatRepositories/{sets.test.js → __tests__/sets.test.js} +3 -3
- data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +16 -0
- data/webpack/redux/reducers/RedHatRepositories/enabled.js +34 -18
- data/webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js +10 -0
- data/webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.js +39 -48
- data/webpack/redux/reducers/index.js +6 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailArtifacts.js +19 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailInfo.js +51 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetails.js +147 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsActions.js +25 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsConstants.js +3 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailsReducer.js +33 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/ModuleStreamDetailProfiles.js +19 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/ProfileRpmsCellFormatter.js +53 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/ProfileRpmsCellFormatter.scss +4 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/TableSchema.js +35 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ModuleStreamDetailProfiles.test.js +14 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js +24 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/__tests__/__snapshots__/ModuleStreamDetailProfiles.test.js.snap +126 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/__tests__/__snapshots__/ProfileRpmsCellFormatter.test.js.snap +14 -0
- data/webpack/scenes/ModuleStreams/Details/Repositories/ModuleStreamDetailRepositories.js +19 -0
- data/webpack/scenes/ModuleStreams/Details/Repositories/TableSchema.js +39 -0
- data/webpack/scenes/ModuleStreams/Details/Repositories/__tests__/ModuleStreamDetailRepositories.test.js +14 -0
- data/webpack/scenes/ModuleStreams/Details/Repositories/__tests__/__snapshots__/ModuleStreamDetailRepositories.test.js.snap +70 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetailArtifacts.test.js +14 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetailInfo.test.js +14 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetails.test.js +27 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetailsActions.test.js +42 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetailsReducer.test.js +33 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetailArtifacts.test.js.snap +18 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetailInfo.test.js.snap +111 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetails.test.js.snap +552 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetailsActions.test.js.snap +144 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetailsReducer.test.js.snap +50 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/moduleStreamDetails.fixtures.js +115 -0
- data/webpack/scenes/ModuleStreams/Details/index.js +17 -0
- data/webpack/scenes/ModuleStreams/ModuleStreamsActions.js +29 -0
- data/webpack/scenes/ModuleStreams/ModuleStreamsConstants.js +3 -0
- data/webpack/scenes/ModuleStreams/ModuleStreamsPage.js +98 -0
- data/webpack/scenes/ModuleStreams/ModuleStreamsReducer.js +43 -0
- data/webpack/scenes/ModuleStreams/ModuleStreamsTable.js +38 -0
- data/webpack/scenes/ModuleStreams/ModuleStreamsTableSchema.js +69 -0
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js +27 -0
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamsActions.test.js +49 -0
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamsReducer.test.js +46 -0
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js +25 -0
- data/webpack/scenes/ModuleStreams/__tests__/__snapshots__/ModuleStreamPage.test.js.snap +69 -0
- data/webpack/scenes/ModuleStreams/__tests__/__snapshots__/ModuleStreamsTable.test.js.snap +95 -0
- data/webpack/scenes/ModuleStreams/__tests__/moduleStreams.fixtures.js +72 -0
- data/webpack/scenes/ModuleStreams/index.js +17 -0
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository/EnabledRepository.js +120 -0
- data/webpack/scenes/RedHatRepositories/components/{EnabledRepository.stories.js → EnabledRepository/EnabledRepository.stories.js} +0 -0
- data/webpack/scenes/RedHatRepositories/components/{EnabledRepositoryContent.js → EnabledRepository/EnabledRepositoryContent.js} +0 -0
- data/webpack/scenes/RedHatRepositories/components/{__tests__ → EnabledRepository/__tests__}/EnabledRepository.test.js +6 -2
- data/webpack/scenes/RedHatRepositories/components/{__tests__ → EnabledRepository/__tests__}/EnabledRepositoryContent.test.js +0 -0
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository/__tests__/__snapshots__/EnabledRepository.test.js.snap +31 -0
- data/webpack/scenes/RedHatRepositories/components/{__tests__ → EnabledRepository/__tests__}/__snapshots__/EnabledRepositoryContent.test.js.snap +0 -0
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository/index.js +17 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySet.js +1 -1
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepositories.js +43 -5
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepositoriesHelpers.js +3 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository/RepositorySetRepository.js +168 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository/__test__/RepositorySetRepository.test.js +38 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository/__test__/__snapshots__/RepositorySetRepository.test.js.snap +70 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository/index.js +18 -0
- data/webpack/scenes/RedHatRepositories/components/SearchBar.js +4 -3
- data/webpack/scenes/RedHatRepositories/components/__tests__/RepositorySetRepositories.test.js +44 -0
- data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/RepositorySetRepositories.test.js.snap +48 -0
- data/webpack/scenes/RedHatRepositories/helpers.js +19 -15
- data/webpack/scenes/RedHatRepositories/index.js +1 -3
- data/webpack/scenes/RedHatRepositories/index.scss +16 -0
- data/webpack/scenes/Settings/Tables/TableActions.js +73 -0
- data/webpack/scenes/Settings/Tables/TableConstants.js +11 -0
- data/webpack/scenes/Settings/Tables/TableHelpers.js +8 -0
- data/webpack/scenes/Settings/Tables/TableReducer.js +46 -0
- data/webpack/scenes/Settings/Tables/__tests__/Table.fixtures.js +125 -0
- data/webpack/scenes/Settings/Tables/__tests__/TableActions.test.js +84 -0
- data/webpack/scenes/Settings/Tables/__tests__/TableReducer.test.js +41 -0
- data/webpack/scenes/Settings/Tables/__tests__/__snapshots__/TableReducer.test.js.snap +76 -0
- data/webpack/scenes/Settings/index.js +4 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionAttributes.js +2 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailActions.js +1 -1
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailAssociations.js +1 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailInfo.js +1 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProduct.js +20 -13
- data/webpack/scenes/Subscriptions/Details/{SubscriptionDetailEnabledProducts.js → SubscriptionDetailProductContent.js} +5 -5
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailReducer.js +3 -3
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +7 -6
- data/webpack/scenes/Subscriptions/Details/__tests__/{SubscriptionDetailEnabledProducts.test.js → SubscriptionDetailProductContent.test.js} +4 -4
- data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js +2 -2
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailProduct.test.js.snap +28 -16
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/{SubscriptionDetailEnabledProducts.test.js.snap → SubscriptionDetailProductContent.test.js.snap} +1 -1
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +16 -16
- data/webpack/scenes/Subscriptions/Details/__tests__/subscriptionDetails.fixtures.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/DeleteManifestModalText.js +2 -0
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +38 -61
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryReducer.js +4 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryTableSchema.js +1 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +3 -3
- data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +12 -3
- data/webpack/scenes/Subscriptions/SubscriptionActions.js +26 -0
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +56 -0
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +26 -11
- data/webpack/scenes/Subscriptions/SubscriptionValidations.js +1 -0
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +144 -39
- data/webpack/scenes/Subscriptions/SubscriptionsPage.scss +7 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +10 -16
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsTableSchema.js +1 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsPage.test.js +1 -1
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +11 -1
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +15 -2
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +12 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +19 -0
- data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +87 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/EntitlementsInlineEditFormatter.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js +31 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +16 -11
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +18 -3
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionTypeFormatter.test.js +33 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +29 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionTypeFormatter.test.js.snap +34 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +24 -43
- data/webpack/scenes/Subscriptions/index.js +24 -7
- data/webpack/scenes/Tasks/TaskActions.js +43 -19
- data/webpack/scenes/Tasks/TaskConstants.js +1 -0
- data/webpack/scenes/Tasks/__tests__/TaskActions.test.js +15 -12
- data/webpack/scenes/Tasks/helpers.js +17 -27
- data/webpack/services/api/index.js +3 -0
- metadata +160 -52
- data/app/lib/actions/katello/repository/scheduled_sync.rb +0 -15
- data/app/lib/actions/katello/sync_plan/add_products.rb +0 -27
- data/app/lib/actions/katello/sync_plan/destroy.rb +0 -26
- data/app/lib/actions/katello/sync_plan/remove_products.rb +0 -23
- data/app/lib/actions/katello/sync_plan/update.rb +0 -20
- data/app/lib/actions/pulp/repos/update.rb +0 -24
- data/app/lib/actions/pulp/repository/ensure_sync_notification.rb +0 -11
- data/app/lib/actions/pulp/repository/remove_schedule.rb +0 -16
- data/app/lib/actions/pulp/repository/update_schedule.rb +0 -47
- data/app/lib/katello/validators/repository_unique_attribute_validator.rb +0 -13
- data/app/models/katello/candlepin/docker_repository_mapper.rb +0 -77
- data/app/models/katello/input_template_renderer.rb +0 -7
- data/lib/katello/tasks/upgrades/2.4/import_distributions.rake +0 -11
- data/lib/katello/tasks/upgrades/2.4/import_package_groups.rake +0 -11
- data/lib/katello/tasks/upgrades/2.4/import_puppet_modules.rake +0 -12
- data/lib/katello/tasks/upgrades/2.4/import_rpms.rake +0 -12
- data/lib/katello/tasks/upgrades/3.0/add_export_distributor.rake +0 -14
- data/lib/katello/tasks/upgrades/3.0/delete_docker_v1_content.rake +0 -27
- data/lib/katello/tasks/upgrades/3.0/update_puppet_repository_distributors.rake +0 -20
- data/lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake +0 -9
- data/lib/katello/tasks/upgrades/3.3/hypervisors.rake +0 -7
- data/lib/katello/tasks/upgrades/3.4/reindex_docker_tags.rake +0 -12
- data/lib/katello/tasks/upgrades/3.4/remove_unused_products.rake +0 -28
- data/lib/katello/tasks/upgrades/3.6/import_backend_consumer_attributes.rake +0 -32
- data/lib/katello/tasks/upgrades/3.6/import_product_content.rake +0 -12
- data/lib/katello/tasks/upgrades/3.6/republish_file_repos.rake +0 -16
- data/lib/katello/tasks/upgrades/3.7/import_pools.rake +0 -12
- data/lib/katello/tasks/upgrades/3.7/make_all_ks_repos_bootable.rake +0 -11
- data/webpack/helpers/caret.js +0 -6
- data/webpack/redux/reducers/RedHatRepositories/enabled.test.js +0 -36
- data/webpack/redux/reducers/RedHatRepositories/filters.fixtures.js +0 -5
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository.js +0 -105
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository.js +0 -129
- data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/EnabledRepository.test.js.snap +0 -25
@@ -96,10 +96,12 @@ module Katello
|
|
96
96
|
param :content_type, String, :desc => N_("One of yum or docker")
|
97
97
|
param :upstream_username, String, :desc => N_("Username to access URL")
|
98
98
|
param :upstream_password, String, :desc => N_("Password to access URL")
|
99
|
+
param :search, String, :desc => N_("Search pattern (defaults to '*')")
|
99
100
|
def repo_discover
|
100
101
|
fail _("url not defined.") if params[:url].blank?
|
102
|
+
registry_search = params[:search].empty? ? '*' : params[:search]
|
101
103
|
task = async_task(::Actions::Katello::Repository::Discover, params[:url], params[:content_type],
|
102
|
-
params[:upstream_username], params[:upstream_password])
|
104
|
+
params[:upstream_username], params[:upstream_password], registry_search)
|
103
105
|
respond_for_async :resource => task
|
104
106
|
end
|
105
107
|
|
@@ -7,7 +7,7 @@ module Katello
|
|
7
7
|
|
8
8
|
api :POST, "/package_group", N_("Create a package group")
|
9
9
|
param :repository_id, String, :required => true, :desc => N_("repository_id")
|
10
|
-
param :name, String, :required => true, :desc => N_("package group name
|
10
|
+
param :name, String, :required => true, :desc => N_("package group name")
|
11
11
|
param :description, String, :desc => N_("package group description. Defaults to params[:name]")
|
12
12
|
param :user_visible, :bool, :desc => N_("set \"user_visible\" flag on package group. Defaults to true")
|
13
13
|
param :mandatory_package_names, Array, :desc => N_("mandatory package names to include in the package group")
|
@@ -31,12 +31,13 @@ module Katello
|
|
31
31
|
validate_contents = ::Foreman::Cast.to_bool(params[:validate_contents])
|
32
32
|
|
33
33
|
syncable_products = @products.syncable
|
34
|
-
|
34
|
+
syncable_roots = RootRepository.where(:product_id => syncable_products).has_url
|
35
35
|
|
36
|
-
|
37
|
-
|
36
|
+
syncable_roots = syncable_roots.yum_type if skip_metadata_check || validate_contents
|
37
|
+
syncable_roots = syncable_roots.where.not(:download_policy => ::Runcible::Models::YumImporter::DOWNLOAD_ON_DEMAND) if validate_contents
|
38
38
|
|
39
|
-
|
39
|
+
syncable_repositories = Katello::Repository.where(:root_id => syncable_roots).in_default_view
|
40
|
+
fail _("No syncable repositories found for selected products and options.") if syncable_roots.empty?
|
40
41
|
|
41
42
|
task = async_task(::Actions::BulkAction,
|
42
43
|
::Actions::Katello::Repository::Sync,
|
@@ -86,7 +86,7 @@ module Katello
|
|
86
86
|
api :GET, "/products/:id", N_("Show a product")
|
87
87
|
param :id, :number, :desc => N_("product numeric identifier"), :required => true
|
88
88
|
def show
|
89
|
-
find_product(:includes => [{:repositories => :environment}])
|
89
|
+
find_product(:includes => [{:root_repositories => {:repositories => :environment}}])
|
90
90
|
respond_for_show(:resource => @product)
|
91
91
|
end
|
92
92
|
|
@@ -10,5 +10,10 @@ module Katello
|
|
10
10
|
end
|
11
11
|
collection
|
12
12
|
end
|
13
|
+
|
14
|
+
def custom_collection_by_content_view_version(versions)
|
15
|
+
resource_class.joins(:content_view_puppet_environments)
|
16
|
+
.where("#{Katello::ContentViewPuppetEnvironment.table_name}.content_view_version_id" => versions)
|
17
|
+
end
|
13
18
|
end
|
14
19
|
end
|
@@ -2,6 +2,8 @@ module Katello
|
|
2
2
|
class Api::V2::RepositoriesController < Api::V2::ApiController # rubocop:disable Metrics/ClassLength
|
3
3
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
4
4
|
|
5
|
+
wrap_parameters :repository, :include => RootRepository.attribute_names
|
6
|
+
|
5
7
|
CONTENT_CREDENTIAL_GPG_KEY_TYPE = "gpg_key".freeze
|
6
8
|
CONTENT_CREDENTIAL_SSL_CA_CERT_TYPE = "ssl_ca_cert".freeze
|
7
9
|
CONTENT_CREDENTIAL_SSL_CLIENT_CERT_TYPE = "ssl_client_cert".freeze
|
@@ -16,16 +18,20 @@ module Katello
|
|
16
18
|
:import_uploads, :gpg_key_content]
|
17
19
|
before_action :find_content, :only => :remove_content
|
18
20
|
before_action :find_organization_from_repo, :only => [:update]
|
19
|
-
before_action :only => [:create, :update] { find_content_credential CONTENT_CREDENTIAL_GPG_KEY_TYPE }
|
20
|
-
before_action :only => [:create, :update] { find_content_credential CONTENT_CREDENTIAL_SSL_CA_CERT_TYPE }
|
21
|
-
before_action :only => [:create, :update] { find_content_credential CONTENT_CREDENTIAL_SSL_CLIENT_CERT_TYPE }
|
22
|
-
before_action :only => [:create, :update] { find_content_credential CONTENT_CREDENTIAL_SSL_CLIENT_KEY_TYPE }
|
23
21
|
before_action :error_on_rh_product, :only => [:create]
|
24
22
|
before_action :error_on_rh_repo, :only => [:destroy]
|
23
|
+
before_action(:only => [:create, :update]) { find_content_credential CONTENT_CREDENTIAL_GPG_KEY_TYPE }
|
24
|
+
before_action(:only => [:create, :update]) { find_content_credential CONTENT_CREDENTIAL_SSL_CA_CERT_TYPE }
|
25
|
+
before_action(:only => [:create, :update]) { find_content_credential CONTENT_CREDENTIAL_SSL_CLIENT_CERT_TYPE }
|
26
|
+
before_action(:only => [:create, :update]) { find_content_credential CONTENT_CREDENTIAL_SSL_CLIENT_KEY_TYPE }
|
25
27
|
|
26
|
-
skip_before_action :authorize, :only => [:
|
28
|
+
skip_before_action :authorize, :only => [:gpg_key_content]
|
27
29
|
skip_before_action :check_content_type, :only => [:upload_content]
|
28
30
|
|
31
|
+
def custom_index_relation(collection)
|
32
|
+
collection.includes(:product)
|
33
|
+
end
|
34
|
+
|
29
35
|
def_param_group :repo do
|
30
36
|
param :url, String, :desc => N_("repository source url")
|
31
37
|
param :gpg_key_id, :number, :desc => N_("id of the gpg key that will be assigned to the new repository")
|
@@ -33,20 +39,21 @@ module Katello
|
|
33
39
|
param :ssl_client_cert_id, :number, :desc => N_("Identifier of the SSL Client Cert")
|
34
40
|
param :ssl_client_key_id, :number, :desc => N_("Identifier of the SSL Client Key")
|
35
41
|
param :unprotected, :bool, :desc => N_("true if this repository can be published via HTTP")
|
36
|
-
param :checksum_type, String, :desc => N_("
|
37
|
-
param :docker_upstream_name, String, :desc => N_("
|
42
|
+
param :checksum_type, String, :desc => N_("Checksum of the repository, currently 'sha1' & 'sha256' are supported")
|
43
|
+
param :docker_upstream_name, String, :desc => N_("Name of the upstream docker repository")
|
44
|
+
param :docker_tags_whitelist, Array, :desc => N_("Comma separated list of tags to sync for Container Image repository")
|
38
45
|
param :download_policy, ["immediate", "on_demand", "background"], :desc => N_("download policy for yum repos (either 'immediate', 'on_demand', or 'background')")
|
39
|
-
param :mirror_on_sync, :bool, :desc => N_("true if this repository when synced has to be mirrored from the source and stale rpms removed
|
40
|
-
param :verify_ssl_on_sync, :bool, :desc => N_("if true, Katello will verify the upstream url's SSL certifcates are signed by a trusted CA
|
46
|
+
param :mirror_on_sync, :bool, :desc => N_("true if this repository when synced has to be mirrored from the source and stale rpms removed")
|
47
|
+
param :verify_ssl_on_sync, :bool, :desc => N_("if true, Katello will verify the upstream url's SSL certifcates are signed by a trusted CA")
|
41
48
|
param :upstream_username, String, :desc => N_("Username of the upstream repository user used for authentication")
|
42
49
|
param :upstream_password, String, :desc => N_("Password of the upstream repository user used for authentication")
|
43
|
-
param :ostree_upstream_sync_policy, ::Katello::
|
44
|
-
param :ostree_upstream_sync_depth, :number, :desc => N_("if a custom sync policy is chosen for ostree repositories then a 'depth' value must be provided
|
50
|
+
param :ostree_upstream_sync_policy, ::Katello::RootRepository::OSTREE_UPSTREAM_SYNC_POLICIES, :desc => N_("policies for syncing upstream ostree repositories")
|
51
|
+
param :ostree_upstream_sync_depth, :number, :desc => N_("if a custom sync policy is chosen for ostree repositories then a 'depth' value must be provided")
|
45
52
|
param :deb_releases, String, :desc => N_("comma separated list of releases to be synched from deb-archive")
|
46
53
|
param :deb_components, String, :desc => N_("comma separated list of repo components to be synched from deb-archive")
|
47
54
|
param :deb_architectures, String, :desc => N_("comma separated list of architectures to be synched from deb-archive")
|
48
|
-
param :ignore_global_proxy, :bool, :desc => N_("if true, will ignore the globally configured proxy when syncing
|
49
|
-
param :ignorable_content, Array, :desc => N_("List of content units to ignore while syncing a yum repository. Must be subset of %s") %
|
55
|
+
param :ignore_global_proxy, :bool, :desc => N_("if true, will ignore the globally configured proxy when syncing")
|
56
|
+
param :ignorable_content, Array, :desc => N_("List of content units to ignore while syncing a yum repository. Must be subset of %s") % RootRepository::IGNORABLE_CONTENT_UNIT_TYPES.join(",")
|
50
57
|
end
|
51
58
|
|
52
59
|
def_param_group :repo_create do
|
@@ -75,12 +82,12 @@ module Katello
|
|
75
82
|
param :content_type, RepositoryTypeManager.repository_types.keys, :desc => N_("limit to only repositories of this type")
|
76
83
|
param :name, String, :desc => N_("name of the repository"), :required => false
|
77
84
|
param :description, String, :desc => N_("description of the repository")
|
78
|
-
param :available_for, String, :desc => N_("interpret specified object to return only Repositories that can be associated with specified object. Only 'content_view'
|
85
|
+
param :available_for, String, :desc => N_("interpret specified object to return only Repositories that can be associated with specified object. Only 'content_view' & 'content_view_version' are supported."),
|
79
86
|
:required => false
|
80
87
|
param_group :search, Api::V2::ApiController
|
81
88
|
def index
|
82
89
|
base_args = [index_relation.distinct, :name, :asc]
|
83
|
-
options = {:includes => [:
|
90
|
+
options = {:includes => [:environment, {:root => [:gpg_key, :product]}]}
|
84
91
|
|
85
92
|
respond_to do |format|
|
86
93
|
format.csv do
|
@@ -88,12 +95,12 @@ module Katello
|
|
88
95
|
repos = scoped_search(*base_args, options)
|
89
96
|
csv_response(repos,
|
90
97
|
[:id, :name, :description, :label, :content_type, :arch, :url, :major, :minor,
|
91
|
-
:
|
98
|
+
:content_label, :pulp_id, :container_repository_name,
|
92
99
|
:download_policy, 'relative_path', 'product.id', 'product.name',
|
93
100
|
'environment_id'],
|
94
|
-
['Id', 'Name', '
|
95
|
-
'
|
96
|
-
'
|
101
|
+
['Id', 'Name', 'Description', 'label', 'Content Type', 'Arch', 'Url', 'Major', 'Minor',
|
102
|
+
'Content Label', 'Pulp Id', 'Container Repository Name', 'Download Policy', 'Relative Path',
|
103
|
+
'Product Id', 'Product Name',
|
97
104
|
'Environment Id'])
|
98
105
|
end
|
99
106
|
format.any do
|
@@ -106,8 +113,8 @@ module Katello
|
|
106
113
|
def index_relation
|
107
114
|
query = Repository.readable
|
108
115
|
query = index_relation_product(query)
|
109
|
-
query = query.
|
110
|
-
query = query.where(:name => params[:name]) if params[:name]
|
116
|
+
query = query.with_type(params[:content_type]) if params[:content_type]
|
117
|
+
query = query.where(:root_id => RootRepository.where(:name => params[:name])) if params[:name]
|
111
118
|
query = index_relation_content_unit(query)
|
112
119
|
query = index_relation_content_view(query)
|
113
120
|
query = index_relation_environment(query)
|
@@ -115,15 +122,15 @@ module Katello
|
|
115
122
|
end
|
116
123
|
|
117
124
|
def index_relation_product(query)
|
118
|
-
query = query.joins(:product).where("#{Product.table_name}.organization_id" => @organization) if @organization
|
119
|
-
query = query.where(
|
125
|
+
query = query.joins(:root => :product).where("#{Product.table_name}.organization_id" => @organization) if @organization
|
126
|
+
query = query.joins(:root).where("#{RootRepository.table_name}.product_id" => @product.id) if @product
|
120
127
|
query
|
121
128
|
end
|
122
129
|
|
123
130
|
def index_relation_content_view(query)
|
124
131
|
if params[:content_view_version_id]
|
125
132
|
query = query.where(:content_view_version_id => params[:content_view_version_id])
|
126
|
-
query = Repository.where(:id => query.
|
133
|
+
query = Katello::Repository.where(:id => query.select(:library_instance_id)) if params[:library]
|
127
134
|
elsif params[:content_view_id]
|
128
135
|
query = filter_by_content_view(query, params[:content_view_id], params[:environment_id], params[:available_for] == 'content_view')
|
129
136
|
end
|
@@ -139,8 +146,9 @@ module Katello
|
|
139
146
|
instance_ids += instances.where(:library_instance_id => nil)
|
140
147
|
query = Repository.where(:id => instance_ids)
|
141
148
|
elsif (params[:library] && !params[:environment_id]) || (params[:environment_id].blank? && params[:content_view_version_id].blank? && params[:content_view_id].blank?)
|
142
|
-
|
143
|
-
|
149
|
+
if params[:available_for] == 'content_view_version'
|
150
|
+
query = query.where.not(:content_view_version_id => nil, :environment_id => nil)
|
151
|
+
elsif @organization
|
144
152
|
query = query.where(:content_view_version_id => @organization.default_content_view.versions.first.id)
|
145
153
|
else
|
146
154
|
query = query.in_default_view
|
@@ -189,7 +197,7 @@ module Katello
|
|
189
197
|
param_group :repo_create
|
190
198
|
param_group :repo
|
191
199
|
def create
|
192
|
-
repo_params =
|
200
|
+
repo_params = filtered_repository_params
|
193
201
|
unless RepositoryTypeManager.creatable_by_user?(repo_params[:content_type])
|
194
202
|
msg = _("Invalid params provided - content_type must be one of %s") % RepositoryTypeManager.creatable_repository_types.keys.join(",")
|
195
203
|
fail HttpErrors::UnprocessableEntity, msg
|
@@ -209,10 +217,10 @@ module Katello
|
|
209
217
|
repo_params[:ssl_client_cert] = ssl_client_cert
|
210
218
|
repo_params[:ssl_client_key] = ssl_client_key
|
211
219
|
|
212
|
-
|
213
|
-
sync_task(::Actions::Katello::Repository::
|
214
|
-
repository =
|
215
|
-
respond_for_create(:resource => repository)
|
220
|
+
root = construct_repo_from_params(repo_params)
|
221
|
+
sync_task(::Actions::Katello::Repository::CreateRoot, root)
|
222
|
+
@repository = root.reload.library_instance
|
223
|
+
respond_for_create(:resource => @repository)
|
216
224
|
end
|
217
225
|
|
218
226
|
api :GET, "/repositories/repository_types", N_("Show the available repository types")
|
@@ -300,7 +308,7 @@ module Katello
|
|
300
308
|
param_group :repo
|
301
309
|
def update
|
302
310
|
repo_params = repository_params
|
303
|
-
sync_task(::Actions::Katello::Repository::Update, @repository, repo_params)
|
311
|
+
sync_task(::Actions::Katello::Repository::Update, @repository.root, repo_params)
|
304
312
|
respond_for_show(:resource => @repository)
|
305
313
|
end
|
306
314
|
|
@@ -311,34 +319,6 @@ module Katello
|
|
311
319
|
respond_for_destroy
|
312
320
|
end
|
313
321
|
|
314
|
-
api :POST, "/repositories/sync_complete"
|
315
|
-
desc N_("URL for post sync notification from pulp")
|
316
|
-
param 'token', String, :desc => N_("shared secret token"), :required => true
|
317
|
-
param 'payload', Hash, :required => true do
|
318
|
-
param 'repo_id', String, :required => true
|
319
|
-
end
|
320
|
-
param 'call_report', Hash, :required => true do
|
321
|
-
param 'task_id', String, :required => true
|
322
|
-
end
|
323
|
-
def sync_complete
|
324
|
-
if params[:token] != Rack::Utils.parse_query(URI(SETTINGS[:katello][:post_sync_url]).query)['token']
|
325
|
-
fail Errors::SecurityViolation, _("Token invalid during sync_complete.")
|
326
|
-
end
|
327
|
-
|
328
|
-
repo_id = params['payload']['repo_id']
|
329
|
-
task_id = params['call_report']['task_id']
|
330
|
-
User.current = User.anonymous_admin
|
331
|
-
|
332
|
-
repo = Repository.where(:pulp_id => repo_id).first
|
333
|
-
fail _("Couldn't find repository '%s'") % repo_id if repo.nil?
|
334
|
-
Rails.logger.info("Sync_complete called for #{repo.name}, running after_sync.")
|
335
|
-
|
336
|
-
unless repo.dynflow_handled_last_sync?(task_id)
|
337
|
-
async_task(::Actions::Katello::Repository::ScheduledSync, repo, task_id)
|
338
|
-
end
|
339
|
-
render :json => {}
|
340
|
-
end
|
341
|
-
|
342
322
|
api :PUT, "/repositories/:id/remove_packages"
|
343
323
|
api :PUT, "/repositories/:id/remove_docker_manifests"
|
344
324
|
api :PUT, "/repositories/:id/remove_puppet_modules"
|
@@ -436,8 +416,8 @@ module Katello
|
|
436
416
|
api :GET, "/repositories/:id/gpg_key_content", N_("Return the content of a repo gpg key, used directly by yum")
|
437
417
|
param :id, :number, :required => true
|
438
418
|
def gpg_key_content
|
439
|
-
if @repository.gpg_key && @repository.gpg_key.content.present?
|
440
|
-
render(:plain => @repository.gpg_key.content, :layout => false)
|
419
|
+
if @repository.root.gpg_key && @repository.root.gpg_key.content.present?
|
420
|
+
render(:plain => @repository.root.gpg_key.content, :layout => false)
|
441
421
|
else
|
442
422
|
head(404)
|
443
423
|
end
|
@@ -471,17 +451,27 @@ module Katello
|
|
471
451
|
end
|
472
452
|
end
|
473
453
|
|
454
|
+
def filtered_repository_params
|
455
|
+
params = repository_params
|
456
|
+
::Katello::RootRepository::CONTENT_ATTRIBUTE_RESTRICTIONS.each do |attribute, types|
|
457
|
+
params.delete(attribute) unless types.include?(params[:content_type])
|
458
|
+
end
|
459
|
+
params
|
460
|
+
end
|
461
|
+
|
474
462
|
def repository_params
|
475
463
|
keys = [:download_policy, :mirror_on_sync, :arch, :verify_ssl_on_sync, :upstream_password, :upstream_username,
|
476
464
|
:ostree_upstream_sync_depth, :ostree_upstream_sync_policy, :ignore_global_proxy,
|
477
|
-
:deb_releases, :deb_components, :deb_architectures, :description, {:ignorable_content => []}
|
465
|
+
:deb_releases, :deb_components, :deb_architectures, :description, {:ignorable_content => []},
|
466
|
+
{:docker_tags_whitelist => []}
|
478
467
|
]
|
479
468
|
|
480
469
|
keys += [:label, :content_type] if params[:action] == "create"
|
481
470
|
if params[:action] == 'create' || @repository.custom?
|
482
|
-
keys += [:url, :gpg_key_id, :ssl_ca_cert_id, :ssl_client_cert_id, :ssl_client_key_id, :unprotected, :name,
|
471
|
+
keys += [:url, :gpg_key_id, :ssl_ca_cert_id, :ssl_client_cert_id, :ssl_client_key_id, :unprotected, :name,
|
472
|
+
:checksum_type, :docker_upstream_name]
|
483
473
|
end
|
484
|
-
params.require(:repository).permit(*keys).to_h
|
474
|
+
params.require(:repository).permit(*keys).to_h.with_indifferent_access
|
485
475
|
end
|
486
476
|
|
487
477
|
def get_content_credential(repo_params, content_type)
|
@@ -494,30 +484,33 @@ module Katello
|
|
494
484
|
credential_value
|
495
485
|
end
|
496
486
|
|
487
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
497
488
|
def construct_repo_from_params(repo_params)
|
498
|
-
|
489
|
+
root = @product.add_repo(repo_params.slice(:label, :name, :description, :url, :content_type, :arch, :unprotected,
|
499
490
|
:gpg_key, :ssl_ca_cert, :ssl_client_cert, :ssl_client_key,
|
500
|
-
:checksum_type, :download_policy).to_h.
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
491
|
+
:checksum_type, :download_policy).to_h.with_indifferent_access)
|
492
|
+
root.docker_upstream_name = repo_params[:docker_upstream_name] if repo_params[:docker_upstream_name]
|
493
|
+
root.docker_tags_whitelist = repo_params[:docker_tags_whitelist] if repo_params[:docker_tags_whitelist]
|
494
|
+
root.mirror_on_sync = ::Foreman::Cast.to_bool(repo_params[:mirror_on_sync]) if repo_params.key?(:mirror_on_sync)
|
495
|
+
root.ignore_global_proxy = ::Foreman::Cast.to_bool(repo_params[:ignore_global_proxy]) if repo_params.key?(:ignore_global_proxy)
|
496
|
+
root.verify_ssl_on_sync = ::Foreman::Cast.to_bool(repo_params[:verify_ssl_on_sync]) if repo_params.key?(:verify_ssl_on_sync)
|
497
|
+
root.upstream_username = repo_params[:upstream_username] if repo_params.key?(:upstream_username)
|
498
|
+
root.upstream_password = repo_params[:upstream_password] if repo_params.key?(:upstream_password)
|
499
|
+
root.ignorable_content = repo_params[:ignorable_content] if root.yum? && repo_params.key?(:ignorable_content)
|
500
|
+
|
501
|
+
if root.ostree?
|
502
|
+
root.ostree_upstream_sync_policy = repo_params[:ostree_upstream_sync_policy]
|
503
|
+
root.ostree_upstream_sync_depth = repo_params[:ostree_upstream_sync_depth]
|
512
504
|
end
|
513
|
-
if
|
514
|
-
|
515
|
-
|
516
|
-
|
505
|
+
if root.deb?
|
506
|
+
root.deb_releases = repo_params[:deb_releases] if repo_params[:deb_releases]
|
507
|
+
root.deb_components = repo_params[:deb_components] if repo_params[:deb_components]
|
508
|
+
root.deb_architectures = repo_params[:deb_architectures] if repo_params[:deb_architectures]
|
517
509
|
end
|
518
510
|
|
519
|
-
|
511
|
+
root
|
520
512
|
end
|
513
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
521
514
|
|
522
515
|
def error_on_rh_product
|
523
516
|
fail HttpErrors::BadRequest, _("Red Hat products cannot be manipulated.") if @product.redhat?
|
@@ -547,8 +540,11 @@ module Katello
|
|
547
540
|
elsif environment_id
|
548
541
|
version = ContentViewVersion.in_environment(environment_id).where(:content_view_id => content_view_id)
|
549
542
|
query = query.where(:content_view_version_id => version)
|
550
|
-
|
543
|
+
elsif params[:available_for] != 'content_view_version'
|
551
544
|
query = query.joins(:content_view_repositories).where("#{ContentViewRepository.table_name}.content_view_id" => content_view_id)
|
545
|
+
else
|
546
|
+
version_ids = ContentViewVersion.where(:content_view_id => content_view_id).pluck(:id)
|
547
|
+
query = query.where('content_view_version_id IN (?) AND environment_id IS NOT NULL', version_ids)
|
552
548
|
end
|
553
549
|
query
|
554
550
|
end
|
@@ -13,17 +13,19 @@ module Katello
|
|
13
13
|
api_version "v2"
|
14
14
|
end
|
15
15
|
|
16
|
+
api :GET, "/repository_sets", N_("List repository sets.")
|
16
17
|
api :GET, "/products/:product_id/repository_sets", N_("List repository sets for a product.")
|
17
18
|
param :product_id, :number, :required => true, :desc => N_("ID of a product to list repository sets from")
|
18
19
|
param :name, String, :required => false, :desc => N_("Repository set name to search on")
|
19
20
|
param :enabled, :bool, :required => false, :desc => N_("If true, only return repository sets that have been enabled. Defaults to false")
|
20
21
|
param :with_active_subscription, :bool, :required => false, :desc => N_("If true, only return repository sets that are associated with an active subscriptions")
|
22
|
+
param :organization_id, :number, :desc => N_("organization identifier"), :required => false
|
21
23
|
param_group :search, Api::V2::ApiController
|
22
24
|
def index
|
23
|
-
respond(:collection => scoped_search(index_relation,
|
24
|
-
:resource_class => Katello::ProductContent))
|
25
|
+
respond(:collection => scoped_search(index_relation, :name, :asc, :resource_class => Katello::ProductContent))
|
25
26
|
end
|
26
27
|
|
28
|
+
api :GET, "/repository_sets/:id", N_("Get info about a repository set")
|
27
29
|
api :GET, "/products/:product_id/repository_sets/:id", N_("Get info about a repository set")
|
28
30
|
param :id, :number, :required => true, :desc => N_("ID of the repository set")
|
29
31
|
param :product_id, :number, :required => true, :desc => N_("ID of a product to list repository sets from")
|
@@ -31,6 +33,7 @@ module Katello
|
|
31
33
|
respond :resource => @product_content
|
32
34
|
end
|
33
35
|
|
36
|
+
api :GET, "/repository_sets/:id/available_repositories", N_("Get list of available repositories for the repository set")
|
34
37
|
api :GET, "/products/:product_id/repository_sets/:id/available_repositories", N_("Get list of available repositories for the repository set")
|
35
38
|
param :id, :number, :required => true, :desc => N_("ID of the repository set")
|
36
39
|
param :product_id, :number, :required => true, :desc => N_("ID of a product to list repository sets from")
|
@@ -48,14 +51,25 @@ module Katello
|
|
48
51
|
end
|
49
52
|
end
|
50
53
|
|
54
|
+
sorted_repos = repos.sort_by do |repo|
|
55
|
+
major, minor = repo[:substitutions][:releasever].nil? ? [1000, 1000] : repo[:substitutions][:releasever].split('.').map(&:to_i)
|
56
|
+
major = major == 0 ? 1000 : major
|
57
|
+
minor = minor.nil? ? 1000 : minor
|
58
|
+
arch = repo[:substitutions][:basearch].nil? ? "" : repo[:substitutions][:basearch]
|
59
|
+
|
60
|
+
[arch, major, minor]
|
61
|
+
end
|
62
|
+
|
51
63
|
collection = {
|
52
|
-
:results
|
64
|
+
:results => sorted_repos.reverse,
|
53
65
|
:subtotal => repos.size,
|
54
66
|
:total => repos.size
|
55
67
|
}
|
68
|
+
|
56
69
|
respond_for_index :collection => collection
|
57
70
|
end
|
58
71
|
|
72
|
+
api :PUT, "/repository_sets/:id/enable", N_("Enable a repository from the set")
|
59
73
|
api :PUT, "/products/:product_id/repository_sets/:id/enable", N_("Enable a repository from the set")
|
60
74
|
param :id, :number, :required => true, :desc => N_("ID of the repository set to enable")
|
61
75
|
param :product_id, :number, :required => true, :desc => N_("ID of the product containing the repository set")
|
@@ -66,6 +80,7 @@ module Katello
|
|
66
80
|
respond_for_async :resource => task
|
67
81
|
end
|
68
82
|
|
83
|
+
api :PUT, "/repository_sets/:id/disable", N_("Disable a repository from the set")
|
69
84
|
api :PUT, "/products/:product_id/repository_sets/:id/disable", N_("Disable a repository from the set")
|
70
85
|
param :id, :number, :required => true, :desc => N_("ID of the repository set to disable")
|
71
86
|
param :product_id, :number, :required => true, :desc => N_("ID of the product containing the repository set")
|
@@ -82,10 +97,6 @@ module Katello
|
|
82
97
|
Katello::Content
|
83
98
|
end
|
84
99
|
|
85
|
-
def default_sort
|
86
|
-
lambda { |relation| relation.order("#{Katello::Content.table_name}.name asc") }
|
87
|
-
end
|
88
|
-
|
89
100
|
def index_relation
|
90
101
|
if @product.nil?
|
91
102
|
relation = @organization.product_contents.displayable
|
@@ -30,8 +30,8 @@ module Katello
|
|
30
30
|
param :match_installed, :bool, :desc => N_("Return subscriptions that match installed products of the specified host")
|
31
31
|
param :no_overlap, :bool, :desc => N_("Return subscriptions which do not overlap with a currently-attached subscription")
|
32
32
|
def index
|
33
|
-
options = { resource_class: Pool, includes: [:subscription]
|
34
|
-
base_args = [index_relation.distinct,
|
33
|
+
options = { resource_class: Pool, includes: [:subscription] }
|
34
|
+
base_args = [index_relation.distinct, :name, :asc]
|
35
35
|
|
36
36
|
respond_to do |format|
|
37
37
|
format.csv do
|
@@ -60,10 +60,6 @@ module Katello
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
def name_sort
|
64
|
-
lambda { |relation| relation.order("katello_subscriptions.name ASC") }
|
65
|
-
end
|
66
|
-
|
67
63
|
def index_relation
|
68
64
|
return for_host if params[:host_id]
|
69
65
|
return available_for_activation_key if params[:available_for] == "activation_key"
|