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
data/app/models/katello/srpm.rb
CHANGED
@@ -9,6 +9,10 @@ module Katello
|
|
9
9
|
|
10
10
|
before_save lambda { |rpm| rpm.summary = rpm.summary.truncate(255) unless rpm.summary.blank? }
|
11
11
|
|
12
|
+
def self.default_sort
|
13
|
+
order(:name).order(:epoch).order(:version_sortable).order(:release_sortable)
|
14
|
+
end
|
15
|
+
|
12
16
|
def self.repository_association_class
|
13
17
|
RepositorySrpm
|
14
18
|
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
module Katello
|
2
|
+
class SubscriptionFacetPurposeAddon < Katello::Model
|
3
|
+
belongs_to :subscription_facet, inverse_of: :subscription_facet_purpose_addons, class_name: 'Katello::Host::SubscriptionFacet'
|
4
|
+
belongs_to :purpose_addon, inverse_of: :subscription_facet_purpose_addons, class_name: 'Katello::PurposeAddon'
|
5
|
+
end
|
6
|
+
end
|
@@ -5,12 +5,12 @@ module Katello
|
|
5
5
|
belongs_to :repository, :inverse_of => :yum_metadata_files, :class_name => "Katello::Repository"
|
6
6
|
CONTENT_TYPE = "yum_repo_metadata_file".freeze
|
7
7
|
|
8
|
-
def self.import_for_repository(repository
|
8
|
+
def self.import_for_repository(repository)
|
9
9
|
::Katello::YumMetadataFile.where(:repository_id => repository).destroy_all
|
10
|
-
super(repository
|
10
|
+
super(repository)
|
11
11
|
end
|
12
12
|
|
13
|
-
def self.
|
13
|
+
def self.many_repository_associations
|
14
14
|
false
|
15
15
|
end
|
16
16
|
|
@@ -2,6 +2,8 @@ class Setting::Content < Setting
|
|
2
2
|
#rubocop:disable Metrics/MethodLength
|
3
3
|
#rubocop:disable Metrics/AbcSize
|
4
4
|
|
5
|
+
after_save :add_organizations_and_locations_if_global_http_proxy
|
6
|
+
|
5
7
|
def self.hashify_parameters(parameters)
|
6
8
|
Hash[parameters.map { |p| [p, p] }]
|
7
9
|
end
|
@@ -10,14 +12,26 @@ class Setting::Content < Setting
|
|
10
12
|
return unless super
|
11
13
|
|
12
14
|
BLANK_ATTRS.concat %w(register_hostname_fact default_location_subscribed_hosts
|
13
|
-
default_location_puppet_content)
|
15
|
+
default_location_puppet_content content_default_http_proxy)
|
14
16
|
|
15
17
|
download_policies = proc { hashify_parameters(::Runcible::Models::YumImporter::DOWNLOAD_POLICIES) }
|
16
18
|
proxy_download_policies = proc { hashify_parameters(::SmartProxy::DOWNLOAD_POLICIES) }
|
17
19
|
dependency_solving_options = proc { hashify_parameters(['conservative', 'greedy']) }
|
20
|
+
http_proxy_select = [{
|
21
|
+
name: _("HTTP Proxies"),
|
22
|
+
class: 'HttpProxy',
|
23
|
+
scope: 'all',
|
24
|
+
value_method: 'name',
|
25
|
+
text_method: 'name_and_url'
|
26
|
+
}]
|
18
27
|
|
19
28
|
self.transaction do
|
20
29
|
[
|
30
|
+
self.set('content_default_http_proxy', N_("Default HTTP Proxy for syncing content"),
|
31
|
+
nil, N_('Default http proxy'),
|
32
|
+
nil,
|
33
|
+
collection: proc { http_proxy_select }, include_blank: N_("no global default")
|
34
|
+
),
|
21
35
|
self.set('katello_default_provision', N_("Default provisioning template for Operating Systems created from synced content"),
|
22
36
|
'Kickstart default', N_('Default synced OS provisioning template'),
|
23
37
|
nil, :collection => proc { katello_template_setting_values("provision") }
|
@@ -50,9 +64,7 @@ class Setting::Content < Setting
|
|
50
64
|
self.set('katello_default_ptable', N_("Default partitioning table for new Operating Systems created from synced content"),
|
51
65
|
'Kickstart default', N_('Default synced OS partition table'),
|
52
66
|
nil, :collection => proc { Hash[Template.all.where(:type => "Ptable").map { |tmp| [tmp[:name], tmp[:name]] }] }
|
53
|
-
),
|
54
|
-
self.set('katello_default_kexec', N_("Default kexec template for new Operating Systems created from synced content"),
|
55
|
-
'Discovery Red Hat kexec', N_('Default synced OS kexec template'),
|
67
|
+
), self.set('katello_default_kexec', N_("Default kexec template for new Operating Systems created from synced content"), 'Discovery Red Hat kexec', N_('Default synced OS kexec template'),
|
56
68
|
nil, :collection => proc { katello_template_setting_values("kexec") }
|
57
69
|
),
|
58
70
|
self.set('katello_default_atomic_provision', N_("Default provisioning template for new Atomic Operating Systems created from synced content"),
|
@@ -75,8 +87,10 @@ class Setting::Content < Setting
|
|
75
87
|
true, N_('Check services before actions')),
|
76
88
|
self.set('foreman_proxy_content_auto_sync', N_("Whether or not to auto sync the Smart Proxies after a Content View promotion."),
|
77
89
|
true, N_('Sync Smart Proxies after Content View promotion')),
|
78
|
-
self.set('default_download_policy', N_("Default download policy for repositories (either 'immediate', 'on_demand', or 'background')"), "
|
79
|
-
N_('Default Repository download policy'), nil, :collection => download_policies),
|
90
|
+
self.set('default_download_policy', N_("Default download policy for custom repositories (either 'immediate', 'on_demand', or 'background')"), "immediate",
|
91
|
+
N_('Default Custom Repository download policy'), nil, :collection => download_policies),
|
92
|
+
self.set('default_redhat_download_policy', N_("Default download policy for enabled Red Hat repositories (either 'immediate', 'on_demand', or 'background')"), "on_demand",
|
93
|
+
N_('Default Red Hat Repository download policy'), nil, :collection => download_policies),
|
80
94
|
self.set('default_proxy_download_policy', N_("Default download policy for Smart Proxy syncs (either 'inherit', immediate', 'on_demand', or 'background')"), "on_demand",
|
81
95
|
N_('Default Smart Proxy download policy'), nil, :collection => proxy_download_policies),
|
82
96
|
self.set('pulp_docker_registry_port', N_("The port used by Pulp Crane to provide Docker Registries"),
|
@@ -115,7 +129,7 @@ class Setting::Content < Setting
|
|
115
129
|
false, N_('Content View Dependency Solving Default')),
|
116
130
|
self.set('dependency_solving_algorithm',
|
117
131
|
N_("How the logic of solving dependencies in a Content View is managed. Conservative will only add " \
|
118
|
-
"packages to solve the dependencies if the
|
132
|
+
"packages to solve the dependencies if the package needed doesn't exist. Greedy will pull in the " \
|
119
133
|
"latest package to solve a dependency even if it already does exist in the repository."),
|
120
134
|
'conservative', N_('Content View Dependency Solving Algorithm'), nil,
|
121
135
|
:collection => dependency_solving_options)
|
@@ -128,6 +142,17 @@ class Setting::Content < Setting
|
|
128
142
|
templates = ProvisioningTemplate.where(:template_kind => TemplateKind.where(:name => name))
|
129
143
|
templates.each_with_object({}) { |tmpl, hash| hash[tmpl.name] = tmpl.name }
|
130
144
|
end
|
145
|
+
|
146
|
+
def add_organizations_and_locations_if_global_http_proxy
|
147
|
+
if name == 'content_default_http_proxy' && (::HttpProxy.table_exists? rescue(false))
|
148
|
+
proxy = HttpProxy.where(name: value).first
|
149
|
+
|
150
|
+
if proxy
|
151
|
+
proxy.update_attribute(:organizations, Organization.unscoped.all)
|
152
|
+
proxy.update_attribute(:locations, Location.unscoped.all)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
131
156
|
end
|
132
157
|
|
133
158
|
# If the database is not migrated yet, the system will not be able to load
|
@@ -1,10 +1,3 @@
|
|
1
|
-
# Add System Status to About page
|
2
|
-
Deface::Override.new(:virtual_path => "about/index",
|
3
|
-
:name => "add_system_status_to_about",
|
4
|
-
:insert_bottom => '#about',
|
5
|
-
:partial => 'overrides/about/system_status'
|
6
|
-
)
|
7
|
-
|
8
1
|
# Add Installed Packages to About page
|
9
2
|
Deface::Override.new(:virtual_path => "about/index",
|
10
3
|
:name => "add_installed_packages_to_about",
|
data/app/services/cert/certs.rb
CHANGED
@@ -19,7 +19,7 @@ module Cert
|
|
19
19
|
def self.verify_ueber_cert(organization)
|
20
20
|
ueber_cert = OpenSSL::X509::Certificate.new(self.ueber_cert(organization)[:cert])
|
21
21
|
cert_store = OpenSSL::X509::Store.new
|
22
|
-
cert_store.add_file
|
22
|
+
cert_store.add_file SETTINGS[:katello][:candlepin][:ca_cert_file]
|
23
23
|
organization.regenerate_ueber_cert unless cert_store.verify ueber_cert
|
24
24
|
end
|
25
25
|
end
|
@@ -1,15 +1,29 @@
|
|
1
1
|
module Katello
|
2
2
|
class EventQueue
|
3
|
+
MAX_RETRY_AGE = 6.hours
|
4
|
+
|
3
5
|
@event_types = {}
|
4
6
|
|
7
|
+
def self.create_instance(event)
|
8
|
+
event_class = ::Katello::EventQueue.event_class(event.event_type)
|
9
|
+
|
10
|
+
event_class.new(event.object_id) do |instance|
|
11
|
+
instance.metadata = event.metadata if event.metadata
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.runnable_events
|
16
|
+
Katello::Event.where(process_after: nil).or(Katello::Event.where(process_after: Date.new..Time.zone.now))
|
17
|
+
end
|
18
|
+
|
5
19
|
def self.clear_events(event_type, object_id, on_or_earlier_than)
|
6
20
|
Katello::Event.where(:in_progress => true, :object_id => object_id, :event_type => event_type).where('created_at <= ?', on_or_earlier_than).delete_all
|
7
21
|
end
|
8
22
|
|
9
23
|
def self.next_event
|
10
|
-
first =
|
24
|
+
first = runnable_events.where(:in_progress => false).order(:created_at => 'asc').first
|
11
25
|
return if first.nil?
|
12
|
-
last =
|
26
|
+
last = runnable_events.where(:in_progress => false, :object_id => first.object_id,
|
13
27
|
:event_type => first.event_type).order(:created_at => 'desc').first
|
14
28
|
mark_in_progress(first)
|
15
29
|
last
|
@@ -25,7 +39,23 @@ module Katello
|
|
25
39
|
end
|
26
40
|
|
27
41
|
def self.push_event(event_type, id)
|
28
|
-
|
42
|
+
attrs = {
|
43
|
+
event_type: event_type,
|
44
|
+
object_id: id
|
45
|
+
}
|
46
|
+
|
47
|
+
yield(attrs) if block_given?
|
48
|
+
|
49
|
+
Event.create!(attrs)
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.reschedule_event(event)
|
53
|
+
return :expired if event.created_at <= MAX_RETRY_AGE.ago
|
54
|
+
|
55
|
+
retry_seconds = event_class(event.event_type).try(:retry_seconds)
|
56
|
+
if retry_seconds
|
57
|
+
Katello::Event.update(event.id, in_progress: false, process_after: Time.zone.now + retry_seconds)
|
58
|
+
end
|
29
59
|
end
|
30
60
|
|
31
61
|
def self.register_event(event_type, klass)
|
@@ -5,8 +5,11 @@ module Katello
|
|
5
5
|
@repos = repos
|
6
6
|
end
|
7
7
|
|
8
|
+
# rubocop:disable Metrics/MethodLength
|
8
9
|
def calculate
|
9
10
|
counts = {
|
11
|
+
:apt_repositories => 0,
|
12
|
+
:deb_packages => 0,
|
10
13
|
:yum_repositories => 0,
|
11
14
|
:packages => 0,
|
12
15
|
:package_groups => 0,
|
@@ -19,6 +22,9 @@ module Katello
|
|
19
22
|
|
20
23
|
@repos.each do |repo|
|
21
24
|
case
|
25
|
+
when repo_type?(repo, 'deb')
|
26
|
+
counts[:apt_repositories] += 1
|
27
|
+
counts[:deb_packages] += get_unit_count(repo, 'deb')
|
22
28
|
when repo_type?(repo, 'rpm')
|
23
29
|
counts[:yum_repositories] += 1
|
24
30
|
counts[:packages] += get_unit_count(repo, 'rpm')
|
@@ -6,7 +6,6 @@ module Katello
|
|
6
6
|
def update_model(model)
|
7
7
|
model.update_attributes(:schema_version => backend_data[:schema_version],
|
8
8
|
:digest => backend_data[:digest],
|
9
|
-
:downloaded => backend_data[:downloaded],
|
10
9
|
:docker_manifests => ::Katello::DockerManifest.where(:digest => backend_data[:manifests].pluck(:digest))
|
11
10
|
)
|
12
11
|
end
|
@@ -4,7 +4,7 @@ module Katello
|
|
4
4
|
include LazyAccessor
|
5
5
|
|
6
6
|
PULP_SELECT_FIELDS = %w(name checksum).freeze
|
7
|
-
PULP_INDEXED_FIELDS = %w(name checksum
|
7
|
+
PULP_INDEXED_FIELDS = %w(name checksum).freeze
|
8
8
|
CONTENT_TYPE = "iso".freeze
|
9
9
|
|
10
10
|
lazy_accessor :pulp_facts, :initializer => :backend_data
|
@@ -22,10 +22,53 @@ module Katello
|
|
22
22
|
unit_handler.find_by_unit_id(uuid)
|
23
23
|
end
|
24
24
|
|
25
|
+
def self.model_class
|
26
|
+
Katello::RepositoryTypeManager.model_class(self)
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.unit_identifier
|
30
|
+
"_id"
|
31
|
+
end
|
32
|
+
|
25
33
|
def self.unit_handler
|
26
34
|
Katello.pulp_server.extensions.send(self.name.demodulize.underscore)
|
27
35
|
end
|
28
36
|
|
37
|
+
def self.pulp_units_batch_all(unit_ids = nil, page_size = SETTINGS[:katello][:pulp][:bulk_load_size])
|
38
|
+
fields = self.const_get(:PULP_INDEXED_FIELDS) if self.constants.include?(:PULP_INDEXED_FIELDS)
|
39
|
+
criteria = {:limit => page_size, :skip => 0}
|
40
|
+
criteria[:fields] = fields if fields
|
41
|
+
criteria[:filters] = {'_id' => {'$in' => unit_ids}} if unit_ids
|
42
|
+
|
43
|
+
pulp_units_batch(criteria, page_size) do
|
44
|
+
Katello.pulp_server.resources.unit.search(self::CONTENT_TYPE, criteria, :include_repos => true)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.pulp_units_batch_for_repo(repository, options = {})
|
49
|
+
page_size = options.fetch(:page_size, SETTINGS[:katello][:pulp][:bulk_load_size])
|
50
|
+
|
51
|
+
fields = self.const_get(:PULP_INDEXED_FIELDS) if self.constants.include?(:PULP_INDEXED_FIELDS)
|
52
|
+
criteria = {:type_ids => [const_get(:CONTENT_TYPE)], :limit => page_size, :skip => 0}
|
53
|
+
criteria[:fields] = {:unit => fields} if fields
|
54
|
+
|
55
|
+
pulp_units_batch(criteria, page_size) do
|
56
|
+
Katello.pulp_server.resources.repository.unit_search(repository.pulp_id, criteria).pluck(:metadata)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.pulp_units_batch(criteria, page_size = SETTINGS[:katello][:pulp][:bulk_load_size], &block)
|
61
|
+
response = {}
|
62
|
+
Enumerator.new do |yielder|
|
63
|
+
loop do
|
64
|
+
break if (response.blank? && criteria[:skip] != 0)
|
65
|
+
response = block.call
|
66
|
+
yielder.yield response
|
67
|
+
criteria[:skip] += page_size
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
29
72
|
def self.fetch_all
|
30
73
|
count = 0
|
31
74
|
results = []
|
@@ -90,8 +90,11 @@ module Katello
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def create
|
93
|
-
smart_proxy.pulp_api.extensions.repository.create_with_importer_and_distributors(
|
94
|
-
|
93
|
+
smart_proxy.pulp_api.extensions.repository.create_with_importer_and_distributors(
|
94
|
+
repo.pulp_id,
|
95
|
+
generate_importer,
|
96
|
+
generate_distributors,
|
97
|
+
display_name: root.name)
|
95
98
|
end
|
96
99
|
|
97
100
|
def delete
|
@@ -120,12 +123,12 @@ module Katello
|
|
120
123
|
|
121
124
|
def master_importer_connection_options
|
122
125
|
options = {
|
123
|
-
proxy_host: self.proxy_host_importer_value,
|
124
126
|
basic_auth_username: root.upstream_username,
|
125
127
|
basic_auth_password: root.upstream_password,
|
126
128
|
ssl_validation: root.verify_ssl_on_sync?
|
127
129
|
}
|
128
|
-
options.merge(
|
130
|
+
options.merge!(proxy_options)
|
131
|
+
options.merge!(master_importer_ssl_options)
|
129
132
|
end
|
130
133
|
|
131
134
|
def master_importer_ssl_options
|
@@ -151,7 +154,8 @@ module Katello
|
|
151
154
|
{
|
152
155
|
ssl_client_cert: ueber_cert[:cert],
|
153
156
|
ssl_client_key: ueber_cert[:key],
|
154
|
-
ssl_ca_cert: ::Cert::Certs.ca_cert
|
157
|
+
ssl_ca_cert: ::Cert::Certs.ca_cert,
|
158
|
+
ssl_validation: true
|
155
159
|
}
|
156
160
|
end
|
157
161
|
|
@@ -246,6 +250,29 @@ module Katello
|
|
246
250
|
content_type.pulp2_service_class
|
247
251
|
end
|
248
252
|
end
|
253
|
+
|
254
|
+
def proxy_options
|
255
|
+
if repo.root.http_proxy_policy == RootRepository::NO_DEFAULT_HTTP_PROXY
|
256
|
+
return { proxy_host: '' }
|
257
|
+
end
|
258
|
+
|
259
|
+
proxy = repo.root.http_proxy
|
260
|
+
if repo.root.http_proxy_policy == RootRepository::GLOBAL_DEFAULT_HTTP_PROXY
|
261
|
+
proxy = HttpProxy.default_global_content_proxy
|
262
|
+
end
|
263
|
+
|
264
|
+
if proxy
|
265
|
+
uri = URI(proxy.url)
|
266
|
+
proxy_options = {
|
267
|
+
proxy_host: uri.scheme + '://' + uri.host,
|
268
|
+
proxy_port: uri.port,
|
269
|
+
proxy_username: proxy.username,
|
270
|
+
proxy_password: proxy.password
|
271
|
+
}
|
272
|
+
return proxy_options
|
273
|
+
end
|
274
|
+
{ proxy_host: '' }
|
275
|
+
end
|
249
276
|
end
|
250
277
|
end
|
251
278
|
end
|
@@ -21,7 +21,12 @@ module Katello
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def generate_distributors
|
24
|
-
|
24
|
+
yum_dist_id = repo.pulp_id
|
25
|
+
options = {
|
26
|
+
id: yum_dist_id,
|
27
|
+
auto_publish: true
|
28
|
+
}
|
29
|
+
[Runcible::Models::IsoDistributor.new(repo.relative_path, repo.unprotected, true, options)]
|
25
30
|
end
|
26
31
|
|
27
32
|
def partial_repo_path
|
@@ -89,7 +89,7 @@ module Katello
|
|
89
89
|
|
90
90
|
# always copy modular rpms
|
91
91
|
modular_includes = {filters: {unit: { 'filename' => { '$in' => repo.rpms.modular.pluck(:filename) } }}}
|
92
|
-
smart_proxy.pulp_api.extensions.rpm.copy(repo.pulp_id, destination_repo.pulp_id, modular_includes)
|
92
|
+
tasks << smart_proxy.pulp_api.extensions.rpm.copy(repo.pulp_id, destination_repo.pulp_id, modular_includes)
|
93
93
|
|
94
94
|
[:srpm, :errata, :package_group, :yum_repo_metadata_file, :distribution, :module, :module_default].each do |type|
|
95
95
|
tasks << smart_proxy.pulp_api.extensions.send(type).copy(repo.pulp_id, destination_repo.pulp_id)
|
@@ -125,24 +125,24 @@ module Katello
|
|
125
125
|
end
|
126
126
|
|
127
127
|
def purge_empty_contents
|
128
|
-
[
|
128
|
+
[purge_partial_errata, purge_empty_package_groups]
|
129
129
|
end
|
130
130
|
|
131
131
|
def should_purge_empty_contents?
|
132
132
|
true
|
133
133
|
end
|
134
134
|
|
135
|
-
|
136
|
-
|
137
|
-
def purge_empty_errata
|
135
|
+
def purge_partial_errata
|
138
136
|
task = nil
|
139
|
-
repo.
|
137
|
+
repo.remove_partial_errata! do |errata_to_delete|
|
140
138
|
task = repo.unassociate_by_filter(::Katello::ContentViewErratumFilter::CONTENT_TYPE,
|
141
139
|
"id" => { "$in" => errata_to_delete.map(&:errata_id) })
|
142
140
|
end
|
143
141
|
task
|
144
142
|
end
|
145
143
|
|
144
|
+
private
|
145
|
+
|
146
146
|
def purge_empty_package_groups
|
147
147
|
rpm_names = repo.rpms.pluck(:name).uniq
|
148
148
|
|
@@ -4,7 +4,7 @@ module Katello
|
|
4
4
|
include LazyAccessor
|
5
5
|
|
6
6
|
PULP_SELECT_FIELDS = %w(name epoch version release arch checksumtype checksum).freeze
|
7
|
-
PULP_INDEXED_FIELDS = %w(name version release arch epoch summary sourcerpm checksum filename
|
7
|
+
PULP_INDEXED_FIELDS = %w(name version release arch epoch summary sourcerpm checksum filename is_modular).freeze
|
8
8
|
CONTENT_TYPE = "rpm".freeze
|
9
9
|
|
10
10
|
lazy_accessor :description, :license, :buildhost, :vendor, :relativepath, :children, :checksumtype,
|