katello 4.18.0.rc2 → 4.18.1
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 +33 -15
- data/app/assets/javascripts/katello/locale/bn_IN/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/ca/katello.js +35 -17
- data/app/assets/javascripts/katello/locale/cs/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +36 -18
- data/app/assets/javascripts/katello/locale/de/katello.js +44 -26
- data/app/assets/javascripts/katello/locale/de_AT/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/de_DE/katello.js +35 -17
- data/app/assets/javascripts/katello/locale/el/katello.js +35 -17
- data/app/assets/javascripts/katello/locale/en/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/en_GB/katello.js +34 -16
- data/app/assets/javascripts/katello/locale/en_US/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/es/katello.js +199 -181
- data/app/assets/javascripts/katello/locale/et_EE/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/fr/katello.js +941 -923
- data/app/assets/javascripts/katello/locale/gl/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/gu/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/he_IL/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/hi/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/id/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/it/katello.js +35 -17
- data/app/assets/javascripts/katello/locale/ja/katello.js +673 -655
- data/app/assets/javascripts/katello/locale/ka/katello.js +439 -421
- data/app/assets/javascripts/katello/locale/kn/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/ko/katello.js +2190 -2173
- data/app/assets/javascripts/katello/locale/ml_IN/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/mr/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/nl_NL/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/or/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/pa/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/pl/katello.js +35 -17
- data/app/assets/javascripts/katello/locale/pl_PL/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/pt/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/pt_BR/katello.js +212 -194
- data/app/assets/javascripts/katello/locale/ro/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/ro_RO/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/ru/katello.js +35 -17
- data/app/assets/javascripts/katello/locale/sl/katello.js +35 -17
- data/app/assets/javascripts/katello/locale/sv_SE/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/ta/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/ta_IN/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/te/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/tr/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/vi/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/vi_VN/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/zh/katello.js +33 -15
- data/app/assets/javascripts/katello/locale/zh_CN/katello.js +674 -656
- data/app/assets/javascripts/katello/locale/zh_TW/katello.js +35 -17
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +7 -3
- data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +91 -19
- data/app/controllers/katello/api/v2/errata_controller.rb +4 -4
- data/app/controllers/katello/api/v2/exports_controller.rb +14 -7
- data/app/controllers/katello/api/v2/flatpak_remote_repositories_controller.rb +9 -0
- data/app/controllers/katello/api/v2/host_errata_controller.rb +24 -2
- data/app/controllers/katello/api/v2/organizations_controller.rb +10 -4
- data/app/controllers/katello/api/v2/repositories_controller.rb +12 -3
- data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +36 -8
- data/app/lib/actions/katello/content_view/publish.rb +7 -7
- data/app/lib/actions/katello/content_view/remove_rolling_repo_clone.rb +9 -1
- data/app/lib/actions/katello/repository/destroy.rb +3 -2
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +1 -2
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_repository.rb +1 -2
- data/app/lib/katello/errors.rb +2 -0
- data/app/models/katello/content_view_environment.rb +3 -0
- data/app/models/katello/deb.rb +0 -2
- data/app/models/katello/rhel_lifecycle_status.rb +3 -1
- data/app/services/katello/product_content_finder.rb +11 -3
- data/app/services/katello/pulp3/content_view_version/export.rb +53 -31
- data/app/services/katello/pulp3/content_view_version/export_validator.rb +1 -1
- data/app/views/katello/api/v2/content_facet/base.json.rabl +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata-type.filter.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +8 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/bn_IN.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ca.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/cs_CZ.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_AT.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de_DE.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/el.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_GB.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/en_US.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/et_EE.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +12 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gl.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/gu.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/he_IL.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/hi.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/id.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +11 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ka.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/kn.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +11 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ml_IN.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/mr.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/nl_NL.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/or.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pa.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pl_PL.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ro_RO.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sl.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/sv_SE.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ta_IN.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/te.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/tr.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/vi_VN.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +11 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +11 -11
- data/lib/katello/plugin.rb +6 -0
- data/lib/katello/tasks/repository.rake +67 -0
- data/lib/katello/version.rb +1 -1
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.po +33 -15
- data/locale/bn_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn_IN/katello.po +33 -15
- data/locale/ca/LC_MESSAGES/katello.mo +0 -0
- data/locale/ca/katello.po +36 -18
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/katello.po +33 -15
- data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs_CZ/katello.po +37 -19
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.po +49 -31
- data/locale/de_AT/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_AT/katello.po +33 -15
- data/locale/de_DE/LC_MESSAGES/katello.mo +0 -0
- data/locale/de_DE/katello.po +36 -18
- data/locale/el/LC_MESSAGES/katello.mo +0 -0
- data/locale/el/katello.po +36 -18
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/katello.po +33 -15
- data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_GB/katello.po +34 -16
- data/locale/en_US/LC_MESSAGES/katello.mo +0 -0
- data/locale/en_US/katello.po +33 -15
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.po +203 -184
- data/locale/et_EE/LC_MESSAGES/katello.mo +0 -0
- data/locale/et_EE/katello.po +33 -15
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.po +948 -930
- data/locale/gl/LC_MESSAGES/katello.mo +0 -0
- data/locale/gl/katello.po +33 -15
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/katello.po +33 -15
- data/locale/he_IL/LC_MESSAGES/katello.mo +0 -0
- data/locale/he_IL/katello.po +33 -15
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/katello.po +33 -15
- data/locale/id/LC_MESSAGES/katello.mo +0 -0
- data/locale/id/katello.po +33 -15
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.po +36 -18
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.po +681 -661
- data/locale/ka/LC_MESSAGES/katello.mo +0 -0
- data/locale/ka/katello.po +441 -421
- data/locale/katello.pot +380 -348
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/katello.po +33 -15
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.po +2200 -2169
- data/locale/ml_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ml_IN/katello.po +33 -15
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/katello.po +33 -15
- data/locale/nl_NL/LC_MESSAGES/katello.mo +0 -0
- data/locale/nl_NL/katello.po +33 -15
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/katello.po +33 -15
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/katello.po +33 -15
- data/locale/pl/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl/katello.po +36 -18
- data/locale/pl_PL/LC_MESSAGES/katello.mo +0 -0
- data/locale/pl_PL/katello.po +33 -15
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/katello.po +33 -15
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.po +216 -197
- data/locale/ro/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro/katello.po +33 -15
- data/locale/ro_RO/LC_MESSAGES/katello.mo +0 -0
- data/locale/ro_RO/katello.po +33 -15
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.po +36 -18
- data/locale/sl/LC_MESSAGES/katello.mo +0 -0
- data/locale/sl/katello.po +36 -18
- data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
- data/locale/sv_SE/katello.po +33 -15
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.po +33 -15
- data/locale/ta_IN/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta_IN/katello.po +33 -15
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/katello.po +33 -15
- data/locale/tr/LC_MESSAGES/katello.mo +0 -0
- data/locale/tr/katello.po +33 -15
- data/locale/vi/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi/katello.po +33 -15
- data/locale/vi_VN/LC_MESSAGES/katello.mo +0 -0
- data/locale/vi_VN/katello.po +33 -15
- data/locale/zh/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh/katello.po +33 -15
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.po +680 -656
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.po +36 -18
- data/webpack/components/Errata/index.js +18 -0
- data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/HostErrataConstants.js +3 -0
- data/webpack/global_index.js +0 -4
- data/webpack/redux/actions/RedHatRepositories/helpers.js +3 -3
- data/webpack/redux/reducers/index.js +0 -2
- metadata +4 -16
- data/webpack/components/extensions/about/SystemStatuses.js +0 -55
- data/webpack/components/extensions/about/SystemStatusesActions.js +0 -16
- data/webpack/components/extensions/about/SystemStatusesConsts.js +0 -3
- data/webpack/components/extensions/about/SystemStatusesReducer.js +0 -26
- data/webpack/components/extensions/about/SystemStatusesSelectors.js +0 -3
- data/webpack/components/extensions/about/__tests__/SystemStatuses.fixtures.js +0 -20
- data/webpack/components/extensions/about/__tests__/SystemStatuses.test.js +0 -14
- data/webpack/components/extensions/about/__tests__/SystemStatusesReducer.test.js +0 -32
- data/webpack/components/extensions/about/__tests__/__snapshots__/SystemStatuses.test.js.snap +0 -156
- data/webpack/components/extensions/about/__tests__/__snapshots__/SystemStatusesReducer.test.js.snap +0 -47
- data/webpack/components/extensions/about/index.js +0 -19
- data/webpack/components/extensions/reducers.js +0 -6
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
"locale_data": {
|
|
4
4
|
"katello": {
|
|
5
5
|
"": {
|
|
6
|
-
"Project-Id-Version": "katello 4.18.0
|
|
6
|
+
"Project-Id-Version": "katello 4.18.0",
|
|
7
7
|
"Report-Msgid-Bugs-To": "",
|
|
8
8
|
"PO-Revision-Date": "2017-12-19 20:14+0000",
|
|
9
|
-
"Last-Translator": "Bryan Kearney <bryan.kearney@gmail.com>,
|
|
9
|
+
"Last-Translator": "Bryan Kearney <bryan.kearney@gmail.com>, 2025",
|
|
10
10
|
"Language-Team": "Chinese (Taiwan) (https://app.transifex.com/foreman/teams/114/zh_TW/)",
|
|
11
11
|
"MIME-Version": "1.0",
|
|
12
12
|
"Content-Type": "text/plain; charset=UTF-8",
|
|
@@ -1002,9 +1002,6 @@
|
|
|
1002
1002
|
"Back": [
|
|
1003
1003
|
"上一步"
|
|
1004
1004
|
],
|
|
1005
|
-
"Backend System Status": [
|
|
1006
|
-
"後端系統狀態"
|
|
1007
|
-
],
|
|
1008
1005
|
"Base URL": [
|
|
1009
1006
|
""
|
|
1010
1007
|
],
|
|
@@ -1299,7 +1296,7 @@
|
|
|
1299
1296
|
"Cannot incrementally export from a filtered and a non-filtered content view version. The exported content view version '%{content_view} %{current}' cannot be incrementally updated from version '%{from}.'. Please do a full export.": [
|
|
1300
1297
|
""
|
|
1301
1298
|
],
|
|
1302
|
-
"Cannot incrementally export from a incrementally
|
|
1299
|
+
"Cannot incrementally export from a incrementally updated version and a regular version or vice-versa. The exported Content View Version '%{content_view} %{current}' cannot be incrementally exported from version '%{from}.' Please do a full export.": [
|
|
1303
1300
|
""
|
|
1304
1301
|
],
|
|
1305
1302
|
"Cannot install errata: No errata found for search term '%s'": [
|
|
@@ -1476,9 +1473,6 @@
|
|
|
1476
1473
|
"Completed pulp task protection days": [
|
|
1477
1474
|
""
|
|
1478
1475
|
],
|
|
1479
|
-
"Component": [
|
|
1480
|
-
"元件"
|
|
1481
|
-
],
|
|
1482
1476
|
"Component Content View": [
|
|
1483
1477
|
""
|
|
1484
1478
|
],
|
|
@@ -2832,6 +2826,12 @@
|
|
|
2832
2826
|
"Export failed: One or more repositories needs to be synced (with Immediate download policy.)": [
|
|
2833
2827
|
""
|
|
2834
2828
|
],
|
|
2829
|
+
"Export format must be specified for library exports.": [
|
|
2830
|
+
""
|
|
2831
|
+
],
|
|
2832
|
+
"Export format must be specified for non-incremental repository exports.": [
|
|
2833
|
+
""
|
|
2834
|
+
],
|
|
2835
2835
|
"Export formats.Choose syncable if the exported content needs to be in a yum format. This option is only available for %{syncable_repos} repositories. Choose importable if the importing server uses the same version and exported content needs to be one of %{importable_repos} repositories.": [
|
|
2836
2836
|
""
|
|
2837
2837
|
],
|
|
@@ -3018,6 +3018,9 @@
|
|
|
3018
3018
|
"Flatpak remote updated": [
|
|
3019
3019
|
""
|
|
3020
3020
|
],
|
|
3021
|
+
"Flatpak repositories cannot be mirrored into Red Hat products. Please select a custom product.": [
|
|
3022
|
+
""
|
|
3023
|
+
],
|
|
3021
3024
|
"Force": [
|
|
3022
3025
|
""
|
|
3023
3026
|
],
|
|
@@ -3316,7 +3319,7 @@
|
|
|
3316
3319
|
"如何排序結果的順序(比方說 ASC 從下到上)"
|
|
3317
3320
|
],
|
|
3318
3321
|
"ID": [
|
|
3319
|
-
""
|
|
3322
|
+
"ID"
|
|
3320
3323
|
],
|
|
3321
3324
|
"ID of a HTTP Proxy": [
|
|
3322
3325
|
""
|
|
@@ -6051,6 +6054,9 @@
|
|
|
6051
6054
|
"Registry name pattern will result in invalid container image name of member repositories": [
|
|
6052
6055
|
""
|
|
6053
6056
|
],
|
|
6057
|
+
"Registry token expiration time": [
|
|
6058
|
+
""
|
|
6059
|
+
],
|
|
6054
6060
|
"Related composite content views": [
|
|
6055
6061
|
""
|
|
6056
6062
|
],
|
|
@@ -6432,7 +6438,7 @@
|
|
|
6432
6438
|
"Return only errata of a particular severity (None, Low, Moderate, Important, Critical)": [
|
|
6433
6439
|
""
|
|
6434
6440
|
],
|
|
6435
|
-
"Return only errata of a particular type (security, bugfix, enhancement)": [
|
|
6441
|
+
"Return only errata of a particular type (security, bugfix, enhancement, other)": [
|
|
6436
6442
|
""
|
|
6437
6443
|
],
|
|
6438
6444
|
"Return only packages of a particular status (upgradable or up-to-date)": [
|
|
@@ -7683,6 +7689,9 @@
|
|
|
7683
7689
|
"The promotion of %{content_view} to <b>%{environment}</b> has completed. %{count} needed errata are installable on your hosts.": [
|
|
7684
7690
|
"推送 %{content_view} 至 <b>%{environment}</b> 的程序已完成。您的主機可安裝 %{count} 個必要的勘誤。"
|
|
7685
7691
|
],
|
|
7692
|
+
"The provided incremental export format '%{provided}' must match the previous export's format '%{previous}'. Consider using 'from_history_id' to point to a matching export.": [
|
|
7693
|
+
""
|
|
7694
|
+
],
|
|
7686
7695
|
"The repository is already enabled": [
|
|
7687
7696
|
"軟體庫已啟用"
|
|
7688
7697
|
],
|
|
@@ -7920,6 +7929,9 @@
|
|
|
7920
7929
|
"Time in minutes before content that is not contained within a repository and has not been accessed is considered orphaned.": [
|
|
7921
7930
|
""
|
|
7922
7931
|
],
|
|
7932
|
+
"Time in minutes before registry access tokens expire.": [
|
|
7933
|
+
""
|
|
7934
|
+
],
|
|
7923
7935
|
"Time to expire yum metadata in seconds. Only relevant for custom yum repositories.": [
|
|
7924
7936
|
""
|
|
7925
7937
|
],
|
|
@@ -8100,6 +8112,12 @@
|
|
|
8100
8112
|
"Unable to detect puppet path": [
|
|
8101
8113
|
""
|
|
8102
8114
|
],
|
|
8115
|
+
"Unable to find a base content view to use for incremental export using the provided parameters:%{params}": [
|
|
8116
|
+
""
|
|
8117
|
+
],
|
|
8118
|
+
"Unable to find a base content view to use for incremental export. Please run a complete export instead.": [
|
|
8119
|
+
""
|
|
8120
|
+
],
|
|
8103
8121
|
"Unable to find a content view with ID %s": [
|
|
8104
8122
|
""
|
|
8105
8123
|
],
|
|
@@ -8115,12 +8133,6 @@
|
|
|
8115
8133
|
"Unable to import in to Content View specified in the metadata - '%{name}'. The 'import_only' attribute for the content view is set to false. To mark this Content View as importable, have your system administrator run the following command on the server. ": [
|
|
8116
8134
|
""
|
|
8117
8135
|
],
|
|
8118
|
-
"Unable to incrementally export. Do a Full Export on the library content before updating from the latest increment.": [
|
|
8119
|
-
""
|
|
8120
|
-
],
|
|
8121
|
-
"Unable to incrementally export. Do a Full Export on the repository content.": [
|
|
8122
|
-
""
|
|
8123
|
-
],
|
|
8124
8136
|
"Unable to reassign activation_keys. Please check activation_key_content_view_id and activation_key_environment_id.": [
|
|
8125
8137
|
"無法重新指定 activation_keys。請檢查 activation_key_content_view_id 與 activation_key_environment_id。"
|
|
8126
8138
|
],
|
|
@@ -8187,6 +8199,12 @@
|
|
|
8187
8199
|
"Unknown errata status": [
|
|
8188
8200
|
"未知的勘誤狀態"
|
|
8189
8201
|
],
|
|
8202
|
+
"Unknown library export format '%s'.": [
|
|
8203
|
+
""
|
|
8204
|
+
],
|
|
8205
|
+
"Unknown repository export format '%s'.": [
|
|
8206
|
+
""
|
|
8207
|
+
],
|
|
8190
8208
|
"Unknown traces status": [
|
|
8191
8209
|
""
|
|
8192
8210
|
],
|
|
@@ -517,11 +517,11 @@ module Katello
|
|
|
517
517
|
PersonalAccessToken.transaction do
|
|
518
518
|
personal_token = PersonalAccessToken.where(user_id: User.current.id, name: 'registry').first
|
|
519
519
|
if personal_token.nil?
|
|
520
|
-
personal_token = PersonalAccessToken.new(user: User.current, name: 'registry', expires_at:
|
|
520
|
+
personal_token = PersonalAccessToken.new(user: User.current, name: 'registry', expires_at: Setting['registry_token_expiration_minutes'].minutes.from_now)
|
|
521
521
|
personal_token.generate_token
|
|
522
522
|
personal_token.save!
|
|
523
523
|
else
|
|
524
|
-
personal_token.expires_at =
|
|
524
|
+
personal_token.expires_at = Setting['registry_token_expiration_minutes'].minutes.from_now
|
|
525
525
|
personal_token.save!
|
|
526
526
|
end
|
|
527
527
|
rescue ActiveRecord::RecordInvalid
|
|
@@ -574,7 +574,11 @@ module Katello
|
|
|
574
574
|
return yield
|
|
575
575
|
rescue RestClient::Exception => exception
|
|
576
576
|
if [301, 302, 307].include?(exception.response.code)
|
|
577
|
-
|
|
577
|
+
# Handle aliased hostname on original request
|
|
578
|
+
redirect_location = URI(exception.response.headers[:location])
|
|
579
|
+
redirect_location.host = request.host if request.host.present?
|
|
580
|
+
|
|
581
|
+
redirect_to redirect_location.to_s, allow_other_host: true
|
|
578
582
|
nil
|
|
579
583
|
else
|
|
580
584
|
raise exception
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
module Katello
|
|
2
2
|
class Api::V2::ContentExportIncrementalsController < Api::V2::ExportsController
|
|
3
|
-
before_action :
|
|
4
|
-
before_action :
|
|
5
|
-
before_action :
|
|
6
|
-
before_action :
|
|
7
|
-
before_action :find_repository_export_view, :only => [:repository]
|
|
8
|
-
before_action :
|
|
3
|
+
before_action :find_exportable_content_view_version, :only => [:version] # determines @view
|
|
4
|
+
before_action :find_exportable_organization, :only => [:library] # determines @organization
|
|
5
|
+
before_action :find_library_export_view, :only => [:library] # determines @view from @organization
|
|
6
|
+
before_action :find_exportable_repository, :only => [:repository] # finds @repository
|
|
7
|
+
before_action :find_repository_export_view, :only => [:repository] # determines @view from @repository
|
|
8
|
+
before_action :find_incremental_history, :only => [:version, :library, :repository] # determines @history from @view
|
|
9
|
+
before_action :determine_export_format_from_history, :only => [:version, :library, :repository] # determines @export_format from @history
|
|
9
10
|
|
|
10
11
|
def_param_group :incremental do
|
|
11
12
|
param :from_history_id, :number, :desc => N_("Export history identifier used for incremental export. "\
|
|
@@ -43,24 +44,95 @@ module Katello
|
|
|
43
44
|
private
|
|
44
45
|
|
|
45
46
|
def find_library_export_view
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
if params[:from_history_id].present?
|
|
48
|
+
find_incremental_history_from_id
|
|
49
|
+
@view = @history&.content_view_version&.content_view
|
|
50
|
+
else
|
|
51
|
+
# Determine format for finding existing view
|
|
52
|
+
format = params[:format] || ::Katello::Pulp3::ContentViewVersion::Export::UNDEFINED
|
|
53
|
+
|
|
54
|
+
# Try to find existing views based on format
|
|
55
|
+
views = []
|
|
56
|
+
if format != ::Katello::Pulp3::ContentViewVersion::Export::SYNCABLE
|
|
57
|
+
importable_view = ::Katello::Pulp3::ContentViewVersion::Export.find_export_view(
|
|
58
|
+
destination_server: params[:destination_server],
|
|
59
|
+
organization: @organization,
|
|
60
|
+
name: ::Katello::ContentView::EXPORT_LIBRARY,
|
|
61
|
+
generated_for: :library_export
|
|
62
|
+
)
|
|
63
|
+
views << importable_view if importable_view
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
if format != ::Katello::Pulp3::ContentViewVersion::Export::IMPORTABLE
|
|
67
|
+
syncable_view = ::Katello::Pulp3::ContentViewVersion::Export.find_export_view(
|
|
68
|
+
destination_server: params[:destination_server],
|
|
69
|
+
organization: @organization,
|
|
70
|
+
name: "#{::Katello::ContentView::EXPORT_LIBRARY}-SYNCABLE",
|
|
71
|
+
generated_for: :library_export_syncable
|
|
72
|
+
)
|
|
73
|
+
views << syncable_view if syncable_view
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
@view = views.compact.max_by(&:updated_at)
|
|
54
77
|
end
|
|
78
|
+
check_for_blank_view
|
|
55
79
|
end
|
|
56
80
|
|
|
57
81
|
def find_repository_export_view
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
82
|
+
if params[:from_history_id].present?
|
|
83
|
+
find_incremental_history_from_id
|
|
84
|
+
@view = @history&.content_view_version&.content_view
|
|
85
|
+
else
|
|
86
|
+
# Determine format for finding existing view
|
|
87
|
+
format = params[:format] || ::Katello::Pulp3::ContentViewVersion::Export::UNDEFINED
|
|
88
|
+
|
|
89
|
+
# Try to find existing views based on format
|
|
90
|
+
views = []
|
|
91
|
+
if format != ::Katello::Pulp3::ContentViewVersion::Export::SYNCABLE
|
|
92
|
+
importable_view = ::Katello::Pulp3::ContentViewVersion::Export.find_export_view(
|
|
93
|
+
destination_server: nil,
|
|
94
|
+
organization: @repository.organization,
|
|
95
|
+
name: "Export-#{@repository.label}-#{@repository.library_instance_or_self.id}",
|
|
96
|
+
generated_for: :repository_export
|
|
97
|
+
)
|
|
98
|
+
views << importable_view if importable_view
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if format != ::Katello::Pulp3::ContentViewVersion::Export::IMPORTABLE
|
|
102
|
+
syncable_view = ::Katello::Pulp3::ContentViewVersion::Export.find_export_view(
|
|
103
|
+
destination_server: nil,
|
|
104
|
+
organization: @repository.organization,
|
|
105
|
+
name: "Export-SYNCABLE-#{@repository.label}-#{@repository.library_instance_or_self.id}",
|
|
106
|
+
generated_for: :repository_export_syncable
|
|
107
|
+
)
|
|
108
|
+
views << syncable_view if syncable_view
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
@view = views.compact.max_by(&:updated_at)
|
|
112
|
+
end
|
|
113
|
+
check_for_blank_view
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
def check_for_blank_view
|
|
62
117
|
if @view.blank?
|
|
63
|
-
|
|
118
|
+
valid_params = ""
|
|
119
|
+
valid_params << " 'from_history_id':#{params[:from_history_id]}" if params[:from_history_id].present?
|
|
120
|
+
valid_params << " 'format':#{params[:format]}" if params[:format].present?
|
|
121
|
+
if valid_params.blank?
|
|
122
|
+
msg = _("Unable to find a base content view to use for incremental export. Please run a complete export instead.")
|
|
123
|
+
else
|
|
124
|
+
msg = _("Unable to find a base content view to use for incremental export using the provided parameters:%{params}") % { params: valid_params }
|
|
125
|
+
end
|
|
126
|
+
fail HttpErrors::BadRequest, msg
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def determine_export_format_from_history
|
|
131
|
+
@export_format = @history.metadata[:format]
|
|
132
|
+
|
|
133
|
+
if params[:format].present? && @export_format != params[:format]
|
|
134
|
+
msg = _("The provided incremental export format '%{provided}' must match the previous export's format '%{previous}'. "\
|
|
135
|
+
"Consider using 'from_history_id' to point to a matching export.") % { provided: params[:format], previous: @export_format }
|
|
64
136
|
fail HttpErrors::BadRequest, msg
|
|
65
137
|
end
|
|
66
138
|
end
|
|
@@ -55,8 +55,8 @@ module Katello
|
|
|
55
55
|
collection = collection.applicable_to_hosts(hosts)
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
|
-
date_type = params[:date_type].present? ? params[:date_type] : ContentViewErratumFilterRule::UPDATED
|
|
59
|
-
unless ContentViewErratumFilterRule::DATE_TYPES.include?(date_type)
|
|
58
|
+
@date_type = params[:date_type].present? ? params[:date_type] : ContentViewErratumFilterRule::UPDATED
|
|
59
|
+
unless ContentViewErratumFilterRule::DATE_TYPES.include?(@date_type)
|
|
60
60
|
msg = _("Invalid params provided - date_type must be one of %s" % ContentViewErratumFilterRule::DATE_TYPES.join(","))
|
|
61
61
|
fail HttpErrors::UnprocessableEntity, msg
|
|
62
62
|
end
|
|
@@ -65,8 +65,8 @@ module Katello
|
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
def custom_index_relation_handle_type_and_time(collection)
|
|
68
|
-
collection = collection.where("#{date_type} >= ?", params[:start_date]) if params[:start_date]
|
|
69
|
-
collection = collection.where("#{date_type} <= ?", params[:end_date]) if params[:end_date]
|
|
68
|
+
collection = collection.where("#{@date_type} >= ?", params[:start_date]) if params[:start_date]
|
|
69
|
+
collection = collection.where("#{@date_type} <= ?", params[:end_date]) if params[:end_date]
|
|
70
70
|
if params[:types]
|
|
71
71
|
include_other = params[:types]&.include?('other')
|
|
72
72
|
params[:types]&.delete('other')
|
|
@@ -75,7 +75,9 @@ module Katello
|
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
def find_export_format
|
|
78
|
-
if
|
|
78
|
+
if @export_format.present?
|
|
79
|
+
@export_format
|
|
80
|
+
elsif params[:format]
|
|
79
81
|
unless ::Katello::Pulp3::ContentViewVersion::Export::FORMATS.include?(params[:format])
|
|
80
82
|
fail HttpErrors::UnprocessableEntity, _('Invalid export format provided. Format must be one of %s ') %
|
|
81
83
|
::Katello::Pulp3::ContentViewVersion::Export::FORMATS.join(',')
|
|
@@ -113,14 +115,11 @@ module Katello
|
|
|
113
115
|
end
|
|
114
116
|
end
|
|
115
117
|
|
|
116
|
-
def
|
|
118
|
+
def find_incremental_history
|
|
117
119
|
if params[:from_history_id].present?
|
|
118
|
-
|
|
119
|
-
if @history.blank?
|
|
120
|
-
throw_resource_not_found(name: 'export history',
|
|
121
|
-
id: params[:from_history_id])
|
|
122
|
-
end
|
|
120
|
+
find_incremental_history_from_id
|
|
123
121
|
else
|
|
122
|
+
# Use the latest export
|
|
124
123
|
@history = ::Katello::ContentViewVersionExportHistory.
|
|
125
124
|
latest(@view, destination_server: params[:destination_server])
|
|
126
125
|
if @history.blank?
|
|
@@ -129,5 +128,13 @@ module Katello
|
|
|
129
128
|
end
|
|
130
129
|
end
|
|
131
130
|
end
|
|
131
|
+
|
|
132
|
+
def find_incremental_history_from_id
|
|
133
|
+
@history = ::Katello::ContentViewVersionExportHistory.find(params[:from_history_id])
|
|
134
|
+
if @history.blank?
|
|
135
|
+
throw_resource_not_found(name: 'export history',
|
|
136
|
+
id: params[:from_history_id])
|
|
137
|
+
end
|
|
138
|
+
end
|
|
132
139
|
end
|
|
133
140
|
end
|
|
@@ -56,6 +56,7 @@ module Katello
|
|
|
56
56
|
param :product_name, String, :desc => N_("Name of the product to mirror the remote repository to")
|
|
57
57
|
param :organization_id, :number, :desc => N_("organization identifier")
|
|
58
58
|
def mirror
|
|
59
|
+
validate_product_for_mirroring
|
|
59
60
|
task = async_task(::Actions::Katello::Flatpak::MirrorRemoteRepository, @flatpak_remote_repository, @product)
|
|
60
61
|
respond_for_async :resource => task
|
|
61
62
|
end
|
|
@@ -94,5 +95,13 @@ module Katello
|
|
|
94
95
|
def rejected_autocomplete_items
|
|
95
96
|
['flatpak_remote_id', 'flatpak_remote']
|
|
96
97
|
end
|
|
98
|
+
|
|
99
|
+
private
|
|
100
|
+
|
|
101
|
+
def validate_product_for_mirroring
|
|
102
|
+
return unless @product&.redhat?
|
|
103
|
+
msg = _("Flatpak repositories cannot be mirrored into Red Hat products. Please select a custom product.")
|
|
104
|
+
fail HttpErrors::UnprocessableEntity, msg
|
|
105
|
+
end
|
|
97
106
|
end
|
|
98
107
|
end
|
|
@@ -7,6 +7,7 @@ module Katello
|
|
|
7
7
|
bugfix: Katello::Erratum::BUGZILLA, # ['bugfix', 'recommended']
|
|
8
8
|
security: Katello::Erratum::SECURITY, # ['security']
|
|
9
9
|
enhancement: Katello::Erratum::ENHANCEMENT, # ['enhancement', 'optional']
|
|
10
|
+
other: 'other', # any type not in the above categories
|
|
10
11
|
}.freeze
|
|
11
12
|
|
|
12
13
|
before_action :find_host, only: :index
|
|
@@ -15,6 +16,8 @@ module Katello
|
|
|
15
16
|
before_action :find_environment, only: :index
|
|
16
17
|
before_action :find_content_view, only: :index
|
|
17
18
|
|
|
19
|
+
after_action :strip_errata_type, only: :auto_complete_search
|
|
20
|
+
|
|
18
21
|
resource_description do
|
|
19
22
|
api_version 'v2'
|
|
20
23
|
api_base_url "/api"
|
|
@@ -41,7 +44,7 @@ module Katello
|
|
|
41
44
|
param :content_view_id, :number, :desc => N_("Calculate Applicable Errata based on a particular Content View"), :required => false
|
|
42
45
|
param :environment_id, :number, :desc => N_("Calculate Applicable Errata based on a particular Environment"), :required => false
|
|
43
46
|
param :include_applicable, :bool, :desc => N_("Return errata that are applicable to this host. Defaults to false)"), :required => false
|
|
44
|
-
param :type, String, :desc => N_("Return only errata of a particular type (security, bugfix, enhancement)"), :required => false
|
|
47
|
+
param :type, String, :desc => N_("Return only errata of a particular type (security, bugfix, enhancement, other)"), :required => false
|
|
45
48
|
param :severity, String, :desc => N_("Return only errata of a particular severity (None, Low, Moderate, Important, Critical)"), :required => false
|
|
46
49
|
param_group :search, Api::V2::ApiController
|
|
47
50
|
def index
|
|
@@ -89,7 +92,12 @@ module Katello
|
|
|
89
92
|
relation = @host.content_facet.installable_errata(@environment, @content_view)
|
|
90
93
|
end
|
|
91
94
|
if params[:type].present?
|
|
92
|
-
|
|
95
|
+
type_param = params[:type].to_sym
|
|
96
|
+
if type_param == :other
|
|
97
|
+
relation = relation.where.not(:errata_type => [Katello::Erratum::SECURITY, Katello::Erratum::BUGZILLA, Katello::Erratum::ENHANCEMENT].flatten)
|
|
98
|
+
elsif TYPES_FROM_PARAMS[type_param].present?
|
|
99
|
+
relation = relation.where(:errata_type => TYPES_FROM_PARAMS[type_param])
|
|
100
|
+
end
|
|
93
101
|
end
|
|
94
102
|
if params[:severity].present?
|
|
95
103
|
params[:severity] = ['None', ''] if params[:severity] == 'None'
|
|
@@ -142,6 +150,20 @@ module Katello
|
|
|
142
150
|
end
|
|
143
151
|
end
|
|
144
152
|
|
|
153
|
+
def strip_errata_type
|
|
154
|
+
return if response.body.blank?
|
|
155
|
+
|
|
156
|
+
begin
|
|
157
|
+
items = JSON.parse(response.body)
|
|
158
|
+
rescue JSON::ParserError
|
|
159
|
+
return
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
filtered = items.reject { |h| h['part'].to_s.strip == 'errata_type' }
|
|
163
|
+
|
|
164
|
+
response.body = filtered.to_json
|
|
165
|
+
end
|
|
166
|
+
|
|
145
167
|
def validate_index_params!
|
|
146
168
|
if (params[:content_view_id] && params[:environment_id].nil?) || (params[:environment_id] && params[:content_view_id].nil?)
|
|
147
169
|
fail _("Either both parameters 'content_view_id' and 'environment_id' should be specified or neither should be specified")
|
|
@@ -4,16 +4,22 @@ module Katello
|
|
|
4
4
|
|
|
5
5
|
include Api::V2::Rendering
|
|
6
6
|
include ForemanTasks::Triggers
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
redhat_provider update releases)
|
|
7
|
+
LOCAL_FIND_TAXONOMY_ACTIONS = %w(repo_discover cancel_repo_discover download_debug_certificate
|
|
8
|
+
cdn_configuration redhat_provider update releases).freeze
|
|
9
|
+
before_action :local_find_taxonomy, :only => LOCAL_FIND_TAXONOMY_ACTIONS
|
|
11
10
|
|
|
12
11
|
resource_description do
|
|
13
12
|
api_version 'v2'
|
|
14
13
|
api_base_url "/katello/api"
|
|
15
14
|
end
|
|
16
15
|
|
|
16
|
+
def self.before_find_taxonomy_actions
|
|
17
|
+
# used by RH Cloud to delay the execution of local_find_taxonomy
|
|
18
|
+
skip_before_action :local_find_taxonomy, :only => LOCAL_FIND_TAXONOMY_ACTIONS
|
|
19
|
+
yield
|
|
20
|
+
before_action :local_find_taxonomy, :only => LOCAL_FIND_TAXONOMY_ACTIONS
|
|
21
|
+
end
|
|
22
|
+
|
|
17
23
|
def_param_group :resource do
|
|
18
24
|
param :organization, Hash, :required => true, :action_aware => true do
|
|
19
25
|
param :name, String, :required => true
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Katello
|
|
2
2
|
class Api::V2::RepositoriesController < Api::V2::ApiController # rubocop:disable Metrics/ClassLength
|
|
3
3
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
|
4
|
-
|
|
4
|
+
INDEX_ACTIONS = [:index, :auto_complete_search].freeze
|
|
5
5
|
generic_repo_wrap_params = []
|
|
6
6
|
RepositoryTypeManager.generic_remote_options(defined_only: true).each do |option|
|
|
7
7
|
generic_repo_wrap_params << option.name
|
|
@@ -16,8 +16,8 @@ module Katello
|
|
|
16
16
|
CONTENT_CREDENTIAL_SSL_CLIENT_CERT_TYPE = "ssl_client_cert".freeze
|
|
17
17
|
CONTENT_CREDENTIAL_SSL_CLIENT_KEY_TYPE = "ssl_client_key".freeze
|
|
18
18
|
|
|
19
|
-
before_action :find_optional_organization, :only =>
|
|
20
|
-
before_action :find_product, :only =>
|
|
19
|
+
before_action :find_optional_organization, :only => INDEX_ACTIONS
|
|
20
|
+
before_action :find_product, :only => INDEX_ACTIONS
|
|
21
21
|
before_action :find_product_for_create, :only => [:create]
|
|
22
22
|
before_action :find_organization_from_product, :only => [:create]
|
|
23
23
|
before_action :find_unauthorized_katello_resource, :only => [:gpg_key_content]
|
|
@@ -35,6 +35,15 @@ module Katello
|
|
|
35
35
|
skip_before_action :authorize, :only => [:gpg_key_content]
|
|
36
36
|
skip_before_action :check_media_type, :only => [:upload_content]
|
|
37
37
|
|
|
38
|
+
def self.before_index_actions
|
|
39
|
+
# used by RH Cloud to delay the execution of find_optional_organization and find_product
|
|
40
|
+
skip_before_action :find_optional_organization, :only => INDEX_ACTIONS
|
|
41
|
+
skip_before_action :find_product, :only => INDEX_ACTIONS
|
|
42
|
+
yield
|
|
43
|
+
before_action :find_optional_organization, :only => INDEX_ACTIONS
|
|
44
|
+
before_action :find_product, :only => INDEX_ACTIONS
|
|
45
|
+
end
|
|
46
|
+
|
|
38
47
|
def custom_index_relation(collection)
|
|
39
48
|
collection.includes(:product)
|
|
40
49
|
end
|
|
@@ -18,7 +18,8 @@ module Katello
|
|
|
18
18
|
|
|
19
19
|
included do
|
|
20
20
|
prepend Overrides
|
|
21
|
-
|
|
21
|
+
around_action :handle_content_view_environments_for_create, only: [:create]
|
|
22
|
+
before_action :handle_content_view_environments_for_update, only: [:update]
|
|
22
23
|
|
|
23
24
|
def destroy
|
|
24
25
|
Katello::RegistrationManager.unregister_host(@host, :unregistering => false)
|
|
@@ -34,21 +35,48 @@ module Katello
|
|
|
34
35
|
render(:locals => { :resource => @host }, :template => 'katello/api/v2/hosts/show', :status => :ok)
|
|
35
36
|
end
|
|
36
37
|
|
|
37
|
-
def
|
|
38
|
+
def handle_content_view_environments_for_create
|
|
39
|
+
# validations should occur before the action so that the request can fail and not render multiple responses
|
|
40
|
+
cves = validate_content_view_environment_params
|
|
41
|
+
yield
|
|
42
|
+
# the actual assigning needs to wait until the host is created
|
|
43
|
+
set_content_view_environments(cves)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def handle_content_view_environments_for_update
|
|
47
|
+
cves = validate_content_view_environment_params
|
|
48
|
+
set_content_view_environments(cves)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def validate_content_view_environment_params
|
|
38
52
|
content_facet_attributes = params.dig(:host, :content_facet_attributes)
|
|
39
|
-
return if content_facet_attributes.blank? ||
|
|
40
|
-
|
|
53
|
+
return if content_facet_attributes.blank? ||
|
|
54
|
+
(cve_params[:content_view_id].present? && cve_params[:lifecycle_environment_id].present?)
|
|
55
|
+
|
|
41
56
|
cves = ::Katello::ContentViewEnvironment.fetch_content_view_environments(
|
|
42
57
|
labels: cve_params[:content_view_environments],
|
|
43
58
|
ids: cve_params[:content_view_environment_ids],
|
|
44
|
-
organization:
|
|
45
|
-
if cves.
|
|
46
|
-
@host.content_facet.content_view_environments = cves
|
|
47
|
-
else
|
|
59
|
+
organization: find_organization || @host&.organization)
|
|
60
|
+
if cves.blank?
|
|
48
61
|
handle_errors(labels: cve_params[:content_view_environments],
|
|
49
62
|
ids: cve_params[:content_view_environment_ids])
|
|
50
63
|
end
|
|
64
|
+
cves
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# rubocop:disable Naming/AccessorMethodName
|
|
68
|
+
def set_content_view_environments(cves)
|
|
69
|
+
return if cves.blank?
|
|
70
|
+
if @host.blank?
|
|
71
|
+
Rails.logger.debug "No host; not assigning content view environments"
|
|
72
|
+
return
|
|
73
|
+
elsif @host&.content_facet.blank?
|
|
74
|
+
content_facet = Katello::Host::ContentFacet.new(host: @host)
|
|
75
|
+
@host.content_facet = content_facet
|
|
76
|
+
end
|
|
77
|
+
@host.content_facet.content_view_environments = cves
|
|
51
78
|
end
|
|
79
|
+
# rubocop:enable Naming/AccessorMethodName
|
|
52
80
|
|
|
53
81
|
def cve_params
|
|
54
82
|
params.require(:host).require(:content_facet_attributes).permit(:content_view_id, :lifecycle_environment_id, content_view_environments: [], content_view_environment_ids: [])
|
|
@@ -59,13 +59,6 @@ module Actions
|
|
|
59
59
|
if options[:importing]
|
|
60
60
|
handle_importing_content(version, options[:path], options[:metadata])
|
|
61
61
|
elsif options[:syncable]
|
|
62
|
-
if separated_repo_map[:pulp3_deb_multicopy].keys.flatten.present?
|
|
63
|
-
plan_action(::Actions::Katello::Repository::MultiCloneToVersion, separated_repo_map[:pulp3_deb_multicopy], version)
|
|
64
|
-
end
|
|
65
|
-
if separated_repo_map[:pulp3_yum_multicopy].keys.flatten.present?
|
|
66
|
-
plan_action(::Actions::Katello::Repository::MultiCloneToVersion, separated_repo_map[:pulp3_yum_multicopy], version)
|
|
67
|
-
end
|
|
68
|
-
|
|
69
62
|
# Create import history for syncable imports so they display under hammer's content-import list command.
|
|
70
63
|
if options[:path] && options[:metadata]
|
|
71
64
|
plan_action(
|
|
@@ -76,6 +69,13 @@ module Actions
|
|
|
76
69
|
content_view_name: version.content_view.name
|
|
77
70
|
)
|
|
78
71
|
end
|
|
72
|
+
else
|
|
73
|
+
if separated_repo_map[:pulp3_deb_multicopy].keys.flatten.present?
|
|
74
|
+
plan_action(::Actions::Katello::Repository::MultiCloneToVersion, separated_repo_map[:pulp3_deb_multicopy], version)
|
|
75
|
+
end
|
|
76
|
+
if separated_repo_map[:pulp3_yum_multicopy].keys.flatten.present?
|
|
77
|
+
plan_action(::Actions::Katello::Repository::MultiCloneToVersion, separated_repo_map[:pulp3_yum_multicopy], version)
|
|
78
|
+
end
|
|
79
79
|
end
|
|
80
80
|
|
|
81
81
|
concurrence do
|
|
@@ -20,7 +20,15 @@ module Actions
|
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def run
|
|
23
|
-
::Katello::Repository.where(id: input[:repository_ids]).
|
|
23
|
+
::Katello::Repository.where(id: input[:repository_ids]).each do |repository|
|
|
24
|
+
SmartProxy.unscoped.with_repo(repository).each do |smart_proxy|
|
|
25
|
+
next if smart_proxy.pulp_primary?
|
|
26
|
+
|
|
27
|
+
smart_proxy.content_counts&.dig("content_view_versions", repository.content_view_version_id.to_s, "repositories")&.delete(repository.id.to_s)
|
|
28
|
+
smart_proxy.save
|
|
29
|
+
end
|
|
30
|
+
repository.destroy!
|
|
31
|
+
end
|
|
24
32
|
end
|
|
25
33
|
end
|
|
26
34
|
end
|
|
@@ -96,8 +96,9 @@ module Actions
|
|
|
96
96
|
end
|
|
97
97
|
|
|
98
98
|
def handle_redhat_content(repository)
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
content_view_environment = repository.content_view.content_view_environment(repository.environment)
|
|
100
|
+
if content_view_environment && !repository.content_view.rolling?
|
|
101
|
+
plan_action(Candlepin::Environment::SetContent, repository.content_view, repository.environment, content_view_environment)
|
|
101
102
|
end
|
|
102
103
|
end
|
|
103
104
|
|
|
@@ -13,9 +13,8 @@ module Actions
|
|
|
13
13
|
}.merge(opts)
|
|
14
14
|
action_subject(organization)
|
|
15
15
|
validate_repositories_immediate!(organization) if options[:fail_on_missing_content]
|
|
16
|
-
content_view = ::Katello::Pulp3::ContentViewVersion::Export.
|
|
16
|
+
content_view = ::Katello::Pulp3::ContentViewVersion::Export.find_or_create_library_export_view(destination_server: options[:destination_server],
|
|
17
17
|
organization: organization,
|
|
18
|
-
create_by_default: true,
|
|
19
18
|
format: options[:format])
|
|
20
19
|
repo_ids_in_library = organization.default_content_view_version.repositories.exportable(format: options[:format]).immediate_or_none.pluck(:id)
|
|
21
20
|
content_view.update!(repository_ids: repo_ids_in_library)
|