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
@@ -0,0 +1,19 @@
|
|
1
|
+
module Actions
|
2
|
+
module Pulp3
|
3
|
+
module Repository
|
4
|
+
class CopyVersion < Pulp3::AbstractAsyncTask
|
5
|
+
def plan(source_repository, smart_proxy, target_repository)
|
6
|
+
plan_self(:source_repository_id => source_repository.id,
|
7
|
+
:target_repository_id => target_repository.id,
|
8
|
+
:smart_proxy_id => smart_proxy.id)
|
9
|
+
end
|
10
|
+
|
11
|
+
def invoke_external_task
|
12
|
+
source = ::Katello::Repository.find(input[:source_repository_id])
|
13
|
+
target = ::Katello::Repository.find(input[:target_repository_id] || input[:target_repository])
|
14
|
+
output[:pulp_tasks] = target.backend_service(smart_proxy).copy_version(source)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -2,10 +2,11 @@ module Actions
|
|
2
2
|
module Pulp3
|
3
3
|
module Repository
|
4
4
|
class CreatePublication < Pulp3::AbstractAsyncTask
|
5
|
+
middleware.use Actions::Middleware::ExecuteIfContentsChanged
|
5
6
|
def plan(repository, smart_proxy, options)
|
6
7
|
sequence do
|
7
|
-
action = plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id, :options => options)
|
8
|
-
plan_action(SavePublication, repository, action.output[:
|
8
|
+
action = plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id, :contents_changed => options[:contents_changed], :options => options)
|
9
|
+
plan_action(SavePublication, repository, action.output, :contents_changed => options[:contents_changed])
|
9
10
|
end
|
10
11
|
end
|
11
12
|
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module Actions
|
2
|
+
module Pulp3
|
3
|
+
module Repository
|
4
|
+
module Presenters
|
5
|
+
class AbstractSyncPresenter < Helpers::Presenter::Base
|
6
|
+
def humanized_output
|
7
|
+
if action.external_task
|
8
|
+
humanized_details
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def humanized_details
|
15
|
+
fail NotImplementedError
|
16
|
+
end
|
17
|
+
|
18
|
+
def sync_task
|
19
|
+
tasks = action.external_task.select do |task|
|
20
|
+
if task.key? 'name'
|
21
|
+
task['name'].include?("sync")
|
22
|
+
end
|
23
|
+
end
|
24
|
+
tasks.first
|
25
|
+
end
|
26
|
+
|
27
|
+
def cancelled?
|
28
|
+
sync_task && sync_task['state'] == 'cancelled'
|
29
|
+
end
|
30
|
+
|
31
|
+
def task_result
|
32
|
+
sync_task['result']
|
33
|
+
end
|
34
|
+
|
35
|
+
def task_result_details
|
36
|
+
task_result && task_result['details']
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
module Actions
|
2
|
+
module Pulp3
|
3
|
+
module Repository
|
4
|
+
module Presenters
|
5
|
+
class ContentUnitPresenter < AbstractSyncPresenter
|
6
|
+
def progress
|
7
|
+
total_units == 0 ? 0.1 : finished_units.to_f / total_units
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def humanized_details
|
13
|
+
ret = []
|
14
|
+
ret << _("Cancelled.") if cancelled?
|
15
|
+
ret << _("Total tasks: ") + ": #{finished_units}/#{total_units}"
|
16
|
+
ret << "--------------------------------"
|
17
|
+
progress_reports = sync_task.try(:[], 'progress_reports') || []
|
18
|
+
progress_reports.each do |pr|
|
19
|
+
done = pr.try(:[], 'done')
|
20
|
+
total = pr.try(:[], 'total') || pr.try(:[], 'done')
|
21
|
+
unless done.nil? || total.nil?
|
22
|
+
ret << _(pr.try(:[], 'message') + ": #{done}/#{total}")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
ret.join("\n")
|
27
|
+
end
|
28
|
+
|
29
|
+
def total_units
|
30
|
+
total_unit = 0
|
31
|
+
progress_reports = sync_task.try(:[], 'progress_reports') || []
|
32
|
+
progress_reports.each do |pr|
|
33
|
+
total = pr.try(:[], 'total')
|
34
|
+
total = pr.try(:[], 'done') if total.nil?
|
35
|
+
unless total.nil?
|
36
|
+
total_unit += total.to_i
|
37
|
+
end
|
38
|
+
end
|
39
|
+
total_unit
|
40
|
+
end
|
41
|
+
|
42
|
+
def finished_units
|
43
|
+
finished_unit = 0
|
44
|
+
progress_reports = sync_task.try(:[], 'progress_reports') || []
|
45
|
+
progress_reports.each do |pr|
|
46
|
+
done = pr.try(:[], 'done')
|
47
|
+
unless done.nil?
|
48
|
+
finished_unit += done.to_i
|
49
|
+
end
|
50
|
+
end
|
51
|
+
finished_unit
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -3,10 +3,14 @@ module Actions
|
|
3
3
|
module Repository
|
4
4
|
class RefreshDistribution < Pulp3::AbstractAsyncTask
|
5
5
|
include Helpers::Presenter
|
6
|
+
middleware.use Actions::Middleware::ExecuteIfContentsChanged
|
6
7
|
|
7
|
-
def plan(repository, smart_proxy)
|
8
|
-
|
9
|
-
|
8
|
+
def plan(repository, smart_proxy, options = {})
|
9
|
+
sequence do
|
10
|
+
action = plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id, :contents_changed => options[:contents_changed])
|
11
|
+
plan_action(SaveDistributionReferences, repository, smart_proxy,
|
12
|
+
action.output, :contents_changed => options[:contents_changed])
|
13
|
+
end
|
10
14
|
end
|
11
15
|
|
12
16
|
def invoke_external_task
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Actions
|
2
|
+
module Pulp3
|
3
|
+
module Repository
|
4
|
+
class RemoveUnits < Pulp3::AbstractAsyncTask
|
5
|
+
def plan(repository, smart_proxy, options)
|
6
|
+
plan_self(repository_id: repository.id,
|
7
|
+
smart_proxy_id: smart_proxy.id,
|
8
|
+
options: options)
|
9
|
+
end
|
10
|
+
|
11
|
+
def invoke_external_task
|
12
|
+
repo = ::Katello::Repository.find(input[:repository_id])
|
13
|
+
content_unit_ids = input[:options][:contents]
|
14
|
+
|
15
|
+
content_type = ::Katello::RepositoryTypeManager.find_content_type(input[:options][:content_unit_type].downcase)
|
16
|
+
units = content_type.model_class.where(:id => content_unit_ids)
|
17
|
+
|
18
|
+
output[:pulp_tasks] = repo.backend_service(smart_proxy).remove_content(units)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -2,13 +2,15 @@ module Actions
|
|
2
2
|
module Pulp3
|
3
3
|
module Repository
|
4
4
|
class SaveDistributionReferences < Pulp3::Abstract
|
5
|
-
|
6
|
-
|
5
|
+
middleware.use Actions::Middleware::ExecuteIfContentsChanged
|
6
|
+
|
7
|
+
def plan(repository, smart_proxy, tasks, options = {})
|
8
|
+
plan_self(repository_id: repository.id, smart_proxy_id: smart_proxy.id, tasks: tasks, contents_changed: options[:contents_changed])
|
7
9
|
end
|
8
10
|
|
9
11
|
def run
|
10
|
-
if input[:tasks] && input[:tasks].first
|
11
|
-
distribution_hrefs = input[:tasks].map { |task| task[:created_resources].first }
|
12
|
+
if input[:tasks] && input[:tasks][:pulp_tasks] && input[:tasks][:pulp_tasks].first
|
13
|
+
distribution_hrefs = input[:tasks][:pulp_tasks].map { |task| task[:created_resources].first }
|
12
14
|
distribution_hrefs.compact!
|
13
15
|
if distribution_hrefs.any?
|
14
16
|
repo = ::Katello::Repository.find(input[:repository_id])
|
@@ -2,13 +2,14 @@ module Actions
|
|
2
2
|
module Pulp3
|
3
3
|
module Repository
|
4
4
|
class SavePublication < Pulp3::Abstract
|
5
|
-
|
6
|
-
|
5
|
+
middleware.use Actions::Middleware::ExecuteIfContentsChanged
|
6
|
+
def plan(repository, tasks, options = {})
|
7
|
+
plan_self(:repository_id => repository.id, :tasks => tasks, :contents_changed => options[:contents_changed])
|
7
8
|
end
|
8
9
|
|
9
10
|
def run
|
10
|
-
if input[:tasks] && input[:tasks].first
|
11
|
-
publication_href = input[:tasks].first[:created_resources].first
|
11
|
+
if input[:tasks] && input[:tasks][:pulp_tasks] && input[:tasks][:pulp_tasks].first
|
12
|
+
publication_href = input[:tasks][:pulp_tasks].first[:created_resources].first
|
12
13
|
if publication_href
|
13
14
|
repo = ::Katello::Repository.find(input[:repository_id])
|
14
15
|
repo.update_attributes(:publication_href => publication_href)
|
@@ -7,10 +7,14 @@ module Actions
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def run
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
version_href = input[:tasks].last[:created_resources].first
|
11
|
+
repo = ::Katello::Repository.find(input[:repository_id])
|
12
|
+
repo_version = repo.backend_service(::SmartProxy.pulp_master).lookup_version version_href
|
13
|
+
content_summary = send(:eval, repo_version.content_summary)
|
14
|
+
first_version = (repo_version.number == 1)
|
15
|
+
output[:contents_changed] = first_version || !(content_summary.dig(:added).empty? && content_summary.dig(:removed).empty?)
|
16
|
+
if version_href && output[:contents_changed]
|
17
|
+
repo.update_attributes(:version_href => version_href)
|
14
18
|
end
|
15
19
|
end
|
16
20
|
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Actions
|
2
|
+
module Pulp3
|
3
|
+
module Repository
|
4
|
+
class Sync < Pulp3::AbstractAsyncTask
|
5
|
+
include Helpers::Presenter
|
6
|
+
|
7
|
+
def plan(repo, smart_proxy, options = {})
|
8
|
+
plan_self(:repo_id => repo.id, :smart_proxy_id => smart_proxy.id, :options => options)
|
9
|
+
end
|
10
|
+
|
11
|
+
def invoke_external_task
|
12
|
+
repo = ::Katello::Repository.find(input[:repo_id])
|
13
|
+
output[:pulp_tasks] = repo.backend_service(::SmartProxy.find(input[:smart_proxy_id])).sync
|
14
|
+
end
|
15
|
+
|
16
|
+
def external_task=(tasks)
|
17
|
+
output[:create_version] = true
|
18
|
+
super
|
19
|
+
end
|
20
|
+
|
21
|
+
def finalize
|
22
|
+
check_error_details
|
23
|
+
end
|
24
|
+
|
25
|
+
def check_error_details
|
26
|
+
output[:pulp_tasks].each do |pulp_task|
|
27
|
+
error_details = pulp_task.try(:[], "error")
|
28
|
+
if error_details && !error_details.nil?
|
29
|
+
fail _("An error occurred during the sync \n%{error_message}") % {:error_message => error_details}
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def run_progress
|
35
|
+
presenter.progress
|
36
|
+
end
|
37
|
+
|
38
|
+
def run_progress_weight
|
39
|
+
10
|
40
|
+
end
|
41
|
+
|
42
|
+
def presenter
|
43
|
+
Presenters::ContentUnitPresenter.new(self)
|
44
|
+
end
|
45
|
+
|
46
|
+
def rescue_strategy_for_self
|
47
|
+
# There are various reasons the syncing fails, not all of them are
|
48
|
+
# fatal: when fail on syncing, we continue with the task ending up
|
49
|
+
# in the warning state, but not locking further syncs
|
50
|
+
Dynflow::Action::Rescue::Skip
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
module Actions
|
2
2
|
module Pulp3
|
3
3
|
module Repository
|
4
|
-
class
|
5
|
-
def plan(
|
6
|
-
plan_self(:repository_id =>
|
4
|
+
class UpdateDistributions < Pulp3::Abstract
|
5
|
+
def plan(repository, smart_proxy)
|
6
|
+
plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id)
|
7
7
|
end
|
8
8
|
|
9
|
-
def
|
9
|
+
def run
|
10
10
|
repo = ::Katello::Repository.find(input[:repository_id])
|
11
|
-
output[:response] = repo.backend_service(smart_proxy).
|
11
|
+
output[:response] = repo.backend_service(smart_proxy).refresh_distributions
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
module Actions
|
2
2
|
module Pulp3
|
3
3
|
module Repository
|
4
|
-
class
|
4
|
+
class UpdateRemote < Pulp3::Abstract
|
5
5
|
def plan(repository, smart_proxy)
|
6
6
|
plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id)
|
7
7
|
end
|
8
8
|
|
9
9
|
def run
|
10
10
|
repo = ::Katello::Repository.find(input[:repository_id])
|
11
|
-
output[:response] = repo.backend_service(smart_proxy).
|
11
|
+
output[:response] = repo.backend_service(smart_proxy).update_remote
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Actions
|
2
|
+
module Pulp3
|
3
|
+
module Repository
|
4
|
+
class UpdateRepository < Pulp3::Abstract
|
5
|
+
def plan(repository, smart_proxy)
|
6
|
+
plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id)
|
7
|
+
end
|
8
|
+
|
9
|
+
def run
|
10
|
+
repo = ::Katello::Repository.find(input[:repository_id])
|
11
|
+
output[:response] = repo.backend_service(smart_proxy).update
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/app/lib/katello/errors.rb
CHANGED
@@ -116,5 +116,14 @@ module Katello
|
|
116
116
|
end
|
117
117
|
end
|
118
118
|
end
|
119
|
+
|
120
|
+
class UpstreamConsumerGone < StandardError
|
121
|
+
def message
|
122
|
+
_("The Subscription Allocation providing the imported manifest has been removed. " \
|
123
|
+
"Please create a new Subscription Allocation and import the new manifest.")
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
class UpstreamEntitlementGone < StandardError; end
|
119
128
|
end
|
120
129
|
end
|
@@ -10,13 +10,14 @@ module Katello
|
|
10
10
|
::Katello::Util::Data.array_with_indifferent_access akeys
|
11
11
|
end
|
12
12
|
|
13
|
-
def create(name, owner_key, auto_attach)
|
13
|
+
def create(name, owner_key, auto_attach, purpose_role, purpose_usage, purpose_addons)
|
14
14
|
url = "/candlepin/owners/#{owner_key}/activation_keys"
|
15
|
-
JSON.parse(self.post(url, {:name => name, :autoAttach => auto_attach}.to_json, self.default_headers).body).with_indifferent_access
|
15
|
+
JSON.parse(self.post(url, {:name => name, :autoAttach => auto_attach, :role => purpose_role, :usage => purpose_usage, :addOns => purpose_addons}.to_json, self.default_headers).body).with_indifferent_access
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
# rubocop:disable Metrics/ParameterLists
|
19
|
+
def update(id, release_version, service_level, auto_attach, purpose_role, purpose_usage, purpose_addons)
|
20
|
+
attrs = { :releaseVer => release_version, :serviceLevel => service_level, :autoAttach => auto_attach, :role => purpose_role, :usage => purpose_usage, :addOns => purpose_addons }.delete_if { |_k, v| v.nil? }
|
20
21
|
JSON.parse(self.put(path(id), attrs.to_json, self.default_headers).body).with_indifferent_access
|
21
22
|
end
|
22
23
|
|
@@ -110,6 +110,10 @@ module Katello
|
|
110
110
|
def path(owner_label, id = nil)
|
111
111
|
"/candlepin/owners/#{owner_label}/products/#{id}"
|
112
112
|
end
|
113
|
+
|
114
|
+
def update(owner_label, attrs)
|
115
|
+
JSON.parse(self.put(path(owner_label, attrs[:id] || attrs['id']), JSON.generate(attrs), self.default_headers).body).with_indifferent_access
|
116
|
+
end
|
113
117
|
end
|
114
118
|
end
|
115
119
|
end
|
@@ -9,10 +9,21 @@ module Katello
|
|
9
9
|
super(id)
|
10
10
|
end
|
11
11
|
|
12
|
+
# Overrides the HttpResource get method to check if the upstream
|
13
|
+
# consumer exists.
|
14
|
+
def get(params)
|
15
|
+
includes = params.key?(:include_only) ? "&" + included_list(params.delete(:include_only)) : ""
|
16
|
+
JSON.parse(super(path + hash_to_query(params) + includes, self.default_headers).body)
|
17
|
+
rescue RestClient::Gone
|
18
|
+
raise ::Katello::Errors::UpstreamConsumerGone
|
19
|
+
end
|
20
|
+
|
12
21
|
def remove_entitlement(entitlement_id)
|
13
22
|
fail ArgumentError, "No entitlement ID given to remove." if entitlement_id.blank?
|
14
23
|
|
15
24
|
self["entitlements/#{entitlement_id}"].delete
|
25
|
+
rescue RestClient::NotFound
|
26
|
+
raise ::Katello::Errors::UpstreamEntitlementGone
|
16
27
|
end
|
17
28
|
|
18
29
|
def export(url, client_cert, client_key, ca_file)
|
@@ -5,11 +5,15 @@ module Katello
|
|
5
5
|
extend PoolResource
|
6
6
|
|
7
7
|
class << self
|
8
|
+
def get(*args)
|
9
|
+
resource.get(*args)
|
10
|
+
rescue RestClient::Gone
|
11
|
+
raise Katello::Errors::UpstreamConsumerGone
|
12
|
+
end
|
13
|
+
|
8
14
|
def path(id = nil, owner_label = nil)
|
9
15
|
super(id, owner_label || upstream_owner_id)
|
10
16
|
end
|
11
|
-
|
12
|
-
delegate :get, to: :resource
|
13
17
|
end
|
14
18
|
end
|
15
19
|
end
|