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
@@ -13,6 +13,7 @@ module Katello
|
|
13
13
|
param :sync_date, String, :desc => N_("start datetime of synchronization"), :required => true, :action_aware => true
|
14
14
|
param :description, String, :desc => N_("sync plan description")
|
15
15
|
param :enabled, :bool, :desc => N_("enables or disables synchronization"), :required => true, :action_aware => true
|
16
|
+
param :cron_expression, String, :desc => N_("Add custom cron logic for sync plan")
|
16
17
|
end
|
17
18
|
|
18
19
|
api :GET, "/sync_plans", N_("List sync plans")
|
@@ -46,17 +47,12 @@ module Katello
|
|
46
47
|
param :organization_id, :number, :desc => N_("Filter sync plans by organization name or label"), :required => true
|
47
48
|
param_group :sync_plan
|
48
49
|
def create
|
49
|
-
|
50
|
-
|
51
|
-
unless sync_date.is_a?(Time)
|
50
|
+
unless sync_plan_params[:sync_date].to_time(:utc).is_a?(Time)
|
52
51
|
fail _("Date format is incorrect.")
|
53
52
|
end
|
54
|
-
|
55
53
|
@sync_plan = SyncPlan.new(sync_plan_params)
|
56
|
-
@sync_plan.sync_date = sync_date
|
57
54
|
@sync_plan.organization = @organization
|
58
|
-
@sync_plan.
|
59
|
-
|
55
|
+
@sync_plan.save_with_logic!
|
60
56
|
respond_for_create(:resource => @sync_plan)
|
61
57
|
end
|
62
58
|
|
@@ -67,12 +63,10 @@ module Katello
|
|
67
63
|
param_group :sync_plan
|
68
64
|
def update
|
69
65
|
sync_date = sync_plan_params.try(:[], :sync_date).try(:to_time)
|
70
|
-
|
71
66
|
if !sync_date.nil? && !sync_date.is_a?(Time)
|
72
67
|
fail _("Date format is incorrect.")
|
73
68
|
end
|
74
|
-
|
75
|
-
sync_task(::Actions::Katello::SyncPlan::Update, @sync_plan, sync_plan_params)
|
69
|
+
@sync_plan.update_attributes_with_logics!(sync_plan_params) if sync_plan_params
|
76
70
|
respond_for_show(:resource => @sync_plan)
|
77
71
|
end
|
78
72
|
|
@@ -81,15 +75,16 @@ module Katello
|
|
81
75
|
param :organization_id, :number, :desc => N_("Filter sync plans by organization name or label")
|
82
76
|
param :id, :number, :desc => N_("sync plan numeric identifier")
|
83
77
|
def destroy
|
84
|
-
|
85
|
-
respond_for_show(:resource => @sync_plan)
|
78
|
+
@sync_plan.destroy!
|
86
79
|
end
|
87
80
|
|
88
81
|
api :PUT, "/organizations/:organization_id/sync_plans/:id/add_products", N_("Add products to sync plan")
|
89
82
|
param :id, String, :desc => N_("ID of the sync plan"), :required => true
|
90
83
|
param :product_ids, Array, :desc => N_("List of product ids to add to the sync plan"), :required => true
|
91
84
|
def add_products
|
92
|
-
|
85
|
+
products = ::Katello::Product.where(:id => params[:product_ids]).editable
|
86
|
+
@sync_plan.product_ids = (@sync_plan.product_ids + products.collect { |p| p.id }).uniq
|
87
|
+
@sync_plan.save!
|
93
88
|
respond_for_show
|
94
89
|
end
|
95
90
|
|
@@ -97,7 +92,9 @@ module Katello
|
|
97
92
|
param :id, String, :desc => N_("ID of the sync plan"), :required => true
|
98
93
|
param :product_ids, Array, :desc => N_("List of product ids to remove from the sync plan"), :required => true
|
99
94
|
def remove_products
|
100
|
-
|
95
|
+
products = ::Katello::Product.where(:id => params[:product_ids]).editable
|
96
|
+
@sync_plan.product_ids = (@sync_plan.product_ids - products.collect { |p| p.id }).uniq
|
97
|
+
@sync_plan.save!
|
101
98
|
respond_for_show
|
102
99
|
end
|
103
100
|
|
@@ -105,16 +102,8 @@ module Katello
|
|
105
102
|
api :PUT, "/organizations/:organization_id/sync_plans/:id/sync", N_("Initiate a sync of the products attached to the sync plan")
|
106
103
|
param :id, String, :desc => N_("ID of the sync plan"), :required => true
|
107
104
|
def sync
|
108
|
-
|
109
|
-
syncable_repositories = Repository.where(:product_id => syncable_products).has_url
|
110
|
-
|
111
|
-
task = async_task(::Actions::BulkAction,
|
112
|
-
::Actions::Katello::Repository::Sync,
|
113
|
-
syncable_repositories)
|
114
|
-
|
105
|
+
task = async_task(::Actions::Katello::SyncPlan::Run, @sync_plan)
|
115
106
|
respond_for_async :resource => task
|
116
|
-
rescue Foreman::Exception
|
117
|
-
raise HttpErrors::BadRequest, _("No products within sync plan")
|
118
107
|
end
|
119
108
|
|
120
109
|
protected
|
@@ -127,7 +116,7 @@ module Katello
|
|
127
116
|
end
|
128
117
|
|
129
118
|
def sync_plan_params
|
130
|
-
params.require(:sync_plan).permit(:name, :description, :interval, :sync_date, :product_ids, :enabled)
|
119
|
+
params.require(:sync_plan).permit(:name, :description, :interval, :sync_date, :product_ids, :enabled, :cron_expression)
|
131
120
|
end
|
132
121
|
end
|
133
122
|
end
|
@@ -52,12 +52,17 @@ module Katello
|
|
52
52
|
fail HttpErrors::NotFound, _("Couldn't find content view versions '%s'") % missing.join(',')
|
53
53
|
end
|
54
54
|
|
55
|
-
collection = resource_class.all
|
56
|
-
repos = Katello::Repository.where(:content_view_version_id => @versions.pluck(:id))
|
57
|
-
repos = repos.where(:library_instance_id => @repo.id) if @repo
|
58
|
-
|
59
55
|
sort_by, sort_order, options = sort_options
|
60
|
-
|
56
|
+
|
57
|
+
if respond_to?(:custom_collection_by_content_view_version)
|
58
|
+
collection = custom_collection_by_content_view_version(@versions)
|
59
|
+
else
|
60
|
+
repos = Katello::Repository.where(:content_view_version_id => @versions.pluck(:id))
|
61
|
+
repos = repos.where(:library_instance_id => @repo.id) if @repo
|
62
|
+
collection = filter_by_repos(repos, resource_class.all)
|
63
|
+
end
|
64
|
+
|
65
|
+
collection = scoped_search(collection.distinct, sort_by, sort_order, options)
|
61
66
|
collection[:results] = collection[:results].map { |item| ContentViewVersionComparePresenter.new(item, @versions, @repo) }
|
62
67
|
respond_for_index(:collection => collection)
|
63
68
|
end
|
@@ -220,6 +225,8 @@ module Katello
|
|
220
225
|
_("OSTree Branch")
|
221
226
|
when "Katello::FileUnit"
|
222
227
|
_("File")
|
228
|
+
when "Katello::ModuleStream"
|
229
|
+
_("Module Stream")
|
223
230
|
else
|
224
231
|
fail "Can't find resource class: #{resource_class}"
|
225
232
|
end
|
@@ -19,11 +19,8 @@ module Katello
|
|
19
19
|
prepend Overrides
|
20
20
|
|
21
21
|
def destroy
|
22
|
-
|
23
|
-
|
24
|
-
else
|
25
|
-
process_error :redirect => :back, :error_msg => _("Failed to delete %{host}: %{errors}") % { :host => @host, :errors => @host.errors.full_messages }
|
26
|
-
end
|
22
|
+
Katello::RegistrationManager.unregister_host(@host, :unregistering => false)
|
23
|
+
process_success :success_redirect => hosts_path
|
27
24
|
rescue StandardError => ex
|
28
25
|
process_error(:object => @host, :error_msg => ex.message, :redirect => saved_redirect_url_or(send("#{controller_name}_url")))
|
29
26
|
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module Katello
|
2
2
|
if Katello.with_remote_execution?
|
3
3
|
class RemoteExecutionController < JobInvocationsController
|
4
|
+
include Concerns::Api::V2::BulkHostsExtensions
|
5
|
+
|
4
6
|
def new
|
5
7
|
@composer = prepare_composer
|
6
8
|
end
|
@@ -28,11 +30,14 @@ module Katello
|
|
28
30
|
end
|
29
31
|
|
30
32
|
def hosts
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
host_ids = params[:host_ids].is_a?(String) ? params[:host_ids].split(',') : params[:host_ids]
|
34
|
+
find_bulk_hosts('edit_hosts',
|
35
|
+
included: {
|
36
|
+
ids: host_ids,
|
37
|
+
search: params[:scoped_search],
|
38
|
+
excluded: params[:excluded]
|
39
|
+
}
|
40
|
+
)
|
36
41
|
end
|
37
42
|
|
38
43
|
def inputs
|
@@ -40,6 +45,12 @@ module Katello
|
|
40
45
|
{ :errata => params[:name] }
|
41
46
|
elsif feature_name == 'katello_service_restart'
|
42
47
|
{ :helper => params[:name] }
|
48
|
+
elsif feature_name == 'katello_module_stream_action'
|
49
|
+
fail HttpErrors::NotFound, _('module streams not found') if params[:module_spec].blank?
|
50
|
+
fail HttpErrors::NotFound, _('actions not found') if params[:module_stream_action].blank?
|
51
|
+
inputs = { :module_spec => params[:module_spec], :action => params[:module_stream_action] }
|
52
|
+
inputs[:options] = params[:options] if params[:options]
|
53
|
+
inputs
|
43
54
|
else
|
44
55
|
{ :package => params[:name] }
|
45
56
|
end
|
@@ -34,8 +34,6 @@ module Katello
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def kickstart_repository_id(host, options = {})
|
37
|
-
return if host.try(:medium_id).present?
|
38
|
-
|
39
37
|
host_ks_repo_id = host_hostgroup_kickstart_repository_id(host)
|
40
38
|
ks_repo_options = kickstart_repository_options(host, options)
|
41
39
|
# if the kickstart repo id is set in the selected_hostgroup use that
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module Actions
|
2
2
|
module Candlepin
|
3
3
|
class ImportPoolHandler
|
4
|
+
attr_reader :message_handler
|
5
|
+
|
4
6
|
def initialize(logger)
|
5
7
|
@logger = logger
|
6
8
|
end
|
@@ -11,7 +13,7 @@ module Actions
|
|
11
13
|
|
12
14
|
::User.current = ::User.anonymous_admin
|
13
15
|
|
14
|
-
message_handler = ::Katello::Candlepin::MessageHandler.new(message)
|
16
|
+
@message_handler = ::Katello::Candlepin::MessageHandler.new(message)
|
15
17
|
|
16
18
|
case message_handler.subject
|
17
19
|
when /entitlement\.created/
|
@@ -24,26 +26,49 @@ module Actions
|
|
24
26
|
message_handler.import_pool
|
25
27
|
when /pool\.deleted/
|
26
28
|
message_handler.import_pool
|
27
|
-
when
|
28
|
-
|
29
|
+
when /^compliance\.created/
|
30
|
+
reindex_subscription_status
|
31
|
+
when /system_purpose_compliance\.created/
|
32
|
+
reindex_purpose_status
|
29
33
|
end
|
30
34
|
end
|
31
35
|
|
32
36
|
private
|
33
37
|
|
34
|
-
def
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
elsif subscription_facet.nil?
|
43
|
-
@logger.debug "skip re-indexing of non-existent content host #{uuid}"
|
44
|
-
elsif sub_status.nil?
|
45
|
-
@logger.debug "skip re-indexing of empty subscription status #{uuid}"
|
38
|
+
def subscription_facet
|
39
|
+
message_handler.subscription_facet
|
40
|
+
end
|
41
|
+
|
42
|
+
def reindex_subscription_status
|
43
|
+
if message_handler.status.nil?
|
44
|
+
@logger.debug "skip re-indexing of empty #{message_handler.subject} status #{message_handler.consumer_uuid}"
|
45
|
+
return
|
46
46
|
end
|
47
|
+
|
48
|
+
reindex_consumer do
|
49
|
+
subscription_facet.update_subscription_status(message_handler.status)
|
50
|
+
subscription_facet.update_compliance_reasons(message_handler.reasons)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def reindex_purpose_status
|
55
|
+
reindex_consumer do
|
56
|
+
subscription_facet.update_purpose_status(valid_role: message_handler.compliant_role?,
|
57
|
+
valid_usage: message_handler.compliant_usage?,
|
58
|
+
valid_addons: message_handler.compliant_addons?,
|
59
|
+
valid_sla: message_handler.compliant_sla?)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def reindex_consumer
|
64
|
+
if subscription_facet.nil?
|
65
|
+
@logger.debug "skip re-indexing of non-existent content host #{message_handler.consumer_uuid}"
|
66
|
+
return
|
67
|
+
end
|
68
|
+
|
69
|
+
@logger.debug "re-indexing content host #{subscription_facet.host.name}"
|
70
|
+
|
71
|
+
yield
|
47
72
|
end
|
48
73
|
end
|
49
74
|
end
|
@@ -44,6 +44,7 @@ module Actions
|
|
44
44
|
path: relative_path,
|
45
45
|
with_importer: true,
|
46
46
|
docker_upstream_name: repository.docker? ? repository.container_repository_name : nil,
|
47
|
+
docker_tags_whitelist: repository.docker? ? repository.docker_tags_whitelist : nil,
|
47
48
|
repo_registry_id: repository.docker? ? repository.container_repository_name : nil,
|
48
49
|
download_policy: repository.capsule_download_policy(capsule_content.capsule),
|
49
50
|
capsule_id: capsule_content.capsule.id)
|
@@ -9,7 +9,26 @@ module Actions
|
|
9
9
|
def plan(content_view, description = "", options = {})
|
10
10
|
action_subject(content_view)
|
11
11
|
content_view.check_ready_to_publish!
|
12
|
-
|
12
|
+
|
13
|
+
if options[:repos_units].present?
|
14
|
+
valid_labels_from_cv = content_view.repositories.map(&:label)
|
15
|
+
labels_from_repos_units = options[:repos_units].map { |repo| repo[:label] }
|
16
|
+
|
17
|
+
labels_from_repos_units.each do |label|
|
18
|
+
fail _("Repository label '%s' is not associated with content view.") % label unless valid_labels_from_cv.include? label
|
19
|
+
end
|
20
|
+
|
21
|
+
valid_labels_from_cv.each do |label|
|
22
|
+
fail _("Content view has repository label '%s' which is not specified in repos_units parameter.") % label unless labels_from_repos_units.include? label
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
if options[:minor] && options[:major]
|
27
|
+
version = content_view.create_new_version(options[:major], options[:minor])
|
28
|
+
else
|
29
|
+
version = content_view.create_new_version
|
30
|
+
end
|
31
|
+
|
13
32
|
library = content_view.organization.library
|
14
33
|
history = ::Katello::ContentViewHistory.create!(:content_view_version => version,
|
15
34
|
:user => ::User.current.login,
|
@@ -25,7 +44,7 @@ module Actions
|
|
25
44
|
concurrence do
|
26
45
|
content_view.publish_repositories do |repositories|
|
27
46
|
sequence do
|
28
|
-
clone_to_version = plan_action(Repository::CloneToVersion, repositories, version)
|
47
|
+
clone_to_version = plan_action(Repository::CloneToVersion, repositories, version, :repos_units => options[:repos_units])
|
29
48
|
plan_action(Repository::CloneToEnvironment, clone_to_version.new_repository, library,
|
30
49
|
:force_yum_metadata_regeneration => options[:force_yum_metadata_regeneration])
|
31
50
|
end
|
@@ -66,7 +66,7 @@ module Actions
|
|
66
66
|
def copy_repos(source_repos, new_version, content, dep_solve)
|
67
67
|
copy_output = []
|
68
68
|
sequence do
|
69
|
-
new_repo = plan_action(Repository::CloneToVersion, source_repos, new_version, true).new_repository
|
69
|
+
new_repo = plan_action(Repository::CloneToVersion, source_repos, new_version, :incremental => true).new_repository
|
70
70
|
copy_output = copy_yum_content(new_repo, dep_solve, content[:package_ids], content[:errata_ids])
|
71
71
|
|
72
72
|
plan_action(Katello::Repository::MetadataGenerate, new_repo)
|
@@ -10,9 +10,8 @@ module Actions
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def plan(env, options = {})
|
13
|
-
unless env.deletable?
|
14
|
-
|
15
|
-
end
|
13
|
+
fail env.errors.full_messages.join(" ") unless env.deletable?
|
14
|
+
|
16
15
|
skip_repo_destroy = options.fetch(:skip_repo_destroy, false)
|
17
16
|
organization_destroy = options.fetch(:organization_destroy, false)
|
18
17
|
sequence do
|
@@ -10,7 +10,7 @@ module Actions
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def plan(env, options = {})
|
13
|
-
repositories = options[:content_type] ? env.repositories.
|
13
|
+
repositories = options[:content_type] ? env.repositories.with_type(options[:content_type]) : env.repositories
|
14
14
|
action_subject(env)
|
15
15
|
concurrence do
|
16
16
|
repositories.each do |repository|
|
@@ -4,8 +4,8 @@ module Actions
|
|
4
4
|
class Monitor < Actions::Base
|
5
5
|
include ::Dynflow::Action::Singleton
|
6
6
|
|
7
|
-
|
8
|
-
fields!
|
7
|
+
Count = Algebrick.type do
|
8
|
+
fields! count: Integer, time: Time
|
9
9
|
end
|
10
10
|
|
11
11
|
Fatal = Algebrick.type do
|
@@ -33,6 +33,7 @@ module Actions
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def run(event = nil)
|
36
|
+
action_logger.debug("message_queue_event: #{event}")
|
36
37
|
match(event,
|
37
38
|
(on nil do
|
38
39
|
initialize_service
|
@@ -40,8 +41,8 @@ module Actions
|
|
40
41
|
(on Ready do
|
41
42
|
listen_for_events
|
42
43
|
end),
|
43
|
-
(on
|
44
|
-
|
44
|
+
(on Count do
|
45
|
+
update_count(event)
|
45
46
|
end),
|
46
47
|
(on Close | Dynflow::Action::Cancellable::Cancel do
|
47
48
|
close_service
|
@@ -105,17 +106,10 @@ module Actions
|
|
105
106
|
end
|
106
107
|
end
|
107
108
|
|
108
|
-
def
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
end
|
113
|
-
rescue => e
|
114
|
-
world.logger.error(e.message)
|
115
|
-
world.logger.error(e.backtrace.join("\n"))
|
116
|
-
output[:last_error] = e.message
|
117
|
-
ensure
|
118
|
-
::Katello::EventQueue.clear_events(event.event_type, event.object_id, event.created_at)
|
109
|
+
def update_count(event)
|
110
|
+
output[:count] ||= 0
|
111
|
+
output[:count] += event.count
|
112
|
+
output[:last_count_update] = event.time
|
119
113
|
suspend
|
120
114
|
end
|
121
115
|
|
@@ -3,6 +3,7 @@ module Actions
|
|
3
3
|
module EventQueue
|
4
4
|
class PollerThread
|
5
5
|
SLEEP_INTERVAL = 2
|
6
|
+
COUNT_UPDATE_INTERVAL = 250
|
6
7
|
cattr_accessor :instance
|
7
8
|
|
8
9
|
def self.initialize(logger)
|
@@ -22,16 +23,38 @@ module Actions
|
|
22
23
|
@thread.kill if @thread
|
23
24
|
end
|
24
25
|
|
26
|
+
def run_event(event)
|
27
|
+
@logger.debug("event_queue_event: #{event.event_type}, #{event.object_id}")
|
28
|
+
::User.as_anonymous_admin do
|
29
|
+
::Katello::EventQueue.event_class(event.event_type).new(event.object_id).run
|
30
|
+
end
|
31
|
+
rescue => e
|
32
|
+
@logger.error("event_queue_error: #{event.event_type}, #{event.object_id}")
|
33
|
+
@logger.error(e.message)
|
34
|
+
@logger.error(e.backtrace.join("\n"))
|
35
|
+
ensure
|
36
|
+
::Katello::EventQueue.clear_events(event.event_type, event.object_id, event.created_at)
|
37
|
+
end
|
38
|
+
|
25
39
|
def poll_for_events(suspended_action)
|
26
40
|
@thread.kill if @thread
|
27
41
|
@thread = Thread.new do
|
28
42
|
loop do
|
29
43
|
Rails.application.executor.wrap do
|
30
44
|
begin
|
45
|
+
count = 0
|
46
|
+
|
31
47
|
until (event = ::Katello::EventQueue.next_event).nil?
|
32
|
-
|
48
|
+
run_event(event)
|
49
|
+
count += 1
|
50
|
+
|
51
|
+
if count > COUNT_UPDATE_INTERVAL
|
52
|
+
suspended_action.notify_count(count)
|
53
|
+
count = 0
|
54
|
+
end
|
33
55
|
end
|
34
56
|
|
57
|
+
suspended_action.notify_count(count) if count > 0
|
35
58
|
sleep SLEEP_INTERVAL
|
36
59
|
rescue => e
|
37
60
|
suspended_action.notify_fatal(e)
|