katello 4.13.1 → 4.14.0.rc1.1
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/registration_controller_extensions.rb +4 -0
- 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/authorization/product.rb +1 -1
- 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/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/katello.po +275 -23
- 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/katello.po +276 -24
- data/locale/et_EE/katello.po +274 -22
- 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/katello.po +274 -22
- data/locale/ja/katello.po +283 -31
- data/locale/ka/katello.po +280 -28
- data/locale/katello.pot +1001 -527
- data/locale/kn/katello.po +274 -22
- 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/katello.po +276 -24
- data/locale/ro/katello.po +274 -22
- data/locale/ro_RO/katello.po +274 -22
- 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/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/katello.po +283 -31
- 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 +83 -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/__tests__/remoteExecutionActions.test.js +44 -0
- 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 +25 -111
- 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/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po.time_stamp +0 -0
- data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn_IN/katello.po.time_stamp +0 -0
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po.time_stamp +0 -0
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/katello.po.time_stamp +0 -0
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po.time_stamp +0 -0
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po.time_stamp +0 -0
- data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_AT/katello.po.time_stamp +0 -0
- data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_DE/katello.po.time_stamp +0 -0
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po.time_stamp +0 -0
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/katello.po.time_stamp +0 -0
- data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_GB/katello.po.time_stamp +0 -0
- data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_US/katello.po.time_stamp +0 -0
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po.time_stamp +0 -0
- data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
- data/locale/et_EE/katello.po.time_stamp +0 -0
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po.time_stamp +0 -0
- data/locale/gl/LC_MESSAGES/katello.mo +0 -0
- data/locale/gl/katello.po.time_stamp +0 -0
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/katello.po.time_stamp +0 -0
- data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
- data/locale/he_IL/katello.po.time_stamp +0 -0
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/katello.po.time_stamp +0 -0
- data/locale/id/LC_MESSAGES/katello.mo +0 -0
- data/locale/id/katello.po.time_stamp +0 -0
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po.time_stamp +0 -0
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po.time_stamp +0 -0
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po.time_stamp +0 -0
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/katello.po.time_stamp +0 -0
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po.time_stamp +0 -0
- data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ml_IN/katello.po.time_stamp +0 -0
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/katello.po.time_stamp +0 -0
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po.time_stamp +0 -0
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/katello.po.time_stamp +0 -0
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/katello.po.time_stamp +0 -0
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po.time_stamp +0 -0
- data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl_PL/katello.po.time_stamp +0 -0
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/katello.po.time_stamp +0 -0
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po.time_stamp +0 -0
- data/locale/ro/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro/katello.po.time_stamp +0 -0
- data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro_RO/katello.po.time_stamp +0 -0
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po.time_stamp +0 -0
- data/locale/sl/LC_MESSAGES/katello.mo +0 -0
- data/locale/sl/katello.po.time_stamp +0 -0
- data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
- data/locale/sv_SE/katello.po.time_stamp +0 -0
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po.time_stamp +0 -0
- data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta_IN/katello.po.time_stamp +0 -0
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/katello.po.time_stamp +0 -0
- data/locale/tr/LC_MESSAGES/katello.mo +0 -0
- data/locale/tr/katello.po.time_stamp +0 -0
- data/locale/vi/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi/katello.po.time_stamp +0 -0
- data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi_VN/katello.po.time_stamp +0 -0
- data/locale/zh/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh/katello.po.time_stamp +0 -0
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po.time_stamp +0 -0
- data/locale/zh_TW/LC_MESSAGES/katello.mo +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
@@ -155,8 +155,7 @@ Pass [] to make repo available for clients regardless of OS version. Maximum len
|
|
155
155
|
query = query.where(:root_id => RootRepository.where(:label => params[:label])) if params[:label]
|
156
156
|
query = index_relation_content_unit(query)
|
157
157
|
query = index_relation_content_view(query)
|
158
|
-
|
159
|
-
query
|
158
|
+
index_relation_environment(query)
|
160
159
|
end
|
161
160
|
|
162
161
|
def index_relation_product(query)
|
@@ -439,7 +438,7 @@ Alternatively, use the 'force' parameter to regenerate metadata locally. On the
|
|
439
438
|
respond_for_async :resource => sync_task(::Actions::Katello::Repository::RemoveContent, @repository, @content, content_type: params[:content_type], sync_capsule: sync_capsule)
|
440
439
|
end
|
441
440
|
|
442
|
-
api :POST, "/repositories/:id/upload_content", N_("
|
441
|
+
api :POST, "/repositories/:id/upload_content", N_("This endpoint is primarily designed for UI interactions and uploading content into the repository. For API-based uploads, please use the 'content_uploads' endpoint instead.")
|
443
442
|
param :id, :number, :required => true, :desc => N_("repository ID")
|
444
443
|
param :content, File, :required => true, :desc => N_("Content files to upload. Can be a single file or array of files.")
|
445
444
|
param :content_type, String, :required => false, :desc => N_("The type of content to upload (srpm, file, etc.). Check uploadable types here: /katello/api/repositories/repository_types")
|
@@ -537,7 +536,7 @@ Alternatively, use the 'force' parameter to regenerate metadata locally. On the
|
|
537
536
|
if @repository.root.gpg_key && @repository.root.gpg_key.content.present?
|
538
537
|
render(:plain => @repository.root.gpg_key.content, :layout => false)
|
539
538
|
else
|
540
|
-
head(
|
539
|
+
head(:not_found)
|
541
540
|
end
|
542
541
|
end
|
543
542
|
|
@@ -144,8 +144,8 @@ module Katello
|
|
144
144
|
|
145
145
|
relation = relation.where(Katello::Content.table_name => {:name => params[:name]}) if params[:name].present?
|
146
146
|
# ignore with_custom if repository_type is specified
|
147
|
-
if params[:repository_type].blank?
|
148
|
-
relation = relation.redhat
|
147
|
+
if params[:repository_type].blank? && !::Foreman::Cast.to_bool(params[:with_custom])
|
148
|
+
relation = relation.redhat
|
149
149
|
end
|
150
150
|
index_relation_with_consumable_overrides(relation)
|
151
151
|
end
|
@@ -240,18 +240,17 @@ module Katello
|
|
240
240
|
end
|
241
241
|
|
242
242
|
def sort_score(pc) # sort order for enabled
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
score
|
243
|
+
if pc.enabled_content_override&.value == "1"
|
244
|
+
4 # overridden to enabled
|
245
|
+
elsif pc.enabled_content_override.nil? && pc.enabled
|
246
|
+
3 # enabled
|
247
|
+
elsif pc.enabled_content_override.nil? && !pc.enabled
|
248
|
+
2 # disabled
|
249
|
+
elsif pc.enabled_content_override&.value == "0"
|
250
|
+
1 # overridden to disabled
|
251
|
+
else
|
252
|
+
0
|
253
|
+
end
|
255
254
|
end
|
256
255
|
|
257
256
|
def custom_sort_results(unsorted_relation)
|
@@ -41,16 +41,17 @@ module Katello
|
|
41
41
|
format.csv do
|
42
42
|
options[:csv] = true
|
43
43
|
collection = scoped_search(*base_args, options)
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
44
|
+
fields = [:id, :subscription_id, :name, :cp_id, :organization_id, :sockets, :cores,
|
45
|
+
:start_date, :end_date, :consumed, :quantity, :account_number, :contract_number,
|
46
|
+
:support_level, :ram, :stacking_id, :multi_entitlement, :type, :product_id,
|
47
|
+
:unmapped_guest, :virt_only, :virt_who, :upstream?, :product_host_count]
|
48
|
+
headers = ['Pool Id Number', 'Subscription Id', 'Name', 'Pool Id', 'Organization Id',
|
49
|
+
'Sockets', 'Cores', 'Start Date', 'End Date', 'Consumed', 'Quantity', 'Account Number',
|
50
|
+
'Contract Number', 'Support Level', 'RAM', 'Stacking Id', 'Multi Entitlement', 'Type',
|
51
|
+
'Product Id', 'Unmapped Guest', 'Virt Only', 'Requires Virt Who', 'Upstream', 'Product Host Count']
|
52
|
+
csv_response(collection, fields, headers)
|
53
53
|
end
|
54
|
+
|
54
55
|
format.any do
|
55
56
|
collection = scoped_search(*base_args, options)
|
56
57
|
if params[:activation_key_id]
|
@@ -59,6 +60,9 @@ module Katello
|
|
59
60
|
ActivationKeySubscriptionsPresenter.new(pool, key_pools)
|
60
61
|
end
|
61
62
|
end
|
63
|
+
collection[:results] = collection[:results].map do |pool|
|
64
|
+
ProductHostCountPresenter.new(pool)
|
65
|
+
end
|
62
66
|
respond(:collection => collection)
|
63
67
|
end
|
64
68
|
end
|
@@ -88,6 +92,8 @@ module Katello
|
|
88
92
|
fail HttpErrors::BadRequest, N_('This subscription is not relevant to the current organization.')
|
89
93
|
end
|
90
94
|
|
95
|
+
@resource = ProductHostCountPresenter.new(@resource)
|
96
|
+
|
91
97
|
respond(:resource => @resource)
|
92
98
|
end
|
93
99
|
|
@@ -37,8 +37,8 @@ module Katello
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def ensure_library
|
40
|
-
|
41
|
-
fail HttpErrors::NotFound, _("You can check sync status for repositories only in the library lifecycle environment.'")
|
40
|
+
if !@repository.nil? && !@repository.environment.library?
|
41
|
+
fail HttpErrors::NotFound, _("You can check sync status for repositories only in the library lifecycle environment.'")
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
@@ -108,7 +108,7 @@ module Katello
|
|
108
108
|
exception = args.find { |o| o.is_a? Exception }
|
109
109
|
message = args.find { |o| o.is_a? String } || exception.try(:message) || default_message
|
110
110
|
|
111
|
-
status = if exception
|
111
|
+
status = if exception.respond_to?(:status_code)
|
112
112
|
exception.status_code
|
113
113
|
else
|
114
114
|
400
|
@@ -99,9 +99,10 @@ module Katello
|
|
99
99
|
def find_param_arrays(hash = params)
|
100
100
|
list_of_paths = []
|
101
101
|
hash.each do |key, value|
|
102
|
-
|
102
|
+
case value
|
103
|
+
when ActionController::Parameters, Hash
|
103
104
|
list_of_paths += find_param_arrays(value).compact.map { |inner_keys| [key] + inner_keys }
|
104
|
-
|
105
|
+
when Array
|
105
106
|
list_of_paths << [key]
|
106
107
|
end
|
107
108
|
end
|
@@ -18,6 +18,7 @@ module Katello
|
|
18
18
|
included do
|
19
19
|
prepend Overrides
|
20
20
|
before_action :purpose_addon_params, only: [:create, :update]
|
21
|
+
before_action :set_content_view_environments, only: [:create, :update]
|
21
22
|
|
22
23
|
def destroy
|
23
24
|
Katello::RegistrationManager.unregister_host(@host, :unregistering => false)
|
@@ -39,6 +40,33 @@ module Katello
|
|
39
40
|
params[:host][:subscription_facet_attributes][:purpose_addon_ids] = addons.map { |addon_name| ::Katello::PurposeAddon.find_or_create_by(name: addon_name).id }
|
40
41
|
params[:host][:subscription_facet_attributes].delete(:purpose_addons)
|
41
42
|
end
|
43
|
+
|
44
|
+
def set_content_view_environments
|
45
|
+
content_facet_attributes = params.dig(:host, :content_facet_attributes)
|
46
|
+
return if content_facet_attributes.blank? || @host&.content_facet.blank? ||
|
47
|
+
(cve_params[:content_view_id].present? && cve_params[:lifecycle_environment_id].present?)
|
48
|
+
new_cves = nil
|
49
|
+
if cve_params[:content_view_environments].present? && cve_params[:content_view_environment_ids].blank?
|
50
|
+
# Must do maps here to ensure CVEs remain in the same order.
|
51
|
+
# Using ActiveRecord .where will return them in a different order.
|
52
|
+
environment_names = cve_params[:content_view_environments].map(&:strip)
|
53
|
+
Rails.logger.debug "new environment names: #{environment_names}"
|
54
|
+
new_cves = environment_names.map do |name|
|
55
|
+
::Katello::ContentViewEnvironment.with_candlepin_name(name, organization: @host.organization)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
if cve_params[:content_view_environment_ids].present?
|
59
|
+
new_cves = cve_params[:content_view_environment_ids].map do |id|
|
60
|
+
::Katello::ContentViewEnvironment.find_by(id: id)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
@host.content_facet.content_view_environments = new_cves.compact if new_cves.present?
|
65
|
+
end
|
66
|
+
|
67
|
+
def cve_params
|
68
|
+
params.require(:host).require(:content_facet_attributes).permit(:content_view_id, :lifecycle_environment_id, content_view_environments: [], content_view_environment_ids: [])
|
69
|
+
end
|
42
70
|
end
|
43
71
|
end
|
44
72
|
end
|
@@ -28,7 +28,7 @@ module Katello
|
|
28
28
|
update_api(:create) do
|
29
29
|
param :registration_command, Hash do
|
30
30
|
param :activation_key, String, desc: N_('Activation key for subscription-manager client, required for CentOS and Red Hat Enterprise Linux. For multiple keys use `activation_keys` param instead.'), deprecated: true
|
31
|
-
param :activation_keys, Array, desc: N_('Activation keys for subscription-manager client, required for CentOS and Red Hat Enterprise Linux. Required only if host group has no activation keys.')
|
31
|
+
param :activation_keys, Array, desc: N_('Activation keys for subscription-manager client, required for CentOS and Red Hat Enterprise Linux. Required only if host group has no activation keys or if you do not provide a host group.')
|
32
32
|
param :force, :bool, required: false, desc: N_('Clear any previous registration and run subscription-manager with --force.')
|
33
33
|
param :ignore_subman_errors, :bool, required: false, desc: N_('Ignore subscription-manager errors for `subscription-manager register` command')
|
34
34
|
end
|
@@ -31,6 +31,10 @@ module Katello
|
|
31
31
|
super.merge(rhsm_url: smart_proxy.rhsm_url, pulp_content_url: smart_proxy.pulp_content_url)
|
32
32
|
end
|
33
33
|
|
34
|
+
def default_location
|
35
|
+
Location.authorized(:view_locations).find_by(title: Setting[:default_location_subscribed_hosts]) || super
|
36
|
+
end
|
37
|
+
|
34
38
|
private
|
35
39
|
|
36
40
|
def smart_proxy
|
@@ -101,9 +101,10 @@ module Katello
|
|
101
101
|
end
|
102
102
|
|
103
103
|
def sort_options
|
104
|
-
|
104
|
+
case default_sort
|
105
|
+
when Array
|
105
106
|
return [default_sort[0], default_sort[1], {}]
|
106
|
-
|
107
|
+
when Proc
|
107
108
|
return [nil, nil, { :custom_sort => default_sort }]
|
108
109
|
else
|
109
110
|
fail "Unsupported default_sort type"
|
@@ -145,7 +146,7 @@ module Katello
|
|
145
146
|
def compare_same(collection, content_view_versions = nil)
|
146
147
|
cv_version_first = content_view_versions[0]
|
147
148
|
collection_ids = collection.in_repositories(Katello::Repository.where(:content_view_version_id => cv_version_first&.id))&.pluck(:id)
|
148
|
-
content_view_versions[1
|
149
|
+
content_view_versions[1..].each do |version|
|
149
150
|
collection_version_ids = collection.in_repositories(Katello::Repository.where(:content_view_version_id => version&.id))&.pluck(:id)
|
150
151
|
collection_ids = collection_ids.intersection collection_version_ids
|
151
152
|
end
|
@@ -94,10 +94,8 @@ module Katello
|
|
94
94
|
.joins(:lifecycle_environments)
|
95
95
|
.distinct
|
96
96
|
|
97
|
-
|
98
|
-
|
99
|
-
job_invocation_path = new_job_invocation_path(template_id: template_id, host_ids: content_hosts.map { |h| h[:id] }) if template_id
|
100
|
-
end
|
97
|
+
template_id = RemoteExecutionFeature.feature!(:katello_change_content_source).job_template_id
|
98
|
+
job_invocation_path = new_job_invocation_path(template_id: template_id, host_ids: content_hosts.map { |h| h[:id] }) if template_id
|
101
99
|
|
102
100
|
render json: {
|
103
101
|
content_hosts: content_hosts,
|
@@ -1,75 +1,70 @@
|
|
1
1
|
module Katello
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
include Concerns::Api::V2::HostErrataExtensions
|
2
|
+
class RemoteExecutionController < JobInvocationsController
|
3
|
+
include ::Api::V2::BulkHostsExtension
|
4
|
+
include Concerns::Api::V2::HostErrataExtensions
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
def create
|
12
|
-
@composer = prepare_composer
|
13
|
-
if params[:customize] != 'true' && @composer.save
|
14
|
-
@composer.trigger
|
15
|
-
redirect_to job_invocation_path(@composer.job_invocation)
|
16
|
-
else
|
17
|
-
render :action => 'new'
|
18
|
-
end
|
19
|
-
end
|
6
|
+
def new
|
7
|
+
@composer = prepare_composer
|
8
|
+
end
|
20
9
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
10
|
+
def create
|
11
|
+
@composer = prepare_composer
|
12
|
+
if params[:customize] != 'true' && @composer.save
|
13
|
+
@composer.trigger
|
14
|
+
redirect_to job_invocation_path(@composer.job_invocation)
|
15
|
+
else
|
16
|
+
redirect_to new_job_invocation_path({ feature: feature_name, host_ids: hosts.ids, inputs: inputs })
|
25
17
|
end
|
18
|
+
end
|
26
19
|
|
27
|
-
|
20
|
+
# to overcome the isolated namespace engine difficulties with paths
|
21
|
+
helper Rails.application.routes.url_helpers
|
22
|
+
def _routes
|
23
|
+
Rails.application.routes
|
24
|
+
end
|
28
25
|
|
29
|
-
|
30
|
-
JobInvocationComposer.for_feature(feature_name, hosts, inputs)
|
31
|
-
end
|
26
|
+
private
|
32
27
|
|
33
|
-
|
34
|
-
|
28
|
+
def prepare_composer
|
29
|
+
JobInvocationComposer.for_feature(feature_name, hosts, inputs)
|
30
|
+
end
|
35
31
|
|
36
|
-
|
37
|
-
|
32
|
+
def hosts
|
33
|
+
bulk_host_ids = ActiveSupport::JSON.decode(params[:bulk_host_ids]).deep_symbolize_keys
|
38
34
|
|
39
|
-
|
40
|
-
|
41
|
-
Erratum.installable_for_hosts(hosts).pluck(:errata_id).join(',')
|
42
|
-
elsif params[:bulk_errata_ids]
|
43
|
-
find_bulk_errata_ids(hosts, params[:bulk_errata_ids]).join(',')
|
44
|
-
else
|
45
|
-
params[:name]
|
46
|
-
end
|
47
|
-
end
|
35
|
+
find_bulk_hosts('edit_hosts', bulk_host_ids)
|
36
|
+
end
|
48
37
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
fail HttpErrors::NotFound, _('module streams not found') if params[:module_spec].blank?
|
57
|
-
fail HttpErrors::NotFound, _('actions not found') if params[:module_stream_action].blank?
|
58
|
-
inputs = { :module_spec => params[:module_spec], :action => params[:module_stream_action] }
|
59
|
-
inputs[:options] = params[:options] if params[:options]
|
60
|
-
inputs
|
61
|
-
else
|
62
|
-
{ :package => params[:name] }
|
63
|
-
end
|
38
|
+
def errata_inputs
|
39
|
+
if ::Foreman::Cast.to_bool(params[:install_all])
|
40
|
+
Erratum.installable_for_hosts(hosts).pluck(:errata_id).join(',')
|
41
|
+
elsif params[:bulk_errata_ids]
|
42
|
+
find_bulk_errata_ids(hosts, params[:bulk_errata_ids]).join(',')
|
43
|
+
else
|
44
|
+
params[:name]
|
64
45
|
end
|
46
|
+
end
|
65
47
|
|
66
|
-
|
67
|
-
|
68
|
-
|
48
|
+
def inputs
|
49
|
+
case feature_name
|
50
|
+
when 'katello_errata_install'
|
51
|
+
{ :errata => errata_inputs }
|
52
|
+
when 'katello_service_restart'
|
53
|
+
{ :helper => params[:name] }
|
54
|
+
when 'katello_module_stream_action'
|
55
|
+
fail HttpErrors::NotFound, _('module streams not found') if params[:module_spec].blank?
|
56
|
+
fail HttpErrors::NotFound, _('actions not found') if params[:module_stream_action].blank?
|
57
|
+
inputs = { :module_spec => params[:module_spec], :action => params[:module_stream_action] }
|
58
|
+
inputs[:options] = params[:options] if params[:options]
|
59
|
+
inputs
|
60
|
+
else
|
61
|
+
{ :package => params[:name] }
|
69
62
|
end
|
70
63
|
end
|
71
|
-
|
72
|
-
|
64
|
+
|
65
|
+
def feature_name
|
66
|
+
# getting packageInstall from UI, translating to 'katello_package_install' feature
|
67
|
+
"katello_#{params[:remote_action].underscore}"
|
73
68
|
end
|
74
69
|
end
|
75
70
|
end
|
@@ -12,6 +12,22 @@ module Katello
|
|
12
12
|
edit_action? && !using_discovered_hosts_page?
|
13
13
|
end
|
14
14
|
|
15
|
+
def content_source_inherited?(host)
|
16
|
+
!using_hostgroups_page? && host&.content_source.blank? && host&.hostgroup&.content_source.present? && cv_lce_disabled?
|
17
|
+
end
|
18
|
+
|
19
|
+
def lifecycle_environment_inherited?(host)
|
20
|
+
!using_hostgroups_page? && host&.lifecycle_environments&.empty? && host&.hostgroup&.lifecycle_environment.present? && cv_lce_disabled?
|
21
|
+
end
|
22
|
+
|
23
|
+
def content_view_inherited?(host)
|
24
|
+
!using_hostgroups_page? && host&.content_views&.empty? && host&.hostgroup&.content_view.present? && cv_lce_disabled?
|
25
|
+
end
|
26
|
+
|
27
|
+
def kickstart_repo_inheritable?(host)
|
28
|
+
host&.kickstart_repository_id.blank?
|
29
|
+
end
|
30
|
+
|
15
31
|
def using_discovered_hosts_page?
|
16
32
|
controller.controller_name == "discovered_hosts"
|
17
33
|
end
|
@@ -138,9 +154,10 @@ module Katello
|
|
138
154
|
all_options = []
|
139
155
|
orgs.each do |org|
|
140
156
|
content_object_options = ""
|
141
|
-
accessible_content_objects =
|
157
|
+
accessible_content_objects = case object_type
|
158
|
+
when :lifecycle_environment
|
142
159
|
accessible_lifecycle_environments(org, host)
|
143
|
-
|
160
|
+
when :content_source
|
144
161
|
accessible_content_proxies(host)
|
145
162
|
end
|
146
163
|
accessible_content_objects.each do |content_object|
|
@@ -44,7 +44,7 @@ module Katello
|
|
44
44
|
returns String, desc: 'Absolute path to a file'
|
45
45
|
end
|
46
46
|
def repository_url(content_path, _content_type = nil, schema = 'http')
|
47
|
-
return content_path if content_path =~ %r|^([\w
|
47
|
+
return content_path if content_path =~ %r|^([\w\-+]+)://|
|
48
48
|
url = if @host.content_source
|
49
49
|
"#{schema}://#{@host.content_source.hostname}"
|
50
50
|
else
|
@@ -4,7 +4,7 @@ module Actions
|
|
4
4
|
module AlternateContentSourceCommon
|
5
5
|
def create_simplified_acs(acs, smart_proxy)
|
6
6
|
acs.products.each do |product|
|
7
|
-
product.
|
7
|
+
product.acs_compatible_repositories.with_type(acs.content_type).each do |repo|
|
8
8
|
smart_proxy_acs = ::Katello::SmartProxyAlternateContentSource.create(alternate_content_source_id: acs.id, smart_proxy_id: smart_proxy.id, repository_id: repo.id)
|
9
9
|
plan_action(Pulp3::Orchestration::AlternateContentSource::Create, smart_proxy_acs)
|
10
10
|
end
|
@@ -63,12 +63,13 @@ module Actions
|
|
63
63
|
plan_action(Pulp3::Orchestration::AlternateContentSource::Update, smart_proxy_acs)
|
64
64
|
elsif acs.simplified?
|
65
65
|
products_to_associate.each do |product|
|
66
|
-
product.
|
66
|
+
product.acs_compatible_repositories.with_type(acs.content_type).each do |repo|
|
67
67
|
smart_proxy_acs = ::Katello::SmartProxyAlternateContentSource.create(alternate_content_source_id: acs.id, smart_proxy_id: smart_proxy.id, repository_id: repo.id)
|
68
68
|
plan_action(Pulp3::Orchestration::AlternateContentSource::Create, smart_proxy_acs)
|
69
69
|
end
|
70
70
|
end
|
71
71
|
products_to_disassociate.each do |product|
|
72
|
+
# Don't use the acs_compatible_repositories filter here to ensure the proper repositories get disassociated
|
72
73
|
product.repositories.library.with_type(acs.content_type).each do |repo|
|
73
74
|
smart_proxy_acs = ::Katello::SmartProxyAlternateContentSource.find_by(alternate_content_source_id: acs.id, smart_proxy_id: smart_proxy.id, repository_id: repo.id)
|
74
75
|
plan_action(Pulp3::Orchestration::AlternateContentSource::Delete, smart_proxy_acs) if smart_proxy_acs.present?
|
@@ -36,8 +36,7 @@ module Actions
|
|
36
36
|
if repository
|
37
37
|
[repository]
|
38
38
|
else
|
39
|
-
|
40
|
-
repositories
|
39
|
+
smart_proxy_helper.repositories_available_to_capsule(environment, content_view).by_rpm_count
|
41
40
|
end
|
42
41
|
end
|
43
42
|
|
@@ -127,9 +127,10 @@ module Actions
|
|
127
127
|
::Katello::Rpm.with_identifiers(content[:package_ids])
|
128
128
|
unit_map = { :errata => [], :rpms => [] }
|
129
129
|
units.each do |unit|
|
130
|
-
|
130
|
+
case unit.class.name
|
131
|
+
when "Katello::Erratum"
|
131
132
|
unit_map[:errata] << unit.id
|
132
|
-
|
133
|
+
when "Katello::Rpm"
|
133
134
|
unit_map[:rpms] << unit.id
|
134
135
|
end
|
135
136
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Actions
|
2
2
|
module Katello
|
3
3
|
module Environment
|
4
|
-
class
|
4
|
+
class PublishContainerRepositories < Actions::EntryAction
|
5
5
|
middleware.use ::Actions::Middleware::RemoteAction
|
6
6
|
|
7
7
|
input_format do
|
@@ -9,16 +9,18 @@ module Actions
|
|
9
9
|
param :name
|
10
10
|
end
|
11
11
|
|
12
|
-
def plan(env
|
13
|
-
repositories =
|
12
|
+
def plan(env)
|
13
|
+
repositories = env.repositories.docker_type
|
14
14
|
action_subject(env)
|
15
15
|
concurrence do
|
16
16
|
repositories.each do |repository|
|
17
17
|
sequence do
|
18
|
-
repository.
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
unless repository.root.is_container_push && repository.library_instance?
|
19
|
+
repository.set_container_repository_name
|
20
|
+
repository.clear_smart_proxy_sync_histories
|
21
|
+
plan_action(::Actions::Katello::Repository::InstanceUpdate, repository)
|
22
|
+
plan_action(::Actions::Katello::Repository::CapsuleSync, repository)
|
23
|
+
end
|
22
24
|
end
|
23
25
|
end
|
24
26
|
|
@@ -31,7 +33,7 @@ module Actions
|
|
31
33
|
end
|
32
34
|
|
33
35
|
def humanized_name
|
34
|
-
_("Publish Lifecycle Environment Repositories")
|
36
|
+
_("Publish Lifecycle Environment Container Repositories")
|
35
37
|
end
|
36
38
|
|
37
39
|
def humanized_input
|
@@ -20,12 +20,10 @@ module Actions
|
|
20
20
|
content_view = ::Katello::ContentView.find(input[:content_view_id])
|
21
21
|
repository = ::Katello::Repository.find(input[:repository_id]) if input[:repository_id]
|
22
22
|
|
23
|
-
if content_view.default? && repository
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
os.architectures << arch unless os.architectures.include?(arch)
|
28
|
-
end
|
23
|
+
if content_view.default? && repository && repository.distribution_bootable?
|
24
|
+
os = Redhat.find_or_create_operating_system(repository)
|
25
|
+
arch = Architecture.where(:name => repository.distribution_arch).first_or_create!
|
26
|
+
os.architectures << arch unless os.architectures.include?(arch)
|
29
27
|
end
|
30
28
|
end
|
31
29
|
end
|
@@ -33,6 +33,8 @@ module Actions
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
+
return if @duplicate_uuid_hypervisors.empty?
|
37
|
+
|
36
38
|
@duplicate_uuid_hypervisors.each do |hypervisor, existing_host|
|
37
39
|
fail _("Host creation was skipped for %s because it shares a BIOS UUID with %s. " \
|
38
40
|
"To report this hypervisor, override its dmi.system.uuid fact or set 'candlepin.use_system_uuid_for_matching' " \
|
@@ -120,8 +122,8 @@ module Actions
|
|
120
122
|
end
|
121
123
|
|
122
124
|
def validate_host_organization(host, organization)
|
123
|
-
if host.organization_id.nil? || host.organization_id != organization
|
124
|
-
fail _("Host '%{name}' does not belong to an organization") % {:name => host.name}
|
125
|
+
if (host.organization_id.nil? || host.organization_id != organization) && !host.organization
|
126
|
+
fail _("Host '%{name}' does not belong to an organization") % {:name => host.name}
|
125
127
|
end
|
126
128
|
end
|
127
129
|
|
@@ -175,8 +177,8 @@ module Actions
|
|
175
177
|
end
|
176
178
|
|
177
179
|
def update_facts(uuid, host)
|
178
|
-
if @candlepin_attributes.key?(uuid)
|
179
|
-
::Katello::Host::SubscriptionFacet.update_facts(host, @candlepin_attributes[uuid][:facts])
|
180
|
+
if @candlepin_attributes.key?(uuid) && !@candlepin_attributes[uuid][:facts].blank?
|
181
|
+
::Katello::Host::SubscriptionFacet.update_facts(host, @candlepin_attributes[uuid][:facts])
|
180
182
|
end
|
181
183
|
end
|
182
184
|
|
@@ -2,7 +2,7 @@ module Actions
|
|
2
2
|
module Katello
|
3
3
|
module Repository
|
4
4
|
class Create < Actions::EntryAction
|
5
|
-
# rubocop:disable Metrics/MethodLength
|
5
|
+
# rubocop:disable Metrics/MethodLength, Metrics/CyclomaticComplexity
|
6
6
|
def plan(repository, args = {})
|
7
7
|
clone = args[:clone] || false
|
8
8
|
force_repo_create = args[:force_repo_create] || false
|
@@ -15,7 +15,7 @@ module Actions
|
|
15
15
|
sequence do
|
16
16
|
# Container push repositories will already be in pulp. The version_href is
|
17
17
|
# directly updated after a push.
|
18
|
-
unless root.is_container_push
|
18
|
+
unless root.is_container_push && repository.in_default_view?
|
19
19
|
create_action = plan_action(Pulp3::Orchestration::Repository::Create,
|
20
20
|
repository, SmartProxy.pulp_primary, force_repo_create)
|
21
21
|
return if create_action.error
|
@@ -36,10 +36,10 @@ module Actions
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# Container push repos do not need metadata generation or ACS (they do not sync)
|
39
|
-
unless root.is_container_push
|
39
|
+
unless root.is_container_push && repository.in_default_view?
|
40
40
|
concurrence do
|
41
41
|
plan_self(:repository_id => repository.id, :clone => clone)
|
42
|
-
if !clone && repository.url.present?
|
42
|
+
if !clone && repository.url.present? && !repository.url.start_with?('uln')
|
43
43
|
repository.product.alternate_content_sources.with_type(repository.content_type).each do |acs|
|
44
44
|
acs.smart_proxies.each do |smart_proxy|
|
45
45
|
smart_proxy_acs = ::Katello::SmartProxyAlternateContentSource.create(alternate_content_source_id: acs.id, smart_proxy_id: smart_proxy.id, repository_id: repository.id)
|