katello 3.12.3 → 3.13.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/rhsm/candlepin_dynflow_proxy_controller.rb +22 -3
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +2 -2
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +32 -15
- data/app/controllers/katello/api/v2/ansible_collections_controller.rb +19 -0
- data/app/controllers/katello/api/v2/content_view_filters_controller.rb +3 -0
- data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +1 -0
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +1 -0
- data/app/controllers/katello/api/v2/content_views_controller.rb +1 -0
- data/app/controllers/katello/api/v2/environments_controller.rb +1 -0
- data/app/controllers/katello/api/v2/errata_controller.rb +2 -1
- data/app/controllers/katello/api/v2/gpg_keys_controller.rb +1 -0
- data/app/controllers/katello/api/v2/host_collections_controller.rb +1 -0
- data/app/controllers/katello/api/v2/host_debs_controller.rb +34 -0
- data/app/controllers/katello/api/v2/host_errata_controller.rb +51 -4
- data/app/controllers/katello/api/v2/host_packages_controller.rb +1 -0
- data/app/controllers/katello/api/v2/module_streams_controller.rb +1 -0
- data/app/controllers/katello/api/v2/organizations_controller.rb +1 -3
- data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +18 -0
- data/app/controllers/katello/api/v2/products_controller.rb +1 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +46 -11
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +6 -5
- data/app/controllers/katello/api/v2/srpms_controller.rb +24 -0
- data/app/controllers/katello/api/v2/sync_plans_controller.rb +1 -0
- data/app/controllers/katello/application_controller.rb +1 -0
- data/app/controllers/katello/concerns/api/v2/bulk_hosts_extensions.rb +2 -2
- data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +9 -0
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +2 -0
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +1 -1
- data/app/helpers/katello/concerns/dashboard_helper_extensions.rb +13 -10
- data/app/lib/actions/candlepin/activation_key/create.rb +7 -1
- data/app/lib/actions/candlepin/activation_key/update.rb +7 -1
- data/app/lib/actions/candlepin/owner/destroy.rb +1 -1
- data/app/lib/actions/candlepin/product/update.rb +17 -0
- data/app/lib/actions/helpers/output_propagator.rb +13 -0
- data/app/lib/actions/katello/activation_key/create.rb +4 -1
- data/app/lib/actions/katello/activation_key/update.rb +8 -2
- data/app/lib/actions/katello/content_view/publish.rb +22 -34
- data/app/lib/actions/katello/event_queue/poller_thread.rb +22 -9
- data/app/lib/actions/katello/host/update.rb +3 -1
- data/app/lib/actions/katello/host/upload_profiles.rb +16 -0
- data/app/lib/actions/katello/organization/destroy.rb +0 -11
- data/app/lib/actions/katello/product/update.rb +8 -0
- data/app/lib/actions/katello/product/update_http_proxy.rb +19 -0
- data/app/lib/actions/katello/provider/update.rb +6 -7
- data/app/lib/actions/katello/pulp_selector.rb +15 -5
- data/app/lib/actions/katello/repository/check_matching_content.rb +3 -1
- data/app/lib/actions/katello/repository/clone_contents.rb +19 -6
- data/app/lib/actions/katello/repository/clone_to_environment.rb +3 -5
- data/app/lib/actions/katello/repository/create.rb +3 -1
- data/app/lib/actions/katello/repository/destroy.rb +5 -4
- data/app/lib/actions/katello/repository/discover.rb +8 -8
- data/app/lib/actions/katello/repository/export.rb +1 -1
- data/app/lib/actions/katello/repository/filtered_index_content.rb +10 -5
- data/app/lib/actions/katello/repository/finish_upload.rb +8 -0
- data/app/lib/actions/katello/repository/import_upload.rb +5 -2
- data/app/lib/actions/katello/repository/index_content.rb +3 -2
- data/app/lib/actions/katello/repository/metadata_generate.rb +10 -4
- data/app/lib/actions/katello/repository/remove_content.rb +11 -3
- data/app/lib/actions/katello/repository/sync.rb +14 -7
- data/app/lib/actions/katello/repository/update.rb +11 -5
- data/app/lib/actions/katello/repository/update_http_proxy_details.rb +17 -0
- data/app/lib/actions/katello/repository/upload_files.rb +7 -3
- data/app/lib/actions/katello/subscription/update.rb +11 -0
- data/app/lib/actions/katello/upstream_subscriptions/remove_entitlement.rb +3 -0
- data/app/lib/actions/katello/upstream_subscriptions/remove_entitlements.rb +4 -1
- data/app/lib/actions/middleware/backend_services_check.rb +10 -2
- data/app/lib/actions/middleware/propagate_output.rb +15 -0
- data/app/lib/actions/middleware/pulp3_services_check.rb +9 -0
- data/app/lib/actions/pulp/abstract_async_task.rb +8 -1
- data/app/lib/actions/pulp/orchestration/repository/copy_all_units.rb +19 -0
- data/app/lib/actions/pulp/orchestration/repository/refresh.rb +14 -0
- data/app/lib/actions/pulp/orchestration/repository/refresh_if_needed.rb +13 -0
- data/app/lib/actions/pulp/orchestration/repository/remove_units.rb +14 -0
- data/app/lib/actions/pulp/orchestration/repository/sync.rb +17 -0
- data/app/lib/actions/pulp/repository/copy_all_units.rb +1 -1
- data/app/lib/actions/pulp/repository/create.rb +0 -1
- data/app/lib/actions/pulp/repository/refresh.rb +0 -5
- data/app/lib/actions/pulp/repository/remove_units.rb +1 -1
- data/app/lib/actions/pulp/repository/sync.rb +8 -14
- data/app/lib/actions/pulp3/abstract.rb +2 -1
- data/app/lib/actions/pulp3/abstract_async_task.rb +15 -6
- data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +55 -0
- data/app/lib/actions/pulp3/orchestration/repository/create.rb +1 -2
- data/app/lib/actions/pulp3/orchestration/repository/delete.rb +1 -2
- data/app/lib/actions/pulp3/orchestration/repository/generate_metadata.rb +17 -2
- data/app/lib/actions/pulp3/orchestration/repository/remove_units.rb +18 -0
- data/app/lib/actions/pulp3/orchestration/repository/sync.rb +19 -0
- data/app/lib/actions/pulp3/orchestration/repository/update.rb +15 -0
- data/app/lib/actions/pulp3/repository/copy_content.rb +19 -0
- data/app/lib/actions/pulp3/repository/copy_version.rb +19 -0
- data/app/lib/actions/pulp3/repository/create_publication.rb +3 -2
- data/app/lib/actions/pulp3/repository/presenters/abstract_sync_presenter.rb +42 -0
- data/app/lib/actions/pulp3/repository/presenters/content_unit_presenter.rb +57 -0
- data/app/lib/actions/pulp3/repository/refresh_distribution.rb +7 -3
- data/app/lib/actions/pulp3/repository/remove_units.rb +23 -0
- data/app/lib/actions/pulp3/repository/save_distribution_references.rb +6 -4
- data/app/lib/actions/pulp3/repository/save_publication.rb +5 -4
- data/app/lib/actions/pulp3/repository/save_version.rb +8 -4
- data/app/lib/actions/pulp3/repository/sync.rb +55 -0
- data/app/lib/actions/pulp3/repository/{delete_publisher.rb → update_distributions.rb} +5 -5
- data/app/lib/actions/pulp3/repository/{create_publisher.rb → update_remote.rb} +2 -2
- data/app/lib/actions/pulp3/repository/update_repository.rb +16 -0
- data/app/lib/katello/errors.rb +9 -0
- data/app/lib/katello/resources/candlepin/activation_key.rb +5 -4
- data/app/lib/katello/resources/candlepin/product.rb +4 -0
- data/app/lib/katello/resources/candlepin/upstream_consumer.rb +11 -0
- data/app/lib/katello/resources/candlepin/upstream_pool.rb +6 -2
- data/app/lib/katello/resources/cdn.rb +3 -16
- data/app/lib/katello/util/cdn_var_substitutor.rb +0 -3
- data/app/lib/katello/util/http_proxy.rb +9 -9
- data/app/lib/katello/validators/hostgroup_kickstart_repository_validator.rb +1 -1
- data/app/models/katello/activation_key.rb +14 -0
- data/app/models/katello/activation_key_purpose_addon.rb +6 -0
- data/app/models/katello/ansible_collection.rb +32 -0
- data/app/models/katello/candlepin/repository_mapper.rb +1 -1
- data/app/models/katello/concerns/host_managed_extensions.rb +3 -0
- data/app/models/katello/concerns/http_proxy_extensions.rb +60 -0
- data/app/models/katello/concerns/location_extensions.rb +8 -0
- data/app/models/katello/concerns/organization_extensions.rb +9 -0
- data/app/models/katello/concerns/pulp_database_unit.rb +56 -81
- data/app/models/katello/concerns/setting_extensions.rb +14 -0
- data/app/models/katello/concerns/smart_proxy_extensions.rb +27 -11
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +8 -1
- data/app/models/katello/content_view.rb +4 -0
- data/app/models/katello/content_view_filter.rb +4 -8
- data/app/models/katello/docker_tag.rb +11 -10
- data/app/models/katello/erratum.rb +22 -0
- data/app/models/katello/event.rb +2 -0
- data/app/models/katello/events/auto_publish_composite_view.rb +41 -0
- data/app/models/katello/glue/pulp/repo.rb +0 -15
- data/app/models/katello/host/content_facet.rb +35 -4
- data/app/models/katello/host/subscription_facet.rb +14 -16
- data/app/models/katello/host_installed_deb.rb +7 -0
- data/app/models/katello/installed_deb.rb +10 -0
- data/app/models/katello/ping.rb +45 -10
- data/app/models/katello/product_content.rb +1 -1
- data/app/models/katello/purpose_addon.rb +11 -0
- data/app/models/katello/repository.rb +52 -41
- data/app/models/katello/repository_ansible_collection.rb +6 -0
- data/app/models/katello/repository_content_view_filter.rb +7 -0
- data/app/models/katello/rhsm_fact_parser.rb +11 -1
- data/app/models/katello/root_repository.rb +46 -4
- data/app/models/katello/srpm.rb +4 -0
- data/app/models/katello/subscription_facet_purpose_addon.rb +6 -0
- data/app/models/katello/yum_metadata_file.rb +3 -3
- data/app/models/setting/content.rb +32 -7
- data/app/overrides/add_about_page.rb +0 -7
- data/app/services/cert/certs.rb +1 -1
- data/app/services/katello/candlepin/consumer.rb +4 -0
- data/app/services/katello/event_queue.rb +33 -3
- data/app/services/katello/pulp/content_counts_calculator.rb +6 -0
- data/app/services/katello/pulp/docker_manifest.rb +1 -2
- data/app/services/katello/pulp/docker_manifest_list.rb +0 -1
- data/app/services/katello/pulp/file_unit.rb +1 -1
- data/app/services/katello/pulp/pulp_content_unit.rb +43 -0
- data/app/services/katello/pulp/repository.rb +32 -5
- data/app/services/katello/pulp/repository/file.rb +6 -1
- data/app/services/katello/pulp/repository/yum.rb +6 -6
- data/app/services/katello/pulp/rpm.rb +1 -1
- data/app/services/katello/pulp/srpm.rb +1 -1
- data/app/services/katello/pulp3/ansible_collection.rb +31 -0
- data/app/services/katello/pulp3/docker_blob.rb +17 -0
- data/app/services/katello/pulp3/docker_manifest.rb +36 -0
- data/app/services/katello/pulp3/docker_manifest_list.rb +30 -0
- data/app/services/katello/pulp3/docker_tag.rb +28 -0
- data/app/services/katello/pulp3/file_unit.rb +25 -0
- data/app/services/katello/pulp3/pulp_content_unit.rb +75 -0
- data/app/services/katello/pulp3/repository.rb +160 -47
- data/app/services/katello/pulp3/repository/ansible_collection.rb +49 -0
- data/app/services/katello/pulp3/repository/docker.rb +55 -0
- data/app/services/katello/pulp3/repository/file.rb +35 -25
- data/app/services/katello/repository_type.rb +15 -5
- data/app/services/katello/repository_type_manager.rb +32 -1
- data/app/views/dashboard/_subscription_widget.html.erb +7 -7
- data/app/views/foreman/smart_proxies/_content_tab.html.erb +5 -1
- data/app/views/katello/api/v2/activation_keys/base.json.rabl +5 -1
- data/app/views/katello/api/v2/ansible_collections/base.json.rabl +7 -0
- data/app/views/katello/api/v2/ansible_collections/index.json.rabl +7 -0
- data/app/views/katello/api/v2/ansible_collections/show.json.rabl +3 -0
- data/app/views/katello/api/v2/host_debs/base.json.rabl +4 -0
- data/app/views/katello/api/v2/host_debs/index.json.rabl +7 -0
- data/app/views/katello/api/v2/ping/show.json.rabl +2 -1
- data/app/views/katello/api/v2/repositories/base.json.rabl +3 -2
- data/app/views/katello/api/v2/repositories/show.json.rabl +8 -1
- data/app/views/katello/api/v2/srpms/index.json.rabl +7 -0
- data/app/views/katello/api/v2/srpms/show.json.rabl +5 -0
- data/app/views/katello/api/v2/subscription_facet/base.json.rabl +5 -1
- data/config/katello.yaml.example +1 -0
- data/config/routes/api/rhsm.rb +1 -0
- data/config/routes/api/v2.rb +16 -0
- data/config/routes/overrides.rb +4 -0
- data/db/migrate/20180502155123_add_installed_deb.rb +23 -0
- data/db/migrate/20190513162209_drop_repository_reference_publisher_href.rb +5 -0
- data/db/migrate/20190605014649_add_purpose_addons.rb +29 -0
- data/db/migrate/20190617142328_create_katello_ansible_collections.rb +25 -0
- data/db/migrate/20190618034438_add_ansible_collection_whitelist_to_katello_root_repositories.rb +5 -0
- data/db/migrate/20190619192151_add_activation_key_system_purpose_attributes.rb +14 -0
- data/db/migrate/20190701174401_add_http_proxy_policy_to_repository_root.rb +12 -0
- data/db/migrate/20190701192616_add_http_proxy_to_repository_root.rb +6 -0
- data/db/migrate/20190702182118_add_metadata_process_after_to_katello_event.rb +6 -0
- data/db/migrate/20190708195809_remove_all_manifest_downloaded.rb +11 -0
- data/db/migrate/20190723171639_update_content_view_filters_repositories_join_table.rb +11 -0
- data/db/seeds.d/115-http_proxy.rb +25 -0
- data/engines/bastion/app/views/bastion/layouts/assets.html.erb +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details-info.controller.js +15 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +69 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-info.html +39 -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/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-hosts-bulk-errata-modal.html +1 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js +26 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-actions.controller.js +14 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-installed.controller.js +77 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs.controller.js +63 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +18 -21
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-debs-actions.html +62 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-debs-installed.html +52 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-debs.html +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +21 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-publish.html +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-yum.html +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-debs.factory.js +20 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/http-proxies/http-proxies.module.js +14 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/http-proxies/http-proxy.factory.js +21 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/product-bulk-action.factory.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-http-proxy-modal.controller.js +77 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-http-proxy-modal.html +57 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +25 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.filter.js +13 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +75 -29
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/http-proxy-service.js +53 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +18 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +42 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +7 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +16 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/products.html +6 -0
- data/lib/katello.rb +0 -1
- data/lib/katello/engine.rb +2 -0
- data/lib/katello/permission_creator.rb +7 -2
- data/lib/katello/permissions/host_permissions.rb +3 -0
- data/lib/katello/plugin.rb +3 -2
- data/lib/katello/repository_types/ansible_collection.rb +8 -0
- data/lib/katello/repository_types/deb.rb +2 -1
- data/lib/katello/repository_types/docker.rb +23 -4
- data/lib/katello/repository_types/file.rb +7 -1
- data/lib/katello/repository_types/ostree.rb +2 -1
- data/lib/katello/repository_types/puppet.rb +2 -1
- data/lib/katello/repository_types/yum.rb +3 -2
- data/lib/katello/tasks/clean_published_repo_directories.rake +1 -1
- data/lib/katello/tasks/delete_orphaned_content.rake +16 -5
- data/lib/katello/tasks/jenkins.rake +2 -0
- data/lib/katello/tasks/update_content_default_http_proxy.rake +69 -0
- data/lib/katello/version.rb +1 -1
- data/package.json +10 -22
- data/webpack/{move_to_foreman/__mocks__ → __mocks__/foremanJS}/foreman_toast_notifications.js +0 -0
- data/webpack/__mocks__/foremanReact/common/helpers.js +3 -6
- data/webpack/__mocks__/foremanReact/common/keyCodes.js +8 -0
- data/webpack/__mocks__/foremanReact/common/urlHelpers.js +7 -0
- data/webpack/__mocks__/foremanReact/components/Settings/SettingsActions.js +4 -0
- data/webpack/__mocks__/foremanReact/components/Settings/SettingsConstants.js +2 -0
- data/webpack/__mocks__/foremanReact/components/common/Fill/GlobalFill.js +3 -0
- data/webpack/__mocks__/foremanReact/components/common/ModalProgressBar.js +8 -0
- data/webpack/components/SelectOrg/SetOrganization.js +11 -19
- data/webpack/components/WithOrganization/__snapshots__/withOrganization.test.js.snap +1 -3
- data/webpack/components/WithOrganization/withOrganization.js +2 -2
- data/webpack/components/WithOrganization/withOrganization.test.js +2 -2
- data/webpack/components/extensions/about/SystemStatuses.js +55 -0
- data/webpack/components/extensions/about/SystemStatusesActions.js +16 -0
- data/webpack/components/extensions/about/SystemStatusesConsts.js +3 -0
- data/webpack/components/extensions/about/SystemStatusesReducer.js +26 -0
- data/webpack/components/extensions/about/SystemStatusesSelectors.js +3 -0
- data/webpack/components/extensions/about/__tests__/SystemStatuses.fixtures.js +20 -0
- data/webpack/components/extensions/about/__tests__/SystemStatuses.test.js +14 -0
- data/webpack/components/extensions/about/__tests__/SystemStatusesReducer.test.js +32 -0
- data/webpack/components/extensions/about/__tests__/__snapshots__/SystemStatuses.test.js.snap +156 -0
- data/webpack/components/extensions/about/__tests__/__snapshots__/SystemStatusesReducer.test.js.snap +47 -0
- data/webpack/components/extensions/about/index.js +19 -0
- data/webpack/components/extensions/reducers.js +6 -0
- data/webpack/containers/Application/config.js +4 -10
- data/webpack/fills_index.js +10 -0
- data/webpack/move_to_foreman/common/helpers.js +0 -20
- data/webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js +1 -0
- data/webpack/move_to_foreman/components/common/table/formatters/EntitlementsInlineEditFormatter.js +3 -3
- data/webpack/move_to_pf/LoadingState/LoadingState.js +1 -0
- data/webpack/move_to_pf/OptionTooltip/OptionTooltip.scss +2 -1
- data/webpack/move_to_pf/TypeAhead/TypeAhead.js +3 -4
- data/webpack/redux/actions/RedHatRepositories/helpers.js +6 -1
- data/webpack/redux/reducers/index.js +2 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetailInfo.js +1 -0
- data/webpack/scenes/ModuleStreams/Details/ModuleStreamDetails.js +1 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/TableSchema.js +1 -0
- data/webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ProfileRpmsCellFormatter.test.js +0 -2
- data/webpack/scenes/ModuleStreams/Details/Repositories/TableSchema.js +3 -2
- data/webpack/scenes/ModuleStreams/Details/index.js +1 -1
- data/webpack/scenes/ModuleStreams/ModuleStreamsPage.js +2 -0
- data/webpack/scenes/ModuleStreams/ModuleStreamsTable.js +2 -0
- data/webpack/scenes/ModuleStreams/ModuleStreamsTableSchema.js +3 -2
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js +0 -1
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js +0 -1
- data/webpack/scenes/ModuleStreams/index.js +1 -1
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository/EnabledRepository.js +2 -3
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository/EnabledRepositoryContent.js +1 -0
- data/webpack/scenes/RedHatRepositories/components/RecommendedRepositorySetsToggler.js +1 -0
- data/webpack/scenes/RedHatRepositories/components/RecommendedRepositorySetsToggler.scss +1 -1
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepositories.js +1 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository/RepositorySetRepository.js +3 -4
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository/__test__/RepositorySetRepository.test.js +0 -2
- data/webpack/scenes/RedHatRepositories/components/SearchBar.js +1 -0
- data/webpack/scenes/RedHatRepositories/helpers.js +1 -1
- data/webpack/scenes/RedHatRepositories/index.js +3 -2
- data/webpack/scenes/RedHatRepositories/index.scss +1 -1
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailAssociations.js +3 -3
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProductContent.js +1 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProducts.js +1 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +1 -2
- data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js +0 -1
- data/webpack/scenes/Subscriptions/Details/index.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +1 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +1 -2
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +1 -1
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +3 -2
- data/webpack/scenes/Subscriptions/SubscriptionsPage.scss +1 -2
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +9 -9
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsTableSchema.js +2 -2
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsPage.test.js +0 -1
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/index.js +1 -1
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +1 -2
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +2 -1
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +2 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionTypeFormatter.js +3 -2
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +1 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +3 -2
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/InputsErrorsDialog.js +1 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/UnsavedChangesDialog.js +1 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/UpdateDialog.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Table.js +1 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +1 -0
- data/webpack/scenes/Subscriptions/index.js +1 -1
- data/webpack/scenes/Tasks/helpers.js +5 -6
- metadata +161 -20
- data/app/lib/actions/katello/repository/clear.rb +0 -11
- data/app/views/overrides/about/_system_status.html.erb +0 -19
- data/webpack/move_to_foreman/Settings/SettingsActions.js +0 -28
- data/webpack/move_to_foreman/Settings/SettingsConstants.js +0 -3
- data/webpack/move_to_foreman/Settings/__tests__/SettingsActions.test.js +0 -41
- data/webpack/move_to_foreman/Settings/__tests__/settings.fixtures.js +0 -34
- data/webpack/move_to_foreman/components/common/ModalProgressBar/ModalProgressBar.js +0 -48
- data/webpack/move_to_foreman/components/common/ModalProgressBar/ModalProgressBar.scss +0 -15
- data/webpack/move_to_foreman/components/common/ModalProgressBar/__tests__/ModalProgressBar.test.js +0 -22
- data/webpack/move_to_foreman/components/common/ModalProgressBar/__tests__/__snapshots__/ModalProgressBar.test.js.snap +0 -60
- data/webpack/move_to_foreman/components/common/ModalProgressBar/index.js +0 -4
- data/webpack/move_to_foreman/foreman_toast_notifications.js +0 -22
@@ -2,6 +2,7 @@ module Actions
|
|
2
2
|
module Katello
|
3
3
|
module Repository
|
4
4
|
class Destroy < Actions::EntryAction
|
5
|
+
include Actions::Katello::PulpSelector
|
5
6
|
middleware.use ::Actions::Middleware::RemoteAction
|
6
7
|
|
7
8
|
# options:
|
@@ -18,10 +19,10 @@ module Actions
|
|
18
19
|
end
|
19
20
|
|
20
21
|
plan_action(ContentViewPuppetModule::Destroy, repository) if repository.puppet?
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
plan_pulp_action([Actions::Pulp::Orchestration::Repository::Delete,
|
23
|
+
Actions::Pulp3::Orchestration::Repository::Delete],
|
24
|
+
repository,
|
25
|
+
SmartProxy.pulp_master)
|
25
26
|
|
26
27
|
plan_self(:user_id => ::User.current.id)
|
27
28
|
sequence do
|
@@ -51,16 +51,16 @@ module Actions
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def proxy
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
54
|
+
proxy_details = {}
|
55
|
+
if (proxy = ::HttpProxy.default_global_content_proxy)
|
56
|
+
uri = URI(proxy.url)
|
57
|
+
proxy_details[:proxy_host] = "#{uri.host}#{uri.path}"
|
58
|
+
proxy_details[:proxy_port] = uri.port
|
59
|
+
proxy_details[:proxy_user] = proxy.username
|
60
|
+
proxy_details[:proxy_password] = proxy.password
|
61
61
|
end
|
62
62
|
|
63
|
-
|
63
|
+
proxy_details
|
64
64
|
end
|
65
65
|
end
|
66
66
|
end
|
@@ -68,7 +68,7 @@ module Actions
|
|
68
68
|
repos.each do |repo|
|
69
69
|
sequence do
|
70
70
|
if repo.link?
|
71
|
-
plan_action(
|
71
|
+
plan_action(Pulp::Repository::Clear, repo, SmartProxy.pulp_master!)
|
72
72
|
plan_action(Pulp::Repository::CopyAllUnits, repo.target_repository, repo)
|
73
73
|
end
|
74
74
|
end
|
@@ -6,11 +6,11 @@ module Actions
|
|
6
6
|
param :id, Integer
|
7
7
|
param :filter
|
8
8
|
param :dependency
|
9
|
+
param :content_type
|
9
10
|
end
|
10
11
|
|
11
12
|
def run
|
12
13
|
repo = ::Katello::Repository.find(input[:id])
|
13
|
-
unit_ids = search_units(repo)
|
14
14
|
if repo.puppet?
|
15
15
|
::Katello::PuppetModule.import_for_repository(repo)
|
16
16
|
elsif repo.docker?
|
@@ -20,16 +20,21 @@ module Actions
|
|
20
20
|
elsif repo.file?
|
21
21
|
::Katello::FileUnit.import_for_repository(repo)
|
22
22
|
elsif repo.deb?
|
23
|
-
::Katello::Deb.import_all(unit_ids)
|
24
|
-
|
25
|
-
|
23
|
+
::Katello::Deb.import_all(unit_ids, repo)
|
24
|
+
elsif repo.yum?
|
25
|
+
unit_ids = search_units(repo)
|
26
|
+
if input[:content_type] == 'srpm'
|
27
|
+
::Katello::Srpm.import_all(unit_ids, repo)
|
28
|
+
else
|
29
|
+
::Katello::Rpm.import_all(unit_ids, repo)
|
30
|
+
end
|
26
31
|
end
|
27
32
|
end
|
28
33
|
|
29
34
|
private
|
30
35
|
|
31
36
|
def search_units(repo)
|
32
|
-
found = repo.unit_search(:type_ids => [
|
37
|
+
found = repo.unit_search(:type_ids => [input[:content_type]],
|
33
38
|
:filters => input[:filter])
|
34
39
|
found.map { |result| result.try(:[], :unit_id) }.compact
|
35
40
|
end
|
@@ -4,6 +4,13 @@ module Actions
|
|
4
4
|
class FinishUpload < Actions::Base
|
5
5
|
def plan(repository, options = {})
|
6
6
|
dependency = options.fetch(:dependency, nil)
|
7
|
+
content_type = options.fetch(:content_type)
|
8
|
+
if content_type
|
9
|
+
unit_type_id = SmartProxy.pulp_master.content_service(content_type)::CONTENT_TYPE
|
10
|
+
else
|
11
|
+
content_type = repository.content_type
|
12
|
+
unit_type_id = SmartProxy.pulp_master.content_service(content_type)::CONTENT_TYPE
|
13
|
+
end
|
7
14
|
generate_metadata = options.fetch(:generate_metadata, true)
|
8
15
|
plan_action(Katello::Repository::MetadataGenerate, repository, :dependency => dependency) if generate_metadata
|
9
16
|
|
@@ -11,6 +18,7 @@ module Actions
|
|
11
18
|
plan_action(Katello::Repository::FilteredIndexContent,
|
12
19
|
id: repository.id,
|
13
20
|
filter: {:association => {:created => {"$gt" => recent_range}}},
|
21
|
+
content_type: unit_type_id,
|
14
22
|
dependency: dependency)
|
15
23
|
end
|
16
24
|
end
|
@@ -11,7 +11,10 @@ module Actions
|
|
11
11
|
unit_keys = repo_service.unit_keys(uploads)
|
12
12
|
generate_metadata = options.fetch(:generate_metadata, true)
|
13
13
|
sync_capsule = options.fetch(:sync_capsule, true)
|
14
|
-
|
14
|
+
repo_type = repository.content_type
|
15
|
+
|
16
|
+
options[:content_type] ||= ::Katello::RepositoryTypeManager.find(repo_type).default_managed_content_type.label
|
17
|
+
unit_type_id = SmartProxy.pulp_master.content_service(options[:content_type])::CONTENT_TYPE
|
15
18
|
|
16
19
|
sequence do
|
17
20
|
upload_results = concurrence do
|
@@ -27,7 +30,7 @@ module Actions
|
|
27
30
|
unit_metadata: unit_metadata)
|
28
31
|
|
29
32
|
plan_action(FinishUpload, repository, :dependency => import_upload.output,
|
30
|
-
generate_metadata: false)
|
33
|
+
generate_metadata: false, content_type: options[:content_type])
|
31
34
|
import_upload.output
|
32
35
|
end
|
33
36
|
end
|
@@ -8,12 +8,13 @@ module Actions
|
|
8
8
|
param :id, Integer
|
9
9
|
param :dependency, Hash
|
10
10
|
param :contents_changed
|
11
|
-
param :
|
11
|
+
param :source_repository_id
|
12
12
|
end
|
13
13
|
|
14
14
|
def run
|
15
|
+
source_repository = ::Katello::Repository.find(input[:source_repository_id]) if input[:source_repository_id]
|
15
16
|
repo = ::Katello::Repository.find(input[:id])
|
16
|
-
repo.index_content(
|
17
|
+
repo.index_content(source_repository: source_repository)
|
17
18
|
end
|
18
19
|
end
|
19
20
|
end
|
@@ -2,19 +2,25 @@ module Actions
|
|
2
2
|
module Katello
|
3
3
|
module Repository
|
4
4
|
class MetadataGenerate < Actions::Base
|
5
|
+
include Actions::Katello::PulpSelector
|
6
|
+
|
5
7
|
def plan(repository, options = {})
|
6
8
|
dependency = options.fetch(:dependency, nil)
|
7
9
|
force = options.fetch(:force, false)
|
8
10
|
repository_creation = options.fetch(:repository_creation, false)
|
9
11
|
source_repository = options.fetch(:source_repository, nil)
|
10
12
|
source_repository ||= repository.target_repository if repository.link?
|
13
|
+
if repository_creation
|
14
|
+
matching_content = false
|
15
|
+
else
|
16
|
+
matching_content = options.fetch(:matching_content, false)
|
17
|
+
end
|
11
18
|
|
12
|
-
|
13
|
-
|
14
|
-
repository, SmartProxy.pulp_master,
|
19
|
+
plan_pulp_action([Pulp::Repository::DistributorPublish, Pulp3::Orchestration::Repository::GenerateMetadata],
|
20
|
+
repository, SmartProxy.pulp_master,
|
15
21
|
:force => force,
|
16
22
|
:source_repository => source_repository,
|
17
|
-
:matching_content =>
|
23
|
+
:matching_content => matching_content,
|
18
24
|
:dependency => dependency,
|
19
25
|
:repository_creation => repository_creation)
|
20
26
|
end
|
@@ -3,6 +3,7 @@ module Actions
|
|
3
3
|
module Repository
|
4
4
|
class RemoveContent < Actions::EntryAction
|
5
5
|
include Dynflow::Action::WithSubPlans
|
6
|
+
include Actions::Katello::PulpSelector
|
6
7
|
|
7
8
|
def plan(repository, content_units, options = {})
|
8
9
|
sync_capsule = options.fetch(:sync_capsule, true)
|
@@ -15,12 +16,19 @@ module Actions
|
|
15
16
|
|
16
17
|
action_subject(repository)
|
17
18
|
|
18
|
-
pulp_action = Pulp::Repository::RemoveUnits
|
19
19
|
content_unit_ids = content_units.map(&:id)
|
20
|
-
content_unit_type = content_units.first.class::CONTENT_TYPE
|
20
|
+
content_unit_type = options[:content_type] || content_units.first.class::CONTENT_TYPE
|
21
21
|
|
22
22
|
sequence do
|
23
|
-
|
23
|
+
remove_content_args = {
|
24
|
+
:contents => content_unit_ids,
|
25
|
+
:content_unit_type => content_unit_type}
|
26
|
+
|
27
|
+
pulp_action = plan_pulp_action(
|
28
|
+
[Pulp::Orchestration::Repository::RemoveUnits,
|
29
|
+
Pulp3::Orchestration::Repository::RemoveUnits],
|
30
|
+
repository, SmartProxy.pulp_master, remove_content_args)
|
31
|
+
return if pulp_action.error
|
24
32
|
plan_self(:content_unit_class => content_units.first.class.name, :content_unit_ids => content_unit_ids)
|
25
33
|
plan_action(CapsuleSync, repository) if sync_capsule
|
26
34
|
end
|
@@ -4,6 +4,7 @@ module Actions
|
|
4
4
|
module Repository
|
5
5
|
class Sync < Actions::EntryAction
|
6
6
|
include Helpers::Presenter
|
7
|
+
include Actions::Katello::PulpSelector
|
7
8
|
middleware.use Actions::Middleware::ExecuteIfContentsChanged
|
8
9
|
|
9
10
|
input_format do
|
@@ -16,7 +17,7 @@ module Actions
|
|
16
17
|
# of Katello and we just need to finish the rest of the orchestration
|
17
18
|
# rubocop:disable MethodLength
|
18
19
|
# rubocop:disable CyclomaticComplexity
|
19
|
-
def plan(repo,
|
20
|
+
def plan(repo, _pulp_sync_task_id = nil, options = {})
|
20
21
|
action_subject(repo)
|
21
22
|
|
22
23
|
source_url = options.fetch(:source_url, nil)
|
@@ -35,14 +36,18 @@ module Actions
|
|
35
36
|
fail ::Katello::Errors::InvalidActionOptionError, _("Cannot skip metadata check on non-yum repositories.") if skip_metadata_check && !repo.yum?
|
36
37
|
|
37
38
|
sequence do
|
38
|
-
# clear yum metadata if validate_contents is on (to avoid metadata corruption issues)
|
39
39
|
plan_action(Pulp::Repository::RemoveUnits, :repo_id => repo.id, :content_unit_type => ::Katello::YumMetadataFile::CONTENT_TYPE) if validate_contents
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
sync_args = {:smart_proxy_id => SmartProxy.pulp_master.id, :repo_id => repo.id, :source_url => source_url, :options => pulp_sync_options}
|
41
|
+
sync_action = plan_pulp_action([Actions::Pulp::Orchestration::Repository::Sync,
|
42
|
+
Actions::Pulp3::Orchestration::Repository::Sync],
|
43
|
+
repo,
|
44
|
+
SmartProxy.pulp_master,
|
45
|
+
sync_args)
|
46
|
+
output = sync_action.output
|
43
47
|
|
44
48
|
contents_changed = skip_metadata_check || output[:contents_changed]
|
45
|
-
|
49
|
+
|
50
|
+
plan_action(Katello::Repository::IndexContent, :id => repo.id, :contents_changed => contents_changed)
|
46
51
|
plan_action(Katello::Foreman::ContentUpdate, repo.environment, repo.content_view, repo)
|
47
52
|
plan_action(Katello::Repository::FetchPxeFiles, :id => repo.id)
|
48
53
|
plan_action(Katello::Repository::CorrectChecksum, repo)
|
@@ -75,7 +80,9 @@ module Actions
|
|
75
80
|
end
|
76
81
|
|
77
82
|
def presenter
|
78
|
-
|
83
|
+
found = all_planned_actions(Pulp::Repository::Sync)
|
84
|
+
found = all_planned_actions(Pulp3::Repository::Sync) if found.empty?
|
85
|
+
Helpers::Presenter::Delegated.new(self, found)
|
79
86
|
end
|
80
87
|
|
81
88
|
def pulp_task_id
|
@@ -2,6 +2,8 @@ module Actions
|
|
2
2
|
module Katello
|
3
3
|
module Repository
|
4
4
|
class Update < Actions::EntryAction
|
5
|
+
include Actions::Katello::PulpSelector
|
6
|
+
|
5
7
|
def plan(root, repo_params)
|
6
8
|
repository = root.library_instance
|
7
9
|
action_subject root.library_instance
|
@@ -15,22 +17,26 @@ module Actions
|
|
15
17
|
plan_action(::Actions::Candlepin::Product::ContentUpdate,
|
16
18
|
:owner => repository.organization.label,
|
17
19
|
:content_id => root.content_id,
|
18
|
-
:name =>
|
20
|
+
:name => root.name,
|
19
21
|
:content_url => root.custom_content_path,
|
20
22
|
:gpg_key_url => repository.yum_gpg_key_url,
|
21
23
|
:label => content.label,
|
22
24
|
:type => root.content_type,
|
23
25
|
:arches => root.arch == "noarch" ? nil : root.arch)
|
24
26
|
|
25
|
-
content.update_attributes!(name:
|
27
|
+
content.update_attributes!(name: root.name,
|
26
28
|
content_url: root.custom_content_path,
|
27
29
|
content_type: repository.content_type,
|
28
30
|
label: content.label,
|
29
31
|
gpg_url: repository.yum_gpg_key_url)
|
30
32
|
end
|
31
|
-
|
32
|
-
|
33
|
-
|
33
|
+
if root.pulp_update_needed?
|
34
|
+
plan_pulp_action([::Actions::Pulp::Orchestration::Repository::Refresh,
|
35
|
+
::Actions::Pulp3::Orchestration::Repository::Update],
|
36
|
+
repository,
|
37
|
+
SmartProxy.pulp_master)
|
38
|
+
plan_self(:repository_id => root.library_instance.id)
|
39
|
+
end
|
34
40
|
end
|
35
41
|
|
36
42
|
def run
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Actions
|
2
|
+
module Katello
|
3
|
+
module Repository
|
4
|
+
class UpdateHttpProxyDetails < Actions::EntryAction
|
5
|
+
include Actions::Katello::PulpSelector
|
6
|
+
|
7
|
+
def plan(repository)
|
8
|
+
plan_pulp_action(
|
9
|
+
[Actions::Pulp::Orchestration::Repository::Refresh,
|
10
|
+
Actions::Pulp3::Repository::UpdateRemote],
|
11
|
+
repository,
|
12
|
+
SmartProxy.pulp_master)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -6,9 +6,13 @@ module Actions
|
|
6
6
|
module Katello
|
7
7
|
module Repository
|
8
8
|
class UploadFiles < Actions::EntryAction
|
9
|
-
def plan(repository, files)
|
9
|
+
def plan(repository, files, content_type = nil)
|
10
10
|
action_subject(repository)
|
11
11
|
tmp_files = prepare_tmp_files(files)
|
12
|
+
|
13
|
+
content_type ||= ::Katello::RepositoryTypeManager.find(repository.content_type).default_managed_content_type.label
|
14
|
+
unit_type_id = SmartProxy.pulp_master.content_service(content_type)::CONTENT_TYPE
|
15
|
+
|
12
16
|
sequence do
|
13
17
|
concurrence do
|
14
18
|
tmp_files.each do |file|
|
@@ -19,7 +23,7 @@ module Actions
|
|
19
23
|
file: file[:path])
|
20
24
|
plan_action(Pulp::Repository::ImportUpload,
|
21
25
|
pulp_id: repository.pulp_id,
|
22
|
-
unit_type_id:
|
26
|
+
unit_type_id: unit_type_id,
|
23
27
|
unit_key: unit_key(file, repository),
|
24
28
|
upload_id: upload_request.output[:upload_id])
|
25
29
|
plan_action(Pulp::Repository::DeleteUploadRequest,
|
@@ -27,7 +31,7 @@ module Actions
|
|
27
31
|
end
|
28
32
|
end
|
29
33
|
end
|
30
|
-
plan_action(FinishUpload, repository)
|
34
|
+
plan_action(FinishUpload, repository, content_type: content_type)
|
31
35
|
plan_self(tmp_files: tmp_files)
|
32
36
|
end
|
33
37
|
ensure
|
@@ -6,10 +6,13 @@ module Actions
|
|
6
6
|
|
7
7
|
input_format do
|
8
8
|
param :entitlement_id
|
9
|
+
param :sub_name
|
9
10
|
end
|
10
11
|
|
11
12
|
def run
|
12
13
|
output[:response] = ::Katello::Resources::Candlepin::UpstreamConsumer.remove_entitlement(input[:entitlement_id])
|
14
|
+
rescue ::Katello::Errors::UpstreamEntitlementGone
|
15
|
+
output[:response] = _("%s has already been deleted" % input[:sub_name])
|
13
16
|
end
|
14
17
|
|
15
18
|
def run_progress_weight
|
@@ -3,6 +3,7 @@ module Actions
|
|
3
3
|
module UpstreamSubscriptions
|
4
4
|
class RemoveEntitlements < Actions::Base
|
5
5
|
def plan(pool_ids = [])
|
6
|
+
::Katello::Resources::Candlepin::UpstreamConsumer.get(:include_only => [:uuid])
|
6
7
|
ids = pool_ids.uniq.compact
|
7
8
|
fail _("No pool IDs were provided.") if ids.blank?
|
8
9
|
fail _("Current organization is not set.") unless ::Organization.current
|
@@ -13,7 +14,9 @@ module Actions
|
|
13
14
|
|
14
15
|
fail _("Provided pool with id %s has no upstream entitlement" % pid) if pool.upstream_entitlement_id.nil?
|
15
16
|
|
16
|
-
|
17
|
+
sub_name = pool.subscription.name
|
18
|
+
|
19
|
+
plan_action(::Actions::Katello::UpstreamSubscriptions::RemoveEntitlement, entitlement_id: pool.upstream_entitlement_id, sub_name: sub_name)
|
17
20
|
end
|
18
21
|
|
19
22
|
plan_action(::Actions::Katello::Organization::ManifestRefresh, ::Organization.current)
|
@@ -26,8 +26,16 @@ module Actions
|
|
26
26
|
protected
|
27
27
|
|
28
28
|
def capsule_id(args)
|
29
|
-
|
30
|
-
|
29
|
+
capsule_id = nil
|
30
|
+
args.each do |arg|
|
31
|
+
if arg.is_a? SmartProxy
|
32
|
+
capsule_id = arg.id
|
33
|
+
elsif arg.is_a? Hash
|
34
|
+
capsule_id = arg[:capsule_id] || arg[:smart_proxy_id]
|
35
|
+
end
|
36
|
+
break if capsule_id
|
37
|
+
end
|
38
|
+
capsule_id
|
31
39
|
end
|
32
40
|
|
33
41
|
def source_action
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Actions
|
2
|
+
module Middleware
|
3
|
+
class PropagateOutput < Dynflow::Middleware
|
4
|
+
def run(*args)
|
5
|
+
pass(*args)
|
6
|
+
if action.input.keys.include?('subaction_output') && action.input['subaction_output']
|
7
|
+
action.input['subaction_output'].each do |key, value|
|
8
|
+
self.action.output[key] = value
|
9
|
+
end
|
10
|
+
action.input.delete('subaction_output')
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|