katello 4.17.1 → 4.18.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/locale/bn/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/ca/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/cs/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/de/katello.js +147 -3
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/el/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/en/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/en_US/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/es/katello.js +147 -3
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/fr/katello.js +147 -3
- data/app/assets/javascripts/katello/locale/gl/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/gu/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/hi/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/id/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/it/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/ja/katello.js +147 -3
- data/app/assets/javascripts/katello/locale/ka/katello.js +147 -3
- data/app/assets/javascripts/katello/locale/kn/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/ko/katello.js +147 -3
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/mr/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/or/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/pa/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/pl/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/pt/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +147 -3
- data/app/assets/javascripts/katello/locale/ro/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/ru/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/sl/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/ta/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/te/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/tr/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/vi/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/zh/katello.js +148 -4
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +147 -3
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +148 -4
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +12 -14
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +2 -1
- data/app/controllers/katello/api/v2/errata_controller.rb +16 -0
- data/app/controllers/katello/api/v2/flatpak_remote_repositories_controller.rb +20 -3
- data/app/controllers/katello/api/v2/flatpak_remotes_controller.rb +7 -3
- data/app/controllers/katello/api/v2/generic_content_units_controller.rb +1 -2
- data/app/controllers/katello/api/v2/products_controller.rb +18 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +5 -3
- data/app/controllers/katello/concerns/api/v2/hosts_bulk_actions_controller_extensions.rb +10 -0
- data/app/controllers/katello/concerns/api/v2/registration_commands_controller_extensions.rb +1 -0
- data/app/controllers/katello/concerns/filtered_auto_complete_search.rb +17 -0
- data/app/lib/actions/helpers/smart_proxy_sync_helper.rb +12 -0
- data/app/lib/actions/katello/content_view/add_rolling_repo_clone.rb +4 -4
- data/app/lib/actions/katello/content_view/capsule_sync.rb +8 -3
- data/app/lib/actions/katello/content_view/publish.rb +39 -12
- data/app/lib/actions/katello/flatpak/mirror_remote_repository.rb +2 -1
- data/app/lib/actions/katello/repository/capsule_sync.rb +11 -1
- data/app/lib/actions/katello/repository/import_upload.rb +2 -3
- data/app/lib/actions/katello/repository/sync.rb +2 -1
- data/app/lib/actions/katello/repository/upload_files.rb +2 -1
- data/app/lib/katello/concerns/bookmark_controller_validator_extensions.rb +1 -1
- data/app/lib/katello/resources/cdn.rb +1 -1
- data/app/models/katello/concerns/smart_proxy_extensions.rb +46 -8
- data/app/models/katello/content_view_environment.rb +1 -1
- data/app/models/katello/erratum.rb +26 -1
- data/app/models/katello/flatpak_remote.rb +0 -1
- data/app/models/katello/flatpak_remote_repository.rb +24 -0
- data/app/models/katello/glue/pulp/repos.rb +1 -1
- data/app/models/katello/root_repository.rb +1 -0
- data/app/presenters/katello/flatpak_remote_mirror_status_presenter.rb +41 -0
- data/app/services/katello/repository_type_manager.rb +2 -0
- data/app/views/foreman/job_templates/flatpak_install.erb +17 -2
- data/app/views/foreman/job_templates/flatpak_login_action.erb +17 -3
- data/app/views/foreman/job_templates/install_errata_by_search_query.erb +1 -1
- data/app/views/foreman/job_templates/install_errata_by_search_query_-_katello_ansible_default.erb +1 -1
- data/app/views/katello/api/v2/flatpak_remote_repositories/base.json.rabl +3 -1
- data/app/views/katello/api/v2/flatpak_remotes/base.json.rabl +5 -0
- data/app/views/katello/api/v2/flatpak_remotes/permissions.json.rabl +1 -0
- data/config/routes/api/v2.rb +1 -1
- data/config/routes.rb +3 -0
- data/db/migrate/20250613210050_use_big_int_for_erratum_packages_id.rb +11 -0
- data/db/seeds.d/108-subcription-bookmarks.rb +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html +5 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +4 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn_IN.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ca.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/cs_CZ.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_AT.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_DE.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/el.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_GB.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_US.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/et_EE.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gl.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gu.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/he_IL.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/hi.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/id.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ka.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/kn.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ml_IN.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/mr.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/nl_NL.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/or.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pa.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl_PL.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro_RO.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sl.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sv_SE.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta_IN.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/te.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/tr.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi_VN.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +13 -3
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +2 -0
- data/lib/katello/engine.rb +0 -1
- data/lib/katello/permission_creator.rb +1 -1
- data/lib/katello/plugin.rb +26 -2
- data/lib/katello/version.rb +1 -1
- data/lib/katello.rb +0 -1
- data/lib/proxy_api/container_gateway.rb +24 -0
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +148 -4
- data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn_IN/katello.po +148 -4
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po +148 -4
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/katello.po +148 -4
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +148 -4
- data/locale/de/katello.po +147 -3
- data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_AT/katello.po +148 -4
- data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_DE/katello.po +148 -4
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po +148 -4
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/katello.po +148 -4
- data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_GB/katello.po +148 -4
- data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_US/katello.po +148 -4
- data/locale/es/katello.po +147 -3
- data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
- data/locale/et_EE/katello.po +148 -4
- data/locale/fr/katello.po +147 -3
- data/locale/gl/LC_MESSAGES/katello.mo +0 -0
- data/locale/gl/katello.po +148 -4
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/katello.po +148 -4
- data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
- data/locale/he_IL/katello.po +148 -4
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/katello.po +148 -4
- data/locale/id/LC_MESSAGES/katello.mo +0 -0
- data/locale/id/katello.po +148 -4
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +148 -4
- data/locale/ja/katello.po +147 -3
- data/locale/ka/katello.po +147 -3
- data/locale/katello.pot +703 -428
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/katello.po +148 -4
- data/locale/ko/katello.po +147 -3
- data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ml_IN/katello.po +148 -4
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/katello.po +148 -4
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po +148 -4
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/katello.po +148 -4
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/katello.po +148 -4
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po +148 -4
- data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl_PL/katello.po +148 -4
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/katello.po +148 -4
- data/locale/pt_BR/katello.po +147 -3
- data/locale/ro/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro/katello.po +148 -4
- data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro_RO/katello.po +148 -4
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +148 -4
- data/locale/sl/LC_MESSAGES/katello.mo +0 -0
- data/locale/sl/katello.po +148 -4
- data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
- data/locale/sv_SE/katello.po +148 -4
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +148 -4
- data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta_IN/katello.po +148 -4
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/katello.po +148 -4
- data/locale/tr/LC_MESSAGES/katello.mo +0 -0
- data/locale/tr/katello.po +148 -4
- data/locale/vi/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi/katello.po +148 -4
- data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi_VN/katello.po +148 -4
- data/locale/zh/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh/katello.po +148 -4
- data/locale/zh_CN/katello.po +147 -3
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +148 -4
- data/package.json +0 -1
- data/webpack/components/Content/Details/__tests__/__snapshots__/ContentDetails.test.js.snap +2 -2
- data/webpack/components/OptionTooltip/OptionTooltip.scss +1 -1
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +6 -1
- data/webpack/components/extensions/Hosts/ActionsBar/index.js +11 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCVModal/BulkChangeHostCVModal.js +1 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCVModal/actions.js +1 -2
- data/webpack/components/extensions/Hosts/BulkActions/BulkErrataWizard/04_ReviewFooter.js +1 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkPackagesWizard/04_ReviewFooter.js +1 -1
- data/webpack/components/extensions/Hosts/BulkActions/BulkRepositorySetsWizard/01_BulkRepositorySetsTable.js +371 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkRepositorySetsWizard/03_Review.js +79 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkRepositorySetsWizard/03_ReviewFooter.js +73 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkRepositorySetsWizard/BulkRepositorySetsWizard.js +170 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkRepositorySetsWizard/actions.js +23 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkRepositorySetsWizard/helpers.js +28 -0
- data/webpack/components/extensions/Hosts/BulkActions/BulkRepositorySetsWizard/index.js +23 -0
- data/webpack/components/extensions/RegistrationCommands/fields/SetupContainerRegistryCerts.js +39 -0
- data/webpack/components/extensions/RegistrationCommands/index.js +7 -0
- data/webpack/components/pf3Table/formatters/ellipsisCellFormatter.js +3 -2
- data/webpack/containers/Application/config.js +11 -0
- data/webpack/global_index.js +3 -1
- data/webpack/scenes/FlatpakRemotes/CreateEdit/CreateFlatpakRemoteModal.js +30 -0
- data/webpack/scenes/FlatpakRemotes/CreateEdit/EditFlatpakRemotesModal.js +38 -0
- data/webpack/scenes/FlatpakRemotes/CreateEdit/FlatpakRemoteform.js +218 -0
- data/webpack/scenes/FlatpakRemotes/CreateEdit/__tests__/flatpakRemoteform.test.js +117 -0
- data/webpack/scenes/FlatpakRemotes/Delete/DeleteFlatpakModal.js +59 -0
- data/webpack/scenes/FlatpakRemotes/Details/FlatpakRemoteDetailActions.js +87 -0
- data/webpack/scenes/FlatpakRemotes/Details/FlatpakRemoteDetailReducers.js +23 -0
- data/webpack/scenes/FlatpakRemotes/Details/FlatpakRemoteDetailSelectors.js +16 -0
- data/webpack/scenes/FlatpakRemotes/Details/FlatpakRemoteDetails.js +167 -0
- data/webpack/scenes/FlatpakRemotes/Details/Mirror/MirrorRepositoryModal.js +135 -0
- data/webpack/scenes/FlatpakRemotes/Details/Mirror/__tests__/mirrorRepositoryModal.test.js +167 -0
- data/webpack/scenes/FlatpakRemotes/Details/RemoteRepositories/RemoteRepositoriesTable.js +171 -0
- data/webpack/scenes/FlatpakRemotes/Details/__tests__/flatpakRemoteDetails.fixtures.json +58 -0
- data/webpack/scenes/FlatpakRemotes/Details/__tests__/flatpakRemoteDetails.test.js +90 -0
- data/webpack/scenes/FlatpakRemotes/Details/index.js +4 -0
- data/webpack/scenes/FlatpakRemotes/FlatpakRemotesActions.js +26 -0
- data/webpack/scenes/FlatpakRemotes/FlatpakRemotesConstants.js +15 -0
- data/webpack/scenes/FlatpakRemotes/FlatpakRemotesPage.js +202 -0
- data/webpack/scenes/FlatpakRemotes/FlatpakRemotesSelectors.js +24 -0
- data/webpack/scenes/FlatpakRemotes/__tests__/flatpakRemotesList.fixtures.json +55 -0
- data/webpack/scenes/FlatpakRemotes/__tests__/flatpakRemotesPage.test.js +74 -0
- data/webpack/scenes/FlatpakRemotes/index.js +4 -0
- data/webpack/scenes/Hosts/ChangeContentSource/components/Hosts.js +2 -2
- data/webpack/scenes/RedHatRepositories/components/RecommendedRepositorySetsToggler.scss +1 -1
- data/webpack/scenes/RedHatRepositories/index.scss +1 -1
- data/webpack/scenes/Settings/SettingsSelectors.js +3 -3
- data/webpack/scenes/Settings/index.js +1 -3
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +2 -2
- data/webpack/scenes/Subscriptions/SubscriptionsPage.scss +1 -1
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +0 -21
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +0 -44
- data/webpack/scenes/Subscriptions/index.js +1 -3
- metadata +38 -21
- data/webpack/scenes/Settings/SettingsConstants.js +0 -2
- data/webpack/scenes/Settings/SettingsReducer.js +0 -19
@@ -9,6 +9,7 @@ module Katello
|
|
9
9
|
begin
|
10
10
|
options = resource_class.respond_to?(:completer_scope_options) ? resource_class.completer_scope_options(params[:search]) : {}
|
11
11
|
items = resource_class.where(:id => self.index_relation).complete_for(params[:search], options)
|
12
|
+
items = filter_autocomplete_items(items)
|
12
13
|
items = items.map do |item|
|
13
14
|
category = ['and', 'or', 'not', 'has'].include?(item.to_s.sub(/^.*\s+/, '')) ? _('Operators') : ''
|
14
15
|
part = item.to_s.sub(/^.*\b(and|or)\b/i) { |match| match.sub(/^.*\s+/, '') }
|
@@ -20,6 +21,22 @@ module Katello
|
|
20
21
|
end
|
21
22
|
render :json => items
|
22
23
|
end
|
24
|
+
|
25
|
+
protected
|
26
|
+
|
27
|
+
def filter_autocomplete_items(items)
|
28
|
+
rejected_patterns = rejected_autocomplete_items
|
29
|
+
return items if rejected_patterns.empty?
|
30
|
+
|
31
|
+
items.reject do |item|
|
32
|
+
item_string = item.to_s.downcase
|
33
|
+
rejected_patterns.any? { |pattern| item_string.include?(pattern.downcase) }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def rejected_autocomplete_items
|
38
|
+
[]
|
39
|
+
end
|
23
40
|
end
|
24
41
|
end
|
25
42
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Actions
|
2
|
+
module Helpers
|
3
|
+
module SmartProxySyncHelper
|
4
|
+
def schedule_async_repository_proxy_sync(repository)
|
5
|
+
return unless Setting[:foreman_proxy_content_auto_sync]
|
6
|
+
if SmartProxy.unscoped.pulpcore_proxies_with_environment(repository.environment).exists?
|
7
|
+
ForemanTasks.async_task(::Actions::Katello::Repository::CapsuleSync, repository)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -2,6 +2,8 @@ module Actions
|
|
2
2
|
module Katello
|
3
3
|
module ContentView
|
4
4
|
class AddRollingRepoClone < Actions::EntryAction
|
5
|
+
include Helpers::SmartProxySyncHelper
|
6
|
+
|
5
7
|
def plan(content_view, repository_ids)
|
6
8
|
library = content_view.organization.library
|
7
9
|
clone_ids = []
|
@@ -27,10 +29,8 @@ module Actions
|
|
27
29
|
end
|
28
30
|
|
29
31
|
def run
|
30
|
-
|
31
|
-
|
32
|
-
ForemanTasks.async_task(::Actions::Katello::Repository::CapsuleSync, repo)
|
33
|
-
end
|
32
|
+
::Katello::Repository.where(id: input[:repository_ids]).each do |repository|
|
33
|
+
schedule_async_repository_proxy_sync(repository)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
@@ -7,22 +7,27 @@ module Actions
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def plan(content_view, environment)
|
10
|
+
env_smart_proxies = SmartProxy.unscoped.with_environment(environment)
|
11
|
+
smart_proxies = env_smart_proxies.select { |sp| sp.authorized?(:manage_capsule_content) && sp.authorized?(:view_capsule_content) }
|
10
12
|
sequence do
|
11
13
|
concurrence do
|
12
|
-
smart_proxies = SmartProxy.unscoped.with_environment(environment).select { |sp| sp.authorized?(:manage_capsule_content) && sp.authorized?(:view_capsule_content) }
|
13
14
|
unless smart_proxies.blank?
|
14
15
|
plan_action(::Actions::BulkAction, ::Actions::Katello::CapsuleContent::Sync, smart_proxies.sort,
|
15
16
|
:content_view_id => content_view.id, :environment_id => environment.id, :skip_content_counts_update => true)
|
16
17
|
end
|
17
18
|
end
|
18
19
|
#For Content view triggered capsule sync, we need to update content counts in one action in finalize, instead of one action per CV, per env, per smart proxy
|
19
|
-
plan_self(:content_view_id => content_view.id, :environment_id => environment.id)
|
20
|
+
plan_self(:content_view_id => content_view.id, :environment_id => environment.id, skipped_capsules: (env_smart_proxies - smart_proxies).any?)
|
20
21
|
end
|
21
22
|
end
|
22
23
|
|
23
24
|
def finalize
|
25
|
+
environment = ::Katello::KTEnvironment.find(input[:environment_id])
|
26
|
+
if input[:skipped_capsules]
|
27
|
+
output[:warning] = "Some smart proxies are not authorized for capsule content management or viewing in environment '#{environment.name}'. Skipping sync for those smart proxies."
|
28
|
+
Rails.logger.warn output[:warning]
|
29
|
+
end
|
24
30
|
if Setting[:automatic_content_count_updates]
|
25
|
-
environment = ::Katello::KTEnvironment.find(input[:environment_id])
|
26
31
|
smart_proxies = SmartProxy.unscoped.with_environment(environment).select { |sp| sp.authorized?(:manage_capsule_content) && sp.authorized?(:view_capsule_content) }
|
27
32
|
options = {environment_id: input[:environment_id], content_view_id: input[:content_view_id]}
|
28
33
|
smart_proxies.each do |smart_proxy|
|
@@ -10,8 +10,8 @@ module Actions
|
|
10
10
|
execution_plan_hooks.use :trigger_capsule_sync, :on => :success
|
11
11
|
execution_plan_hooks.use :notify_on_failure, :on => [:failure, :paused]
|
12
12
|
|
13
|
-
# rubocop:disable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity
|
14
|
-
def plan(content_view, description = "", options = {importing: false, syncable: false})
|
13
|
+
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
14
|
+
def plan(content_view, description = "", options = {importing: false, syncable: false})
|
15
15
|
action_subject(content_view)
|
16
16
|
|
17
17
|
content_view.check_ready_to_publish!(**options.slice(:importing, :syncable))
|
@@ -32,8 +32,7 @@ module Actions
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
|
36
|
-
options[:override_components] = include_other_components(options[:override_components], content_view)
|
35
|
+
options[:override_components] = include_other_components(content_view, options[:override_components], options[:major], options[:minor])
|
37
36
|
|
38
37
|
version = version_for_publish(content_view, options)
|
39
38
|
self.version = version
|
@@ -58,13 +57,24 @@ module Actions
|
|
58
57
|
separated_repo_map = separated_repo_mapping(repository_mapping, content_view.solve_dependencies)
|
59
58
|
|
60
59
|
if options[:importing]
|
61
|
-
|
62
|
-
|
60
|
+
handle_importing_content(version, options[:path], options[:metadata])
|
61
|
+
elsif options[:syncable]
|
63
62
|
if separated_repo_map[:pulp3_deb_multicopy].keys.flatten.present?
|
64
|
-
plan_action(Repository::MultiCloneToVersion, separated_repo_map[:pulp3_deb_multicopy], version)
|
63
|
+
plan_action(::Actions::Katello::Repository::MultiCloneToVersion, separated_repo_map[:pulp3_deb_multicopy], version)
|
65
64
|
end
|
66
65
|
if separated_repo_map[:pulp3_yum_multicopy].keys.flatten.present?
|
67
|
-
plan_action(Repository::MultiCloneToVersion, separated_repo_map[:pulp3_yum_multicopy], version)
|
66
|
+
plan_action(::Actions::Katello::Repository::MultiCloneToVersion, separated_repo_map[:pulp3_yum_multicopy], version)
|
67
|
+
end
|
68
|
+
|
69
|
+
# Create import history for syncable imports so they display under hammer's content-import list command.
|
70
|
+
if options[:path] && options[:metadata]
|
71
|
+
plan_action(
|
72
|
+
::Actions::Pulp3::ContentViewVersion::CreateImportHistory,
|
73
|
+
content_view_version_id: version.id,
|
74
|
+
path: options[:path],
|
75
|
+
metadata: options[:metadata],
|
76
|
+
content_view_name: version.content_view.name
|
77
|
+
)
|
68
78
|
end
|
69
79
|
end
|
70
80
|
|
@@ -95,6 +105,7 @@ module Actions
|
|
95
105
|
environment_id: library.id, user_id: ::User.current.id, skip_promotion: options[:skip_promotion])
|
96
106
|
end
|
97
107
|
end
|
108
|
+
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
98
109
|
|
99
110
|
def humanized_name
|
100
111
|
_("Publish")
|
@@ -161,9 +172,25 @@ module Actions
|
|
161
172
|
|
162
173
|
private
|
163
174
|
|
164
|
-
|
175
|
+
# On an upgrade with component overrides, include components from the old content view version that
|
176
|
+
# wouldn't have been carried over otherwise.
|
177
|
+
def include_other_components(content_view, override_components, major, minor)
|
165
178
|
if override_components.present?
|
166
|
-
|
179
|
+
# For incremental updates, we need to get components from the content view version immediately prior to this
|
180
|
+
# version. We do not upgrade components to the latest version on incremental updates.
|
181
|
+
if major.present? && minor.to_i > 0
|
182
|
+
prev_minor_version = content_view.versions.find_by(major: major, minor: (minor - 1))
|
183
|
+
unless prev_minor_version
|
184
|
+
fail _("During incremental update, the previous content view version '%s' could not be found.") % "#{content_view.name} #{major}.#{minor - 1}"
|
185
|
+
end
|
186
|
+
components_to_test = prev_minor_version.components
|
187
|
+
|
188
|
+
# For major versions, fetch the latest component versions from the content view.
|
189
|
+
else
|
190
|
+
components_to_test = content_view.components
|
191
|
+
end
|
192
|
+
|
193
|
+
components_to_test.each do |component|
|
167
194
|
component_has_override = override_components.detect do |override_component|
|
168
195
|
component.content_view_id == override_component.content_view_id
|
169
196
|
end
|
@@ -207,14 +234,14 @@ module Actions
|
|
207
234
|
::Katello::KTEnvironment.where(:id => environment_ids)
|
208
235
|
end
|
209
236
|
|
210
|
-
def
|
237
|
+
def handle_importing_content(version, path = nil, metadata = nil)
|
211
238
|
sequence do
|
212
239
|
plan_action(::Actions::Pulp3::Orchestration::ContentViewVersion::Import, version, { path: path, metadata: metadata })
|
213
240
|
concurrence do
|
214
241
|
version.importable_repositories.pluck(:id).each do |id|
|
215
242
|
# need to force full_indexing for these version repositories
|
216
243
|
# on import. This will then help us correctly copy version units to the library
|
217
|
-
plan_action(Katello::Repository::IndexContent, id: id, full_index: true)
|
244
|
+
plan_action(::Actions::Katello::Repository::IndexContent, id: id, full_index: true)
|
218
245
|
end
|
219
246
|
end
|
220
247
|
concurrence do
|
@@ -3,6 +3,7 @@ module Actions
|
|
3
3
|
module Flatpak
|
4
4
|
class MirrorRemoteRepository < Actions::EntryAction
|
5
5
|
def plan(remote_repository, product)
|
6
|
+
action_subject(remote_repository)
|
6
7
|
repo_params = {
|
7
8
|
name: remote_repository.name,
|
8
9
|
label: remote_repository.label,
|
@@ -15,7 +16,7 @@ module Actions
|
|
15
16
|
upstream_username: remote_repository.flatpak_remote.username,
|
16
17
|
upstream_password: remote_repository.flatpak_remote.token,
|
17
18
|
unprotected: true,
|
18
|
-
mirroring_policy:
|
19
|
+
mirroring_policy: Setting[:default_non_yum_mirroring_policy],
|
19
20
|
}
|
20
21
|
root = product.add_repo(repo_params)
|
21
22
|
plan_action(::Actions::Katello::Repository::CreateRoot, root)
|
@@ -9,14 +9,24 @@ module Actions
|
|
9
9
|
def plan(repo)
|
10
10
|
if repo.node_syncable?
|
11
11
|
concurrence do
|
12
|
-
|
12
|
+
env_smart_proxies = SmartProxy.unscoped.with_environment(repo.environment)
|
13
|
+
smart_proxies = env_smart_proxies.select { |sp| sp.authorized?(:manage_capsule_content) && sp.authorized?(:view_capsule_content) }
|
13
14
|
unless smart_proxies.blank?
|
14
15
|
plan_action(::Actions::BulkAction, ::Actions::Katello::CapsuleContent::Sync, smart_proxies,
|
15
16
|
:repository_id => repo.id)
|
16
17
|
end
|
18
|
+
plan_self(environment_id: repo.environment.id, skipped_capsules: (env_smart_proxies - smart_proxies).any?)
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
22
|
+
|
23
|
+
def finalize
|
24
|
+
environment = ::Katello::KTEnvironment.find(input[:environment_id])
|
25
|
+
if input[:skipped_capsules]
|
26
|
+
output[:warning] = "Some smart proxies are not authorized for capsule content management or viewing in environment '#{environment.name}'. Skipping sync for those smart proxies."
|
27
|
+
Rails.logger.warn output[:warning]
|
28
|
+
end
|
29
|
+
end
|
20
30
|
end
|
21
31
|
end
|
22
32
|
end
|
@@ -4,6 +4,7 @@ module Actions
|
|
4
4
|
module Repository
|
5
5
|
class ImportUpload < Actions::EntryAction
|
6
6
|
include Helpers::RollingCVRepos
|
7
|
+
include Helpers::SmartProxySyncHelper
|
7
8
|
|
8
9
|
# rubocop:disable Metrics/MethodLength
|
9
10
|
def plan(repository, uploads, options = {})
|
@@ -63,9 +64,7 @@ module Actions
|
|
63
64
|
|
64
65
|
def run
|
65
66
|
repository = ::Katello::Repository.find(input[:repository_id])
|
66
|
-
if input[:sync_capsule]
|
67
|
-
ForemanTasks.async_task(Katello::Repository::CapsuleSync, repository)
|
68
|
-
end
|
67
|
+
schedule_async_repository_proxy_sync(repository) if input[:sync_capsule]
|
69
68
|
output[:upload_results] = results_to_json(input[:upload_results])
|
70
69
|
rescue ::Katello::Errors::CapsuleCannotBeReached # skip any capsules that cannot be connected to
|
71
70
|
end
|
@@ -6,6 +6,7 @@ module Actions
|
|
6
6
|
extend ApipieDSL::Class
|
7
7
|
include Helpers::Presenter
|
8
8
|
include Helpers::RollingCVRepos
|
9
|
+
include Helpers::SmartProxySyncHelper
|
9
10
|
include ::Actions::ObservableAction
|
10
11
|
middleware.use Actions::Middleware::ExecuteIfContentsChanged
|
11
12
|
|
@@ -72,7 +73,7 @@ module Actions
|
|
72
73
|
update_rolling_content_views_async(repo, input[:contents_changed])
|
73
74
|
end
|
74
75
|
repo.clear_smart_proxy_sync_histories if input[:contents_changed]
|
75
|
-
|
76
|
+
schedule_async_repository_proxy_sync(repo)
|
76
77
|
rescue ::Katello::Errors::CapsuleCannotBeReached # skip any capsules that cannot be connected to
|
77
78
|
end
|
78
79
|
|
@@ -7,6 +7,7 @@ module Actions
|
|
7
7
|
module Repository
|
8
8
|
class UploadFiles < Actions::EntryAction
|
9
9
|
include Helpers::RollingCVRepos
|
10
|
+
include Helpers::SmartProxySyncHelper
|
10
11
|
|
11
12
|
def plan(repository, files, content_type = nil, options = {})
|
12
13
|
action_subject(repository)
|
@@ -52,7 +53,7 @@ module Actions
|
|
52
53
|
|
53
54
|
def run
|
54
55
|
repository = ::Katello::Repository.find(input[:repository][:id])
|
55
|
-
|
56
|
+
schedule_async_repository_proxy_sync(repository)
|
56
57
|
rescue ::Katello::Errors::CapsuleCannotBeReached # skip any capsules that cannot be connected to
|
57
58
|
end
|
58
59
|
|
@@ -4,7 +4,7 @@ module Katello
|
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
6
|
def valid_controllers_list
|
7
|
-
@valid_controllers_list ||= (["dashboard", "common_parameters", "/katello/api/v2/host_bootc_images"] +
|
7
|
+
@valid_controllers_list ||= (["dashboard", "common_parameters", "/katello/api/v2/host_bootc_images", "/katello/api/v2/flatpak_remotes", "/katello/api/v2/flatpak_remote_repositories"] +
|
8
8
|
ActiveRecord::Base.connection.tables.map(&:to_s) +
|
9
9
|
Permission.resources.map(&:tableize)).uniq
|
10
10
|
end
|
@@ -187,7 +187,7 @@ module Katello
|
|
187
187
|
def net_http_class
|
188
188
|
if proxy
|
189
189
|
uri = URI(proxy.url) #Net::HTTP::Proxy ignores port as part of the url
|
190
|
-
Net::HTTP::Proxy(
|
190
|
+
Net::HTTP::Proxy(uri.hostname, uri.port, proxy.username, proxy.password)
|
191
191
|
else
|
192
192
|
Net::HTTP
|
193
193
|
end
|
@@ -234,7 +234,21 @@ module Katello
|
|
234
234
|
update_container_repo_list
|
235
235
|
users = container_gateway_users
|
236
236
|
update_user_container_repo_mapping(users) if users.any?
|
237
|
+
if content_facets.any?
|
238
|
+
update_container_gateway_hosts
|
239
|
+
update_host_container_repo_mapping(content_facets)
|
240
|
+
end
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
def update_container_gateway_hosts
|
245
|
+
# This method updates the hosts that are registered with the container gateway.
|
246
|
+
hosts = self.content_facets.map do |facet|
|
247
|
+
{
|
248
|
+
uuid: facet.uuid,
|
249
|
+
}
|
237
250
|
end
|
251
|
+
ProxyAPI::ContainerGateway.new(url: self.url).update_hosts({ hosts: hosts })
|
238
252
|
end
|
239
253
|
|
240
254
|
def update_container_repo_list
|
@@ -271,6 +285,31 @@ module Katello
|
|
271
285
|
ProxyAPI::ContainerGateway.new(url: self.url).user_repository_mapping(user_repo_map)
|
272
286
|
end
|
273
287
|
|
288
|
+
def update_host_container_repo_mapping(content_facets)
|
289
|
+
host_repo_map = { hosts: [] }
|
290
|
+
content_facets.each do |facet|
|
291
|
+
repositories = ::Katello::Repository.readable_docker_catalog(facet.host)
|
292
|
+
host_repo_map[:hosts] << { facet.uuid => build_repo_list(repositories) }
|
293
|
+
end
|
294
|
+
ProxyAPI::ContainerGateway.new(url: self.url).host_repository_mapping(host_repo_map)
|
295
|
+
end
|
296
|
+
|
297
|
+
def update_host_repositories(host)
|
298
|
+
return unless host&.content_facet&.uuid
|
299
|
+
host_repos = { hosts: [] }
|
300
|
+
repositories = ::Katello::Repository.readable_docker_catalog(host)
|
301
|
+
host_repos[:hosts] << { host.content_facet.uuid => build_repo_list(repositories) }
|
302
|
+
ProxyAPI::ContainerGateway.new(url: self.url).update_host_repositories(host_repos)
|
303
|
+
end
|
304
|
+
|
305
|
+
def build_repo_list(repositories)
|
306
|
+
unauthenticated_repositories = unauthenticated_container_repositories
|
307
|
+
repositories.filter_map do |repo|
|
308
|
+
next if repo.container_repository_name.nil? || unauthenticated_repositories.include?(repo.id)
|
309
|
+
{ repository: repo.container_repository_name, auth_required: true }
|
310
|
+
end
|
311
|
+
end
|
312
|
+
|
274
313
|
def unauthenticated_container_repositories
|
275
314
|
::Katello::Repository.joins(:environment).where("#{::Katello::KTEnvironment.table_name}.registry_unauthenticated_pull" => true).select(:id).pluck(:id)
|
276
315
|
end
|
@@ -611,14 +650,13 @@ module Katello
|
|
611
650
|
end
|
612
651
|
|
613
652
|
def rhsm_url
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
#
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
URI("https://#{URI.parse(url).host}:8443/rhsm")
|
653
|
+
if (rhsm_url_setting = setting(SmartProxy::PULP3_FEATURE, 'rhsm_url').presence)
|
654
|
+
URI(rhsm_url_setting)
|
655
|
+
else
|
656
|
+
# TODO: get this from routes
|
657
|
+
uri = URI.parse(Setting[:foreman_url])
|
658
|
+
uri.path = '/rhsm'
|
659
|
+
uri
|
622
660
|
end
|
623
661
|
end
|
624
662
|
|
@@ -42,7 +42,7 @@ module Katello
|
|
42
42
|
|
43
43
|
def self.for_content_facets(content_facets)
|
44
44
|
joins(:content_facets).
|
45
|
-
where("#{Katello::ContentViewEnvironmentContentFacet.table_name}.content_facet_id" => content_facets)
|
45
|
+
where("#{Katello::ContentViewEnvironmentContentFacet.table_name}.content_facet_id" => content_facets).distinct
|
46
46
|
end
|
47
47
|
|
48
48
|
def self.with_label_and_org(label, organization: Organization.current)
|
@@ -31,7 +31,16 @@ module Katello
|
|
31
31
|
scoped_search :on => :title, :rename => :synopsis, :complete_value => true, :only_explicit => true
|
32
32
|
scoped_search :on => :severity, :complete_value => true
|
33
33
|
scoped_search :on => :errata_type, :only_explicit => true
|
34
|
-
scoped_search :on => :errata_type,
|
34
|
+
scoped_search :on => :errata_type,
|
35
|
+
:rename => :type,
|
36
|
+
:operators => ['=', '!='],
|
37
|
+
:complete_value => {
|
38
|
+
'security' => 'security',
|
39
|
+
'bugfix' => 'bugfix',
|
40
|
+
'enhancement' => 'enhancement',
|
41
|
+
'other' => 'other',
|
42
|
+
},
|
43
|
+
:ext_method => :filter_errata_type
|
35
44
|
scoped_search :on => :issued, :complete_value => true
|
36
45
|
scoped_search :on => :updated, :complete_value => true
|
37
46
|
scoped_search :on => :reboot_suggested, :complete_value => true
|
@@ -58,6 +67,22 @@ module Katello
|
|
58
67
|
end
|
59
68
|
end
|
60
69
|
|
70
|
+
def self.filter_errata_type(_key, operator, value)
|
71
|
+
if value.downcase == "other"
|
72
|
+
if ['!=', '<>'].include?(operator)
|
73
|
+
{ conditions: sanitize_sql_for_conditions(["errata_type IN (?)", TYPES]) }
|
74
|
+
else
|
75
|
+
{ conditions: sanitize_sql_for_conditions(["errata_type NOT IN (?)", TYPES]) }
|
76
|
+
end
|
77
|
+
else
|
78
|
+
if ['!=', '<>'].include?(operator)
|
79
|
+
{ conditions: sanitize_sql_for_conditions(["errata_type != ?", value]) }
|
80
|
+
else
|
81
|
+
{ conditions: sanitize_sql_for_conditions(["errata_type = ?", value]) }
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
61
86
|
scope :security, -> { of_type(Erratum::SECURITY) }
|
62
87
|
scope :bugfix, -> { of_type(Erratum::BUGZILLA) }
|
63
88
|
scope :enhancement, -> { of_type(Erratum::ENHANCEMENT) }
|
@@ -17,7 +17,6 @@ module Katello
|
|
17
17
|
scoped_search :on => :name, :complete_value => true
|
18
18
|
scoped_search :on => :organization_id, :complete_value => true, :only_explicit => true, :validator => ScopedSearch::Validators::INTEGER
|
19
19
|
scoped_search :on => :url, :complete_value => true
|
20
|
-
scoped_search :on => :seeded, :complete_value => true
|
21
20
|
scoped_search :on => :registry_url, :complete_value => true
|
22
21
|
|
23
22
|
def self.humanize_class_name(_name = nil)
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module Katello
|
2
2
|
class FlatpakRemoteRepository < Katello::Model
|
3
3
|
include Ext::LabelFromName
|
4
|
+
include ForemanTasks::Concerns::ActionSubject
|
4
5
|
|
5
6
|
belongs_to :flatpak_remote, inverse_of: :remote_repositories
|
6
7
|
has_many :remote_repository_manifests, dependent: :destroy, class_name: 'Katello::FlatpakRemoteRepositoryManifest'
|
@@ -12,6 +13,7 @@ module Katello
|
|
12
13
|
scoped_search :on => :name, :complete_value => true
|
13
14
|
scoped_search :on => :label, :complete_value => true
|
14
15
|
scoped_search :on => :flatpak_remote_id, :complete_value => true, :only_explicit => true, :validator => ScopedSearch::Validators::INTEGER
|
16
|
+
scoped_search :on => :id, :complete_value => true
|
15
17
|
|
16
18
|
alias_attribute :manifests, :remote_repository_manifests
|
17
19
|
|
@@ -26,5 +28,27 @@ module Katello
|
|
26
28
|
def repository_dependencies
|
27
29
|
manifest_dependencies&.map(&:remote_repository)
|
28
30
|
end
|
31
|
+
|
32
|
+
def last_mirrored_task
|
33
|
+
label = ::Actions::Katello::Flatpak::MirrorRemoteRepository.name
|
34
|
+
type = ::Katello::FlatpakRemoteRepository.name
|
35
|
+
ForemanTasks::Task.search_for("label = #{label} and resource_type = #{type} and resource_id = #{self.id}")
|
36
|
+
.order("started_at desc")
|
37
|
+
.first
|
38
|
+
end
|
39
|
+
|
40
|
+
def last_mirrored_status
|
41
|
+
task = last_mirrored_task
|
42
|
+
presenter = Katello::FlatpakRemoteMirrorStatusPresenter.new(self, task)
|
43
|
+
presenter.mirror_progress.slice(:mirror_id, :result, :started_at, :last_mirror_words)
|
44
|
+
end
|
45
|
+
|
46
|
+
def application_name
|
47
|
+
ref = self.manifests.first&.flatpak_ref
|
48
|
+
return nil if ref.blank?
|
49
|
+
|
50
|
+
match = ref.match(%r{\b(?:app|runtime)/([a-zA-Z0-9_.]+)})
|
51
|
+
match ? match[1] : nil
|
52
|
+
end
|
29
53
|
end
|
30
54
|
end
|
@@ -142,7 +142,7 @@ module Katello
|
|
142
142
|
repo_param[:download_policy] = Setting[:default_download_policy]
|
143
143
|
end
|
144
144
|
|
145
|
-
repo_param[:mirroring_policy]
|
145
|
+
repo_param[:mirroring_policy] ||= Katello::Repository::YUM_TYPE == repo_param[:content_type] ? Setting[:default_yum_mirroring_policy] : Setting[:default_non_yum_mirroring_policy]
|
146
146
|
|
147
147
|
repo_param = repo_param.merge(:product_id => self.id)
|
148
148
|
|
@@ -46,6 +46,7 @@ module Katello
|
|
46
46
|
MIRRORING_POLICY_CONTENT = 'mirror_content_only'.freeze
|
47
47
|
MIRRORING_POLICY_COMPLETE = 'mirror_complete'.freeze
|
48
48
|
MIRRORING_POLICIES = [MIRRORING_POLICY_ADDITIVE, MIRRORING_POLICY_COMPLETE, MIRRORING_POLICY_CONTENT].freeze
|
49
|
+
NON_YUM_MIRRORING_POLICIES = [MIRRORING_POLICY_ADDITIVE, MIRRORING_POLICY_CONTENT].freeze
|
49
50
|
|
50
51
|
ALLOWED_UPDATE_FIELDS = ['updated_at', 'content_id'].freeze
|
51
52
|
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Katello
|
2
|
+
class FlatpakRemoteMirrorStatusPresenter
|
3
|
+
include ::ActionView::Helpers::DateHelper
|
4
|
+
include ::Katello::TranslationHelper
|
5
|
+
|
6
|
+
def initialize(remote_repository, task)
|
7
|
+
@remote_repository = remote_repository
|
8
|
+
@task = task
|
9
|
+
end
|
10
|
+
|
11
|
+
def mirror_progress
|
12
|
+
return { state: nil } unless @remote_repository
|
13
|
+
return empty_task(@remote_repository) unless @task
|
14
|
+
|
15
|
+
{
|
16
|
+
id: @remote_repository.id,
|
17
|
+
mirror_id: @task.id,
|
18
|
+
state: format_state(@task),
|
19
|
+
raw_state: raw_state(@task),
|
20
|
+
result: @task.result,
|
21
|
+
started_at: @task.started_at,
|
22
|
+
last_mirror_words: time_ago_in_words(@task.started_at),
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def empty_task(remote_repository)
|
29
|
+
{ id: remote_repository.id, progress: {}, state: "Never mirrored or task cleaned up", raw_state: "never_mirrored" }
|
30
|
+
end
|
31
|
+
|
32
|
+
def raw_state(task)
|
33
|
+
return 'error' if task.result == 'error' || task.result == 'warning'
|
34
|
+
task.state
|
35
|
+
end
|
36
|
+
|
37
|
+
def format_state(task)
|
38
|
+
task.state
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -10,7 +10,7 @@ template_inputs:
|
|
10
10
|
input_type: user
|
11
11
|
required: false
|
12
12
|
- name: Application name
|
13
|
-
description:
|
13
|
+
description: Full Flatpak app ID (e.g. org.mozilla.firefox). Avoid short names like firefox to ensure the correct app is installed.
|
14
14
|
input_type: user
|
15
15
|
required: true
|
16
16
|
- name: Launch a session bus instance
|
@@ -28,4 +28,19 @@ template_inputs:
|
|
28
28
|
app_name = input('Application name')
|
29
29
|
use_dbus_session = input('Launch a session bus instance') == 'true'
|
30
30
|
%>
|
31
|
-
|
31
|
+
<% if use_dbus_session %>
|
32
|
+
sudo dbus-run-session bash -c '
|
33
|
+
echo "Installing flatpak app <%= app_name %> from <%= remote_name %>"
|
34
|
+
if ! output=$(flatpak install <%= remote_name %> <%= app_name %> --assumeyes 2>&1); then
|
35
|
+
echo "$output"
|
36
|
+
echo "Flatpak install failed"
|
37
|
+
exit 1
|
38
|
+
fi
|
39
|
+
echo "$output"
|
40
|
+
'
|
41
|
+
dbus_status=$?
|
42
|
+
sudo pkill -TERM -f flatpak-oci-authenticator || true
|
43
|
+
exit $dbus_status
|
44
|
+
<% else %>
|
45
|
+
sudo flatpak install <%= remote_name %> <%= app_name %> --assumeyes
|
46
|
+
<% end %>
|
@@ -9,21 +9,35 @@ template_inputs:
|
|
9
9
|
description: URL of container registry
|
10
10
|
input_type: user
|
11
11
|
required: true
|
12
|
+
- name: Set up certificate authentication
|
13
|
+
description: Set up certificate authentication for the registry. You can ignore username/password if using certificate authentication.
|
14
|
+
input_type: user
|
15
|
+
required: false
|
16
|
+
options: "true\r\nfalse"
|
17
|
+
advanced: false
|
18
|
+
value_type: plain
|
19
|
+
default: 'false'
|
12
20
|
- name: Username
|
13
21
|
description: Username for container registry login
|
14
22
|
input_type: user
|
15
|
-
required:
|
23
|
+
required: false
|
16
24
|
- name: Password
|
17
25
|
description: Password/Access token for container registry login
|
18
26
|
input_type: user
|
19
|
-
required:
|
27
|
+
required: false
|
20
28
|
hidden_value: true
|
21
29
|
%>
|
22
30
|
|
23
31
|
<%
|
24
32
|
server_url = input('Flatpak registry URL')
|
33
|
+
setup_cert_auth = input('Set up certificate authentication')
|
25
34
|
username = input('Username')
|
26
35
|
password = input('Password')
|
27
36
|
%>
|
28
37
|
|
29
|
-
|
38
|
+
<% if truthy?(setup_cert_auth) -%>
|
39
|
+
<% server_hostname = server_url.gsub(/https?:\/\//, '').split('/').first %>
|
40
|
+
<%= snippet('container_certs_setup', variables: { registration_host: server_hostname }) -%>
|
41
|
+
<% else -%>
|
42
|
+
echo <%= shell_escape(password) %> | sudo podman login <%= server_url %> --username <%= username %> --password-stdin --authfile /etc/flatpak/oci-auth.json
|
43
|
+
<% end -%>
|
@@ -7,7 +7,7 @@ feature: katello_errata_install_by_search
|
|
7
7
|
provider_type: script
|
8
8
|
template_inputs:
|
9
9
|
- name: Errata search query
|
10
|
-
description: Filter criteria for errata to be installed.
|
10
|
+
description: Filter criteria for errata to be installed. IMPORTANT- If left blank, the job will attempt to install all applicable errata.
|
11
11
|
input_type: user
|
12
12
|
required: false
|
13
13
|
foreign_input_sets:
|