katello 4.13.1 → 4.14.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/assets/javascripts/katello/hosts/host_and_hostgroup_edit.js +12 -8
- data/app/assets/javascripts/katello/locale/bn/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ca/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/cs/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +275 -23
- data/app/assets/javascripts/katello/locale/de/katello.js +280 -28
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/el/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/en/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/en_US/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/es/katello.js +276 -24
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/fr/katello.js +283 -31
- data/app/assets/javascripts/katello/locale/gl/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/gu/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/hi/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/id/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/it/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ja/katello.js +283 -31
- data/app/assets/javascripts/katello/locale/ka/katello.js +280 -28
- data/app/assets/javascripts/katello/locale/kn/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ko/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/mr/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/or/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/pa/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/pl/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/pt/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +276 -24
- data/app/assets/javascripts/katello/locale/ro/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ru/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/sl/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ta/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/te/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/tr/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/vi/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/zh/katello.js +274 -22
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +283 -31
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +274 -22
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +118 -74
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +15 -10
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +1 -1
- data/app/controllers/katello/api/v2/api_controller.rb +7 -0
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +4 -4
- data/app/controllers/katello/api/v2/debs_controller.rb +3 -2
- data/app/controllers/katello/api/v2/environments_controller.rb +2 -4
- data/app/controllers/katello/api/v2/host_contents_controller.rb +8 -3
- data/app/controllers/katello/api/v2/host_errata_controller.rb +4 -4
- data/app/controllers/katello/api/v2/host_packages_controller.rb +2 -2
- data/app/controllers/katello/api/v2/organizations_controller.rb +1 -1
- data/app/controllers/katello/api/v2/packages_controller.rb +13 -3
- data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +6 -2
- data/app/controllers/katello/api/v2/repositories_controller.rb +3 -4
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +13 -14
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +15 -9
- data/app/controllers/katello/api/v2/sync_controller.rb +2 -2
- data/app/controllers/katello/application_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/authorization.rb +3 -2
- data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +28 -0
- data/app/controllers/katello/concerns/api/v2/registration_commands_controller_extensions.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +4 -3
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +2 -4
- data/app/controllers/katello/remote_execution_controller.rb +53 -58
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +19 -2
- data/app/helpers/katello/katello_urls_helper.rb +1 -1
- data/app/lib/actions/katello/alternate_content_source/alternate_content_source_common.rb +1 -1
- data/app/lib/actions/katello/alternate_content_source/update.rb +2 -1
- data/app/lib/actions/katello/capsule_content/verify_checksum.rb +1 -2
- data/app/lib/actions/katello/content_view/publish.rb +1 -0
- data/app/lib/actions/katello/content_view_version/create_repos.rb +1 -0
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +3 -2
- data/app/lib/actions/katello/environment/{publish_repositories.rb → publish_container_repositories.rb} +10 -8
- data/app/lib/actions/katello/foreman/content_update.rb +4 -6
- data/app/lib/actions/katello/host/hypervisors_update.rb +6 -4
- data/app/lib/actions/katello/repository/create.rb +4 -4
- data/app/lib/actions/katello/repository/import_upload.rb +4 -6
- data/app/lib/actions/katello/repository/metadata_generate.rb +1 -0
- data/app/lib/actions/katello/repository/update.rb +3 -3
- data/app/lib/actions/katello/repository_set/enable_repository.rb +5 -6
- data/app/lib/actions/middleware/backend_services_check.rb +3 -2
- data/app/lib/actions/pulp3/abstract_async_task.rb +2 -4
- data/app/lib/actions/pulp3/capsule_content/verify_checksum.rb +1 -2
- data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +5 -1
- data/app/lib/actions/pulp3/orchestration/repository/delete.rb +5 -2
- data/app/lib/actions/pulp3/repository/save_version.rb +3 -5
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +5 -9
- data/app/lib/katello/errors.rb +1 -0
- data/app/lib/katello/http_resource.rb +1 -0
- data/app/lib/katello/lazy_accessor.rb +1 -1
- data/app/lib/katello/resources/candlepin/candlepin_ping.rb +0 -5
- data/app/lib/katello/resources/candlepin/owner.rb +1 -1
- data/app/lib/katello/resources/candlepin/pool.rb +1 -2
- data/app/lib/katello/resources/candlepin/upstream_job.rb +1 -1
- data/app/lib/katello/resources/cdn.rb +3 -2
- data/app/lib/katello/resources/discovery/yum.rb +3 -3
- data/app/lib/katello/util/cdn_var_substitutor.rb +5 -3
- data/app/lib/katello/util/data.rb +3 -2
- data/app/lib/katello/util/errata.rb +4 -3
- data/app/lib/katello/util/package.rb +3 -3
- data/app/lib/katello/util/path_with_substitutions.rb +1 -1
- data/app/lib/katello/util/report_table.rb +3 -2
- data/app/lib/katello/util/url_matcher.rb +1 -1
- data/app/lib/katello/validators/alternate_content_source_path_validator.rb +4 -3
- data/app/lib/katello/validators/alternate_content_source_products_validator.rb +5 -7
- data/app/lib/katello/validators/container_image_name_validator.rb +1 -1
- data/app/lib/katello/validators/katello_name_format_validator.rb +2 -2
- data/app/lib/katello/validators/no_trailing_space_validator.rb +2 -2
- data/app/lib/katello/validators/prior_validator.rb +2 -2
- data/app/lib/katello/validators/product_unique_attribute_validator.rb +2 -4
- data/app/models/katello/activation_key.rb +4 -6
- data/app/models/katello/alternate_content_source.rb +1 -1
- data/app/models/katello/authorization/host_tracer.rb +1 -2
- data/app/models/katello/candlepin/repository_mapper.rb +2 -2
- data/app/models/katello/concerns/host_managed_extensions.rb +41 -10
- data/app/models/katello/concerns/hostgroup_extensions.rb +2 -4
- data/app/models/katello/concerns/location_extensions.rb +2 -4
- data/app/models/katello/concerns/operatingsystem_extensions.rb +84 -16
- data/app/models/katello/concerns/smart_proxy_extensions.rb +4 -4
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +2 -0
- data/app/models/katello/content_view.rb +5 -1
- data/app/models/katello/content_view_environment.rb +19 -4
- data/app/models/katello/content_view_environment_content_facet.rb +11 -0
- data/app/models/katello/erratum.rb +1 -1
- data/app/models/katello/event.rb +1 -1
- data/app/models/katello/glue/provider.rb +1 -2
- data/app/models/katello/hash_util.rb +1 -1
- data/app/models/katello/host/content_facet.rb +16 -3
- data/app/models/katello/host/subscription_facet.rb +27 -4
- data/app/models/katello/host_collection.rb +12 -8
- data/app/models/katello/pool.rb +5 -1
- data/app/models/katello/product.rb +7 -4
- data/app/models/katello/provider.rb +1 -2
- data/app/models/katello/repository.rb +18 -4
- data/app/models/katello/root_repository.rb +19 -0
- data/app/models/katello/rpm.rb +2 -2
- data/app/models/katello/subscription_facet_pool.rb +1 -1
- data/app/models/katello/sync_plan.rb +5 -4
- data/app/models/katello/task_status.rb +18 -18
- data/app/presenters/katello/product_host_count_presenter.rb +10 -0
- data/app/services/katello/candlepin/consumer.rb +11 -11
- data/app/services/katello/candlepin/message_handler.rb +3 -2
- data/app/services/katello/content_unit_indexer.rb +6 -0
- data/app/services/katello/pulp3/alternate_content_source.rb +1 -3
- data/app/services/katello/pulp3/api/core.rb +1 -1
- data/app/services/katello/pulp3/api/docker.rb +10 -0
- data/app/services/katello/pulp3/content_view_version/export.rb +1 -0
- data/app/services/katello/pulp3/content_view_version/import.rb +6 -4
- data/app/services/katello/pulp3/content_view_version/importable_products.rb +1 -3
- data/app/services/katello/pulp3/repository/apt.rb +4 -16
- data/app/services/katello/pulp3/repository/yum.rb +9 -5
- data/app/services/katello/pulp3/repository.rb +2 -2
- data/app/services/katello/pulp3/repository_mirror.rb +2 -9
- data/app/services/katello/pulp3/task.rb +4 -2
- data/app/services/katello/registration_manager.rb +13 -3
- data/app/services/katello/smart_proxy_helper.rb +1 -0
- data/app/views/dashboard/_host_collection_widget.html.erb +5 -4
- data/app/views/foreman/job_templates/install_errata.erb +2 -0
- data/app/views/foreman/job_templates/install_errata_-_katello_ansible_default.erb +2 -0
- data/app/views/foreman/job_templates/install_errata_by_search_query.erb +2 -0
- data/app/views/foreman/job_templates/install_errata_by_search_query_-_katello_ansible_default.erb +3 -1
- data/app/views/foreman/job_templates/install_packages_by_search_query_-_katello_ansible_default.erb +1 -1
- data/app/views/foreman/job_templates/remove_packages_by_search_query_-_katello_ansible_default.erb +2 -2
- data/app/views/foreman/job_templates/resolve_traces.erb +5 -1
- data/app/views/foreman/job_templates/update_packages_by_search_query_-_katello_ansible_default.erb +1 -1
- data/app/views/foreman/job_templates/upload_profile.erb +2 -0
- data/app/views/foreman/smart_proxies/_reclaim_space.html.erb +7 -5
- data/app/views/katello/api/v2/content_facet/base.json.rabl +18 -2
- data/app/views/katello/api/v2/packages/thindex.json.rabl +6 -0
- data/app/views/katello/api/v2/repositories/show.json.rabl +8 -8
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +1 -1
- data/app/views/katello/api/v2/subscription_facet/base.json.rabl +1 -1
- data/app/views/katello/api/v2/subscriptions/index.json.rabl +1 -0
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +1 -0
- data/app/views/overrides/activation_keys/_host_environment_select.html.erb +14 -11
- data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +4 -4
- data/config/routes/api/v2.rb +3 -1
- data/config/routes.rb +1 -3
- data/db/migrate/20160114200145_add_mirror_on_sync_to_repositories.rb +1 -0
- data/db/migrate/20160131182301_add_download_policy_to_katello_repositories.rb +1 -0
- data/db/migrate/20210119162528_delete_puppet_and_ostree_repos.rb +3 -0
- data/db/migrate/20240522165308_add_priority_to_content_view_environment_content_facet.rb +5 -0
- data/db/migrate/20240621121212_katello_repository_debs_id_bigint.rb +6 -0
- data/db/migrate/20240729192228_add_convert2rhel_to_host_facets.rb +9 -0
- data/db/seeds.d/102-organizations.rb +5 -7
- data/db/seeds.d/150-module_job_templates.rb +7 -9
- data/db/seeds.d/75-job_templates.rb +9 -16
- data/engines/bastion_katello/README.md +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb-info.html +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-content-hosts.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/package-info.html +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +28 -27
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +2 -2
- data/lib/katello/engine.rb +1 -8
- data/lib/katello/permission_creator.rb +3 -2
- data/lib/katello/plugin.rb +31 -27
- data/lib/katello/tasks/clean_old_file_repos.rake +2 -4
- data/lib/katello/tasks/reset.rake +3 -4
- data/lib/katello/version.rb +1 -1
- data/lib/katello.rb +0 -2
- data/lib/monkeys/ar_postgres_evr_t.rb +2 -0
- data/locale/action_names.rb +1 -1
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +274 -22
- data/locale/bn_IN/katello.po +274 -22
- data/locale/ca/katello.po +274 -22
- data/locale/cs/katello.po +274 -22
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +275 -23
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +280 -28
- data/locale/de_AT/katello.po +274 -22
- data/locale/de_DE/katello.po +274 -22
- data/locale/el/katello.po +274 -22
- data/locale/en/katello.po +274 -22
- data/locale/en_GB/katello.po +274 -22
- data/locale/en_US/katello.po +274 -22
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +276 -24
- data/locale/et_EE/katello.po +274 -22
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +283 -31
- data/locale/gl/katello.po +274 -22
- data/locale/gu/katello.po +274 -22
- data/locale/he_IL/katello.po +274 -22
- data/locale/hi/katello.po +274 -22
- data/locale/id/katello.po +274 -22
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +274 -22
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +283 -31
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +280 -28
- data/locale/katello.pot +1001 -527
- data/locale/kn/katello.po +274 -22
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +274 -22
- data/locale/ml_IN/katello.po +274 -22
- data/locale/mr/katello.po +274 -22
- data/locale/nl_NL/katello.po +274 -22
- data/locale/or/katello.po +274 -22
- data/locale/pa/katello.po +274 -22
- data/locale/pl/katello.po +274 -22
- data/locale/pl_PL/katello.po +274 -22
- data/locale/pt/katello.po +274 -22
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +276 -24
- data/locale/ro/katello.po +274 -22
- data/locale/ro_RO/katello.po +274 -22
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +274 -22
- data/locale/sl/katello.po +274 -22
- data/locale/sv_SE/katello.po +274 -22
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +274 -22
- data/locale/ta_IN/katello.po +274 -22
- data/locale/te/katello.po +274 -22
- data/locale/tr/katello.po +274 -22
- data/locale/vi/katello.po +274 -22
- data/locale/vi_VN/katello.po +274 -22
- data/locale/zh/katello.po +274 -22
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +283 -31
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +274 -22
- data/webpack/ForemanColumnExtensions/index.js +44 -1
- data/webpack/components/Table/TableWrapper.js +6 -0
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.js +24 -3
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +124 -56
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/HostContentViewActions.js +2 -3
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/contentViewDetailsCard.test.js +44 -10
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +75 -31
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionConstants.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionHooks.js +1 -1
- data/webpack/components/extensions/HostDetails/Tabs/customizedRexUrlHelpers.js +22 -7
- data/webpack/components/extensions/Hosts/ActionsBar/ActionsBar.scss +14 -0
- data/webpack/components/extensions/Hosts/ActionsBar/index.js +82 -23
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCVModal/index.js +5 -2
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/02_BulkErrataTable.js +171 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/04_Review.js +160 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/04_ReviewFooter.js +99 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/BulkErrataWizard.js +157 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/index.js +24 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/02_BulkPackagesTable.js +157 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/04_Review.js +168 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/04_ReviewFooter.js +141 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/BulkPackagesWizard.js +252 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/index.js +24 -0
- data/webpack/components/extensions/Hosts/BulkActions/HostReview.js +176 -0
- data/webpack/components/extensions/Hosts/TableRowActions/index.js +17 -0
- data/webpack/global_index.js +11 -3
- data/webpack/redux/actions/RedHatRepositories/repositorySetRepositories.js +5 -6
- data/webpack/redux/reducers/RedHatRepositories/__tests__/repositorySetRepositories.test.js +1 -1
- data/webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.js +1 -1
- data/webpack/scenes/ContentViews/Copy/CopyContentViewModal.js +2 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +2 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewBulkAddModal.js +2 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +2 -1
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +2 -1
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +2 -2
- data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +2 -1
- data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +3 -2
- data/webpack/scenes/ContentViews/Publish/PublishContentViewWizard.js +2 -1
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +2 -1
- data/webpack/scenes/ContentViews/components/CVBreadCrumb.js +2 -1
- data/webpack/scenes/ContentViews/components/ContentViewSelect/ContentViewSelectOption.js +2 -2
- data/webpack/scenes/Subscriptions/Details/SubscriptionAttributes.js +1 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailInfo.test.js.snap +10 -0
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +6 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +2 -0
- data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +14 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +1 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +10 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.fixtures.js +1 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/__snapshots__/SubscriptionsToolbar.test.js.snap +10 -0
- data/webpack/scenes/Tasks/helpers.js +1 -1
- metadata +24 -63
- data/app/assets/javascripts/katello/containers/container.js +0 -304
- data/app/lib/katello/util/http_helper.rb +0 -15
- data/app/models/732bd3db9f64c621c64d2be4f2a838727aac0845.patch +0 -61
- data/app/models/katello/repository.rb.bak +0 -978
- data/app/services/katello/pulp3/content_view_version/import_validator.rb.bak +0 -166
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb.bak +0 -164
- data/lib/katello/tasks/update_repository_expiry.rake +0 -114
- data/locale/bn/katello.po.time_stamp +0 -0
- data/locale/bn_IN/katello.po.time_stamp +0 -0
- data/locale/ca/katello.po.time_stamp +0 -0
- data/locale/cs/katello.po.time_stamp +0 -0
- data/locale/cs_CZ/katello.po.time_stamp +0 -0
- data/locale/de/katello.po.time_stamp +0 -0
- data/locale/de_AT/katello.po.time_stamp +0 -0
- data/locale/de_DE/katello.po.time_stamp +0 -0
- data/locale/el/katello.po.time_stamp +0 -0
- data/locale/en/katello.po.time_stamp +0 -0
- data/locale/en_GB/katello.po.time_stamp +0 -0
- data/locale/en_US/katello.po.time_stamp +0 -0
- data/locale/es/katello.po.time_stamp +0 -0
- data/locale/et_EE/katello.po.time_stamp +0 -0
- data/locale/fr/katello.po.time_stamp +0 -0
- data/locale/gl/katello.po.time_stamp +0 -0
- data/locale/gu/katello.po.time_stamp +0 -0
- data/locale/he_IL/katello.po.time_stamp +0 -0
- data/locale/hi/katello.po.time_stamp +0 -0
- data/locale/id/katello.po.time_stamp +0 -0
- data/locale/it/katello.po.time_stamp +0 -0
- data/locale/ja/katello.po.time_stamp +0 -0
- data/locale/ka/katello.po.time_stamp +0 -0
- data/locale/kn/katello.po.time_stamp +0 -0
- data/locale/ko/katello.po.time_stamp +0 -0
- data/locale/ml_IN/katello.po.time_stamp +0 -0
- data/locale/mr/katello.po.time_stamp +0 -0
- data/locale/nl_NL/katello.po.time_stamp +0 -0
- data/locale/or/katello.po.time_stamp +0 -0
- data/locale/pa/katello.po.time_stamp +0 -0
- data/locale/pl/katello.po.time_stamp +0 -0
- data/locale/pl_PL/katello.po.time_stamp +0 -0
- data/locale/pt/katello.po.time_stamp +0 -0
- data/locale/pt_BR/katello.po.time_stamp +0 -0
- data/locale/ro/katello.po.time_stamp +0 -0
- data/locale/ro_RO/katello.po.time_stamp +0 -0
- data/locale/ru/katello.po.time_stamp +0 -0
- data/locale/sl/katello.po.time_stamp +0 -0
- data/locale/sv_SE/katello.po.time_stamp +0 -0
- data/locale/ta/katello.po.time_stamp +0 -0
- data/locale/ta_IN/katello.po.time_stamp +0 -0
- data/locale/te/katello.po.time_stamp +0 -0
- data/locale/tr/katello.po.time_stamp +0 -0
- data/locale/vi/katello.po.time_stamp +0 -0
- data/locale/vi_VN/katello.po.time_stamp +0 -0
- data/locale/zh/katello.po.time_stamp +0 -0
- data/locale/zh_CN/katello.po.time_stamp +0 -0
- data/locale/zh_TW/katello.po.time_stamp +0 -0
- data/webpack/global_test_setup.js.bak +0 -59
- data/webpack/utils/useKatelloDocUrl.js +0 -18
@@ -1,166 +0,0 @@
|
|
1
|
-
module Katello
|
2
|
-
module Pulp3
|
3
|
-
module ContentViewVersion
|
4
|
-
class ImportValidator
|
5
|
-
def initialize(import:)
|
6
|
-
@content_view = import.content_view
|
7
|
-
@path = import.path
|
8
|
-
@smart_proxy = import.smart_proxy
|
9
|
-
@organization = import.organization
|
10
|
-
@metadata_map = import.metadata_map
|
11
|
-
@interested_repos = import.intersecting_repos_library_and_metadata
|
12
|
-
@redhat_library_products = redhat_library_products
|
13
|
-
end
|
14
|
-
|
15
|
-
def check!
|
16
|
-
if @metadata_map.content_view.blank? && !metadata_map.syncable_format?
|
17
|
-
fail _("Content view not provided in the metadata")
|
18
|
-
end
|
19
|
-
|
20
|
-
ensure_non_syncable_path_valid! unless @metadata_map.syncable_format?
|
21
|
-
ensure_pulp_importable!
|
22
|
-
if @content_view && !@content_view.default?
|
23
|
-
ensure_non_composite!
|
24
|
-
ensure_importing_cvv_does_not_exist!
|
25
|
-
ensure_from_cvv_exists!
|
26
|
-
end
|
27
|
-
ensure_manifest_imported!
|
28
|
-
ensure_metadata_matches_repos_in_library!
|
29
|
-
ensure_redhat_products_metadata_are_in_the_library!
|
30
|
-
end
|
31
|
-
|
32
|
-
def ensure_non_syncable_path_valid!
|
33
|
-
uri = URI(@path)
|
34
|
-
unless uri.scheme.blank? || uri.scheme == "file"
|
35
|
-
fail _("Invalid path provided. Content can be only imported from file system. ")
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def ensure_non_composite!
|
40
|
-
return if @content_view.blank?
|
41
|
-
fail _("Content cannot be imported into a Composite Content View. ") if @content_view.composite?
|
42
|
-
end
|
43
|
-
|
44
|
-
def ensure_pulp_importable!
|
45
|
-
return if @metadata_map.syncable_format?
|
46
|
-
api = ::Katello::Pulp3::Api::Core.new(@smart_proxy).importer_check_api
|
47
|
-
response = api.pulp_import_check_post(toc: "#{@path}/#{@metadata_map.toc}")
|
48
|
-
unless response.toc.is_valid
|
49
|
-
fail response.toc.messages.join("\n")
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
def ensure_importing_cvv_does_not_exist!
|
54
|
-
major = @metadata_map.content_view_version.major
|
55
|
-
minor = @metadata_map.content_view_version.minor
|
56
|
-
|
57
|
-
if ::Katello::ContentViewVersion.where(major: major, minor: minor, content_view: @content_view).exists?
|
58
|
-
fail _("Content View Version specified in the metadata - '%{name}' already exists. "\
|
59
|
-
"If you wish to replace the existing version, delete %{name} and try again. " % { name: "#{@content_view.name} #{major}.#{minor}" })
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
def ensure_from_cvv_exists!
|
64
|
-
major = @metadata_map.content_view_version.major
|
65
|
-
minor = @metadata_map.content_view_version.minor
|
66
|
-
|
67
|
-
if @metadata_map.from_content_view_version
|
68
|
-
from_major = @metadata_map.from_content_view_version.major
|
69
|
-
from_minor = @metadata_map.from_content_view_version.minor
|
70
|
-
|
71
|
-
unless ::Katello::ContentViewVersion.where(major: from_major, minor: from_minor, content_view: @content_view).exists?
|
72
|
-
fail _("Prior Content View Version specified in the metadata - '%{name}' does not exist. "\
|
73
|
-
"Please import the metadata for '%{name}' before importing '%{current}' " % { name: "#{@content_view.name} #{from_major}.#{from_minor}",
|
74
|
-
current: "#{@content_view.name} #{major}.#{minor}"})
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
def ensure_manifest_imported!
|
80
|
-
any_rh_repos = @metadata_map.repositories.any?(&:redhat)
|
81
|
-
if any_rh_repos && !@organization.manifest_imported?
|
82
|
-
fail _("No manifest found. Import a manifest with the appropriate subscriptions "\
|
83
|
-
"before importing content.")
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
def ensure_metadata_matches_repos_in_library!
|
88
|
-
bad_repos = @interested_repos.select do |katello_repo|
|
89
|
-
metadata_repo = metadata_repo_for_katello_repo(katello_repo)
|
90
|
-
|
91
|
-
next unless metadata_repo
|
92
|
-
|
93
|
-
!(katello_repo.content_type == metadata_repo.content_type &&
|
94
|
-
katello_repo.redhat? == metadata_repo.redhat)
|
95
|
-
end
|
96
|
-
|
97
|
-
if bad_repos.any?
|
98
|
-
fail _("The following repositories provided in the import metadata have an incorrect content type or provider type. "\
|
99
|
-
"Make sure the export and import repositories are of the same type before importing\n "\
|
100
|
-
"%{repos}" % { repos: generate_product_repo_i18n_string(bad_repos).join("")}
|
101
|
-
)
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
|
-
def ensure_redhat_products_metadata_are_in_the_library!
|
106
|
-
missing = @metadata_map.repositories.select do |repo|
|
107
|
-
repo.redhat && katello_product_for_metadata_repo(repo).nil?
|
108
|
-
end
|
109
|
-
|
110
|
-
if missing.any?
|
111
|
-
repos_in_import = generate_product_repo_i18n_string(missing)
|
112
|
-
fail _("The organization's manifest does not contain the subscriptions required to enable the following repositories.\n "\
|
113
|
-
"%{repos}" % { repos: repos_in_import.join("")}
|
114
|
-
)
|
115
|
-
end
|
116
|
-
end
|
117
|
-
|
118
|
-
def ensure_no_missing_rh_repos!
|
119
|
-
rh_repos = @metadata_map.repositories.select { |r| r.redhat }
|
120
|
-
helper = ::Katello::Pulp3::ContentViewVersion::ImportableRepositories.new(
|
121
|
-
organization: @organization,
|
122
|
-
metadata_repositories: rh_repos,
|
123
|
-
syncable_format: @metadata_map.syncable_format?,
|
124
|
-
path: path
|
125
|
-
)
|
126
|
-
helper.generate!
|
127
|
-
rh_repos = rh_repos.select do |repo|
|
128
|
-
end
|
129
|
-
end
|
130
|
-
|
131
|
-
|
132
|
-
private
|
133
|
-
|
134
|
-
def katello_product_for_metadata_repo(metadata_repo)
|
135
|
-
@redhat_library_products.find do |product|
|
136
|
-
if metadata_repo.redhat && metadata_repo.product.cp_id
|
137
|
-
product.cp_id == metadata_repo.product.cp_id
|
138
|
-
else
|
139
|
-
product.label == metadata_repo.product.label
|
140
|
-
end
|
141
|
-
end
|
142
|
-
end
|
143
|
-
|
144
|
-
def metadata_repo_for_katello_repo(repo)
|
145
|
-
@metadata_map.repositories.find do |metadata_repo|
|
146
|
-
if repo.redhat? && metadata_repo.product.cp_id
|
147
|
-
repo.label == metadata_repo.label && repo.product.cp_id == metadata_repo.product.cp_id
|
148
|
-
else
|
149
|
-
repo.label == metadata_repo.label && repo.product.label == metadata_repo.product.label
|
150
|
-
end
|
151
|
-
end
|
152
|
-
end
|
153
|
-
|
154
|
-
def redhat_library_products
|
155
|
-
::Katello::Product.in_org(@organization).redhat
|
156
|
-
end
|
157
|
-
|
158
|
-
def generate_product_repo_i18n_string(metadata_repos)
|
159
|
-
metadata_repos.map do |repo|
|
160
|
-
_("\n* Product = '%{product}', Repository = '%{repository}'" % { product: repo.product.name, repository: repo.name })
|
161
|
-
end
|
162
|
-
end
|
163
|
-
end
|
164
|
-
end
|
165
|
-
end
|
166
|
-
end
|
@@ -1,164 +0,0 @@
|
|
1
|
-
module Katello
|
2
|
-
module Pulp3
|
3
|
-
module ContentViewVersion
|
4
|
-
class ImportableRepositories
|
5
|
-
attr_reader :creatable, :updatable
|
6
|
-
|
7
|
-
def initialize(organization:,
|
8
|
-
metadata_repositories:,
|
9
|
-
syncable_format: false,
|
10
|
-
path: nil)
|
11
|
-
@organization = organization
|
12
|
-
@metadata_repositories = metadata_repositories
|
13
|
-
@creatable = []
|
14
|
-
@updatable = []
|
15
|
-
@syncable_format = syncable_format
|
16
|
-
@path = path
|
17
|
-
end
|
18
|
-
|
19
|
-
def find_root_repo(metadata_repo:, product:)
|
20
|
-
product.root_repositories.find do |r|
|
21
|
-
if metadata_repo.content&.id && metadata_repo.redhat
|
22
|
-
next if (r.content.cp_content_id != metadata_repo.content.id)
|
23
|
-
next if metadata_repo.arch_substituted? && r.arch != metadata_repo.arch
|
24
|
-
next if metadata_repo.release_version_substituted? && (r.major != metadata_repo.major ||
|
25
|
-
r.minor != metadata_repo.minor)
|
26
|
-
true
|
27
|
-
else
|
28
|
-
r.label == metadata_repo.label
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
def generate!
|
34
|
-
# For Red Hat repositories or Custom Repositories in the metadata exclusively
|
35
|
-
# Set up a 2 different list of importable root repositories
|
36
|
-
# creatable: repos that are part of the metadata but not in the library.
|
37
|
-
# They are ready to be created
|
38
|
-
# updatable: repo that are both in the metadata and library.
|
39
|
-
# These may contain updates to the repo and hence ready to be updated.
|
40
|
-
@metadata_repositories.each do |repo|
|
41
|
-
product = product_for_metadata_repo(repo)
|
42
|
-
fail _("Unable to find product '%s' in organization '%s'" % [repo.product.label, @organization.name]) if product.blank?
|
43
|
-
|
44
|
-
root = find_root_repo(product: product, metadata_repo: repo)
|
45
|
-
if root
|
46
|
-
updatable << { repository: root, options: update_repo_params(repo) }
|
47
|
-
elsif repo.redhat
|
48
|
-
product_content = fetch_product_content(repo.content, product)
|
49
|
-
substitutions = {}
|
50
|
-
substitutions[:basearch] = repo.arch if repo.content.arch_substituted?
|
51
|
-
substitutions[:releasever] = repo.minor if repo.content.release_version_substituted?
|
52
|
-
create_options = {
|
53
|
-
product: product,
|
54
|
-
content: product_content,
|
55
|
-
substitutions: substitutions,
|
56
|
-
override_url: fetch_feed_url(repo)
|
57
|
-
}
|
58
|
-
create_options[:override_arch] = repo.arch
|
59
|
-
creatable << create_options
|
60
|
-
else
|
61
|
-
creatable << { repository: product.add_repo(create_repo_params(repo, product)) }
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
private
|
67
|
-
|
68
|
-
def find_unique_name(metadata_repo, product)
|
69
|
-
name = metadata_repo.name
|
70
|
-
i = 1
|
71
|
-
while product.root_repositories.where(name: name).exists?
|
72
|
-
name = "#{metadata_repo.name} #{i}"
|
73
|
-
i += 1
|
74
|
-
end
|
75
|
-
name
|
76
|
-
end
|
77
|
-
|
78
|
-
def product_for_metadata_repo(repo)
|
79
|
-
if repo.redhat && repo.product.cp_id
|
80
|
-
@organization.products.includes(:root_repositories).find_by(cp_id: repo.product.cp_id)
|
81
|
-
else
|
82
|
-
@organization.products.includes(:root_repositories).find_by(label: repo.product.label)
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
def fetch_product_content(content_metadata, product)
|
87
|
-
query = ::Katello::Content.joins(:product_contents).where("#{Katello::ProductContent.table_name}.product_id": product.id)
|
88
|
-
table_name = Katello::Content.table_name
|
89
|
-
if content_metadata&.id
|
90
|
-
query.find_by("#{table_name}.cp_content_id": content_metadata.id)
|
91
|
-
else
|
92
|
-
query.find_by("#{table_name}.label": content_metadata.label)
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
def gpg_key_id(metadata_repo)
|
97
|
-
if metadata_repo.gpg_key
|
98
|
-
@organization.gpg_keys.find_by(name: metadata_repo.gpg_key.name).id
|
99
|
-
end
|
100
|
-
end
|
101
|
-
|
102
|
-
def create_repo_params(metadata_repo, product)
|
103
|
-
keys = [
|
104
|
-
:label,
|
105
|
-
:description,
|
106
|
-
:arch,
|
107
|
-
:unprotected,
|
108
|
-
:content_type,
|
109
|
-
:checksum_type,
|
110
|
-
:os_versions,
|
111
|
-
:major,
|
112
|
-
:minor,
|
113
|
-
:download_policy,
|
114
|
-
:mirroring_policy
|
115
|
-
]
|
116
|
-
|
117
|
-
params = { name: find_unique_name(metadata_repo, product) }
|
118
|
-
params[:gpg_key_id] = gpg_key_id(metadata_repo)
|
119
|
-
keys.each do |key|
|
120
|
-
params[key] = metadata_repo.send(key)
|
121
|
-
end
|
122
|
-
url = fetch_feed_url(metadata_repo)
|
123
|
-
params[:url] = url if url
|
124
|
-
params
|
125
|
-
end
|
126
|
-
|
127
|
-
def fetch_feed_url(metadata_repo)
|
128
|
-
return unless @syncable_format
|
129
|
-
uri = URI(@path)
|
130
|
-
if uri.scheme.blank? || uri.scheme == "file"
|
131
|
-
"file://#{uri.path.chomp('/')}#{metadata_repo.content.url}"
|
132
|
-
else
|
133
|
-
"#{@path.chomp('/')}#{metadata_repo.content.url}"
|
134
|
-
end
|
135
|
-
end
|
136
|
-
|
137
|
-
def update_repo_params(metadata_repo)
|
138
|
-
keys = [
|
139
|
-
:description,
|
140
|
-
:arch,
|
141
|
-
:unprotected,
|
142
|
-
:checksum_type,
|
143
|
-
:os_versions,
|
144
|
-
:major,
|
145
|
-
:minor,
|
146
|
-
:download_policy,
|
147
|
-
:mirroring_policy
|
148
|
-
]
|
149
|
-
params = {}
|
150
|
-
url = fetch_feed_url(metadata_repo)
|
151
|
-
params[:url] = url if url
|
152
|
-
params[:gpg_key_id] = gpg_key_id(metadata_repo)
|
153
|
-
|
154
|
-
keys.each do |key|
|
155
|
-
value = metadata_repo.send(key)
|
156
|
-
params[key] = value if value
|
157
|
-
end
|
158
|
-
|
159
|
-
params
|
160
|
-
end
|
161
|
-
end
|
162
|
-
end
|
163
|
-
end
|
164
|
-
end
|
@@ -1,114 +0,0 @@
|
|
1
|
-
namespace :katello do
|
2
|
-
def commit?
|
3
|
-
ENV['COMMIT'] == 'true' || ENV['FOREMAN_UPGRADE'] == '1'
|
4
|
-
end
|
5
|
-
|
6
|
-
desc "Regnerate metadata for all repositories. Specify CONTENT_VIEW=name and LIFECYCLE_ENVIRONMENT=name to narrow repositories."
|
7
|
-
task :regenerate_repo_metadata => ["dynflow:client", "check_ping"] do
|
8
|
-
User.current = User.anonymous_api_admin
|
9
|
-
repos = lookup_repositories
|
10
|
-
|
11
|
-
if repos.any?
|
12
|
-
task = ForemanTasks.async_task(Actions::Katello::Repository::BulkMetadataGenerate, repos.all.order_by_root(:name))
|
13
|
-
puts "Regenerating #{repos.count} repositories. You can monitor these on task id #{task.id}\n"
|
14
|
-
else
|
15
|
-
puts "No repositories found for regeneration."
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
desc "Refresh repository metadata for all repositories. Specify CONTENT_VIEW=name and LIFECYCLE_ENVIRONMENT=name to narrow repositories."
|
20
|
-
task :refresh_pulp_repo_details => ["dynflow:client", "check_ping"] do
|
21
|
-
User.current = User.anonymous_api_admin
|
22
|
-
repos = lookup_repositories
|
23
|
-
|
24
|
-
if repos.any?
|
25
|
-
task = ForemanTasks.async_task(::Actions::BulkAction, Actions::Katello::Repository::RefreshRepository, repos.all.order_by_root(:name))
|
26
|
-
puts "Refreshing #{repos.count} repositories. You can monitor these on task id #{task.id}\n"
|
27
|
-
else
|
28
|
-
puts "No repositories found for regeneration."
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
desc "Correct missing pulp repositories. Specify CONTENT_VIEW=name and LIFECYCLE_ENVIRONMENT=name to narrow repositories. COMMIT=true to perform operation."
|
33
|
-
task :correct_repositories => ["environment", "check_ping"] do
|
34
|
-
puts "All operations will be skipped. Re-run with COMMIT=true to perform corrections." unless commit?
|
35
|
-
|
36
|
-
User.current = User.anonymous_api_admin
|
37
|
-
repos = lookup_repositories
|
38
|
-
|
39
|
-
repos.find_each.with_index do |repo, index|
|
40
|
-
puts "Processing Repository #{index + 1}/#{repos.count}: #{repo.name} (#{repo.id})"
|
41
|
-
unless repo_exists?(repo)
|
42
|
-
handle_missing_repo(repo)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
::Katello::RootRepository.orphaned.each do |root_repo|
|
47
|
-
handle_missing_root_repo(root_repo)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
desc "Change the download policy of all repos. Specify DOWNLOAD_POLICY=policy. Options are immediate or on_demand."
|
52
|
-
task :change_download_policy => ["environment", "check_ping"] do
|
53
|
-
policy = ENV['DOWNLOAD_POLICY']
|
54
|
-
unless ::Katello::RootRepository::DOWNLOAD_POLICIES.include?(policy)
|
55
|
-
puts "Invalid download policy specified: '#{policy}'. "
|
56
|
-
puts "Options are immediate or on_demand."
|
57
|
-
next
|
58
|
-
end
|
59
|
-
|
60
|
-
User.current = User.anonymous_api_admin
|
61
|
-
repos = Katello::Repository.yum_type.where(library_instance_id: nil)
|
62
|
-
|
63
|
-
repos.find_each.with_index do |repo, index|
|
64
|
-
puts "Processing Repository #{index + 1}/#{repos.count}: #{repo.name} (#{repo.id})"
|
65
|
-
begin
|
66
|
-
ForemanTasks.sync_task(::Actions::Katello::Repository::Update, repo.root,
|
67
|
-
download_policy: policy)
|
68
|
-
rescue => e
|
69
|
-
puts "Failed to update repository #{repo.name} (#{repo.id}): #{e.message}"
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
def lookup_repositories
|
75
|
-
lifecycle_envs = Katello::KTEnvironment.where(:name => ENV['LIFECYCLE_ENVIRONMENT']) if ENV['LIFECYCLE_ENVIRONMENT']
|
76
|
-
content_views = Katello::ContentView.where(:name => ENV['CONTENT_VIEW']) if ENV['CONTENT_VIEW']
|
77
|
-
|
78
|
-
repos = ::Katello::Repository
|
79
|
-
repos = repos.in_environment(lifecycle_envs) if lifecycle_envs
|
80
|
-
repos = repos.in_content_views(content_views) if content_views
|
81
|
-
repos
|
82
|
-
end
|
83
|
-
|
84
|
-
def repo_exists?(repo)
|
85
|
-
if SmartProxy.pulp_primary!.pulp3_support?(repo)
|
86
|
-
backend_service = repo.backend_service(SmartProxy.pulp_primary!)
|
87
|
-
return false unless backend_service&.repository_reference&.repository_href
|
88
|
-
backend_service.api.repositories_api.read(backend_service.repository_reference.repository_href)
|
89
|
-
else
|
90
|
-
false
|
91
|
-
end
|
92
|
-
true
|
93
|
-
rescue StandardError => e
|
94
|
-
return false if e.code == 404
|
95
|
-
end
|
96
|
-
|
97
|
-
def handle_missing_repo(repo)
|
98
|
-
puts "Repository #{repo.id} Missing"
|
99
|
-
if repo.content_view.default?
|
100
|
-
puts "Recreating #{repo.id}"
|
101
|
-
if commit?
|
102
|
-
ForemanTasks.sync_task(::Actions::Katello::Repository::Create, repo, force_repo_create: true)
|
103
|
-
repo.reload.index_content
|
104
|
-
end
|
105
|
-
else
|
106
|
-
puts "Deleting #{repo.id}"
|
107
|
-
ForemanTasks.sync_task(::Actions::Katello::Repository::Destroy, repo) if commit?
|
108
|
-
end
|
109
|
-
end
|
110
|
-
|
111
|
-
def handle_missing_root_repo(root_repo)
|
112
|
-
root_repo.destroy! if commit?
|
113
|
-
end
|
114
|
-
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,59 +0,0 @@
|
|
1
|
-
import nock from 'nock';
|
2
|
-
import checkForOuiaIds from './ouia_id_check';
|
3
|
-
|
4
|
-
// runs before each test to make sure console.error output will
|
5
|
-
// fail a test (i.e. default PropType missing). Check the error
|
6
|
-
// output and traceback for actual error.
|
7
|
-
const originalConsoleError = global.console.error;
|
8
|
-
global.console.error = (error, stack) => {
|
9
|
-
originalConsoleError(error); // ensure error is printed to console, comment
|
10
|
-
// in case of ouia-id check
|
11
|
-
|
12
|
-
/* Uncomment block below to filter out PF4 ouiaId errors */
|
13
|
-
// const ignore = ['in ForwardRef (created by Tabs)',
|
14
|
-
// 'in Button (created by Label)', 'created by _default',
|
15
|
-
// 'created by PaginationOptionsMenu', 'created by TypeAheadItems',
|
16
|
-
// 'The prop `ouiaId` is marked as required in `Modal`, but its value is `undefined`',
|
17
|
-
// 'created by WizardHeader', 'created by Navigation',
|
18
|
-
// 'created by ActionsColumn', 'created by InactiveText', 'created by Select',
|
19
|
-
// 'created by Context.Consumer', 'created by DualListSelector'];
|
20
|
-
|
21
|
-
/* eslint-disable-next-line no-console */
|
22
|
-
if (stack) console.log(stack); // Prints out original stack trace
|
23
|
-
|
24
|
-
/* Uncomment block below to filter out PF4 ouiaId errors */
|
25
|
-
// if (error && !ignore.some(e => error.includes(e))) {
|
26
|
-
// originalConsoleError(error); // ensure error is printed to console
|
27
|
-
// console.log(stack); // Prints out original stack trace
|
28
|
-
// }
|
29
|
-
|
30
|
-
throw new Error(error); // comment this and uncomment the next line when checking for ouia ids
|
31
|
-
// if (!error.includes('Failed prop type')) throw new Error(error);
|
32
|
-
};
|
33
|
-
|
34
|
-
// Increase jest timeout as some tests using multiple http mocks can time out on CI systems.
|
35
|
-
jest.setTimeout(process.env.JEST_TIMEOUT || 15000);
|
36
|
-
|
37
|
-
// uncomment this to see if tests are trying to make real API requests
|
38
|
-
// beforeAll(() => {
|
39
|
-
// nock.disableNetConnect();
|
40
|
-
// });
|
41
|
-
|
42
|
-
afterAll(() => {
|
43
|
-
jest.resetModules();
|
44
|
-
if (global.gc) global.gc();
|
45
|
-
});
|
46
|
-
|
47
|
-
beforeEach(() => {
|
48
|
-
if (!nock.isActive()) { nock.activate(); }
|
49
|
-
});
|
50
|
-
|
51
|
-
// To see where you need to add ouiaIds:
|
52
|
-
// 1. uncomment this and the import above
|
53
|
-
checkForOuiaIds();
|
54
|
-
// 2. (optional) uncomment the line in global.console.error function above
|
55
|
-
|
56
|
-
afterEach(() => {
|
57
|
-
nock.cleanAll();
|
58
|
-
});
|
59
|
-
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import URI from 'urijs';
|
2
|
-
import { useForemanVersion } from 'foremanReact/Root/Context/ForemanContext';
|
3
|
-
import { foremanUrl } from 'foremanReact/common/helpers';
|
4
|
-
|
5
|
-
// useKatelloDocUrl('Managing_Content, '#Products_and_Repositories_content-management') =>
|
6
|
-
// https://docs.theforeman.org/3.7/Managing_Content/index-katello.html#Products_and_Repositories_content-management
|
7
|
-
export const useKatelloDocUrl = (guide = 'Managing_Content', hash = '') => {
|
8
|
-
// in dev you'll have to replace the Foreman version in the url with the latest published one
|
9
|
-
const foremanVersion = useForemanVersion();
|
10
|
-
const rootUrl = `https://docs.theforeman.org/${foremanVersion}/`;
|
11
|
-
|
12
|
-
const section = `${guide}/index-katello.html${hash}`;
|
13
|
-
|
14
|
-
const url = new URI({ path: '/links/manual', query: { root_url: rootUrl, section } });
|
15
|
-
return foremanUrl(url.href());
|
16
|
-
};
|
17
|
-
|
18
|
-
export default useKatelloDocUrl;
|