katello 4.8.4 → 4.9.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/hosts/host_and_hostgroup_edit.js +40 -4
- data/app/assets/javascripts/katello/locale/bn/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/cs/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/de/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/en/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/es/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/fr/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/gu/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/hi/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/it/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/ja/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/ka/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/kn/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/ko/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/locale/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/mr/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/or/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/pa/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/pt/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/ru/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/ta/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/te/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +1 -0
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +1 -0
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +10 -0
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +1 -0
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +2 -0
- data/app/controllers/katello/api/v2/content_views_controller.rb +22 -12
- data/app/controllers/katello/api/v2/environments_controller.rb +5 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -2
- data/app/controllers/katello/api/v2/organizations_controller.rb +11 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +4 -3
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +13 -4
- data/app/controllers/katello/api/v2/simple_content_access_controller.rb +1 -3
- data/app/controllers/katello/concerns/api/api_controller.rb +2 -2
- data/app/controllers/katello/concerns/content_facet_hosts_controller_extensions.rb +1 -1
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +6 -4
- data/app/lib/actions/candlepin/product/content_add.rb +13 -1
- data/app/lib/actions/candlepin/product/content_update.rb +2 -1
- data/app/lib/actions/katello/agent_action.rb +3 -4
- data/app/lib/actions/katello/bulk_agent_action.rb +1 -4
- data/app/lib/actions/katello/content_view/publish.rb +1 -0
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +1 -0
- data/app/lib/actions/katello/host/update_content_view.rb +2 -4
- data/app/lib/actions/katello/organization/simple_content_access/enable.rb +0 -10
- data/app/lib/actions/katello/organization/simple_content_access/toggle.rb +2 -12
- data/app/lib/actions/katello/product/content_create.rb +2 -2
- data/app/lib/actions/katello/repository/destroy.rb +15 -7
- data/app/lib/actions/katello/repository/update.rb +23 -1
- data/app/lib/actions/pulp3/abstract_async_task.rb +2 -0
- data/app/lib/actions/pulp3/orchestration/repository/generate_metadata.rb +5 -12
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +34 -2
- data/app/lib/katello/event_daemon/runner.rb +8 -4
- data/app/lib/katello/repo_discovery.rb +3 -1
- data/app/lib/katello/resources/cdn/katello_cdn.rb +4 -8
- data/app/lib/katello/util/default_enablement_migrator.rb +183 -0
- data/app/models/katello/activation_key.rb +4 -0
- data/app/models/katello/alternate_content_source.rb +13 -8
- data/app/models/katello/candlepin/repository_mapper.rb +0 -1
- data/app/models/katello/concerns/content_view_filter_rule_common.rb +42 -0
- data/app/models/katello/concerns/host_managed_extensions.rb +9 -40
- data/app/models/katello/concerns/smart_proxy_extensions.rb +24 -23
- data/app/models/katello/content.rb +9 -0
- data/app/models/katello/content_view.rb +99 -4
- data/app/models/katello/content_view_environment_content_facet.rb +12 -0
- data/app/models/katello/content_view_filter.rb +5 -1
- data/app/models/katello/content_view_package_filter_rule.rb +0 -1
- data/app/models/katello/content_view_repository.rb +0 -1
- data/app/models/katello/content_view_version.rb +26 -0
- data/app/models/katello/docker_meta_tag.rb +4 -0
- data/app/models/katello/host/content_facet.rb +2 -0
- data/app/models/katello/kt_environment.rb +13 -3
- data/app/models/katello/ping.rb +1 -1
- data/app/models/katello/product.rb +1 -1
- data/app/models/katello/product_content.rb +13 -15
- data/app/models/katello/root_repository.rb +21 -2
- data/app/models/katello/sync_plan.rb +2 -6
- data/app/presenters/katello/host_package_presenter.rb +5 -3
- data/app/services/katello/product_content_finder.rb +6 -1
- data/app/services/katello/pulp3/alternate_content_source.rb +5 -0
- data/app/services/katello/pulp3/module_stream.rb +2 -12
- data/app/services/katello/pulp3/repository/yum.rb +3 -0
- data/app/views/foreman/job_templates/install_errata.erb +4 -4
- data/app/views/foreman/job_templates/install_errata_-_katello_ansible_default.erb +4 -7
- data/app/views/foreman/job_templates/install_errata_by_search_query.erb +5 -6
- data/app/views/katello/api/v2/activation_keys/base.json.rabl +6 -0
- data/app/views/katello/api/v2/common/destroy.json.rabl +2 -1
- data/app/views/katello/api/v2/content_credentials/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_facet/base.json.rabl +10 -9
- data/app/views/katello/api/v2/content_view_repositories/show_all.json.rabl +6 -0
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +11 -1
- data/app/views/katello/api/v2/content_views/base.json.rabl +3 -0
- data/app/views/katello/api/v2/docker_tags/_base.json.rabl +4 -0
- data/app/views/katello/api/v2/environments/show.json.rabl +10 -0
- data/app/views/katello/api/v2/host_subscriptions/show.json.rabl +1 -0
- data/app/views/katello/api/v2/repositories/index.json.rabl +6 -0
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -0
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +8 -2
- data/app/views/overrides/activation_keys/_host_environment_select.html.erb +22 -15
- data/app/views/smart_proxies/_disk_usage.html.erb +2 -0
- data/ca/redhat-uep.pem +53 -53
- data/db/migrate/20220228173251_remove_drpm_from_ignorable_content.rb +0 -1
- data/db/migrate/20230328180352_add_applied_filters_to_katello_content_view_versions.rb +5 -0
- data/db/migrate/20230503190626_add_metadata_expire_to_root.rb +5 -0
- data/db/seeds.d/111-upgrade_tasks.rb +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +16 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +4 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-repository-sets.html +15 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-subscriptions.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/katello-agent-notice.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/views/content-credentials.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-host-bulk-module-streams-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-environment-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +10 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-host-collections-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-repository-sets-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-traces-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +0 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/deb.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/debs/details/views/deb-info.html +12 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/docker-tag-repositories.controller.js +43 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-details.html +7 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-environments.html +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-info.html +0 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-repositories.html +60 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/docker-tags.controller.js +0 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/docker-tags.routes.js +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/views/docker-tags.html +0 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum-content-hosts.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-content-hosts.html +5 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-packages.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +7 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-add-hosts.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-hosts.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-add-hosts.html +4 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-hosts-list.html +4 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +590 -175
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn_IN.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ca.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/cs_CZ.po +5204 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_AT.po +5153 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_DE.po +5159 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/el.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_GB.po +5158 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_US.po +5153 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/et_EE.po +5153 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gl.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gu.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/he_IL.po +5191 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/hi.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/id.po +5136 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +5303 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ka.po +34 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/kn.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ml_IN.po +5153 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/mr.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/nl_NL.po +5161 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/or.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pa.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl.po +5192 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl_PL.po +5187 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt.po +5174 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro.po +5170 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro_RO.po +5170 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +5279 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sl.po +5191 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sv_SE.po +5158 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta_IN.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/te.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/tr.po +5157 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi.po +5136 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi_VN.po +5136 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh.po +5136 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +38 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/views/organization-selector.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/package.controller.js +8 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/package-info.html +12 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-advanced-sync-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-http-proxy-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-sync-plan-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +13 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +12 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details-reclaim-space-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +17 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-docker-manifest-lists.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-docker-manifests.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-docker-tags.html +0 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +6 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +20 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories-reclaim-space-modal.html +1 -1
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/activation_keys.scss +13 -0
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/bastion_katello.scss +1 -0
- data/lib/katello/engine.rb +0 -7
- data/lib/katello/plugin.rb +18 -15
- data/lib/katello/tasks/upgrades/4.9/update_custom_products_enablement.rake +11 -0
- data/lib/katello/version.rb +1 -1
- data/locale/action_names.rb +1 -2
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +215 -183
- data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn_IN/katello.po +8901 -0
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po +8900 -0
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/katello.po +216 -185
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +8906 -0
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +223 -191
- data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_AT/katello.po +8897 -0
- data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_DE/katello.po +8906 -0
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po +8900 -0
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/katello.po +215 -183
- data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_GB/katello.po +8902 -0
- data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_US/katello.po +8897 -0
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +218 -187
- data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
- data/locale/et_EE/katello.po +8897 -0
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +233 -204
- data/locale/gl/LC_MESSAGES/katello.mo +0 -0
- data/locale/gl/katello.po +8900 -0
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/katello.po +215 -183
- data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
- data/locale/he_IL/katello.po +8902 -0
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/katello.po +215 -183
- data/locale/id/LC_MESSAGES/katello.mo +0 -0
- data/locale/id/katello.po +8896 -0
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +216 -185
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +233 -202
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +223 -191
- data/locale/katello.pot +1844 -1796
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/katello.po +215 -183
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +216 -183
- data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ml_IN/katello.po +8897 -0
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/katello.po +215 -183
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po +8907 -0
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/katello.po +215 -183
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/katello.po +215 -183
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po +8903 -0
- data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl_PL/katello.po +8899 -0
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/katello.po +215 -183
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +218 -187
- data/locale/ro/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro/katello.po +8897 -0
- data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro_RO/katello.po +8898 -0
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +216 -184
- data/locale/sl/LC_MESSAGES/katello.mo +0 -0
- data/locale/sl/katello.po +8901 -0
- data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
- data/locale/sv_SE/katello.po +8903 -0
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +215 -183
- data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta_IN/katello.po +8901 -0
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/katello.po +215 -183
- data/locale/tr/LC_MESSAGES/katello.mo +0 -0
- data/locale/tr/katello.po +8900 -0
- data/locale/vi/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi/katello.po +8896 -0
- data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi_VN/katello.po +8897 -0
- data/locale/zh/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh/katello.po +8896 -0
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +233 -202
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +216 -183
- data/package.json +1 -0
- data/webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js +1 -0
- data/webpack/components/Bookmark/AddBookmarkModal.js +8 -2
- data/webpack/components/Content/ContentTable.js +1 -0
- data/webpack/components/Content/Details/ContentDetailInfo.js +1 -1
- data/webpack/components/Content/Details/ContentDetails.js +3 -3
- data/webpack/components/Content/Details/__tests__/__snapshots__/ContentDetailInfo.test.js.snap +1 -0
- data/webpack/components/Content/Details/__tests__/__snapshots__/ContentDetails.test.js.snap +4 -0
- data/webpack/components/Content/__tests__/__snapshots__/ContentTable.test.js.snap +1 -0
- data/webpack/components/RoutedTabs/index.js +1 -1
- data/webpack/components/SelectOrg/SetOrganization.js +7 -1
- data/webpack/components/Table/EmptyStateMessage.js +8 -3
- data/webpack/components/Table/MainTable.js +8 -2
- data/webpack/components/TooltipButton/TooltipButton.js +2 -2
- data/webpack/components/TooltipButton/__snapshots__/TooltipButton.test.js.snap +3 -0
- data/webpack/components/extensions/HostDetails/ActionsBar/index.js +2 -0
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.js +81 -24
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.scss +3 -0
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +10 -3
- data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/HostContentViewActions.js +8 -0
- data/webpack/components/extensions/HostDetails/Cards/SystemPurposeCard/SystemPurposeCard.js +3 -2
- data/webpack/components/extensions/HostDetails/DetailsTabCards/HwPropertiesCard.js +3 -1
- data/webpack/components/extensions/HostDetails/Tabs/ContentTab/SecondaryTabsRoutes.js +1 -1
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +0 -4
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErratumExpansionDetail.js +2 -2
- data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +1 -5
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +20 -0
- data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionConstants.js +1 -0
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsConstants.js +16 -0
- data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +54 -8
- data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesEnabler.js +1 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/ActivationKeys.test.js.snap +8 -1
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/Force.test.js.snap +1 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/IgnoreSubmanErrors.test.js.snap +1 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/LifeCycleEnvironment.test.js.snap +1 -0
- data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +2 -1
- data/webpack/components/extensions/RegistrationCommands/fields/Force.js +1 -0
- data/webpack/components/extensions/RegistrationCommands/fields/IgnoreSubmanErrors.js +1 -0
- data/webpack/components/extensions/RegistrationCommands/fields/LifecycleEnvironment.js +1 -0
- data/webpack/components/extensions/about/index.js +2 -2
- data/webpack/components/pf3Table/components/Table.js +1 -0
- data/webpack/scenes/AlternateContentSources/ACSIndexPage.js +6 -1
- data/webpack/scenes/AlternateContentSources/Create/Steps/ACSCredentials.js +15 -2
- data/webpack/scenes/AlternateContentSources/Create/Steps/SelectSource.js +6 -1
- data/webpack/scenes/AlternateContentSources/Details/ACSExpandableDetails.js +4 -1
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditCredentials.js +9 -0
- data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +1 -0
- data/webpack/scenes/Content/Details/ContentDetails.js +4 -2
- data/webpack/scenes/Content/Details/ContentRepositories.js +1 -1
- data/webpack/scenes/Content/GenericContentPage.js +1 -1
- data/webpack/scenes/Content/Table/ContentTable.js +2 -2
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +4 -0
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignActivationKeysForm.js +26 -13
- data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionReassignHostsForm.js +27 -13
- data/webpack/scenes/ContentViews/Delete/__tests__/cvVersionsData.fixtures.json +8 -4
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +3 -2
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentEnvironments.js +1 -1
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +25 -24
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +19 -3
- data/webpack/scenes/ContentViews/Details/ContentViewDetailReducer.js +6 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +2 -0
- data/webpack/scenes/ContentViews/Details/Filters/Add/CVFilterAddModal.js +2 -2
- data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositoryTable.js +15 -2
- data/webpack/scenes/ContentViews/Details/Filters/ArtifactsWithNoErrata.js +5 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +13 -9
- data/webpack/scenes/ContentViews/Details/Filters/CVDebFilterContent.js +19 -6
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +5 -1
- data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +50 -51
- data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +45 -44
- data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +45 -44
- data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +13 -8
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +4 -3
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +5 -2
- data/webpack/scenes/ContentViews/Details/Filters/FilterRuleConstants.js +6 -0
- data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVDebMatchContentModal.js +3 -2
- data/webpack/scenes/ContentViews/Details/Filters/Rules/ContainerTag/AddEditContainerTagRuleModal.js +10 -2
- data/webpack/scenes/ContentViews/Details/Filters/Rules/DebPackage/AddEditDebPackageRuleModal.js +5 -1
- data/webpack/scenes/ContentViews/Details/Filters/Rules/Package/AddEditPackageRuleModal.js +7 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvErrataIDFilter.test.js +37 -24
- data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +3 -3
- data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +78 -8
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +27 -8
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailNoReposAdded.fixtures.json +13 -0
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/ActionSummary.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ReassignActivationKeys.js +16 -16
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ReassignHosts.js +16 -16
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/BulkDeleteVersions.fixtures.json +6 -3
- data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/contentViewVersion.fixtures.json +10 -5
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +9 -2
- data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareTable.js +1 -0
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/contentViewVersionOneDetials.fixtures.json +2 -1
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/contentViewVersionThreeDetails.fixtures.json +2 -1
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/contentViewVersionTwoDetails.fixtures.json +2 -1
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/contentViewVersions.fixtures.json +12 -6
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/emptyStateCVVersionOneDetails.fixtures.json +2 -1
- data/webpack/scenes/ContentViews/Details/Versions/Compare/__tests__/emptyStateCVVersionTwoDetails.fixtures.json +2 -1
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +25 -4
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVEnvironmentSelectionForm.js +4 -2
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignActivationKeysForm.js +26 -13
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVReassignHostsForm.js +30 -17
- data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionRemoveReview.js +1 -0
- data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/versionsResponseData.fixtures.json +6 -3
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +2 -2
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +8 -1
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetails.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsHeader.js +55 -6
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionComponent.fixtures.json +6 -3
- data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.fixtures.json +2 -1
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +8 -4
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionsWithTask.fixtures.json +4 -2
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetails.fixtures.json +1 -0
- data/webpack/scenes/ContentViews/Publish/CVPublishFinish.js +4 -2
- data/webpack/scenes/ContentViews/Publish/CVPublishForm.js +30 -3
- data/webpack/scenes/ContentViews/Publish/CVPublishReview.js +24 -2
- data/webpack/scenes/ContentViews/Publish/cvPublishForm.scss +4 -0
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +2 -2
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +1 -3
- data/webpack/scenes/ContentViews/__tests__/mockDetails.fixtures.json +2 -1
- data/webpack/scenes/ContentViews/components/ContentViewSelect/ContentViewSelect.js +2 -1
- data/webpack/scenes/ContentViews/components/ContentViewSelect/ContentViewSelectOption.js +3 -2
- data/webpack/scenes/ContentViews/components/ContentViewSelect/helpers.js +32 -0
- data/webpack/scenes/ContentViews/components/ContentViewsCounter.js +52 -42
- data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +1 -0
- data/webpack/scenes/ContentViews/components/FiltersAppliedIcon.js +17 -0
- data/webpack/scenes/ContentViews/components/NeedsPublishIcon.js +45 -0
- data/webpack/scenes/ContentViews/components/NeedsPublishIcon.scss +9 -0
- data/webpack/scenes/ContentViews/expansions/RelatedContentViewComponentsModal.js +1 -1
- data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +49 -22
- data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceTemplate.js +7 -1
- data/webpack/scenes/Hosts/ChangeContentSource/components/FormField.js +1 -0
- data/webpack/scenes/Hosts/ChangeContentSource/components/HostsModal.js +2 -0
- data/webpack/scenes/Hosts/ChangeContentSource/index.js +2 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/__snapshots__/ModuleStreamDetailInfo.test.js.snap +1 -0
- data/webpack/scenes/ModuleStreams/__tests__/__snapshots__/ModuleStreamsTable.test.js.snap +1 -0
- data/webpack/scenes/RedHatRepositories/RedHatRepositoriesPage.js +2 -0
- data/webpack/scenes/RedHatRepositories/__tests__/__snapshots__/RedHatRepositoriesPage.test.js.snap +2 -0
- data/webpack/scenes/RedHatRepositories/components/RecommendedRepositorySetsToggler.js +6 -1
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepositories.js +1 -1
- data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/RecommendedRepositorySetsToggler.test.js.snap +1 -0
- data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/RepositorySetRepositories.test.js.snap +1 -0
- data/webpack/scenes/RedHatRepositories/helpers.js +2 -0
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailAssociations.js +1 -1
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetailInfo.js +2 -2
- data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +4 -4
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailAssociations.test.js.snap +1 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailInfo.test.js.snap +2 -0
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +4 -0
- data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/NetworkSyncForm.js +2 -1
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +5 -4
- data/webpack/scenes/Subscriptions/Manifest/SimpleContentAccess.js +1 -0
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +1 -1
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +3 -1
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +3 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +1 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +5 -6
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/__snapshots__/SubscriptionsToolbar.test.js.snap +60 -5
- data/webpack/utils/useKatelloDocUrl.js +18 -0
- metadata +163 -22
- data/app/lib/actions/katello/organization/simple_content_access/prepare_content_overrides.rb +0 -36
- data/app/lib/katello/util/content_overrides_migrator.rb +0 -98
- data/webpack/components/extensions/HostDetails/common/KatelloAgentDeprecationAlert.js +0 -23
@@ -20,6 +20,7 @@ module Katello
|
|
20
20
|
param :version, String, :desc => N_("Filter versions by version number"), :required => false
|
21
21
|
param :composite_version_id, :number, :desc => N_("Filter versions that are components in the specified composite version"), :required => false
|
22
22
|
param :organization_id, :number, :desc => N_("Organization identifier")
|
23
|
+
param :include_applied_filters, :bool, :desc => N_("Whether or not to return filters applied to the content view version"), :required => false
|
23
24
|
param :triggered_by_id, :number, :desc => N_("Filter composite versions whose publish was triggered by the specified component version"), :required => false
|
24
25
|
param_group :search, Api::V2::ApiController
|
25
26
|
add_scoped_search_description_for(ContentViewVersion)
|
@@ -44,6 +45,7 @@ module Katello
|
|
44
45
|
|
45
46
|
api :GET, "/content_view_versions/:id", N_("Show content view version")
|
46
47
|
param :id, :number, :desc => N_("Content view version identifier"), :required => true
|
48
|
+
param :include_applied_filters, :bool, :desc => N_("Whether or not to return filters applied to the content view version"), :required => false
|
47
49
|
def show
|
48
50
|
respond :resource => @content_view_version
|
49
51
|
end
|
@@ -109,23 +109,14 @@ module Katello
|
|
109
109
|
param :major, :number, :desc => N_("Override the major version number"), :required => false
|
110
110
|
param :minor, :number, :desc => N_("Override the minor version number"), :required => false
|
111
111
|
param :environment_ids, Array, :desc => N_("Identifiers for Lifecycle Environment"), :required => false
|
112
|
-
param :
|
112
|
+
param :publish_only_if_needed, :bool, :desc => N_("Check audited changes and proceed only if content or filters have changed since last publish"), :required => false
|
113
|
+
param :is_force_promote, :bool, :desc => N_("Force content view promotion and bypass lifecycle environment restriction"), :required => false
|
113
114
|
param :repos_units, Array, :desc => N_("Specify the list of units in each repo"), :required => false do
|
114
115
|
param :label, String, :desc => N_("repo label"), :required => true
|
115
116
|
param :rpm_filenames, Array, of: String, :desc => N_("list of rpm filename strings to include in published version"), :required => true
|
116
117
|
end
|
117
118
|
def publish
|
118
|
-
|
119
|
-
fail HttpErrors::BadRequest, _("Directly setting package lists on composite content views is not allowed. Please " \
|
120
|
-
"update the components, then re-publish the composite.")
|
121
|
-
end
|
122
|
-
if params[:major].present? && params[:minor].present? && ContentViewVersion.find_by(:content_view_id => params[:id], :major => params[:major], :minor => params[:minor]).present?
|
123
|
-
fail HttpErrors::BadRequest, _("A CV version already exists with the same major and minor version (%{major}.%{minor})") % {:major => params[:major], :minor => params[:minor]}
|
124
|
-
end
|
125
|
-
|
126
|
-
if params[:major].present? && params[:minor].nil? || params[:major].nil? && params[:minor].present?
|
127
|
-
fail HttpErrors::BadRequest, _("Both major and minor parameters have to be used to override a CV version")
|
128
|
-
end
|
119
|
+
validate_publish_params!
|
129
120
|
|
130
121
|
task = async_task(::Actions::Katello::ContentView::Publish, @content_view, params[:description],
|
131
122
|
:environment_ids => params[:environment_ids],
|
@@ -254,6 +245,25 @@ module Katello
|
|
254
245
|
|
255
246
|
private
|
256
247
|
|
248
|
+
def validate_publish_params!
|
249
|
+
if params[:repos_units].present? && @content_view.composite?
|
250
|
+
fail HttpErrors::BadRequest, _("Directly setting package lists on composite content views is not allowed. Please " \
|
251
|
+
"update the components, then re-publish the composite.")
|
252
|
+
end
|
253
|
+
if params[:major].present? && params[:minor].present? && ContentViewVersion.find_by(:content_view_id => params[:id], :major => params[:major], :minor => params[:minor]).present?
|
254
|
+
fail HttpErrors::BadRequest, _("A CV version already exists with the same major and minor version (%{major}.%{minor})") % {:major => params[:major], :minor => params[:minor]}
|
255
|
+
end
|
256
|
+
|
257
|
+
if params[:major].present? && params[:minor].nil? || params[:major].nil? && params[:minor].present?
|
258
|
+
fail HttpErrors::BadRequest, _("Both major and minor parameters have to be used to override a CV version")
|
259
|
+
end
|
260
|
+
|
261
|
+
if (::Foreman::Cast.to_bool(params[:publish_only_if_needed]) && !@content_view.needs_publish?)
|
262
|
+
fail HttpErrors::BadRequest, _("Content view does not need a publish since there are no audited changes since the last publish." \
|
263
|
+
" Pass check_needs_publish parameter as false if you don't want to check if content view needs a publish.")
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
257
267
|
def ensure_non_default
|
258
268
|
if @content_view.default? && !%w(show history).include?(params[:action])
|
259
269
|
fail HttpErrors::BadRequest, _("The default content view cannot be edited, published, or deleted.")
|
@@ -132,6 +132,7 @@ module Katello
|
|
132
132
|
|
133
133
|
api :GET, "/organizations/:organization_id/environments/paths", N_("List environment paths")
|
134
134
|
param :organization_id, :number, :desc => N_("organization identifier")
|
135
|
+
param :content_source_id, :number, :desc => N_("Show whether each lifecycle environment is associated with the given Smart Proxy id.")
|
135
136
|
param :permission_type, String, :desc => <<-DESC
|
136
137
|
The associated permission type. One of (readable | promotable)
|
137
138
|
Default: readable
|
@@ -142,7 +143,10 @@ module Katello
|
|
142
143
|
else
|
143
144
|
@organization.readable_promotion_paths
|
144
145
|
end
|
145
|
-
|
146
|
+
if params[:content_source_id]
|
147
|
+
@content_source_id = params[:content_source_id].to_i
|
148
|
+
@content_source = SmartProxy.authorized(:view_smart_proxies).find(@content_source_id)
|
149
|
+
end
|
146
150
|
paths = env_paths.inject([]) do |result, path|
|
147
151
|
result << { :environments => [@organization.library] + path.select(&:readable?) }
|
148
152
|
end
|
@@ -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,
|
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
|
|
@@ -326,12 +326,11 @@ module Katello
|
|
326
326
|
|
327
327
|
hosts.each do |host|
|
328
328
|
next unless host.content_facet
|
329
|
+
host.content_facet.content_source = content_source
|
329
330
|
host.content_facet.assign_single_environment(
|
330
331
|
:content_view_id => content_view.id,
|
331
332
|
:environment_id => lifecycle_environment.id
|
332
333
|
)
|
333
|
-
host.content_facet.content_source = content_source
|
334
|
-
|
335
334
|
host.update_candlepin_associations
|
336
335
|
end
|
337
336
|
|
@@ -56,11 +56,22 @@ module Katello
|
|
56
56
|
api :PUT, '/organizations/:id', N_('Update organization')
|
57
57
|
param :id, :number, :desc => N_("organization ID"), :required => true
|
58
58
|
param :redhat_repository_url, String, :desc => N_("Red Hat CDN URL"), deprecated: true
|
59
|
+
param :simple_content_access, :bool, :desc => N_('Whether Simple Content Access should be enabled for the organization.'), :required => false, :default => true
|
59
60
|
param_group :resource
|
60
61
|
def update
|
61
62
|
if params[:redhat_repository_url]
|
62
63
|
sync_task(::Actions::Katello::CdnConfiguration::Update, @organization.cdn_configuration, url: params[:redhat_repository_url])
|
63
64
|
end
|
65
|
+
unless params[:simple_content_access].nil?
|
66
|
+
sca_param = ::Foreman::Cast.to_bool(params[:simple_content_access])
|
67
|
+
if sca_param && !@taxonomy.simple_content_access?(cached: false)
|
68
|
+
# user has requested SCA enable
|
69
|
+
sync_task(::Actions::Katello::Organization::SimpleContentAccess::Enable, params[:id])
|
70
|
+
elsif !sca_param && @taxonomy.simple_content_access?(cached: false)
|
71
|
+
# user has requested SCA disable
|
72
|
+
sync_task(::Actions::Katello::Organization::SimpleContentAccess::Disable, params[:id])
|
73
|
+
end
|
74
|
+
end
|
64
75
|
super
|
65
76
|
end
|
66
77
|
|
@@ -71,7 +71,7 @@ module Katello
|
|
71
71
|
param :http_proxy_id, :number, :desc => N_("ID of a HTTP Proxy")
|
72
72
|
param :arch, String, :desc => N_("Architecture of content in the repository")
|
73
73
|
param :retain_package_versions_count, :number, :desc => N_("The maximum number of versions of each package to keep.")
|
74
|
-
|
74
|
+
param :metadata_expire, :number, :desc => N_("Time to expire yum metadata in seconds. Only relevant for custom yum repositories.")
|
75
75
|
RepositoryTypeManager.generic_remote_options(defined_only: true).each do |option|
|
76
76
|
param option.name, option.type, :desc => N_(option.description)
|
77
77
|
end
|
@@ -580,7 +580,7 @@ module Katello
|
|
580
580
|
# rubocop:disable Metrics/CyclomaticComplexity
|
581
581
|
def repository_params
|
582
582
|
keys = [:download_policy, :mirroring_policy, :sync_policy, :arch, :verify_ssl_on_sync, :upstream_password,
|
583
|
-
:upstream_username, :download_concurrency, :upstream_authentication_token,
|
583
|
+
:upstream_username, :download_concurrency, :upstream_authentication_token, :metadata_expire,
|
584
584
|
{:os_versions => []}, :deb_releases, :deb_components, :deb_architectures, :description,
|
585
585
|
:http_proxy_policy, :http_proxy_id, :retain_package_versions_count, {:ignorable_content => []}
|
586
586
|
]
|
@@ -620,7 +620,8 @@ module Katello
|
|
620
620
|
def construct_repo_from_params(repo_params) # rubocop:disable Metrics/AbcSize
|
621
621
|
root = @product.add_repo(repo_params.slice(:label, :name, :description, :url, :content_type, :arch, :unprotected,
|
622
622
|
:gpg_key, :ssl_ca_cert, :ssl_client_cert, :ssl_client_key,
|
623
|
-
:checksum_type, :download_policy, :http_proxy_policy
|
623
|
+
:checksum_type, :download_policy, :http_proxy_policy,
|
624
|
+
:metadata_expire).to_h.with_indifferent_access)
|
624
625
|
root.docker_upstream_name = repo_params[:docker_upstream_name] if repo_params[:docker_upstream_name]
|
625
626
|
if root.docker?
|
626
627
|
if repo_params[:docker_tags_whitelist].present?
|
@@ -26,7 +26,7 @@ module Katello
|
|
26
26
|
param :enabled, :bool, :required => false, :desc => N_("If true, only return repository sets that have been enabled. Defaults to false")
|
27
27
|
param :with_active_subscription, :bool, :required => false, :desc => N_("If true, only return repository sets that are associated with an active subscriptions")
|
28
28
|
param :organization_id, :number, :desc => N_("organization identifier"), :required => false
|
29
|
-
param :with_custom, :bool, :required => false, :desc => N_("If true, return custom repository sets along with redhat repos")
|
29
|
+
param :with_custom, :bool, :required => false, :desc => N_("If true, return custom repository sets along with redhat repos. Will be ignored if repository_type is supplied.")
|
30
30
|
param :activation_key_id, :number, :desc => N_("activation key identifier"), :required => false
|
31
31
|
param :host_id, :number, :desc => N_("Id of the host"), :required => false
|
32
32
|
param :content_access_mode_all, :bool, :desc => N_("Get all content available, not just that provided by subscriptions.")
|
@@ -34,6 +34,7 @@ module Katello
|
|
34
34
|
param :status, [:enabled, :disabled, :overridden],
|
35
35
|
:desc => N_("Limit content to enabled / disabled / overridden"),
|
36
36
|
:required => false
|
37
|
+
param :repository_type, [:redhat, :custom], :desc => N_("Limit content to Red Hat / custom"), :required => false
|
37
38
|
|
38
39
|
param_group :search, Api::V2::ApiController
|
39
40
|
add_scoped_search_description_for(Katello::ProductContent)
|
@@ -128,6 +129,9 @@ module Katello
|
|
128
129
|
else
|
129
130
|
relation = @product.displayable_product_contents
|
130
131
|
end
|
132
|
+
if %w(custom redhat).include?(params[:repository_type])
|
133
|
+
relation = relation.send(params[:repository_type].to_sym)
|
134
|
+
end
|
131
135
|
|
132
136
|
if ::Foreman::Cast.to_bool(params[:enabled])
|
133
137
|
relation = relation.enabled(@organization)
|
@@ -139,7 +143,10 @@ module Katello
|
|
139
143
|
end
|
140
144
|
|
141
145
|
relation = relation.where(Katello::Content.table_name => {:name => params[:name]}) if params[:name].present?
|
142
|
-
|
146
|
+
# ignore with_custom if repository_type is specified
|
147
|
+
if params[:repository_type].blank?
|
148
|
+
relation = relation.redhat unless ::Foreman::Cast.to_bool(params[:with_custom])
|
149
|
+
end
|
143
150
|
index_relation_with_consumable_overrides(relation)
|
144
151
|
end
|
145
152
|
|
@@ -154,11 +161,13 @@ module Katello
|
|
154
161
|
:match_environment => content_access_mode_env,
|
155
162
|
:consumable => @consumable)
|
156
163
|
unfiltered = relation.merge(content_finder.product_content)
|
157
|
-
return unfiltered unless params[:status]
|
164
|
+
return unfiltered unless params[:status] || params[:repository_type]
|
158
165
|
filtered_ids = ProductContentFinder.wrap_with_overrides(
|
159
166
|
product_contents: unfiltered,
|
160
167
|
overrides: @consumable&.content_overrides,
|
161
|
-
status: params[:status]
|
168
|
+
status: params[:status],
|
169
|
+
repository_type: params[:repository_type]
|
170
|
+
).map(&:id).uniq
|
162
171
|
unfiltered.where(id: filtered_ids)
|
163
172
|
end
|
164
173
|
|
@@ -26,10 +26,8 @@ module Katello
|
|
26
26
|
api :PUT, "/organizations/:organization_id/simple_content_access/enable",
|
27
27
|
N_("Enable simple content access for a manifest")
|
28
28
|
param :organization_id, :number, :desc => N_("Organization ID"), :required => true
|
29
|
-
param :auto_create_overrides, :bool, :desc => N_("Automatically create disabled content overrides for custom products which do not have an attached subscription"), :required => false, :default => true
|
30
29
|
def enable
|
31
|
-
|
32
|
-
task = async_task(::Actions::Katello::Organization::SimpleContentAccess::Enable, params[:organization_id], auto_create_overrides: auto_create)
|
30
|
+
task = async_task(::Actions::Katello::Organization::SimpleContentAccess::Enable, params[:organization_id])
|
33
31
|
respond_for_async :resource => task
|
34
32
|
end
|
35
33
|
|
@@ -19,11 +19,11 @@ module Katello
|
|
19
19
|
|
20
20
|
class_methods do
|
21
21
|
def katello_agent_deprecation_text
|
22
|
-
N_("
|
22
|
+
N_("WARNING: Katello-agent is deprecated and will be removed in %s. Migrate to remote execution now.") % katello_agent_removal_release
|
23
23
|
end
|
24
24
|
|
25
25
|
def katello_agent_removal_release
|
26
|
-
N_("
|
26
|
+
N_("Katello 4.10")
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -6,7 +6,7 @@ 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 params[:host] && params[:host][:content_facet_attributes]
|
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
12
|
Rails.logger.info "set_up_content_view_environment: cv_id=#{cv_id}, env_id=#{env_id}"
|
@@ -57,14 +57,16 @@ module Katello
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
-
def fetch_lifecycle_environment(
|
61
|
-
return
|
60
|
+
def fetch_lifecycle_environment(host_or_hostgroup, options = {})
|
61
|
+
return host_or_hostgroup.single_lifecycle_environment if host_or_hostgroup.try(:single_lifecycle_environment)
|
62
|
+
return host_or_hostgroup.lifecycle_environment if host_or_hostgroup.try(:lifecycle_environment)
|
62
63
|
selected_host_group = options.fetch(:selected_host_group, nil)
|
63
64
|
return selected_host_group.lifecycle_environment if selected_host_group.present?
|
64
65
|
end
|
65
66
|
|
66
|
-
def fetch_content_view(
|
67
|
-
return
|
67
|
+
def fetch_content_view(host_or_hostgroup, options = {})
|
68
|
+
return host_or_hostgroup.single_content_view if host_or_hostgroup.try(:single_content_view)
|
69
|
+
return host_or_hostgroup.content_view if host_or_hostgroup.try(:content_view)
|
68
70
|
selected_host_group = options.fetch(:selected_host_group, nil)
|
69
71
|
return selected_host_group.content_view if selected_host_group.present?
|
70
72
|
end
|
@@ -2,6 +2,8 @@ module Actions
|
|
2
2
|
module Candlepin
|
3
3
|
module Product
|
4
4
|
class ContentAdd < Candlepin::Abstract
|
5
|
+
DEFAULT_ENABLEMENT = false
|
6
|
+
|
5
7
|
input_format do
|
6
8
|
param :product_id
|
7
9
|
param :content_id
|
@@ -10,7 +12,17 @@ module Actions
|
|
10
12
|
|
11
13
|
def run
|
12
14
|
output[:response] = ::Katello::Resources::Candlepin::Product.
|
13
|
-
add_content(input[:owner], input[:product_id], input[:content_id],
|
15
|
+
add_content(input[:owner], input[:product_id], input[:content_id], DEFAULT_ENABLEMENT)
|
16
|
+
end
|
17
|
+
|
18
|
+
def humanized_name
|
19
|
+
_("Add content")
|
20
|
+
end
|
21
|
+
|
22
|
+
# results in correct grammar on Tasks page,
|
23
|
+
# e.g. "Import manifest for organization Default Organization"
|
24
|
+
def humanized_input
|
25
|
+
"for Candlepin product #{input[:product_id]}"
|
14
26
|
end
|
15
27
|
end
|
16
28
|
end
|
@@ -12,6 +12,7 @@ module Actions
|
|
12
12
|
param :content_url
|
13
13
|
param :gpg_key_url
|
14
14
|
param :owner
|
15
|
+
param :metadata_expire
|
15
16
|
end
|
16
17
|
|
17
18
|
def run
|
@@ -25,7 +26,7 @@ module Actions
|
|
25
26
|
arches: input[:arches] || '',
|
26
27
|
requiredTags: input[:os_versions],
|
27
28
|
label: input[:label],
|
28
|
-
metadataExpire: 1,
|
29
|
+
metadataExpire: input[:metadata_expire] || 1,
|
29
30
|
vendor: ::Katello::Provider::CUSTOM)
|
30
31
|
end
|
31
32
|
end
|
@@ -14,10 +14,8 @@ module Actions
|
|
14
14
|
|
15
15
|
def plan(host, options)
|
16
16
|
action_subject(host, :hostname => host.name, :content => options[:content])
|
17
|
-
|
18
|
-
dispatch_history_id = options.dig(:dispatch_histories, host.id.to_s) ||
|
19
|
-
options.dig(:dispatch_histories, host.id.to_i) ||
|
20
|
-
::Katello::Agent::Dispatcher.create_histories(
|
17
|
+
|
18
|
+
dispatch_history_id = options.dig(:dispatch_histories, host.id.to_s) || ::Katello::Agent::Dispatcher.create_histories(
|
21
19
|
host_ids: [host.id]
|
22
20
|
).first.id
|
23
21
|
|
@@ -46,6 +44,7 @@ module Actions
|
|
46
44
|
history.dynflow_execution_plan_id = suspended_action.execution_plan_id
|
47
45
|
history.dynflow_step_id = suspended_action.step_id
|
48
46
|
history.save!
|
47
|
+
|
49
48
|
dispatch_message(history) unless input[:bulk]
|
50
49
|
|
51
50
|
schedule_timeout(timeout, optional: true)
|
@@ -21,10 +21,7 @@ module Actions
|
|
21
21
|
|
22
22
|
def spawn_plans
|
23
23
|
args = input[:args].first
|
24
|
-
|
25
|
-
# Hash#slice will return a filtered hash only with the specified keys, and ignore keys that don't exist
|
26
|
-
possible_keys = [*current_batch.map(&:to_i), *current_batch.map(&:to_s)]
|
27
|
-
histories = ::Katello::Agent::DispatchHistory.where(id: args[:dispatch_histories].slice(*possible_keys).values)
|
24
|
+
histories = ::Katello::Agent::DispatchHistory.where(id: args[:dispatch_histories].slice(*current_batch.map(&:to_s)).values)
|
28
25
|
::Katello::Agent::Dispatcher.dispatch(
|
29
26
|
args[:type].to_sym,
|
30
27
|
histories,
|
@@ -110,6 +110,7 @@ module Actions
|
|
110
110
|
def finalize
|
111
111
|
version = ::Katello::ContentViewVersion.find(input[:content_view_version_id])
|
112
112
|
version.update_content_counts!
|
113
|
+
version.add_applied_filters!
|
113
114
|
# update errata applicability counts for all hosts in the CV & Library
|
114
115
|
unless input[:skip_promotion]
|
115
116
|
environment = ::Katello::KTEnvironment.find(input[:environment_id])
|
@@ -248,6 +248,7 @@ module Actions
|
|
248
248
|
def finalize
|
249
249
|
version = ::Katello::ContentViewVersion.find(input[:new_content_view_version_id])
|
250
250
|
version.update_content_counts!
|
251
|
+
version.add_applied_filters!
|
251
252
|
generate_description(version, output[:added_units]) if version.description.blank?
|
252
253
|
|
253
254
|
history = ::Katello::ContentViewHistory.find(input[:history_id])
|
@@ -4,10 +4,8 @@ module Actions
|
|
4
4
|
class UpdateContentView < Actions::EntryAction
|
5
5
|
def plan(host, content_view_id, lifecycle_environment_id)
|
6
6
|
if host.content_facet
|
7
|
-
host.content_facet.
|
8
|
-
|
9
|
-
lifecycle_environment_id: lifecycle_environment_id
|
10
|
-
)
|
7
|
+
host.content_facet.content_view = ::Katello::ContentView.find(content_view_id)
|
8
|
+
host.content_facet.lifecycle_environment = ::Katello::KTEnvironment.find(lifecycle_environment_id)
|
11
9
|
host.update_candlepin_associations
|
12
10
|
plan_self(:hostname => host.name)
|
13
11
|
else
|
@@ -3,16 +3,6 @@ module Actions
|
|
3
3
|
module Organization
|
4
4
|
module SimpleContentAccess
|
5
5
|
class Enable < Toggle
|
6
|
-
def plan(organization_id, auto_create_overrides: true)
|
7
|
-
input[:auto_create_overrides] = auto_create_overrides
|
8
|
-
sequence do
|
9
|
-
if auto_create_overrides
|
10
|
-
plan_action(PrepareContentOverrides, organization_id)
|
11
|
-
end
|
12
|
-
super(organization_id) # puts plan_self inside the sequence
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
6
|
def content_access_mode_value
|
17
7
|
SIMPLE_CONTENT_ACCESS_ENABLED_VALUE
|
18
8
|
end
|
@@ -12,15 +12,9 @@ module Actions
|
|
12
12
|
attr_reader :organization
|
13
13
|
|
14
14
|
def plan(organization_id)
|
15
|
-
organization = ::Organization.find(organization_id
|
16
|
-
input[:organization_name] = organization.name
|
17
|
-
input[:organization_label] = organization.label
|
15
|
+
@organization = ::Organization.find(organization_id)
|
18
16
|
action_subject organization
|
19
|
-
|
20
|
-
end
|
21
|
-
|
22
|
-
def run
|
23
|
-
::Katello::Resources::Candlepin::Owner.update(input[:organization_label], contentAccessMode: content_access_mode_value)
|
17
|
+
::Katello::Resources::Candlepin::Owner.update(@organization.label, contentAccessMode: content_access_mode_value)
|
24
18
|
end
|
25
19
|
|
26
20
|
def failure_notification(plan)
|
@@ -36,10 +30,6 @@ module Actions
|
|
36
30
|
)
|
37
31
|
end
|
38
32
|
|
39
|
-
def humanized_input
|
40
|
-
_("for organization %s") % input[:organization_name]
|
41
|
-
end
|
42
|
-
|
43
33
|
private
|
44
34
|
|
45
35
|
def consumer
|
@@ -52,9 +52,9 @@ module Actions
|
|
52
52
|
new_content.vendor = ::Katello::Provider::CUSTOM
|
53
53
|
end
|
54
54
|
|
55
|
-
#custom product content is always
|
55
|
+
# custom product content is always disabled by default
|
56
56
|
::Katello::ProductContent.where(product: root.product, content: content).first_or_create do |pc|
|
57
|
-
pc.enabled =
|
57
|
+
pc.enabled = false
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'set'
|
2
|
+
|
1
3
|
module Actions
|
2
4
|
module Katello
|
3
5
|
module Repository
|
@@ -25,6 +27,7 @@ module Actions
|
|
25
27
|
|
26
28
|
remove_versions(repository, repository.content_views_all(include_composite: true)&.generated_for_none, affected_cvv_ids) if remove_from_content_view_versions
|
27
29
|
|
30
|
+
handle_acs_product_removal(repository)
|
28
31
|
handle_alternate_content_sources(repository)
|
29
32
|
|
30
33
|
plan_self(:user_id => ::User.current.id, :affected_cvv_ids => affected_cvv_ids)
|
@@ -55,17 +58,22 @@ module Actions
|
|
55
58
|
end
|
56
59
|
|
57
60
|
def handle_alternate_content_sources(repository)
|
58
|
-
product = repository.product
|
59
|
-
content_type = repository.content_type
|
60
61
|
repository.smart_proxy_alternate_content_sources.each do |smart_proxy_acs|
|
61
62
|
plan_action(Pulp3::Orchestration::AlternateContentSource::Delete, smart_proxy_acs)
|
62
63
|
end
|
64
|
+
end
|
63
65
|
|
64
|
-
|
65
|
-
#
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
def handle_acs_product_removal(repository)
|
67
|
+
# Remove products from ACS's that contain no repositories which both
|
68
|
+
# match the ACS content type and have a non-nil URL
|
69
|
+
product = repository.product
|
70
|
+
repo_content_types = Set.new
|
71
|
+
product.repositories.each do |test_repo|
|
72
|
+
# we need to check id because test_repo will still contain the old, non-nil url
|
73
|
+
repo_content_types.add(test_repo.content_type) if (repository.id != test_repo.id) && test_repo.url.present?
|
74
|
+
end
|
75
|
+
::Katello::AlternateContentSource.with_products(product).each do |acs|
|
76
|
+
unless repo_content_types.include?(acs.content_type)
|
69
77
|
acs.products = acs.products - [product]
|
70
78
|
Rails.logger.info _('Removing product %{prod_name} with ID %{prod_id} from ACS %{acs_name} with ID %{acs_id}') %
|
71
79
|
{ prod_name: product.name, prod_id: product.id, acs_name: acs.name, acs_id: acs.id }
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'set'
|
2
|
+
|
1
3
|
module Actions
|
2
4
|
module Katello
|
3
5
|
module Repository
|
@@ -29,7 +31,8 @@ module Actions
|
|
29
31
|
:label => content.label,
|
30
32
|
:type => root.content_type,
|
31
33
|
:arches => root.format_arches,
|
32
|
-
:os_versions => root.os_versions&.join(',')
|
34
|
+
:os_versions => root.os_versions&.join(','),
|
35
|
+
:metadata_expire => root.metadata_expire
|
33
36
|
)
|
34
37
|
|
35
38
|
content.update!(name: root.name,
|
@@ -73,6 +76,7 @@ module Actions
|
|
73
76
|
end
|
74
77
|
end
|
75
78
|
elsif delete_acs
|
79
|
+
handle_acs_product_removal(repository)
|
76
80
|
repository.smart_proxy_alternate_content_sources.each do |smart_proxy_acs|
|
77
81
|
plan_action(Pulp3::Orchestration::AlternateContentSource::Delete, smart_proxy_acs, old_url: old_url)
|
78
82
|
end
|
@@ -83,6 +87,24 @@ module Actions
|
|
83
87
|
end
|
84
88
|
end
|
85
89
|
|
90
|
+
def handle_acs_product_removal(repository)
|
91
|
+
# Remove products from ACS's that contain no repositories which both
|
92
|
+
# match the ACS content type and have a non-nil URL
|
93
|
+
product = repository.product
|
94
|
+
repo_content_types = Set.new
|
95
|
+
product.repositories.each do |test_repo|
|
96
|
+
# we need to check id because test_repo will still contain the old, non-nil url
|
97
|
+
repo_content_types.add(test_repo.content_type) if (repository.id != test_repo.id) && test_repo.url.present?
|
98
|
+
end
|
99
|
+
::Katello::AlternateContentSource.with_products(product).each do |acs|
|
100
|
+
unless repo_content_types.include?(acs.content_type)
|
101
|
+
acs.products = acs.products - [product]
|
102
|
+
Rails.logger.info _('Removing product %{prod_name} with ID %{prod_id} from ACS %{acs_name} with ID %{acs_id}') %
|
103
|
+
{ prod_name: product.name, prod_id: product.id, acs_name: acs.name, acs_id: acs.id }
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
86
108
|
def update_content?(repository)
|
87
109
|
repository.library_instance? && !repository.product.redhat?
|
88
110
|
end
|
@@ -114,6 +114,8 @@ module Actions
|
|
114
114
|
case message
|
115
115
|
when 'This repository uses features which are incompatible with \'mirror\' sync. Please sync without mirroring enabled.'
|
116
116
|
'The "Complete Mirroring" mirroring policy is not compatible with this repository. You may want to update it to use "Content Only"'
|
117
|
+
when 'Treeinfo file should have INI format'
|
118
|
+
'This repository has a malformed or inaccessible treeinfo file. To sync, try enabling \'Ignore treeinfo\'. All kickstart contents will be skipped.'
|
117
119
|
else
|
118
120
|
message
|
119
121
|
end
|
@@ -14,8 +14,6 @@ module Actions
|
|
14
14
|
plan_self(source_repository_id: options[:source_repository].id, target_repository_id: repository.id, smart_proxy_id: smart_proxy.id)
|
15
15
|
elsif publication_content_type && (force_publication || repository.publication_href.nil? || !repository.using_mirrored_metadata?)
|
16
16
|
plan_action(Actions::Pulp3::Repository::CreatePublication, repository, smart_proxy, options)
|
17
|
-
elsif !publication_content_type
|
18
|
-
plan_self(target_repository_id: repository.id, contents_changed: options[:contents_changed], skip_publication: true)
|
19
17
|
end
|
20
18
|
plan_action(Actions::Pulp3::ContentGuard::Refresh, smart_proxy) unless repository.unprotected
|
21
19
|
plan_action(Actions::Pulp3::Repository::RefreshDistribution, repository, smart_proxy, :contents_changed => options[:contents_changed]) if Setting[:distribute_archived_cvv] || repository.environment
|
@@ -23,18 +21,13 @@ module Actions
|
|
23
21
|
end
|
24
22
|
|
25
23
|
def run
|
24
|
+
#we don't have to actually generate a publication, we can reuse the old one
|
26
25
|
target_repo = ::Katello::Repository.find(input[:target_repository_id])
|
27
|
-
|
28
|
-
|
29
|
-
target_repo.clear_smart_proxy_sync_histories
|
30
|
-
else
|
31
|
-
#we don't have to actually generate a publication, we can reuse the old one
|
32
|
-
source_repo = ::Katello::Repository.find(input[:source_repository_id])
|
33
|
-
if (target_repo.publication_href != source_repo.publication_href && smart_proxy.pulp_primary?)
|
34
|
-
target_repo.clear_smart_proxy_sync_histories
|
35
|
-
end
|
36
|
-
target_repo.update!(publication_href: source_repo.publication_href)
|
26
|
+
source_repo = ::Katello::Repository.find(input[:source_repository_id])
|
27
|
+
if (target_repo.publication_href != source_repo.publication_href && smart_proxy.pulp_primary?)
|
28
|
+
target_repo.clear_smart_proxy_sync_histories
|
37
29
|
end
|
30
|
+
target_repo.update!(publication_href: source_repo.publication_href)
|
38
31
|
end
|
39
32
|
end
|
40
33
|
end
|