katello 3.17.0.rc2 → 3.18.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +38 -21
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +3 -1
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +10 -15
- data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -8
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +31 -14
- data/app/controllers/katello/api/v2/content_view_filters_controller.rb +17 -8
- data/app/controllers/katello/api/v2/content_view_repositories_controller.rb +1 -0
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +74 -34
- data/app/controllers/katello/api/v2/content_views_controller.rb +37 -26
- data/app/controllers/katello/api/v2/environments_controller.rb +8 -8
- data/app/controllers/katello/api/v2/gpg_keys_controller.rb +5 -5
- data/app/controllers/katello/api/v2/host_collections_controller.rb +19 -16
- data/app/controllers/katello/api/v2/host_debs_controller.rb +1 -0
- data/app/controllers/katello/api/v2/host_errata_controller.rb +2 -2
- data/app/controllers/katello/api/v2/host_tracer_controller.rb +16 -36
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +44 -4
- data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/products_controller.rb +9 -9
- data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/repositories_controller.rb +8 -5
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +24 -14
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/sync_plans_controller.rb +8 -9
- data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +9 -2
- data/app/controllers/katello/concerns/api/v2/authorization.rb +19 -5
- data/app/controllers/katello/concerns/api/v2/bulk_hosts_extensions.rb +22 -18
- data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +21 -0
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +1 -1
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +24 -0
- data/app/controllers/katello/concerns/registration_controller_extensions.rb +16 -0
- data/app/helpers/katello/katello_urls_helper.rb +5 -2
- data/app/lib/actions/candlepin/product/content_create.rb +2 -0
- data/app/lib/actions/candlepin/product/content_update.rb +2 -0
- data/app/lib/actions/helpers/smart_proxy_sync_history_helper.rb +24 -0
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +16 -7
- data/app/lib/actions/katello/content_view/promote.rb +2 -2
- data/app/lib/actions/katello/content_view/promote_to_environment.rb +12 -3
- data/app/lib/actions/katello/content_view/publish.rb +19 -3
- data/app/lib/actions/katello/content_view_version/import.rb +30 -0
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +22 -6
- data/app/lib/actions/katello/host/hypervisors_update.rb +18 -0
- data/app/lib/actions/katello/host/update_system_purpose.rb +31 -0
- data/app/lib/actions/katello/host/upload_package_profile.rb +3 -1
- data/app/lib/actions/katello/host/upload_profiles.rb +8 -6
- data/app/lib/actions/katello/organization/create.rb +1 -1
- data/app/lib/actions/katello/organization/manifest_delete.rb +0 -1
- data/app/lib/actions/katello/organization/manifest_import.rb +0 -1
- data/app/lib/actions/katello/organization/manifest_refresh.rb +0 -1
- data/app/lib/actions/katello/organization/simple_content_access/disable.rb +8 -0
- data/app/lib/actions/katello/organization/simple_content_access/enable.rb +8 -0
- data/app/lib/actions/katello/organization/simple_content_access/toggle.rb +16 -2
- data/app/lib/actions/katello/product/content_create.rb +7 -6
- data/app/lib/actions/katello/repository/filtered_index_content.rb +10 -1
- data/app/lib/actions/katello/repository/import_upload.rb +4 -1
- data/app/lib/actions/katello/repository/multi_clone_contents.rb +8 -6
- data/app/lib/actions/katello/repository/remove_content.rb +1 -1
- data/app/lib/actions/katello/repository/sync.rb +3 -1
- data/app/lib/actions/katello/repository/update.rb +5 -1
- data/app/lib/actions/katello/repository/upload_files.rb +1 -0
- data/app/lib/actions/middleware/record_smart_proxy_sync_history.rb +15 -0
- data/app/lib/actions/pulp/consumer/sync_capsule.rb +4 -2
- data/app/lib/actions/pulp/repository/distributor_publish.rb +1 -1
- data/app/lib/actions/pulp3/abstract_async_task.rb +1 -0
- data/app/lib/actions/pulp3/capsule_content/sync.rb +1 -0
- data/app/lib/actions/pulp3/content_view_version/create_importer.rb +24 -0
- data/app/lib/actions/pulp3/content_view_version/destroy_importer.rb +16 -0
- data/app/lib/actions/pulp3/content_view_version/export.rb +6 -1
- data/app/lib/actions/pulp3/content_view_version/import.rb +25 -0
- data/app/lib/actions/pulp3/orchestration/content_view_version/copy_version_units_to_library.rb +25 -0
- data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +40 -10
- data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +47 -0
- data/app/lib/actions/pulp3/orchestration/repository/generate_metadata.rb +4 -1
- data/app/lib/actions/pulp3/repository/commit_upload.rb +2 -1
- data/app/lib/actions/pulp3/repository/copy_content.rb +6 -1
- data/app/lib/actions/pulp3/repository/multi_copy_content.rb +1 -1
- data/app/lib/actions/pulp3/repository/save_artifact.rb +1 -1
- data/app/lib/katello/resources/candlepin/consumer.rb +2 -2
- data/app/lib/katello/resources/candlepin/owner.rb +5 -0
- data/app/lib/katello/resources/candlepin/upstream_consumer.rb +6 -0
- data/app/lib/katello/resources/cdn.rb +3 -2
- data/app/lib/katello/resources/registry.rb +3 -3
- data/app/lib/katello/util/cdn_var_substitutor.rb +9 -7
- data/app/models/katello/authorization/activation_key.rb +4 -0
- data/app/models/katello/authorization/content_view.rb +13 -0
- data/app/models/katello/authorization/content_view_component.rb +15 -0
- data/app/models/katello/authorization/content_view_filter.rb +15 -0
- data/app/models/katello/authorization/gpg_key.rb +12 -4
- data/app/models/katello/authorization/lifecycle_environment.rb +8 -0
- data/app/models/katello/authorization/sync_plan.rb +16 -0
- data/app/models/katello/concerns/organization_extensions.rb +4 -5
- data/app/models/katello/concerns/smart_proxy_extensions.rb +2 -0
- data/app/models/katello/content_view.rb +30 -3
- data/app/models/katello/content_view_component.rb +2 -0
- data/app/models/katello/content_view_filter.rb +5 -0
- data/app/models/katello/content_view_puppet_module.rb +8 -0
- data/app/models/katello/content_view_repository.rb +13 -1
- data/app/models/katello/content_view_version.rb +10 -1
- data/app/models/katello/content_view_version_export_history.rb +2 -0
- data/app/models/katello/glue/candlepin/pool.rb +9 -14
- data/app/models/katello/glue/pulp/repo.rb +9 -1
- data/app/models/katello/gpg_key.rb +1 -1
- data/app/models/katello/ping.rb +8 -3
- data/app/models/katello/repository.rb +26 -0
- data/app/models/katello/root_repository.rb +31 -2
- data/app/models/katello/smart_proxy_sync_history.rb +8 -0
- data/app/overrides/add_organization_attributes.rb +12 -0
- data/app/services/katello/candlepin/event_handler.rb +2 -0
- data/app/services/katello/candlepin/message_handler.rb +34 -0
- data/app/services/katello/candlepin/upstream_consumer.rb +28 -0
- data/app/services/katello/host_status_manager.rb +9 -0
- data/app/services/katello/host_trace_manager.rb +38 -0
- data/app/services/katello/pulp3/api/apt.rb +57 -0
- data/app/services/katello/pulp3/api/core.rb +8 -0
- data/app/services/katello/pulp3/content_view_version/export.rb +87 -32
- data/app/services/katello/pulp3/content_view_version/import.rb +52 -0
- data/app/services/katello/pulp3/content_view_version/import_export_common.rb +50 -0
- data/app/services/katello/pulp3/content_view_version/import_validator.rb +107 -0
- data/app/services/katello/pulp3/deb.rb +38 -0
- data/app/services/katello/pulp3/migration.rb +8 -2
- data/app/services/katello/pulp3/pulp_content_unit.rb +5 -0
- data/app/services/katello/pulp3/repository.rb +7 -1
- data/app/services/katello/pulp3/repository/ansible_collection.rb +9 -0
- data/app/services/katello/pulp3/repository/apt.rb +63 -0
- data/app/services/katello/pulp3/repository/docker.rb +4 -0
- data/app/services/katello/pulp3/repository/yum.rb +71 -4
- data/app/services/katello/pulp3/repository_mirror.rb +9 -4
- data/app/services/katello/pulp3/task.rb +4 -4
- data/app/services/katello/pulp3/task_group.rb +6 -0
- data/app/services/katello/repository_type.rb +2 -1
- data/app/services/katello/smart_proxy_helper.rb +9 -0
- data/app/services/katello/ui_notifications/subscriptions/sca_disable_error.rb +13 -0
- data/app/services/katello/ui_notifications/subscriptions/sca_disable_success.rb +13 -0
- data/app/services/katello/ui_notifications/subscriptions/sca_enable_error.rb +13 -0
- data/app/services/katello/ui_notifications/subscriptions/sca_enable_success.rb +13 -0
- data/app/views/dashboard/_subscription_widget.html.erb +0 -5
- data/app/views/foreman/hosts/_registration.html.erb +12 -0
- data/app/views/katello/api/v2/content_view_version_export_histories/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_views/base.json.rabl +1 -0
- data/app/views/katello/api/v2/repositories/base.json.rabl +1 -1
- data/app/views/overrides/organizations/_edit_override.html.erb +10 -1
- data/app/views/overrides/organizations/_index_header_override.html.erb +3 -0
- data/app/views/overrides/organizations/_index_row_override.html.erb +3 -0
- data/config/routes/api/v2.rb +3 -6
- data/config/routes/overrides.rb +5 -0
- data/db/migrate/20200929200357_create_katello_smart_proxy_sync_history.rb +13 -0
- data/db/migrate/20201008204114_add_os_versions_to_katello_root_repositories.rb +5 -0
- data/db/migrate/20201012172713_remove_gpg_key_perms.rb +23 -0
- data/db/migrate/20201012192035_add_metadata_to_katello_content_view_version_export_history.rb +5 -0
- data/db/migrate/20201021150008_add_import_only_to_katello_content_view.rb +5 -0
- data/db/seeds.d/109-katello-notification-blueprints.rb +24 -0
- data/db/seeds.d/111-upgrade_tasks.rb +2 -1
- data/engines/bastion/app/assets/javascripts/bastion/components/notification.service.js +1 -1
- data/engines/bastion/app/assets/javascripts/bastion/components/nutupane.factory.js +8 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +2 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +4 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-subscriptions.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-repository-sets.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-system-purpose-modal.controller.js +112 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-traces-modal.controller.js +3 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html +78 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-modal-helper.service.js +11 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-installed.controller.js +2 -42
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-repository-sets.controller.js +4 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-subscriptions.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-repository-sets.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.controller.js +6 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-details.controller.js +12 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +7 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-info.html +7 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/new/content-view-new.controller.js +17 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/new/views/content-view-new.html +16 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/views/content-views.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-details.controller.js +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-info.html +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +3 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +15 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-advanced-sync-modal.controller.js +6 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +168 -155
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +18 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +125 -113
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +17 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js +46 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository-types.service.js +8 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-details.html +1 -1
- data/lib/katello/engine.rb +2 -0
- data/lib/katello/permission_creator.rb +78 -69
- data/lib/katello/permissions/host_permissions.rb +2 -0
- data/lib/katello/plugin.rb +10 -2
- data/lib/katello/repository_types/deb.rb +9 -1
- data/lib/katello/tasks/pulp3_migration_abort.rake +17 -0
- data/lib/katello/tasks/pulp3_migration_stats.rake +21 -0
- data/lib/katello/tasks/pulp3_post_migration_check.rake +2 -1
- data/lib/katello/tasks/reimport.rake +1 -1
- data/lib/katello/tasks/reset.rake +2 -1
- data/lib/katello/tasks/upgrades/3.18/add_cvv_export_history_metadata.rb +18 -0
- data/lib/katello/version.rb +1 -1
- data/locale/action_names.rb +54 -47
- data/locale/bn/katello.po +165 -26
- data/locale/cs/katello.po +164 -24
- data/locale/de/katello.po +165 -26
- data/locale/en/katello.po +164 -23
- data/locale/es/katello.po +165 -25
- data/locale/fr/katello.po +165 -25
- data/locale/gu/katello.po +165 -26
- data/locale/hi/katello.po +165 -26
- data/locale/it/katello.po +165 -25
- data/locale/ja/katello.po +165 -26
- data/locale/katello.pot +1036 -802
- data/locale/kn/katello.po +165 -26
- data/locale/ko/katello.po +165 -25
- data/locale/mr/katello.po +165 -26
- data/locale/or/katello.po +165 -26
- data/locale/pa/katello.po +165 -26
- data/locale/pt/katello.po +164 -23
- data/locale/pt_BR/katello.po +165 -25
- data/locale/ru/katello.po +165 -25
- data/locale/ta/katello.po +165 -26
- data/locale/te/katello.po +165 -26
- data/locale/zh_CN/katello.po +165 -25
- data/locale/zh_TW/katello.po +165 -26
- data/webpack/components/ActionableDetail.js +2 -1
- data/webpack/components/Search/Search.js +1 -1
- data/webpack/components/Table/MainTable.js +6 -2
- data/webpack/components/Table/TableWrapper.js +46 -9
- data/webpack/index.js +0 -1
- data/webpack/scenes/ContentViews/ContentViewSelectors.js +7 -3
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +8 -0
- data/webpack/scenes/ContentViews/ContentViewsPage.js +2 -9
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +25 -3
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +14 -4
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +2 -1
- data/webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js +56 -0
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +169 -0
- data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +47 -0
- data/webpack/scenes/ContentViews/Details/Repositories/RepoAddedStatus.js +17 -0
- data/webpack/scenes/ContentViews/Details/Repositories/RepoIcon.js +23 -0
- data/webpack/scenes/ContentViews/Details/Repositories/SelectableDropdown.js +49 -0
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +154 -0
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.test.js +131 -0
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +3 -0
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +4 -1
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +2 -2
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +29 -19
- data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +17 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestConstants.js +4 -0
- data/webpack/scenes/Subscriptions/Manifest/SimpleContentAccess.js +19 -2
- data/webpack/scenes/Subscriptions/Manifest/__tests__/SimpleContentAccess.test.js +9 -1
- data/webpack/scenes/Subscriptions/Manifest/index.js +2 -1
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +1 -1
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +3 -0
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +8 -2
- data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +3 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +3 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +6 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsSelectors.test.js.snap +6 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +1 -13
- data/webpack/test-utils/react-testing-lib-wrapper.js +3 -0
- metadata +87 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-traces-resolve.factory.js +0 -18
- data/webpack/__mocks__/foremanReact/components/common/Fill/GlobalFill.js +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31984263518369ed740c74cc962e0a3726d173f56f39beeff760737391520ba5
|
4
|
+
data.tar.gz: 87110c33c153b8dbb60062382e4afbe36e72ce826b4655fc64bdce3adf639e2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e34e20b1885f1e552101ed27f9a002844ef460213fe6f0b57efb507bae174a84fd1dc04c6b9bd9caac5af2a81c88e60dddd7e135c236e5f8a4bd3b022620596c
|
7
|
+
data.tar.gz: f33c6fd1f711801f238631c3eda95c5d3c2c2305b5f1a6c4de8c15226d5c6cf717e2827a5552723b2d84edf427ee890c7c933c4d8d632686b5e68a2ba5dba230
|
@@ -166,25 +166,27 @@ module Katello
|
|
166
166
|
headers[header[0].split('_')[1..-1].join('-')] = header[1]
|
167
167
|
end
|
168
168
|
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
169
|
+
if (manifest_response = redirect_client { Resources::Registry::Proxy.get(@_request.fullpath, headers) })
|
170
|
+
#when pulp 2 is removed, this should no longer be needed, and all clients should be redirected
|
171
|
+
logger.debug filter_sensitive_data(manifest_response)
|
172
|
+
results = JSON.parse(manifest_response)
|
173
|
+
|
174
|
+
response.header['Docker-Content-Digest'] = "sha256:#{Digest::SHA256.hexdigest(manifest_response)}"
|
175
|
+
# https://docs.docker.com/registry/spec/manifest-v2-2/
|
176
|
+
# If its v2 schema 2 only the mediaType attribute will be present in the manifest
|
177
|
+
media_type = results['mediaType']
|
178
|
+
if media_type.blank?
|
179
|
+
# so mediaType is not schema2 v2 only set the mediaType based on
|
180
|
+
# https://docs.docker.com/registry/spec/manifest-v2-1/
|
181
|
+
media_type = if results["signatures"].blank?
|
182
|
+
'application/vnd.docker.distribution.manifest.v1+json'
|
183
|
+
else
|
184
|
+
'application/vnd.docker.distribution.manifest.v1+prettyjws'
|
185
|
+
end
|
186
|
+
end
|
186
187
|
|
187
|
-
|
188
|
+
render json: manifest_response, content_type: media_type
|
189
|
+
end
|
188
190
|
end
|
189
191
|
|
190
192
|
def check_blob
|
@@ -199,11 +201,24 @@ module Katello
|
|
199
201
|
render json: {}
|
200
202
|
end
|
201
203
|
|
204
|
+
def redirect_client
|
205
|
+
return yield
|
206
|
+
rescue RestClient::Exception => exception
|
207
|
+
if [301, 302, 307].include?(exception.response.code)
|
208
|
+
redirect_to exception.response.headers[:location]
|
209
|
+
nil
|
210
|
+
else
|
211
|
+
raise exception
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
202
215
|
def pull_blob
|
203
216
|
headers = {}
|
204
217
|
headers['Accept'] = request.headers['Accept'] if request.headers['Accept']
|
205
|
-
|
206
|
-
|
218
|
+
if (blob_response = redirect_client { Resources::Registry::Proxy.get(@_request.fullpath, headers, max_redirects: 0) })
|
219
|
+
#when pulp 2 is removed, this should no longer be needed, and all clients should be redirected
|
220
|
+
render json: blob_response
|
221
|
+
end
|
207
222
|
end
|
208
223
|
|
209
224
|
def push_manifest
|
@@ -478,7 +493,9 @@ module Katello
|
|
478
493
|
end
|
479
494
|
|
480
495
|
def confirm_settings
|
481
|
-
|
496
|
+
if SETTINGS.dig(:katello, :container_image_registry) || SmartProxy.pulp_primary&.pulp3_repository_type_support?(::Katello::Repository::DOCKER_TYPE)
|
497
|
+
return true
|
498
|
+
end
|
482
499
|
render_error('custom_error', :status => :not_found,
|
483
500
|
:locals => { :message => "Registry not configured" })
|
484
501
|
end
|
@@ -119,7 +119,9 @@ module Katello
|
|
119
119
|
# Note that this request comes in as content-type 'text/plain' so that
|
120
120
|
# tomcat won't parse the json. Here we just pass the plain body through to candlepin
|
121
121
|
def async_hypervisors_update
|
122
|
-
task = Katello::Resources::Candlepin::Consumer.async_hypervisors(params[:owner],
|
122
|
+
task = Katello::Resources::Candlepin::Consumer.async_hypervisors(owner: params[:owner],
|
123
|
+
reporter_id: params[:reporter_id],
|
124
|
+
raw_json: request.raw_post)
|
123
125
|
async_task(::Actions::Katello::Host::Hypervisors, nil, :task_id => task['id'])
|
124
126
|
|
125
127
|
render :json => task
|
@@ -1,5 +1,4 @@
|
|
1
1
|
module Katello
|
2
|
-
# rubocop:disable Metrics/ClassLength
|
3
2
|
class Api::V2::ActivationKeysController < Api::V2::ApiController
|
4
3
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
5
4
|
include Katello::Concerns::Api::V2::ContentOverridesController
|
@@ -7,11 +6,10 @@ module Katello
|
|
7
6
|
before_action :find_environment, :only => [:index, :create, :update]
|
8
7
|
before_action :find_optional_organization, :only => [:index, :create, :show]
|
9
8
|
before_action :find_content_view, :only => [:index]
|
10
|
-
before_action :
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
before_action :authorize
|
9
|
+
before_action :find_authorized_katello_resource, :only => [:show, :update, :destroy, :available_releases, :product_content,
|
10
|
+
:available_host_collections, :add_host_collections, :remove_host_collections,
|
11
|
+
:content_override, :add_subscriptions, :remove_subscriptions,
|
12
|
+
:subscriptions]
|
15
13
|
before_action :verify_simple_content_access_disabled, :only => [:add_subscriptions]
|
16
14
|
|
17
15
|
wrap_parameters :include => (ActivationKey.attribute_names + %w(host_collection_ids service_level auto_attach purpose_role purpose_usage purpose_addons content_view_environment))
|
@@ -97,6 +95,9 @@ module Katello
|
|
97
95
|
param :id, :number, :desc => N_("ID of the activation key"), :required => true
|
98
96
|
param :organization_id, :number, :desc => N_("organization identifier"), :required => false
|
99
97
|
def copy
|
98
|
+
@activation_key = Katello::ActivationKey.readable.find_by(:id => params[:id])
|
99
|
+
throw_resource_not_found(name: 'activation_key', id: params[:id]) if @activation_key.nil?
|
100
|
+
|
100
101
|
fail HttpErrors::BadRequest, _("New name cannot be blank") unless params[:new_name]
|
101
102
|
@new_activation_key = @activation_key.copy(params[:new_name])
|
102
103
|
@new_activation_key.user = current_user
|
@@ -256,12 +257,6 @@ module Katello
|
|
256
257
|
activation_keys
|
257
258
|
end
|
258
259
|
|
259
|
-
def find_activation_key
|
260
|
-
@activation_key = ActivationKey.find(params[:id])
|
261
|
-
fail HttpErrors::NotFound, _("Couldn't find activation key '%s'") % params[:id] if @activation_key.nil?
|
262
|
-
@activation_key
|
263
|
-
end
|
264
|
-
|
265
260
|
private
|
266
261
|
|
267
262
|
def subscription_index
|
@@ -281,7 +276,7 @@ module Katello
|
|
281
276
|
environment_id = params[:environment][:id] if !environment_id && params[:environment]
|
282
277
|
return unless environment_id
|
283
278
|
|
284
|
-
@environment = KTEnvironment.
|
279
|
+
@environment = KTEnvironment.readable.find_by(id: environment_id)
|
285
280
|
fail HttpErrors::NotFound, _("Couldn't find environment '%s'") % params[:environment_id] if @environment.nil?
|
286
281
|
@organization = @environment.organization
|
287
282
|
@environment
|
@@ -292,7 +287,7 @@ module Katello
|
|
292
287
|
@host_collections = []
|
293
288
|
|
294
289
|
ids&.each do |host_collection_id|
|
295
|
-
host_collection = HostCollection.find(host_collection_id)
|
290
|
+
host_collection = HostCollection.readable.find(host_collection_id)
|
296
291
|
fail HttpErrors::NotFound, _("Couldn't find host collection '%s'") % host_collection_id if host_collection.nil?
|
297
292
|
@host_collections << host_collection
|
298
293
|
end
|
@@ -306,7 +301,7 @@ module Katello
|
|
306
301
|
def find_content_view
|
307
302
|
if params.include?(:content_view_id)
|
308
303
|
cv_id = params[:content_view_id]
|
309
|
-
@content_view = ContentView.find_by(:id => cv_id)
|
304
|
+
@content_view = ContentView.readable.find_by(:id => cv_id)
|
310
305
|
fail HttpErrors::NotFound, _("Couldn't find content view '%s'") % cv_id if @content_view.nil?
|
311
306
|
end
|
312
307
|
end
|
@@ -1,9 +1,8 @@
|
|
1
1
|
module Katello
|
2
2
|
class Api::V2::ContentCredentialsController < Api::V2::ApiController
|
3
3
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
4
|
-
before_action :authorize
|
5
4
|
before_action :find_organization, :only => [:create, :index, :auto_complete_search]
|
6
|
-
before_action :
|
5
|
+
before_action :find_authorized_katello_resource, :only => [:show, :update, :destroy, :content, :set_content]
|
7
6
|
skip_before_action :check_media_type, :only => [:create, :content, :set_content]
|
8
7
|
|
9
8
|
def resource_class
|
@@ -103,12 +102,6 @@ module Katello
|
|
103
102
|
|
104
103
|
protected
|
105
104
|
|
106
|
-
def find_content_credential
|
107
|
-
@content_credential = GpgKey.find(params[:id])
|
108
|
-
rescue ActiveRecord::RecordNotFound
|
109
|
-
raise HttpErrors::NotFound, _("Couldn't find Content Credential '%s'") % params[:id]
|
110
|
-
end
|
111
|
-
|
112
105
|
def content_credential_params
|
113
106
|
params.permit(:name, :content_type, :content)
|
114
107
|
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
module Katello
|
2
2
|
class Api::V2::ContentViewComponentsController < Api::V2::ApiController
|
3
|
-
before_action :find_composite_content_view
|
4
|
-
before_action :
|
3
|
+
before_action :find_composite_content_view, :only => [:show, :index]
|
4
|
+
before_action :find_composite_content_view_for_edit, :only => [:add_components, :remove_components, :update]
|
5
|
+
before_action :find_authorized_katello_resource, :only => [:show, :update]
|
5
6
|
|
6
7
|
wrap_parameters :include => %w(composite_content_view_id content_view_version_id content_view_id latest)
|
7
8
|
|
@@ -13,7 +14,7 @@ module Katello
|
|
13
14
|
end
|
14
15
|
|
15
16
|
def index_response
|
16
|
-
results = @view.content_view_components
|
17
|
+
results = @view.content_view_components.readable
|
17
18
|
{
|
18
19
|
:results => results.uniq,
|
19
20
|
:subtotal => results.count,
|
@@ -31,15 +32,26 @@ module Katello
|
|
31
32
|
param :latest, :bool, :desc => N_("true if the latest version of the component's content view is desired")
|
32
33
|
end
|
33
34
|
def add_components
|
35
|
+
@view.add_components(authorized_components)
|
36
|
+
@view.save!
|
37
|
+
respond_for_index(:collection => index_response, :template => "index")
|
38
|
+
end
|
39
|
+
|
40
|
+
private def authorized_components
|
34
41
|
components = params.require(:components).map do |component|
|
35
42
|
component = component.permit([:latest, :content_view_version_id, :content_view_id])
|
36
43
|
options = {}
|
37
44
|
options[:latest] = ::Foreman::Cast.to_bool(component[:latest]) if component.key?(:latest)
|
38
|
-
options.merge(component.slice(:content_view_version_id, :content_view_id))
|
45
|
+
options.merge(component.slice(:content_view_version_id, :content_view_id)).with_indifferent_access
|
46
|
+
end
|
47
|
+
|
48
|
+
components.each do |component|
|
49
|
+
if component[:content_view_version_id] && Katello::ContentViewVersion.readable.find_by(id: component[:content_view_version_id]).nil?
|
50
|
+
throw_resource_not_found(name: 'content_view_version', id: component[:content_view_version_id])
|
51
|
+
elsif component[:content_view_id] && Katello::ContentView.readable.find_by(id: component[:content_view_id]).nil?
|
52
|
+
throw_resource_not_found(name: 'content_view', id: component[:content_view_id])
|
53
|
+
end
|
39
54
|
end
|
40
|
-
@view.add_components(components)
|
41
|
-
@view.save!
|
42
|
-
respond_for_index(:collection => index_response, :template => "index")
|
43
55
|
end
|
44
56
|
|
45
57
|
api :PUT, "/content_views/:composite_content_view_id/content_view_components/remove",
|
@@ -56,7 +68,7 @@ module Katello
|
|
56
68
|
param :composite_content_view_id, :number, :desc => N_("composite content view numeric identifier"), :required => true
|
57
69
|
param :id, :number, :desc => N_("content view component ID. Identifier of the component association"), :required => true
|
58
70
|
def show
|
59
|
-
respond :resource => @
|
71
|
+
respond :resource => @content_view_component
|
60
72
|
end
|
61
73
|
|
62
74
|
api :PUT, "/content_views/:composite_content_view_id/content_view_components/:id",
|
@@ -67,6 +79,9 @@ module Katello
|
|
67
79
|
param :latest, :bool, :desc => N_("true if the latest version of the components content view is desired")
|
68
80
|
def update
|
69
81
|
cvv_id = component_params[:content_view_version_id]
|
82
|
+
if cvv_id && Katello::ContentViewVersion.readable.find_by(id: cvv_id).nil?
|
83
|
+
throw_resource_not_found(name: 'content view version', id: cvv_id)
|
84
|
+
end
|
70
85
|
if component_params.key?(:latest) && component_params.key?(:content_view_version_id)
|
71
86
|
latest = ::Foreman::Cast.to_bool(component_params[:latest])
|
72
87
|
if latest && cvv_id.present?
|
@@ -75,22 +90,24 @@ module Katello
|
|
75
90
|
end
|
76
91
|
end
|
77
92
|
if cvv_id.present?
|
78
|
-
@
|
93
|
+
@content_view_component.update!(:content_view_version_id => cvv_id, :latest => false)
|
79
94
|
elsif component_params.key?(:latest)
|
80
95
|
latest = ::Foreman::Cast.to_bool(component_params[:latest])
|
81
|
-
@
|
96
|
+
@content_view_component.update!(:content_view_version_id => nil, :latest => latest)
|
82
97
|
end
|
83
|
-
respond :resource => @
|
98
|
+
respond :resource => @content_view_component
|
84
99
|
end
|
85
100
|
|
86
101
|
private
|
87
102
|
|
88
103
|
def find_composite_content_view
|
89
|
-
@view = ContentView.composite.non_default.
|
104
|
+
@view = ContentView.composite.non_default.readable.find_by(id: params[:composite_content_view_id])
|
105
|
+
throw_resource_not_found(name: 'composite content view', id: params[:composite_content_view_id]) if @view.nil?
|
90
106
|
end
|
91
107
|
|
92
|
-
def
|
93
|
-
@
|
108
|
+
def find_composite_content_view_for_edit
|
109
|
+
@view = ContentView.composite.non_default.editable.find_by(id: params[:composite_content_view_id])
|
110
|
+
throw_resource_not_found(name: 'composite content view', id: params[:composite_content_view_id]) if @view.nil?
|
94
111
|
end
|
95
112
|
|
96
113
|
def component_params
|
@@ -2,9 +2,9 @@ module Katello
|
|
2
2
|
class Api::V2::ContentViewFiltersController < Api::V2::ApiController
|
3
3
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
4
4
|
|
5
|
-
before_action :
|
5
|
+
before_action :find_editable_content_view, :only => [:create, :update, :destroy]
|
6
|
+
before_action :find_readable_content_view, :only => [:show, :index, :auto_complete_search]
|
6
7
|
before_action :find_filter, :except => [:index, :create, :auto_complete_search]
|
7
|
-
|
8
8
|
wrap_parameters :include => (ContentViewFilter.attribute_names + %w(repository_ids))
|
9
9
|
|
10
10
|
api :get, "/content_views/:content_view_id/filters", N_("list filters")
|
@@ -73,7 +73,7 @@ module Katello
|
|
73
73
|
respond :resource => @filter
|
74
74
|
end
|
75
75
|
|
76
|
-
api :
|
76
|
+
api :delefind_filterte, "/content_views/:content_view_id/filters/:id", N_("delete a filter")
|
77
77
|
api :delete, "/content_view_filters/:id", N_("delete a filter")
|
78
78
|
param :content_view_id, :number, :desc => N_("content view identifier")
|
79
79
|
param :id, :number, :desc => N_("filter identifier"), :required => true
|
@@ -84,18 +84,27 @@ module Katello
|
|
84
84
|
|
85
85
|
private
|
86
86
|
|
87
|
-
def
|
88
|
-
@view = ContentView.
|
87
|
+
def find_readable_content_view
|
88
|
+
@view = ContentView.readable.find_by(id: params[:content_view_id]) if params[:content_view_id]
|
89
|
+
throw_resource_not_found(name: 'content view', id: params[:content_view_id]) if params[:content_view_id] && @view.nil?
|
90
|
+
end
|
91
|
+
|
92
|
+
def find_editable_content_view
|
93
|
+
@view = ContentView.editable.find_by(id: params[:content_view_id]) if params[:content_view_id]
|
94
|
+
throw_resource_not_found(name: 'content view', id: params[:content_view_id]) if params[:content_view_id] && @view.nil?
|
89
95
|
end
|
90
96
|
|
91
97
|
def find_filter
|
92
98
|
if @view
|
93
99
|
@filter = @view.filters.find_by(:id => params[:id])
|
94
|
-
|
100
|
+
elsif params[:action] == 'show'
|
101
|
+
@filter = ContentViewFilter.readable.find_by(id: params[:id])
|
102
|
+
@view = @filter&.content_view
|
95
103
|
else
|
96
|
-
@filter = ContentViewFilter.
|
97
|
-
@view = @filter
|
104
|
+
@filter = ContentViewFilter.editable.find_by(id: params[:id])
|
105
|
+
@view = @filter&.content_view
|
98
106
|
end
|
107
|
+
fail HttpErrors::NotFound, _("Couldn't find ContentViewFilter with id=%s") % params[:id] unless @filter
|
99
108
|
end
|
100
109
|
|
101
110
|
def filter_params
|
@@ -25,6 +25,7 @@ module Katello
|
|
25
25
|
SQL
|
26
26
|
|
27
27
|
query = Katello::Repository.readable.in_default_view.in_organization(@organization)
|
28
|
+
query = query.with_type(params[:content_type]) if params[:content_type]
|
28
29
|
# Use custom sort to perform the join and order since we need to order by specific content_view
|
29
30
|
# and the ORDER BY query needs access to the katello_content_view_repositories table
|
30
31
|
custom_sort = ->(sort_query) { sort_query.joins(:root).joins(join_query).order(order_query) }
|
@@ -1,4 +1,5 @@
|
|
1
1
|
module Katello
|
2
|
+
# rubocop:disable Metrics/ClassLength
|
2
3
|
class Api::V2::ContentViewVersionsController < Api::V2::ApiController
|
3
4
|
include Concerns::Api::V2::BulkHostsExtensions
|
4
5
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
@@ -99,47 +100,34 @@ module Katello
|
|
99
100
|
:template => '../../../api/v2/content_view_version_export_histories/index')
|
100
101
|
end
|
101
102
|
|
102
|
-
api :
|
103
|
+
api :GET, "/content_view_versions/export_api_status", N_("true if the export api is pulp3 ready and usable. This API is intended for use by hammer-cli only.")
|
104
|
+
def export_api_status
|
105
|
+
::Foreman::Deprecation.api_deprecation_warning("export_api_status is being deprecated and will be removed in a future version of Katello.")
|
106
|
+
render json: { api_usable: SmartProxy.pulp_primary.pulp3_repository_type_support?(Katello::Repository::YUM_TYPE) }, status: :ok
|
107
|
+
end
|
108
|
+
|
109
|
+
api :POST, "/content_view_versions/:id/export", N_("Export a content view version")
|
103
110
|
param :id, :number, :desc => N_("Content view version identifier"), :required => true
|
104
111
|
param :destination_server, String, :desc => N_("Destination Server name, required for Pulp3")
|
112
|
+
param :chunk_size_mb, :number, :desc => N_("Chunk export-tarfile into pieces of chunk_size mega bytes. Relevant only for Pulp 3 repositories"), :required => false
|
105
113
|
param :export_to_iso, :bool, :desc => N_("Export to ISO format. Relevant only for Pulp 2 repositories"), :required => false
|
106
114
|
param :iso_mb_size, :number, :desc => N_("maximum size of each ISO in MB. Relevant only for Pulp 2 repositories"), :required => false
|
107
115
|
param :since, Date, :desc => N_("Optional date of last export (ex: 2010-01-01T12:00:00Z). Relevant only for Pulp 2 repositories"), :required => false
|
108
116
|
def export
|
109
|
-
if SmartProxy.pulp_primary.pulp3_repository_type_support?(Katello::Repository::YUM_TYPE)
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
fail HttpErrors::BadRequest, _("Destination Server Name required for Pulp3 repositories")
|
117
|
-
end
|
118
|
-
|
119
|
-
task = async_task(::Actions::Pulp3::Orchestration::ContentViewVersion::Export, @version, destination_server: params[:destination_server])
|
120
|
-
else
|
121
|
-
::Foreman::Deprecation.api_deprecation_warning("Export is being deprecated and will be removed in a future version of Katello. Use hammer content-view version export instead.")
|
122
|
-
if params[:export_to_iso].blank? && params[:iso_mb_size].present?
|
123
|
-
fail HttpErrors::BadRequest, _("ISO export must be enabled when specifying ISO size")
|
124
|
-
end
|
125
|
-
|
126
|
-
if (repos = @version.content_view.on_demand_repositories).any?
|
127
|
-
fail HttpErrors::BadRequest, _("This content view has on demand repositories that cannot be exported: %{repos}" % {repos: repos.pluck(:label).join(", ")})
|
128
|
-
end
|
129
|
-
|
130
|
-
if params[:since].present?
|
131
|
-
begin
|
132
|
-
params[:since].to_datetime
|
133
|
-
rescue
|
134
|
-
raise HttpErrors::BadRequest, _("Invalid date provided.")
|
135
|
-
end
|
136
|
-
end
|
137
|
-
task = async_task(::Actions::Katello::ContentViewVersion::Export, @version,
|
138
|
-
::Foreman::Cast.to_bool(params[:export_to_iso]),
|
139
|
-
params[:since].try(:to_datetime),
|
140
|
-
params[:iso_mb_size])
|
141
|
-
end
|
117
|
+
task = if SmartProxy.pulp_primary.pulp3_repository_type_support?(Katello::Repository::YUM_TYPE)
|
118
|
+
export_pulp_v3
|
119
|
+
else
|
120
|
+
export_pulp_v2
|
121
|
+
end
|
122
|
+
respond_for_async :resource => task
|
123
|
+
end
|
142
124
|
|
125
|
+
api :POST, "/content_view_versions/import", N_("Import a content view version")
|
126
|
+
param :content_view_id, :number, :desc => N_("Content view identifier"), :required => true
|
127
|
+
param :path, String, :desc => N_("Directory containing the exported Content View Version"), :required => true
|
128
|
+
param :metadata, Hash, :desc => N_("Metadata taken from the upstream export history for this Content View Version"), :required => true
|
129
|
+
def import
|
130
|
+
task = async_task(::Actions::Katello::ContentViewVersion::Import, @view, path: params[:path], metadata: metadata_params&.to_h)
|
143
131
|
respond_for_async :resource => task
|
144
132
|
end
|
145
133
|
|
@@ -333,5 +321,57 @@ module Katello
|
|
333
321
|
return deny_access unless @version.content_view.deletable?
|
334
322
|
true
|
335
323
|
end
|
324
|
+
|
325
|
+
def export_pulp_v2
|
326
|
+
::Foreman::Deprecation.api_deprecation_warning("Export is being deprecated and will be removed in a future version of Katello. Use hammer content-view version export instead.")
|
327
|
+
if params[:export_to_iso].blank? && params[:iso_mb_size].present?
|
328
|
+
fail HttpErrors::BadRequest, _("ISO export must be enabled when specifying ISO size")
|
329
|
+
end
|
330
|
+
|
331
|
+
if (repos = @version.content_view.on_demand_repositories).any?
|
332
|
+
fail HttpErrors::BadRequest, _("This content view has on demand repositories that cannot be exported: %{repos}" % {repos: repos.pluck(:label).join(", ")})
|
333
|
+
end
|
334
|
+
|
335
|
+
if params[:since].present?
|
336
|
+
begin
|
337
|
+
params[:since].to_datetime
|
338
|
+
rescue
|
339
|
+
raise HttpErrors::BadRequest, _("Invalid date provided.")
|
340
|
+
end
|
341
|
+
end
|
342
|
+
async_task(::Actions::Katello::ContentViewVersion::Export, @version,
|
343
|
+
::Foreman::Cast.to_bool(params[:export_to_iso]),
|
344
|
+
params[:since].try(:to_datetime),
|
345
|
+
params[:iso_mb_size])
|
346
|
+
end
|
347
|
+
|
348
|
+
def export_pulp_v3
|
349
|
+
invalid_params = [:export_to_iso, :iso_mb_size, :since].reject { |param| params[param].blank? }
|
350
|
+
unless invalid_params.empty?
|
351
|
+
fail HttpErrors::BadRequest, _("Invalid parameters provided - %{params}. These are only relevant for Pulp 2 repositories" % { params: invalid_params.join(', ')})
|
352
|
+
end
|
353
|
+
|
354
|
+
if params[:destination_server].blank?
|
355
|
+
fail HttpErrors::BadRequest, _("Destination Server Name required for Pulp3 repositories")
|
356
|
+
end
|
357
|
+
|
358
|
+
history = ::Katello::ContentViewVersionExportHistory.find(params[:from_history_id]) unless params[:from_history_id].blank?
|
359
|
+
|
360
|
+
async_task(::Actions::Pulp3::Orchestration::ContentViewVersion::Export, @version, destination_server: params[:destination_server],
|
361
|
+
chunk_size: params[:chunk_size_mb],
|
362
|
+
from_history: history)
|
363
|
+
end
|
364
|
+
|
365
|
+
def metadata_params
|
366
|
+
params.require(:metadata).permit(
|
367
|
+
:organization,
|
368
|
+
:content_view,
|
369
|
+
:repository_mapping,
|
370
|
+
:toc,
|
371
|
+
content_view_version: [:major, :minor]
|
372
|
+
).tap do |nested|
|
373
|
+
nested[:repository_mapping] = params[:metadata].require(:repository_mapping).permit!
|
374
|
+
end
|
375
|
+
end
|
336
376
|
end
|
337
377
|
end
|