katello 4.9.1 → 4.10.0.rc2
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/README.md +4 -7
- data/app/assets/javascripts/katello/locale/bn/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/ca/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/cs/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +8969 -0
- data/app/assets/javascripts/katello/locale/de/katello.js +8991 -1
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/el/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/en/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/en_US/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/es/katello.js +8984 -1
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/fr/katello.js +9008 -1
- data/app/assets/javascripts/katello/locale/gl/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/gu/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/hi/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/id/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/it/katello.js +8974 -1
- data/app/assets/javascripts/katello/locale/ja/katello.js +9004 -1
- data/app/assets/javascripts/katello/locale/ka/katello.js +8976 -1
- data/app/assets/javascripts/katello/locale/kn/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/ko/katello.js +8972 -1
- data/app/assets/javascripts/katello/locale/locale/katello.js +3070 -1
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/mr/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/or/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/pa/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/pl/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/pt/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +8984 -1
- data/app/assets/javascripts/katello/locale/ro/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/ru/katello.js +8973 -1
- data/app/assets/javascripts/katello/locale/sl/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/ta/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/te/katello.js +8967 -1
- data/app/assets/javascripts/katello/locale/tr/katello.js +8967 -0
- data/app/assets/javascripts/katello/locale/vi/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/zh/katello.js +8966 -0
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +9004 -1
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +8972 -1
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
- data/app/controllers/katello/api/v2/alternate_content_sources_bulk_actions_controller.rb +22 -1
- data/app/controllers/katello/api/v2/api_controller.rb +0 -15
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +13 -4
- data/app/controllers/katello/api/v2/host_errata_controller.rb +0 -12
- data/app/controllers/katello/api/v2/host_packages_controller.rb +0 -55
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +0 -77
- data/app/controllers/katello/api/v2/organizations_controller.rb +2 -1
- data/app/controllers/katello/api/v2/products_controller.rb +4 -4
- data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +12 -5
- data/app/controllers/katello/api/v2/repositories_controller.rb +16 -17
- data/app/controllers/katello/api/v2/sync_controller.rb +0 -1
- data/app/controllers/katello/concerns/api/api_controller.rb +0 -10
- data/app/controllers/katello/concerns/content_facet_hosts_controller_extensions.rb +7 -9
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +1 -1
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +14 -2
- data/app/lib/actions/katello/alternate_content_source/update.rb +1 -1
- data/app/lib/actions/katello/content_view/capsule_sync.rb +1 -1
- data/app/lib/actions/katello/content_view/incremental_updates.rb +3 -9
- data/app/lib/actions/katello/content_view_environment/destroy.rb +5 -3
- data/app/lib/actions/katello/content_view_version/destroy.rb +5 -1
- data/app/lib/actions/katello/content_view_version/republish_repositories.rb +8 -2
- data/app/lib/actions/katello/host/update_content_view.rb +4 -2
- data/app/lib/actions/katello/product/destroy.rb +15 -11
- data/app/lib/actions/katello/repository/capsule_sync.rb +1 -1
- data/app/lib/actions/katello/repository/destroy.rb +10 -2
- data/app/lib/actions/katello/repository/index_content.rb +0 -1
- data/app/lib/actions/katello/repository/sync.rb +1 -3
- data/app/lib/actions/katello/repository/update_metadata_sync.rb +1 -1
- data/app/lib/actions/katello/repository/verify_checksum.rb +2 -10
- data/app/lib/actions/pulp3/orchestration/repository/generate_metadata.rb +12 -5
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +4 -9
- data/app/lib/katello/resources/cdn.rb +4 -0
- data/app/lib/katello/validators/alternate_content_source_products_validator.rb +1 -1
- data/app/models/katello/candlepin/repository_mapper.rb +1 -0
- data/app/models/katello/cdn_configuration.rb +4 -0
- data/app/models/katello/concerns/host_managed_extensions.rb +57 -4
- data/app/models/katello/content_view.rb +21 -3
- data/app/models/katello/content_view_component.rb +1 -1
- data/app/models/katello/content_view_version.rb +4 -0
- data/app/models/katello/docker_meta_tag.rb +3 -1
- data/app/models/katello/host/content_facet.rb +10 -8
- data/app/models/katello/kt_environment.rb +1 -1
- data/app/models/katello/ping.rb +1 -12
- data/app/models/katello/product_content.rb +14 -1
- data/app/models/katello/repository.rb +6 -1
- data/app/models/katello/root_repository.rb +2 -8
- data/app/services/katello/applicability/applicable_content_helper.rb +2 -2
- data/app/services/katello/registration_manager.rb +2 -12
- data/app/views/foreman/job_templates/configure_host_for_new_content_source.erb +25 -0
- data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +1 -1
- data/app/views/katello/api/v2/content_facet/show.json.rabl +0 -12
- data/app/views/katello/api/v2/content_view_components/show.json.rabl +4 -1
- data/app/views/katello/api/v2/content_views/base.json.rabl +6 -2
- data/app/views/katello/api/v2/products/show.json.rabl +3 -0
- data/app/views/katello/api/v2/repositories/base.json.rabl +18 -0
- data/app/views/katello/api/v2/repositories/show.json.rabl +0 -1
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +2 -2
- data/app/views/overrides/activation_keys/_host_environment_select.html.erb +4 -5
- data/app/views/overrides/activation_keys/_host_media_type_select.html.erb +11 -3
- data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +15 -7
- data/config/initializers/monkeys.rb +1 -0
- data/config/katello.yaml.example +0 -4
- data/config/routes/api/v2.rb +3 -0
- data/config/routes/overrides.rb +0 -11
- data/db/migrate/20220228173251_remove_drpm_from_ignorable_content.rb +1 -0
- data/db/migrate/20230609155411_add_custom_cdn_auth_enabled_to_katello_cdn_configurations.rb +5 -0
- data/db/migrate/20230710190626_remove_relative_path_limit.rb +5 -0
- data/db/migrate/20230717150442_change_change_content_source_job_template_name.rb +20 -0
- data/db/migrate/20230828143236_remove_katello_agent_dispatch_history.rb +15 -0
- data/db/seeds.d/111-upgrade_tasks.rb +1 -2
- data/engines/bastion/app/views/bastion/layouts/assets.html.erb +1 -1
- data/engines/bastion_katello/README.md +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/views/activation-keys.html +8 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +3 -44
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-module-streams-modal.controller.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +1 -65
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +1 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +1 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-applicable.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +1 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-actions.controller.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js +2 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js +1 -39
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-debs-applicable.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +1 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +4 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +1 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +0 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/file-content-views.controller.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/views/file-content-views.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +235 -521
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-details.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +17 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +55 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-packages.html +13 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-details.html +5 -0
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +1 -3
- data/lib/katello/engine.rb +0 -18
- data/lib/katello/permission_creator.rb +1 -1
- data/lib/katello/plugin.rb +0 -25
- data/lib/katello/version.rb +1 -1
- data/lib/monkeys/remove_hidden_distribution.rb +383 -0
- data/locale/action_names.rb +3 -1
- data/locale/bn/katello.po +130 -39
- data/locale/bn_IN/katello.po +130 -39
- data/locale/ca/katello.po +130 -39
- data/locale/cs/katello.po +130 -39
- data/locale/cs_CZ/katello.po +130 -39
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +134 -43
- data/locale/de_AT/katello.po +130 -39
- data/locale/de_DE/katello.po +130 -39
- data/locale/el/katello.po +130 -39
- data/locale/en/katello.po +130 -39
- data/locale/en_GB/katello.po +130 -39
- data/locale/en_US/katello.po +130 -39
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +133 -42
- data/locale/et_EE/katello.po +130 -39
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +138 -47
- data/locale/gl/katello.po +130 -39
- data/locale/gu/katello.po +130 -39
- data/locale/he_IL/katello.po +130 -39
- data/locale/hi/katello.po +130 -39
- data/locale/id/katello.po +130 -39
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +131 -40
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +138 -47
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +131 -40
- data/locale/katello.pot +805 -642
- data/locale/kn/katello.po +130 -39
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +131 -40
- data/locale/ml_IN/katello.po +130 -39
- data/locale/mr/katello.po +130 -39
- data/locale/nl_NL/katello.po +130 -39
- data/locale/or/katello.po +130 -39
- data/locale/pa/katello.po +130 -39
- data/locale/pl/katello.po +130 -39
- data/locale/pl_PL/katello.po +130 -39
- data/locale/pt/katello.po +130 -39
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +133 -42
- data/locale/ro/katello.po +130 -39
- data/locale/ro_RO/katello.po +130 -39
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +131 -40
- data/locale/sl/katello.po +130 -39
- data/locale/sv_SE/katello.po +130 -39
- data/locale/ta/katello.po +130 -39
- data/locale/ta_IN/katello.po +130 -39
- data/locale/te/katello.po +130 -39
- data/locale/tr/katello.po +130 -39
- data/locale/vi/katello.po +130 -39
- data/locale/vi_VN/katello.po +130 -39
- data/locale/zh/katello.po +130 -39
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +138 -47
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +131 -40
- data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +0 -5
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/index.js +9 -3
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +7 -54
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/HostErrataActions.js +2 -11
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/HostPackagesActions.js +1 -40
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/HostPackagesConstants.js +0 -3
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +5 -40
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +6 -61
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +5 -4
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +0 -212
- data/webpack/components/extensions/HostDetails/Tabs/__tests__/packageInstallModal.test.js +2 -157
- data/webpack/components/extensions/HostDetails/hostDetailsHelpers.js +0 -20
- data/webpack/containers/Application/config.js +5 -0
- data/webpack/scenes/ActivationKeys/Details/ActivationKeyActions.js +31 -0
- data/webpack/scenes/ActivationKeys/Details/ActivationKeyConstants.js +3 -0
- data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.js +127 -0
- data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.scss +37 -0
- data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetailsSelectors.js +16 -0
- data/webpack/scenes/ActivationKeys/Details/__tests__/activationKeyDetails.test.js +117 -0
- data/webpack/scenes/ActivationKeys/Details/components/DeleteMenu.js +77 -0
- data/webpack/scenes/ActivationKeys/Details/components/DeleteModal.js +63 -0
- data/webpack/scenes/ActivationKeys/Details/components/EditModal.js +199 -0
- data/webpack/scenes/ActivationKeys/Details/index.js +3 -0
- data/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js +1 -1
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditCredentials.js +10 -5
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditProducts.js +8 -3
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditSmartProxies.js +8 -3
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +1 -1
- data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSEdits.test.js +2 -2
- data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +1 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +37 -29
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewBulkAddModal.js +53 -37
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +7 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.fixtures.json +15 -6
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +6 -5
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/publishedContentViewDetails.fixtures.json +43 -197
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +1 -1
- data/webpack/scenes/ContentViews/Details/Filters/Rules/Package/AddEditPackageRuleModal.js +1 -1
- data/webpack/scenes/ContentViews/Details/Promote/ContentViewVersionPromote.js +2 -2
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +0 -98
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +103 -1
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionsLatestEnvironment.fixtures.json +634 -0
- data/webpack/scenes/ContentViews/components/ContentViewSelect/helpers.js +1 -1
- data/webpack/scenes/Hosts/ChangeContentSource/actions.js +14 -12
- data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +45 -6
- data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceTemplate.js +42 -7
- data/webpack/scenes/Hosts/ChangeContentSource/index.js +37 -10
- data/webpack/scenes/Hosts/ChangeContentSource/styles.scss +5 -0
- data/webpack/scenes/RedHatRepositories/__tests__/__snapshots__/RedHatRepositoriesPage.test.js.snap +0 -8
- data/webpack/scenes/RedHatRepositories/index.scss +1 -1
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +2 -2
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +0 -8
- metadata +85 -80
- data/app/lib/actions/katello/agent/dispatch_history_presenter.rb +0 -64
- data/app/lib/actions/katello/agent_action.rb +0 -119
- data/app/lib/actions/katello/bulk_agent_action.rb +0 -34
- data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +0 -44
- data/app/lib/actions/katello/host/erratum/install.rb +0 -38
- data/app/lib/actions/katello/host/package/install.rb +0 -34
- data/app/lib/actions/katello/host/package/remove.rb +0 -48
- data/app/lib/actions/katello/host/package/update.rb +0 -42
- data/app/lib/actions/katello/host/package_group/install.rb +0 -30
- data/app/lib/actions/katello/host/package_group/remove.rb +0 -30
- data/app/lib/katello/agent/base_message.rb +0 -41
- data/app/lib/katello/agent/client_message_handler.rb +0 -69
- data/app/lib/katello/agent/connection.rb +0 -38
- data/app/lib/katello/agent/install_errata_message.rb +0 -25
- data/app/lib/katello/agent/install_package_group_message.rb +0 -25
- data/app/lib/katello/agent/install_package_message.rb +0 -28
- data/app/lib/katello/agent/remove_package_group_message.rb +0 -25
- data/app/lib/katello/agent/remove_package_message.rb +0 -28
- data/app/lib/katello/agent/update_package_message.rb +0 -33
- data/app/lib/katello/event_daemon/services/agent_event_receiver.rb +0 -59
- data/app/lib/katello/qpid/connection.rb +0 -149
- data/app/lib/katello/util/default_enablement_migrator.rb +0 -183
- data/app/models/katello/agent/dispatch_history.rb +0 -19
- data/app/models/katello/events/delete_host_agent_queue.rb +0 -19
- data/app/services/katello/agent/dispatcher.rb +0 -60
- data/app/views/foreman/job_templates/change_content_source.erb +0 -18
- data/app/views/katello/api/v2/sync/index.json.rabl +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/katello-agent-notice.html +0 -8
- data/lib/katello/tasks/upgrades/4.9/update_custom_products_enablement.rake +0 -13
@@ -188,7 +188,7 @@ module Katello
|
|
188
188
|
|
189
189
|
api :PUT, "/systems/:id/enabled_repos", N_("Update the information about enabled repositories")
|
190
190
|
desc <<-DESC
|
191
|
-
Used
|
191
|
+
Used to keep the information about enabled repositories up to date.
|
192
192
|
This information is then used for computing the errata available for the system.
|
193
193
|
DESC
|
194
194
|
param :enabled_repos, Hash, :required => true do
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Katello
|
2
2
|
class Api::V2::AlternateContentSourcesBulkActionsController < Api::V2::ApiController
|
3
|
-
before_action :find_alternate_content_sources
|
3
|
+
before_action :find_alternate_content_sources, except: [:refresh_all_alternate_content_sources]
|
4
4
|
|
5
5
|
api :PUT, '/alternate_content_sources/bulk/destroy', N_('Destroy one or more alternate content sources')
|
6
6
|
param :ids, Array, desc: N_('List of alternate content source IDs'), required: true
|
@@ -34,11 +34,32 @@ module Katello
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
+
api :POST, '/alternate_content_sources/bulk/refresh_all', N_("Refresh all alternate content sources")
|
38
|
+
def refresh_all_alternate_content_sources
|
39
|
+
refreshable_alternate_content_sources = AlternateContentSource.editable
|
40
|
+
if refreshable_alternate_content_sources.empty?
|
41
|
+
msg = _("Unable to refresh any alternate content source. You either do"\
|
42
|
+
" not have the permission to refresh, or no alternate content sources exist.")
|
43
|
+
fail HttpErrors::UnprocessableEntity, msg
|
44
|
+
else
|
45
|
+
task = async_task(::Actions::BulkAction,
|
46
|
+
::Actions::Katello::AlternateContentSource::Refresh,
|
47
|
+
refreshable_alternate_content_sources)
|
48
|
+
respond_for_async resource: task
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
37
52
|
private
|
38
53
|
|
39
54
|
def find_alternate_content_sources
|
40
55
|
params.require(:ids)
|
41
56
|
@alternate_content_sources = AlternateContentSource.readable.where(id: params[:ids])
|
57
|
+
unless params[:ids].size == @alternate_content_sources.size
|
58
|
+
missing_ids = params[:ids].map(&:to_s) - @alternate_content_sources.pluck(:id)&.map(&:to_s)
|
59
|
+
msg = "Could not find alternate content sources with id: #{missing_ids} . You either do not have required permissions"\
|
60
|
+
", or these alternate content sources do not exist."
|
61
|
+
fail HttpErrors::UnprocessableEntity, msg
|
62
|
+
end
|
42
63
|
end
|
43
64
|
end
|
44
65
|
end
|
@@ -38,21 +38,6 @@ module Katello
|
|
38
38
|
@resource_class ||= "Katello::#{resource_name.classify}".constantize
|
39
39
|
end
|
40
40
|
|
41
|
-
def deprecate_katello_agent
|
42
|
-
check_katello_agent_not_disabled
|
43
|
-
::Foreman::Deprecation.api_deprecation_warning("This action uses katello-agent, which is deprecated and will be removed in #{katello_agent_removal_release}.")
|
44
|
-
end
|
45
|
-
|
46
|
-
def check_katello_agent_not_disabled
|
47
|
-
unless ::Katello.with_katello_agent?
|
48
|
-
fail HttpErrors::BadRequest, _("This action uses katello-agent, which is currently disabled. Use remote execution instead.")
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
def katello_agent_removal_release
|
53
|
-
self.class.katello_agent_removal_release
|
54
|
-
end
|
55
|
-
|
56
41
|
def full_result_response(collection)
|
57
42
|
{ :results => collection,
|
58
43
|
:total => collection.count,
|
@@ -22,6 +22,8 @@ module Katello
|
|
22
22
|
param :organization_id, :number, :desc => N_("Organization identifier")
|
23
23
|
param :include_applied_filters, :bool, :desc => N_("Whether or not to return filters applied to the content view version"), :required => false
|
24
24
|
param :triggered_by_id, :number, :desc => N_("Filter composite versions whose publish was triggered by the specified component version"), :required => false
|
25
|
+
param :file_id, :number, :desc => N_("Filter content view versions that contain the file")
|
26
|
+
param :nondefault, :bool, :desc => N_("Filter out default content views"), :required => false
|
25
27
|
param_group :search, Api::V2::ApiController
|
26
28
|
add_scoped_search_description_for(ContentViewVersion)
|
27
29
|
def index
|
@@ -36,10 +38,12 @@ module Katello
|
|
36
38
|
versions = ContentViewVersion.readable
|
37
39
|
versions = versions.triggered_by(params[:triggered_by_id]) if params[:triggered_by_id]
|
38
40
|
versions = versions.with_organization_id(params[:organization_id]) if params[:organization_id]
|
41
|
+
versions = versions.non_default_view if ::Foreman::Cast.to_bool(params[:nondefault])
|
39
42
|
versions = versions.where(:content_view_id => @view.id) if @view
|
40
43
|
versions = versions.for_version(version_number) if version_number
|
41
44
|
versions = versions.in_environment(@environment) if @environment
|
42
45
|
versions = versions.component_of(params[:composite_version_id]) if params[:composite_version_id]
|
46
|
+
versions = versions.contains_file(params[:file_id]) if params[:file_id]
|
43
47
|
versions
|
44
48
|
end
|
45
49
|
|
@@ -78,9 +82,15 @@ module Katello
|
|
78
82
|
|
79
83
|
api :PUT, "/content_view_versions/:id/republish_repositories", N_("Forces a republish of the version's repositories' metadata")
|
80
84
|
param :id, :number, :desc => N_("Content view version identifier"), :required => true
|
81
|
-
param :force, :bool, :desc => N_("Force metadata regeneration to proceed.
|
85
|
+
param :force, :bool, :desc => N_("Force metadata regeneration to proceed. Dangerous operation when version has repositories with the 'Complete Mirroring' mirroring policy")
|
82
86
|
def republish_repositories
|
83
|
-
|
87
|
+
mirror_complete_repos = @content_view_version.repositories.joins(:root).where(root: { mirroring_policy: ::Katello::RootRepository::MIRRORING_POLICY_COMPLETE })
|
88
|
+
if mirror_complete_repos.size > 0 && !::Foreman::Cast.to_bool(params[:force])
|
89
|
+
fail HttpErrors::BadRequest, _("Metadata republishing is dangerous on content view versions with repositories with the 'Complete Mirroring' mirroring policy.
|
90
|
+
Change the mirroring policy on these repositories: #{mirror_complete_repos.pluck(:name)} and try again.
|
91
|
+
Alternatively, use the 'force' parameter to regenerate metadata locally. New versions of the content view will continue to use upstream metadata for repositories with 'Complete Mirroring'.")
|
92
|
+
end
|
93
|
+
task = async_task(::Actions::Katello::ContentViewVersion::RepublishRepositories, @content_view_version, force: ::Foreman::Cast.to_bool(params[:force]))
|
84
94
|
respond_for_async :resource => task
|
85
95
|
end
|
86
96
|
|
@@ -127,8 +137,7 @@ module Katello
|
|
127
137
|
validate_content(params[:add_content])
|
128
138
|
resolve_dependencies = params.fetch(:resolve_dependencies, true)
|
129
139
|
task = async_task(::Actions::Katello::ContentView::IncrementalUpdates, @content_view_version_environments, @composite_version_environments,
|
130
|
-
params[:add_content], resolve_dependencies, hosts, params[:description]
|
131
|
-
Setting[:remote_execution_by_default] && ::Katello.with_remote_execution?)
|
140
|
+
params[:add_content], resolve_dependencies, hosts, params[:description])
|
132
141
|
respond_for_async :resource => task
|
133
142
|
end
|
134
143
|
|
@@ -14,7 +14,6 @@ module Katello
|
|
14
14
|
before_action :find_errata_ids, only: :apply
|
15
15
|
before_action :find_environment, only: :index
|
16
16
|
before_action :find_content_view, only: :index
|
17
|
-
before_action :deprecate_katello_agent, only: :apply
|
18
17
|
|
19
18
|
resource_description do
|
20
19
|
api_version 'v2'
|
@@ -58,17 +57,6 @@ module Katello
|
|
58
57
|
respond_for_index :collection => collection
|
59
58
|
end
|
60
59
|
|
61
|
-
api :PUT, "/hosts/:host_id/errata/apply", N_("Schedule errata for installation using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
|
62
|
-
param :host_id, :number, :desc => N_("Host ID"), :required => true
|
63
|
-
param :errata_ids, Array, :desc => N_("List of Errata ids to install. Will be removed in %s") % katello_agent_removal_release, required: true
|
64
|
-
|
65
|
-
param_group :bulk_errata_ids
|
66
|
-
param_group :search, Api::V2::ApiController
|
67
|
-
def apply
|
68
|
-
task = async_task(::Actions::Katello::Host::Erratum::Install, @host, content: @errata_ids)
|
69
|
-
respond_for_async :resource => task
|
70
|
-
end
|
71
|
-
|
72
60
|
api :GET, "/hosts/:host_id/errata/:id", N_("Retrieve a single errata for a host")
|
73
61
|
param :host_id, :number, :desc => N_("Host ID"), :required => true
|
74
62
|
param :id, String, :desc => N_("Errata id of the erratum (RHSA-2012:108)"), :required => true
|
@@ -10,7 +10,6 @@ module Katello
|
|
10
10
|
before_action :require_packages_only, :only => [:upgrade]
|
11
11
|
before_action :find_editable_host_with_facet, :except => :index
|
12
12
|
before_action :find_host, :only => :index
|
13
|
-
before_action :deprecate_katello_agent, :only => [:install, :remove, :upgrade, :upgrade_all]
|
14
13
|
|
15
14
|
resource_description do
|
16
15
|
api_version 'v2'
|
@@ -35,60 +34,6 @@ module Katello
|
|
35
34
|
respond_for_index(:collection => collection)
|
36
35
|
end
|
37
36
|
|
38
|
-
api :PUT, "/hosts/:host_id/packages/install", N_("Install packages remotely using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
|
39
|
-
param :host_id, :number, :required => true, :desc => N_("ID of the host")
|
40
|
-
param_group :packages_or_groups
|
41
|
-
def install
|
42
|
-
if params[:packages]
|
43
|
-
packages = validate_package_list_format(params[:packages])
|
44
|
-
task = async_task(::Actions::Katello::Host::Package::Install, @host, content: packages)
|
45
|
-
respond_for_async :resource => task
|
46
|
-
return
|
47
|
-
end
|
48
|
-
|
49
|
-
if params[:groups]
|
50
|
-
groups = extract_group_names(params[:groups])
|
51
|
-
task = async_task(::Actions::Katello::Host::PackageGroup::Install, @host, content: groups)
|
52
|
-
respond_for_async :resource => task
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
api :PUT, "/hosts/:host_id/packages/upgrade", N_("Update packages remotely using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
|
57
|
-
param :host_id, :number, :required => true, :desc => N_("ID of the host")
|
58
|
-
param :packages, Array, :desc => N_("list of packages names"), :required => true
|
59
|
-
def upgrade
|
60
|
-
if params[:packages]
|
61
|
-
packages = validate_package_list_format(params[:packages])
|
62
|
-
task = async_task(::Actions::Katello::Host::Package::Update, @host, content: packages)
|
63
|
-
respond_for_async :resource => task
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
api :PUT, "/hosts/:host_id/packages/upgrade_all", N_("Update packages remotely using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
|
68
|
-
param :host_id, :number, :required => true, :desc => N_("ID of the host")
|
69
|
-
def upgrade_all
|
70
|
-
task = async_task(::Actions::Katello::Host::Package::Update, @host, content: [])
|
71
|
-
respond_for_async :resource => task
|
72
|
-
end
|
73
|
-
|
74
|
-
api :PUT, "/hosts/:host_id/packages/remove", N_("Uninstall packages remotely using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
|
75
|
-
param :host_id, :number, :required => true, :desc => N_("ID of the host")
|
76
|
-
param_group :packages_or_groups
|
77
|
-
def remove
|
78
|
-
if params[:packages]
|
79
|
-
packages = validate_package_list_format(params[:packages])
|
80
|
-
task = async_task(::Actions::Katello::Host::Package::Remove, @host, content: packages)
|
81
|
-
respond_for_async :resource => task
|
82
|
-
return
|
83
|
-
end
|
84
|
-
|
85
|
-
if params[:groups]
|
86
|
-
groups = extract_group_names(params[:groups])
|
87
|
-
task = async_task(::Actions::Katello::Host::PackageGroup::Remove, @host, content: groups)
|
88
|
-
respond_for_async :resource => task
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
37
|
def index_relation
|
93
38
|
packages = @host.installed_packages
|
94
39
|
upgradable_packages = ::Katello::Rpm.installable_for_hosts([@host]).select(:name)
|
@@ -81,7 +81,7 @@ module Katello
|
|
81
81
|
def create
|
82
82
|
rhsm_params = params_to_rhsm_params
|
83
83
|
|
84
|
-
host = Katello::RegistrationManager.process_registration(rhsm_params, @content_view_environment)
|
84
|
+
host = Katello::RegistrationManager.process_registration(rhsm_params, [@content_view_environment])
|
85
85
|
host.reload
|
86
86
|
::Katello::Host::SubscriptionFacet.update_facts(host, rhsm_params[:facts]) unless rhsm_params[:facts].blank?
|
87
87
|
|
@@ -1,5 +1,4 @@
|
|
1
1
|
module Katello
|
2
|
-
# rubocop:disable Metrics/ClassLength
|
3
2
|
class Api::V2::HostsBulkActionsController < Api::V2::ApiController
|
4
3
|
include Concerns::Api::V2::BulkHostsExtensions
|
5
4
|
include Katello::Concerns::Api::V2::ContentOverridesController
|
@@ -15,9 +14,7 @@ module Katello
|
|
15
14
|
before_action :find_errata, only: [:available_incremental_updates]
|
16
15
|
before_action :find_organization, only: [:add_subscriptions]
|
17
16
|
before_action :find_traces, only: [:resolve_traces]
|
18
|
-
before_action :deprecate_katello_agent, only: [:install_content, :update_content, :remove_content]
|
19
17
|
|
20
|
-
before_action :validate_content_action, only: [:install_content, :update_content, :remove_content]
|
21
18
|
before_action :validate_organization, only: [:add_subscriptions]
|
22
19
|
|
23
20
|
# disable *_count fields on erratum rabl, since they perform N+1 queries
|
@@ -28,22 +25,6 @@ module Katello
|
|
28
25
|
api_base_url "/api"
|
29
26
|
end
|
30
27
|
|
31
|
-
PARAM_ACTIONS = {
|
32
|
-
:install_content => {
|
33
|
-
:package => ::Actions::Katello::Host::Package::Install,
|
34
|
-
:package_group => ::Actions::Katello::Host::PackageGroup::Install,
|
35
|
-
:errata => :install_errata
|
36
|
-
},
|
37
|
-
:update_content => {
|
38
|
-
:package => ::Actions::Katello::Host::Package::Update,
|
39
|
-
:package_group => ::Actions::Katello::Host::PackageGroup::Install
|
40
|
-
},
|
41
|
-
:remove_content => {
|
42
|
-
:package => ::Actions::Katello::Host::Package::Remove,
|
43
|
-
:package_group => ::Actions::Katello::Host::PackageGroup::Remove
|
44
|
-
}
|
45
|
-
}.with_indifferent_access
|
46
|
-
|
47
28
|
def_param_group :bulk_params do
|
48
29
|
param :organization_id, :number, :required => true, :desc => N_("ID of the organization")
|
49
30
|
param :included, Hash, :required => true, :action_aware => true do
|
@@ -117,37 +98,6 @@ module Katello
|
|
117
98
|
:resource_class => Erratum))
|
118
99
|
end
|
119
100
|
|
120
|
-
api :PUT, "/hosts/bulk/install_content", N_("Install content on one or more hosts using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
|
121
|
-
param_group :bulk_params
|
122
|
-
param :content_type, String,
|
123
|
-
:desc => N_("The type of content. The following types are supported: 'package', 'package_group' and 'errata'."),
|
124
|
-
:required => true
|
125
|
-
param :content, Array, :desc => N_("List of content (e.g. package names, package group names (Deprecated) or errata ids)")
|
126
|
-
def install_content
|
127
|
-
content_action
|
128
|
-
end
|
129
|
-
|
130
|
-
api :PUT, "/hosts/bulk/update_content", N_("Update content on one or more hosts using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
|
131
|
-
param_group :bulk_params
|
132
|
-
param :content_type, String,
|
133
|
-
:desc => N_("The type of content. The following types are supported: 'package' and 'package_group."),
|
134
|
-
:required => true
|
135
|
-
param :content, Array, :desc => N_("List of content (e.g. package or package group names)"), :required => true
|
136
|
-
param :update_all, :bool, :desc => N_("Updates all packages on the host(s)")
|
137
|
-
def update_content
|
138
|
-
content_action
|
139
|
-
end
|
140
|
-
|
141
|
-
api :PUT, "/hosts/bulk/remove_content", N_("Remove content on one or more hosts using katello-agent. %s") % katello_agent_deprecation_text, deprecated: true
|
142
|
-
param_group :bulk_params
|
143
|
-
param :content_type, String,
|
144
|
-
:desc => N_("The type of content. The following types are supported: 'package' and 'package_group."),
|
145
|
-
:required => true
|
146
|
-
param :content, Array, :desc => N_("List of content (e.g. package or package group names)"), :required => true
|
147
|
-
def remove_content
|
148
|
-
content_action
|
149
|
-
end
|
150
|
-
|
151
101
|
api :PUT, "/hosts/bulk/destroy", N_("Destroy one or more hosts")
|
152
102
|
param_group :bulk_params
|
153
103
|
def destroy_hosts
|
@@ -384,33 +334,6 @@ module Katello
|
|
384
334
|
end
|
385
335
|
end
|
386
336
|
|
387
|
-
def content_action
|
388
|
-
if params[:content_type] == 'errata'
|
389
|
-
options = {}
|
390
|
-
options[:update_all] = true if ::Foreman::Cast.to_bool(params[:install_all])
|
391
|
-
options[:errata_ids] = params[:content]
|
392
|
-
|
393
|
-
task = async_task(::Actions::BulkAction, ::Actions::Katello::Host::Erratum::ApplicableErrataInstall, @hosts, options)
|
394
|
-
respond_for_async :resource => task
|
395
|
-
else
|
396
|
-
content = params[:content]
|
397
|
-
if params[:action] == :update_content && params[:update_all]
|
398
|
-
content = []
|
399
|
-
end
|
400
|
-
task = async_task(Actions::Katello::BulkAgentAction, PARAM_ACTIONS[params[:action]][params[:content_type]], @hosts, content: content)
|
401
|
-
respond_for_async :resource => task
|
402
|
-
end
|
403
|
-
end
|
404
|
-
|
405
|
-
def validate_content_action
|
406
|
-
fail HttpErrors::BadRequest, _("A content_type must be provided.") if params[:content_type].blank?
|
407
|
-
fail HttpErrors::BadRequest, _("No content has been provided.") if params[:content].blank? && !params[:update_all]
|
408
|
-
|
409
|
-
if PARAM_ACTIONS[params[:action]][params[:content_type]].nil?
|
410
|
-
fail HttpErrors::BadRequest, _("Invalid content type %s") % params[:content_type]
|
411
|
-
end
|
412
|
-
end
|
413
|
-
|
414
337
|
def find_environment
|
415
338
|
@environment = KTEnvironment.editable.find(params[:environment_id])
|
416
339
|
throw_resource_not_found(name: 'lifecycle environment', id: params[:environment_id]) unless @environment
|
@@ -161,9 +161,10 @@ module Katello
|
|
161
161
|
param :upstream_content_view_label, String, :desc => N_("Upstream Content View Label, default: Default_Organization_View. Relevant only for 'upstream_server' type.")
|
162
162
|
param :upstream_lifecycle_environment_label, String, :desc => N_("Upstream Lifecycle Environment, default: Library. Relevant only for 'upstream_server' type.")
|
163
163
|
param :ssl_ca_credential_id, Integer, :desc => N_("Content Credential to use for SSL CA. Relevant only for 'upstream_server' type.")
|
164
|
+
param :custom_cdn_auth_enabled, :bool, :desc => N_("If product certificates should be used to authenticate to a custom CDN.")
|
164
165
|
def cdn_configuration
|
165
166
|
config_keys = [:url, :username, :password, :upstream_organization_label, :ssl_ca_credential_id, :type,
|
166
|
-
:upstream_lifecycle_environment_label, :upstream_content_view_label]
|
167
|
+
:upstream_lifecycle_environment_label, :upstream_content_view_label, :custom_cdn_auth_enabled]
|
167
168
|
config_params = params.slice(*config_keys).permit!.to_h
|
168
169
|
|
169
170
|
task = sync_task(::Actions::Katello::CdnConfiguration::Update, @organization.cdn_configuration, config_params)
|
@@ -17,10 +17,10 @@ module Katello
|
|
17
17
|
|
18
18
|
def_param_group :product do
|
19
19
|
param :description, String, :desc => N_("Product description")
|
20
|
-
param :gpg_key_id, :number, :desc => N_("Identifier of the GPG key")
|
21
|
-
param :ssl_ca_cert_id, :number, :desc => N_("Idenifier of the SSL CA Cert")
|
22
|
-
param :ssl_client_cert_id, :number, :desc => N_("Identifier of the SSL Client Cert")
|
23
|
-
param :ssl_client_key_id, :number, :desc => N_("Identifier of the SSL Client Key")
|
20
|
+
param :gpg_key_id, :number, :desc => N_("Identifier of the GPG key"), :allow_nil => true
|
21
|
+
param :ssl_ca_cert_id, :number, :desc => N_("Idenifier of the SSL CA Cert"), :allow_nil => true
|
22
|
+
param :ssl_client_cert_id, :number, :desc => N_("Identifier of the SSL Client Cert"), :allow_nil => true
|
23
|
+
param :ssl_client_key_id, :number, :desc => N_("Identifier of the SSL Client Key"), :allow_nil => true
|
24
24
|
param :sync_plan_id, :number, :desc => N_("Plan numeric identifier"), :allow_nil => true
|
25
25
|
end
|
26
26
|
|
@@ -7,7 +7,7 @@ module Katello
|
|
7
7
|
def destroy_repositories
|
8
8
|
deletion_authorized_repositories = @repositories.deletable
|
9
9
|
unpromoted_repos = deletion_authorized_repositories.reject { |repo| repo.promoted? && repo.content_views.generated_for_none.exists? }
|
10
|
-
|
10
|
+
unpromoted_repos_non_last_affected_repo = unpromoted_repos.reject { |repo| repo.filters.any? { |filter| filter.repositories.size == 1 } }
|
11
11
|
messages1 = format_bulk_action_messages(
|
12
12
|
:success => "",
|
13
13
|
:error => _("You do not have permissions to delete %s"),
|
@@ -17,16 +17,23 @@ module Katello
|
|
17
17
|
|
18
18
|
messages2 = format_bulk_action_messages(
|
19
19
|
:success => "",
|
20
|
-
:error => _("Repository %s cannot be deleted since it has already been included in a published Content View."),
|
20
|
+
:error => _("Repository %s cannot be deleted since it has already been included in a published Content View. Use repository details page to delete"),
|
21
21
|
:models => deletion_authorized_repositories,
|
22
22
|
:authorized => unpromoted_repos
|
23
23
|
)
|
24
24
|
|
25
|
-
|
25
|
+
messages3 = format_bulk_action_messages(
|
26
|
+
:success => "",
|
27
|
+
:error => _("Repository %s cannot be deleted since it is the last affected repository in a filter. Use repository details page to delete."),
|
28
|
+
:models => unpromoted_repos,
|
29
|
+
:authorized => unpromoted_repos_non_last_affected_repo
|
30
|
+
)
|
31
|
+
|
32
|
+
errors = messages1[:error] + messages2[:error] + messages3[:error]
|
26
33
|
|
27
34
|
task = nil
|
28
|
-
if
|
29
|
-
task = async_task(::Actions::BulkAction, ::Actions::Katello::Repository::Destroy,
|
35
|
+
if unpromoted_repos_non_last_affected_repo.any?
|
36
|
+
task = async_task(::Actions::BulkAction, ::Actions::Katello::Repository::Destroy, unpromoted_repos_non_last_affected_repo)
|
30
37
|
else
|
31
38
|
status = 400
|
32
39
|
end
|
@@ -41,16 +41,15 @@ module Katello
|
|
41
41
|
|
42
42
|
def_param_group :repo do
|
43
43
|
param :url, String, :desc => N_("repository source url")
|
44
|
-
param :os_versions, Array,
|
45
|
-
|
46
|
-
param :gpg_key_id, :number, :desc => N_("id of the gpg key that will be assigned to the new repository")
|
47
|
-
param :ssl_ca_cert_id, :number, :desc => N_("Identifier of the content credential containing the SSL CA Cert")
|
48
|
-
param :ssl_client_cert_id, :number, :desc => N_("Identifier of the content credential containing the SSL Client Cert")
|
49
|
-
param :ssl_client_key_id, :number, :desc => N_("Identifier of the content credential containing the SSL Client Key")
|
44
|
+
param :os_versions, Array, :desc => N_("Identifies whether the repository should be unavailable on a client with a non-matching OS version.
|
45
|
+
Pass [] to make repo available for clients regardless of OS version. Maximum length 1; allowed tags are: %s") % Katello::RootRepository::ALLOWED_OS_VERSIONS.join(', ')
|
46
|
+
param :gpg_key_id, :number, :desc => N_("id of the gpg key that will be assigned to the new repository"), :allow_nil => true
|
47
|
+
param :ssl_ca_cert_id, :number, :desc => N_("Identifier of the content credential containing the SSL CA Cert"), :allow_nil => true
|
48
|
+
param :ssl_client_cert_id, :number, :desc => N_("Identifier of the content credential containing the SSL Client Cert"), :allow_nil => true
|
49
|
+
param :ssl_client_key_id, :number, :desc => N_("Identifier of the content credential containing the SSL Client Key"), :allow_nil => true
|
50
50
|
param :unprotected, :bool, :desc => N_("true if this repository can be published via HTTP")
|
51
51
|
param :checksum_type, String, :desc => N_("Checksum of the repository, currently 'sha1' & 'sha256' are supported")
|
52
52
|
param :docker_upstream_name, String, :desc => N_("Name of the upstream docker repository")
|
53
|
-
param :docker_tags_whitelist, Array, :desc => N_("Comma-separated list of tags to sync for Container Image repository (Deprecated)"), :deprecated => true
|
54
53
|
param :include_tags, Array, :desc => N_("Comma-separated list of tags to sync for a container image repository")
|
55
54
|
param :exclude_tags, Array, :desc => N_("Comma-separated list of tags to exclude when syncing a container image repository. Default: any tag ending in \"-source\"")
|
56
55
|
param :download_policy, ["immediate", "on_demand"], :desc => N_("download policy for yum, deb, and docker repos (either 'immediate' or 'on_demand')")
|
@@ -325,10 +324,11 @@ module Katello
|
|
325
324
|
|
326
325
|
api :PUT, "/repositories/:id/republish", N_("Forces a republish of the specified repository, regenerating metadata and symlinks on the filesystem. Not allowed for repositories with the 'Complete Mirroring' mirroring policy.")
|
327
326
|
param :id, :number, :desc => N_("Repository identifier"), :required => true
|
328
|
-
param :force, :bool, :desc => N_("Force metadata regeneration to proceed.
|
327
|
+
param :force, :bool, :desc => N_("Force metadata regeneration to proceed. Dangerous when repositories use the 'Complete Mirroring' mirroring policy")
|
329
328
|
def republish
|
330
|
-
if @repository.mirroring_policy == Katello::RootRepository::MIRRORING_POLICY_COMPLETE
|
331
|
-
fail HttpErrors::BadRequest, _("Metadata republishing is
|
329
|
+
if @repository.mirroring_policy == Katello::RootRepository::MIRRORING_POLICY_COMPLETE && !::Foreman::Cast.to_bool(params[:force])
|
330
|
+
fail HttpErrors::BadRequest, _("Metadata republishing is risky on 'Complete Mirroring' repositories. Change the mirroring policy and try again.
|
331
|
+
Alternatively, use the 'force' parameter to regenerate metadata locally. On the next sync, the upstream repository's metadata will overwrite local metadata for 'Complete Mirroring' repositories.")
|
332
332
|
end
|
333
333
|
task = async_task(::Actions::Katello::Repository::MetadataGenerate, @repository)
|
334
334
|
respond_for_async :resource => task
|
@@ -416,9 +416,12 @@ module Katello
|
|
416
416
|
api :DELETE, "/repositories/:id", N_("Destroy a custom repository")
|
417
417
|
param :id, :number, :required => true
|
418
418
|
param :remove_from_content_view_versions, :bool, :required => false, :desc => N_("Force delete the repository by removing it from all content view versions")
|
419
|
+
param :delete_empty_repo_filters, :bool, :required => false, :desc => N_("Delete content view filters that have this repository as the last associated repository. Defaults to true. If false, such filters will now apply to all repositories in the content view.")
|
419
420
|
def destroy
|
420
421
|
sync_task(::Actions::Katello::Repository::Destroy, @repository,
|
421
|
-
|
422
|
+
remove_from_content_view_versions: ::Foreman::Cast.to_bool(params.fetch(:remove_from_content_view_versions, false)),
|
423
|
+
delete_empty_repo_filters: ::Foreman::Cast.to_bool(params.fetch(:delete_empty_repo_filters, true))
|
424
|
+
)
|
422
425
|
respond_for_destroy
|
423
426
|
end
|
424
427
|
|
@@ -584,7 +587,7 @@ module Katello
|
|
584
587
|
{:os_versions => []}, :deb_releases, :deb_components, :deb_architectures, :description,
|
585
588
|
:http_proxy_policy, :http_proxy_id, :retain_package_versions_count, {:ignorable_content => []}
|
586
589
|
]
|
587
|
-
keys += [{:
|
590
|
+
keys += [{:include_tags => []}, {:exclude_tags => []}, :docker_upstream_name] if params[:action] == 'create' || @repository&.docker?
|
588
591
|
keys += [:ansible_collection_requirements, :ansible_collection_auth_url, :ansible_collection_auth_token] if params[:action] == 'create' || @repository&.ansible_collection?
|
589
592
|
keys += [:label, :content_type] if params[:action] == "create"
|
590
593
|
|
@@ -624,11 +627,7 @@ module Katello
|
|
624
627
|
:metadata_expire).to_h.with_indifferent_access)
|
625
628
|
root.docker_upstream_name = repo_params[:docker_upstream_name] if repo_params[:docker_upstream_name]
|
626
629
|
if root.docker?
|
627
|
-
|
628
|
-
root.include_tags = repo_params.fetch(:docker_tags_whitelist, [])
|
629
|
-
else
|
630
|
-
root.include_tags = repo_params.fetch(:include_tags, [])
|
631
|
-
end
|
630
|
+
root.include_tags = repo_params.fetch(:include_tags, [])
|
632
631
|
end
|
633
632
|
root.exclude_tags = repo_params.fetch(:exclude_tags, ['*-source']) if root.docker?
|
634
633
|
root.verify_ssl_on_sync = ::Foreman::Cast.to_bool(repo_params[:verify_ssl_on_sync]) if repo_params.key?(:verify_ssl_on_sync)
|
@@ -4,7 +4,6 @@ module Katello
|
|
4
4
|
before_action :find_object, :only => [:index]
|
5
5
|
before_action :ensure_library, :only => [:index]
|
6
6
|
|
7
|
-
api :GET, "/organizations/:organization_id/products/:product_id/sync", N_("Get status of repo synchronisation for given product")
|
8
7
|
api :GET, "/repositories/:repository_id/sync", N_("Get status of synchronisation for given repository")
|
9
8
|
def index
|
10
9
|
respond_for_async(:resource => @obj.sync_status)
|
@@ -17,16 +17,6 @@ module Katello
|
|
17
17
|
User.current
|
18
18
|
end
|
19
19
|
|
20
|
-
class_methods do
|
21
|
-
def katello_agent_deprecation_text
|
22
|
-
N_("WARNING: Katello-agent is deprecated and will be removed in %s. Migrate to remote execution now.") % katello_agent_removal_release
|
23
|
-
end
|
24
|
-
|
25
|
-
def katello_agent_removal_release
|
26
|
-
N_("Katello 4.10")
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
20
|
protected
|
31
21
|
|
32
22
|
def request_from_katello_cli?
|
@@ -6,17 +6,15 @@ module Katello
|
|
6
6
|
before_action :set_up_content_view_environment, only: [:update]
|
7
7
|
|
8
8
|
def set_up_content_view_environment
|
9
|
-
return unless
|
9
|
+
return unless @host&.content_facet.present? && params[:host]&.[](:content_facet_attributes)&.present?
|
10
10
|
cv_id = params[:host][:content_facet_attributes].delete(:content_view_id)
|
11
11
|
env_id = params[:host][:content_facet_attributes].delete(:lifecycle_environment_id)
|
12
|
-
Rails.logger.info "
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
Rails.logger.info "set_up_content_view_environment: done"
|
19
|
-
end
|
12
|
+
Rails.logger.info "#{__method__}: cv_id=#{cv_id}, env_id=#{env_id}"
|
13
|
+
@host.content_facet.assign_single_environment(
|
14
|
+
lifecycle_environment_id: env_id,
|
15
|
+
content_view_id: cv_id
|
16
|
+
)
|
17
|
+
Rails.logger.info "#{__method__}: done"
|
20
18
|
end
|
21
19
|
end
|
22
20
|
end
|
@@ -91,7 +91,7 @@ module Katello
|
|
91
91
|
.distinct
|
92
92
|
|
93
93
|
if Katello.with_remote_execution?
|
94
|
-
template_id = JobTemplate.find_by(name: '
|
94
|
+
template_id = JobTemplate.find_by(name: 'Configure host for new content source')&.id
|
95
95
|
job_invocation_path = new_job_invocation_path(template_id: template_id, host_ids: content_hosts.map { |h| h[:id] }) if template_id
|
96
96
|
end
|
97
97
|
|
@@ -4,6 +4,18 @@ module Katello
|
|
4
4
|
"kt_activation_keys"
|
5
5
|
end
|
6
6
|
|
7
|
+
def edit_action?
|
8
|
+
params[:action] == 'edit'
|
9
|
+
end
|
10
|
+
|
11
|
+
def cv_lce_disabled?
|
12
|
+
edit_action? && !using_discovered_hosts_page?
|
13
|
+
end
|
14
|
+
|
15
|
+
def using_discovered_hosts_page?
|
16
|
+
controller.controller_name == "discovered_hosts"
|
17
|
+
end
|
18
|
+
|
7
19
|
def using_hostgroups_page?
|
8
20
|
controller.controller_name == "hostgroups"
|
9
21
|
end
|
@@ -23,7 +35,7 @@ module Katello
|
|
23
35
|
end
|
24
36
|
|
25
37
|
def use_install_media(host, options = {})
|
26
|
-
return true if host&.errors && host.errors.include?(:medium_id)
|
38
|
+
return true if host&.errors && host.errors.include?(:medium_id) && host.medium.present?
|
27
39
|
kickstart_repository_id(host, options).blank?
|
28
40
|
end
|
29
41
|
|
@@ -164,7 +176,7 @@ module Katello
|
|
164
176
|
|
165
177
|
views = []
|
166
178
|
if lifecycle_environment
|
167
|
-
views = Katello::ContentView.in_environment(lifecycle_environment).readable.order(:name)
|
179
|
+
views = Katello::ContentView.in_environment(lifecycle_environment).ignore_generated.readable.order(:name)
|
168
180
|
views |= [content_view] if content_view.present? && content_view.in_environment?(lifecycle_environment)
|
169
181
|
elsif content_view
|
170
182
|
views = [content_view]
|
@@ -71,7 +71,7 @@ module Actions
|
|
71
71
|
products_to_disassociate.each do |product|
|
72
72
|
product.repositories.library.with_type(acs.content_type).each do |repo|
|
73
73
|
smart_proxy_acs = ::Katello::SmartProxyAlternateContentSource.find_by(alternate_content_source_id: acs.id, smart_proxy_id: smart_proxy.id, repository_id: repo.id)
|
74
|
-
plan_action(Pulp3::Orchestration::AlternateContentSource::Delete, smart_proxy_acs)
|
74
|
+
plan_action(Pulp3::Orchestration::AlternateContentSource::Delete, smart_proxy_acs) if smart_proxy_acs.present?
|
75
75
|
end
|
76
76
|
end
|
77
77
|
end
|
@@ -9,7 +9,7 @@ module Actions
|
|
9
9
|
def plan(content_view, environment)
|
10
10
|
sequence do
|
11
11
|
concurrence do
|
12
|
-
smart_proxies = SmartProxy.with_environment(environment)
|
12
|
+
smart_proxies = SmartProxy.unscoped.with_environment(environment).select { |sp| sp.authorized?(:manage_capsule_content) && sp.authorized?(:view_capsule_content) }
|
13
13
|
unless smart_proxies.blank?
|
14
14
|
plan_action(::Actions::BulkAction, ::Actions::Katello::CapsuleContent::Sync, smart_proxies.sort,
|
15
15
|
:content_view_id => content_view.id, :environment_id => environment.id)
|
@@ -4,8 +4,7 @@ module Actions
|
|
4
4
|
class IncrementalUpdates < Actions::EntryAction
|
5
5
|
include Helpers::Presenter
|
6
6
|
|
7
|
-
def plan(version_environments, composite_version_environments, content, dep_solve, hosts, description
|
8
|
-
use_remote_execution = false)
|
7
|
+
def plan(version_environments, composite_version_environments, content, dep_solve, hosts, description)
|
9
8
|
old_new_version_map = {}
|
10
9
|
output_for_version_ids = []
|
11
10
|
|
@@ -34,13 +33,8 @@ module Actions
|
|
34
33
|
handle_composites(old_new_version_map, composite_version_environments, output_for_version_ids, description)
|
35
34
|
end
|
36
35
|
|
37
|
-
if hosts.any? && !content[:errata_ids].blank? && !use_remote_execution
|
38
|
-
errata = ::Katello::Erratum.with_identifiers(content[:errata_ids])
|
39
|
-
hosts = hosts.where(:id => ::Katello::Host::ContentFacet.with_applicable_errata(errata).pluck(:host_id))
|
40
|
-
plan_action(::Actions::BulkAction, ::Actions::Katello::Host::Erratum::ApplicableErrataInstall, hosts, :errata_ids => content[:errata_ids])
|
41
|
-
end
|
42
36
|
plan_self(:version_outputs => output_for_version_ids, :host_ids => hosts.pluck(:id),
|
43
|
-
:errata_ids => content[:errata_ids]
|
37
|
+
:errata_ids => content[:errata_ids])
|
44
38
|
end
|
45
39
|
end
|
46
40
|
|
@@ -65,7 +59,7 @@ module Actions
|
|
65
59
|
end
|
66
60
|
|
67
61
|
def run
|
68
|
-
if input[:errata_ids].present? && input[:host_ids].present?
|
62
|
+
if input[:errata_ids].present? && input[:host_ids].present?
|
69
63
|
errata_ids = input[:errata_ids].join(',')
|
70
64
|
errata = ::Katello::Erratum.with_identifiers(input[:errata_ids])
|
71
65
|
hosts = ::Host.where(:id => input[:host_ids] &
|