katello 3.18.0.rc2.1 → 4.0.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/assets/stylesheets/katello/katello.scss +0 -72
- data/app/controllers/katello/api/rhsm/candlepin_dynflow_proxy_controller.rb +0 -19
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -3
- data/app/controllers/katello/api/v2/api_controller.rb +1 -2
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +2 -2
- data/app/controllers/katello/api/v2/content_credentials_controller.rb +24 -24
- data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +98 -0
- data/app/controllers/katello/api/v2/content_exports_controller.rb +88 -0
- data/app/controllers/katello/api/v2/content_imports_controller.rb +59 -0
- data/app/controllers/katello/api/v2/content_view_filters_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +56 -94
- data/app/controllers/katello/api/v2/content_views_controller.rb +2 -2
- data/app/controllers/katello/api/v2/host_errata_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_packages_controller.rb +6 -6
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +2 -3
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +3 -2
- data/app/controllers/katello/api/v2/repositories_controller.rb +5 -19
- data/app/controllers/katello/api/v2/simple_content_access_controller.rb +34 -0
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +8 -4
- data/app/controllers/katello/concerns/authorization/api/v2/content_views_controller.rb +1 -1
- data/app/helpers/katello/sync_management_helper.rb +0 -2
- data/app/lib/actions/candlepin/environment/create.rb +1 -1
- data/app/lib/actions/candlepin/environment/set_content.rb +1 -1
- data/app/lib/actions/katello/activation_key/create.rb +9 -11
- data/app/lib/actions/katello/agent/dispatch_history_presenter.rb +64 -0
- data/app/lib/actions/katello/agent_action.rb +107 -0
- data/app/lib/actions/katello/applicability/hosts/bulk_generate.rb +6 -2
- data/app/lib/actions/katello/bulk_agent_action.rb +21 -0
- data/app/lib/actions/katello/capsule_content/sync.rb +8 -8
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +16 -2
- data/app/lib/actions/katello/check_matching_content.rb +17 -0
- data/app/lib/actions/katello/content_view/environment_create.rb +6 -8
- data/app/lib/actions/katello/content_view/promote_to_environment.rb +1 -1
- data/app/lib/actions/katello/content_view/publish.rb +2 -2
- data/app/lib/actions/katello/content_view_version/import.rb +2 -1
- data/app/lib/actions/katello/content_view_version/import_library.rb +17 -0
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +30 -10
- data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +1 -1
- data/app/lib/actions/katello/host/erratum/install.rb +8 -26
- data/app/lib/actions/katello/host/hypervisors_update.rb +4 -4
- data/app/lib/actions/katello/host/package/install.rb +8 -21
- data/app/lib/actions/katello/host/package/remove.rb +8 -20
- data/app/lib/actions/katello/host/package/update.rb +9 -22
- data/app/lib/actions/katello/host/package_group/install.rb +8 -21
- data/app/lib/actions/katello/host/package_group/remove.rb +8 -20
- data/app/lib/actions/katello/host/update_system_purpose.rb +1 -1
- data/app/lib/actions/katello/organization/create.rb +3 -5
- data/app/lib/actions/katello/organization/destroy.rb +1 -1
- data/app/lib/actions/katello/organization/manifest_delete.rb +3 -5
- data/app/lib/actions/katello/organization/manifest_import.rb +1 -1
- data/app/lib/actions/katello/organization/manifest_refresh.rb +1 -1
- data/app/lib/actions/katello/repository/check_matching_content.rb +3 -1
- data/app/lib/actions/katello/repository/clone_contents.rb +8 -11
- data/app/lib/actions/katello/repository/create.rb +0 -8
- data/app/lib/actions/katello/repository/filtered_index_content.rb +3 -0
- data/app/lib/actions/katello/repository/index_content.rb +1 -0
- data/app/lib/actions/katello/repository/multi_clone_contents.rb +9 -12
- data/app/lib/actions/katello/repository/update.rb +0 -8
- data/app/lib/actions/middleware/execute_if_contents_changed.rb +4 -1
- data/app/lib/actions/middleware/record_smart_proxy_sync_history.rb +24 -4
- data/app/lib/actions/pulp/consumer.rb +0 -11
- data/app/lib/actions/pulp/orchestration/repository/refresh_repos.rb +0 -6
- data/app/lib/actions/pulp3/capsule_content/refresh_distribution.rb +3 -3
- data/app/lib/actions/pulp3/content_migration.rb +10 -0
- data/app/lib/actions/pulp3/content_migration_presenter.rb +59 -0
- data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +1 -1
- data/app/lib/actions/pulp3/content_view_version/export.rb +3 -2
- data/app/lib/actions/pulp3/import_migration.rb +6 -1
- data/app/lib/actions/pulp3/orchestration/content_view_version/copy_version_units_to_library.rb +2 -1
- data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +17 -13
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +60 -0
- data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +0 -4
- data/app/lib/actions/pulp3/orchestration/repository/import_upload.rb +16 -3
- data/app/lib/actions/pulp3/orchestration/repository/refresh_repos.rb +1 -6
- data/app/lib/actions/pulp3/repository/copy_content.rb +1 -1
- data/app/lib/actions/pulp3/repository/delete.rb +1 -1
- data/app/lib/actions/pulp3/repository/save_version.rb +1 -1
- data/app/lib/actions/pulp3/repository/upload_tag.rb +18 -0
- data/app/lib/katello/agent/base_message.rb +38 -0
- data/app/lib/katello/agent/client_message_handler.rb +60 -0
- data/app/lib/katello/agent/connection.rb +24 -0
- data/app/lib/katello/agent/install_errata_message.rb +25 -0
- data/app/lib/katello/agent/install_package_group_message.rb +25 -0
- data/app/lib/katello/agent/install_package_message.rb +28 -0
- data/app/lib/katello/agent/remove_package_group_message.rb +25 -0
- data/app/lib/katello/agent/remove_package_message.rb +28 -0
- data/app/lib/katello/agent/update_package_message.rb +25 -0
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +8 -0
- data/app/lib/katello/event_daemon/monitor.rb +53 -0
- data/app/lib/katello/event_daemon/runner.rb +99 -0
- data/app/lib/katello/event_daemon/services/agent_event_receiver.rb +62 -0
- data/app/lib/katello/logging.rb +32 -0
- data/app/lib/katello/messaging/connection.rb +1 -7
- data/app/lib/katello/messaging/received_message.rb +1 -1
- data/app/lib/katello/qpid/connection.rb +130 -0
- data/app/lib/katello/validators/content_view_puppet_module_validator.rb +1 -1
- data/app/models/katello/activation_key.rb +2 -2
- data/app/models/katello/agent/dispatch_history.rb +17 -0
- data/app/models/katello/authorization/content_view_version.rb +25 -2
- data/app/models/katello/authorization/content_view_version_export_history.rb +1 -1
- data/app/models/katello/authorization/organization.rb +8 -0
- data/app/models/katello/candlepin/repository_mapper.rb +1 -1
- data/app/models/katello/concerns/host_managed_extensions.rb +3 -0
- data/app/models/katello/concerns/operatingsystem_extensions.rb +2 -0
- data/app/models/katello/concerns/organization_extensions.rb +2 -2
- data/app/models/katello/concerns/pulp_database_unit.rb +7 -0
- data/app/models/katello/concerns/redhat_extensions.rb +2 -2
- data/app/models/katello/concerns/smart_proxy_extensions.rb +31 -5
- data/app/models/katello/content_migration_progress.rb +4 -0
- data/app/models/katello/content_view.rb +10 -1
- data/app/models/katello/content_view_environment.rb +2 -2
- data/app/models/katello/content_view_history.rb +2 -1
- data/app/models/katello/content_view_package_filter.rb +1 -1
- data/app/models/katello/content_view_puppet_environment.rb +2 -2
- data/app/models/katello/content_view_version.rb +2 -1
- data/app/models/katello/content_view_version_export_history.rb +26 -1
- data/app/models/katello/erratum.rb +3 -1
- data/app/models/katello/events/delete_host_agent_queue.rb +19 -0
- data/app/models/katello/glue/candlepin/pool.rb +2 -0
- data/app/models/katello/glue/pulp/repo.rb +0 -6
- data/app/models/katello/glue/pulp/repos.rb +1 -22
- data/app/models/katello/host/subscription_facet.rb +4 -0
- data/app/models/katello/ping.rb +12 -4
- data/app/models/katello/pool.rb +5 -0
- data/app/models/katello/product.rb +3 -3
- data/app/models/katello/repository.rb +10 -3
- data/app/models/katello/subscription_status.rb +3 -2
- data/app/models/setting/content.rb +0 -2
- data/app/presenters/katello/host_subscription_presenter.rb +3 -4
- data/app/presenters/katello/host_subscriptions_presenter.rb +24 -0
- data/app/services/katello/agent/dispatcher.rb +66 -0
- data/app/services/katello/applicability/applicable_content_helper.rb +44 -15
- data/app/services/katello/candlepin_event_listener.rb +12 -19
- data/app/services/katello/event_monitor/poller_thread.rb +3 -11
- data/app/services/katello/pulp/smart_proxy_repository.rb +0 -15
- data/app/services/katello/pulp3/api/docker.rb +4 -0
- data/app/services/katello/pulp3/content_view_version/export.rb +63 -5
- data/app/services/katello/pulp3/content_view_version/import.rb +40 -0
- data/app/services/katello/pulp3/content_view_version/import_export_common.rb +0 -16
- data/app/services/katello/pulp3/content_view_version/import_validator.rb +26 -49
- data/app/services/katello/pulp3/docker_manifest.rb +1 -0
- data/app/services/katello/pulp3/docker_tag.rb +1 -0
- data/app/services/katello/pulp3/migration.rb +44 -9
- data/app/services/katello/pulp3/repository.rb +13 -4
- data/app/services/katello/pulp3/repository/docker.rb +5 -0
- data/app/services/katello/pulp3/repository/yum.rb +15 -9
- data/app/services/katello/pulp3/task.rb +4 -0
- data/app/services/katello/pulp3/task_group.rb +4 -0
- data/app/services/katello/registration_manager.rb +10 -0
- data/app/services/katello/repository_type.rb +1 -1
- data/app/views/foreman/smart_proxies/_content_tab.html.erb +4 -47
- data/app/views/foreman/smart_proxies/show.html.erb +1 -1
- data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +22 -25
- data/app/views/katello/api/v2/content_view_version_export_histories/show.json.rabl +1 -0
- data/app/views/katello/api/v2/content_views/show.json.rabl +6 -0
- data/app/views/katello/api/v2/organizations/show.json.rabl +7 -9
- data/app/views/katello/layouts/react.html.erb +3 -2
- data/app/views/katello/sync_management/_products.html.erb +1 -1
- data/app/views/overrides/activation_keys/_host_tab_pane.html.erb +1 -5
- data/app/views/overrides/organizations/_edit_override.html.erb +1 -4
- data/app/views/overrides/smart_proxies/_environment_tab.html.erb +1 -1
- data/app/views/overrides/smart_proxies/_environment_tab_pane.html.erb +1 -1
- data/config/katello.yaml.example +0 -3
- data/config/routes/api/v2.rb +31 -13
- data/db/migrate/20150930183738_migrate_content_hosts.rb +1 -1
- data/db/migrate/20191204214919_add_content_view_version_counts.rb +0 -1
- data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +5 -2
- data/db/migrate/20201119211133_pulp3_migration_progress.rb +9 -0
- data/db/migrate/20210119162528_delete_puppet_and_ostree_repos.rb +56 -0
- data/db/migrate/20210122200618_create_katello_agent_dispatch_history.rb +11 -0
- data/db/migrate/20210125161911_delete_erratum_install_batch_size_setting.rb +5 -0
- data/db/migrate/20210128231228_add_type_and_from_cvv_to_cvv_export_history.rb +14 -0
- data/db/migrate/20210201163238_migrate_background_download_policy_to_migrate.rb +7 -0
- data/db/migrate/20210208213920_add_available_module_stream_context.rb +8 -0
- data/db/seeds.d/104-proxy.rb +1 -1
- data/db/seeds.d/111-upgrade_tasks.rb +2 -1
- data/engines/bastion/app/assets/javascripts/bastion/auth/authorization.service.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js +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-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html +35 -40
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register-os-client.directive.js +17 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html +12 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-deb-client.html +38 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-oracle-client.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-sles-client.html +28 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register.html +14 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-activation-keys.controller.js +8 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-content-hosts.controller.js +9 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/package-filter-details.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-publish.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +78 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +17 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +17 -24
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +1292 -1170
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +17 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +858 -807
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +18 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +17 -24
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +17 -18
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +986 -971
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +19 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +9 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/download-policy.service.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscription-start-date.directive.js +21 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscription-type.directive.js +16 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-start-date.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-type.html +18 -0
- data/lib/katello/engine.rb +12 -6
- data/lib/katello/middleware/event_daemon.rb +1 -1
- data/lib/katello/permission_creator.rb +26 -5
- data/lib/katello/plugin.rb +3 -2
- data/lib/katello/tasks/delete_orphaned_content.rake +1 -3
- data/lib/katello/tasks/jenkins.rake +1 -1
- data/lib/katello/tasks/pulp3_content_switchover.rake +1 -1
- data/lib/katello/tasks/pulp3_migration.rake +18 -6
- data/lib/katello/tasks/pulp3_migration_abort.rake +7 -2
- data/lib/katello/tasks/pulp3_migration_stats.rake +28 -8
- data/lib/katello/tasks/pulp3_post_migration_check.rake +1 -3
- data/lib/katello/tasks/receptor/extract_orgs.rake +1 -1
- data/lib/katello/tasks/reimport.rake +1 -1
- data/lib/katello/tasks/repository.rake +3 -5
- data/lib/katello/tasks/reset.rake +0 -15
- data/lib/katello/tasks/upgrades/4.0/remove_ostree_puppet_content.rake +16 -0
- data/lib/katello/version.rb +1 -1
- data/lib/proxy_api/container_gateway.rb +21 -0
- data/locale/action_names.rb +51 -51
- data/locale/bn/katello.edit.po +8538 -0
- data/locale/bn/katello.po +136 -51
- data/locale/bn/katello.po.time_stamp +0 -0
- data/locale/cs/katello.edit.po +8440 -0
- data/locale/cs/katello.po +136 -49
- data/locale/cs/katello.po.time_stamp +0 -0
- data/locale/de/katello.edit.po +8344 -0
- data/locale/de/katello.po +136 -48
- data/locale/de/katello.po.time_stamp +0 -0
- data/locale/en/katello.edit.po +8161 -0
- data/locale/en/katello.po +136 -48
- data/locale/en/katello.po.time_stamp +0 -0
- data/locale/es/katello.edit.po +8306 -0
- data/locale/es/katello.po +136 -48
- data/locale/es/katello.po.time_stamp +0 -0
- data/locale/fr/katello.edit.po +8356 -0
- data/locale/fr/katello.po +136 -48
- data/locale/fr/katello.po.time_stamp +0 -0
- data/locale/gu/katello.edit.po +8540 -0
- data/locale/gu/katello.po +136 -51
- data/locale/gu/katello.po.time_stamp +0 -0
- data/locale/hi/katello.edit.po +8537 -0
- data/locale/hi/katello.po +136 -51
- data/locale/hi/katello.po.time_stamp +0 -0
- data/locale/it/katello.edit.po +8293 -0
- data/locale/it/katello.po +136 -48
- data/locale/it/katello.po.time_stamp +0 -0
- data/locale/ja/katello.edit.po +8322 -0
- data/locale/ja/katello.po +136 -48
- data/locale/ja/katello.po.time_stamp +0 -0
- data/locale/katello.pot +941 -767
- data/locale/kn/katello.edit.po +8538 -0
- data/locale/kn/katello.po +136 -51
- data/locale/kn/katello.po.time_stamp +0 -0
- data/locale/ko/katello.edit.po +8289 -0
- data/locale/ko/katello.po +136 -48
- data/locale/ko/katello.po.time_stamp +0 -0
- data/locale/mr/katello.edit.po +8502 -0
- data/locale/mr/katello.po +136 -51
- data/locale/mr/katello.po.time_stamp +0 -0
- data/locale/or/katello.edit.po +8538 -0
- data/locale/or/katello.po +136 -51
- data/locale/or/katello.po.time_stamp +0 -0
- data/locale/pa/katello.edit.po +8524 -0
- data/locale/pa/katello.po +136 -51
- data/locale/pa/katello.po.time_stamp +0 -0
- data/locale/pt/katello.edit.po +8255 -0
- data/locale/pt/katello.po +136 -51
- data/locale/pt/katello.po.time_stamp +0 -0
- data/locale/pt_BR/katello.edit.po +8289 -0
- data/locale/pt_BR/katello.po +136 -48
- data/locale/pt_BR/katello.po.time_stamp +0 -0
- data/locale/ru/katello.edit.po +8309 -0
- data/locale/ru/katello.po +136 -48
- data/locale/ru/katello.po.time_stamp +0 -0
- data/locale/ta/katello.edit.po +8536 -0
- data/locale/ta/katello.po +136 -51
- data/locale/ta/katello.po.time_stamp +0 -0
- data/locale/te/katello.edit.po +8536 -0
- data/locale/te/katello.po +136 -51
- data/locale/te/katello.po.time_stamp +0 -0
- data/locale/zh_CN/katello.edit.po +8288 -0
- data/locale/zh_CN/katello.po +136 -48
- data/locale/zh_CN/katello.po.time_stamp +0 -0
- data/locale/zh_TW/katello.edit.po +8420 -0
- data/locale/zh_TW/katello.po +136 -48
- data/locale/zh_TW/katello.po.time_stamp +0 -0
- data/package.json +1 -1
- data/webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js +0 -1
- data/webpack/__mocks__/foremanReact/components/Pagination/PaginationHooks.js +2 -0
- data/webpack/__mocks__/foremanReact/components/common/dates/LongDateTime.js +5 -0
- data/webpack/{scenes/ContentViews/Details/Repositories → components/SelectableDropdown}/SelectableDropdown.js +20 -3
- data/webpack/components/SelectableDropdown/__tests__/SelectableDropdown.test.js +45 -0
- data/webpack/components/SelectableDropdown/index.js +3 -0
- data/webpack/components/Table/TableWrapper.js +2 -1
- data/webpack/components/Table/helpers.js +14 -0
- data/webpack/components/TypeAhead/TypeAhead.js +2 -1
- data/webpack/components/TypeAhead/pf3Search/TypeAheadSearch.js +2 -1
- data/webpack/components/TypeAhead/pf4Search/TypeAheadSearch.js +0 -1
- data/webpack/containers/Application/overrides.scss +6 -0
- data/webpack/index.js +6 -0
- data/webpack/redux/actions/RedHatRepositories/helpers.js +5 -5
- data/webpack/scenes/ContentViews/ContentViewsActions.js +31 -2
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +5 -1
- data/webpack/scenes/ContentViews/Copy/ContentViewCopySelectors.js +16 -0
- data/webpack/scenes/ContentViews/Copy/CopyContentViewForm.js +77 -0
- data/webpack/scenes/ContentViews/Copy/CopyContentViewModal.js +44 -0
- data/webpack/scenes/ContentViews/Copy/__tests__/contentViewCopyResult.fixtures.json +42 -0
- data/webpack/scenes/ContentViews/Copy/__tests__/copyContentView.test.js +39 -0
- data/webpack/scenes/ContentViews/Copy/index.js +4 -0
- data/webpack/scenes/ContentViews/Create/ContentViewCreateSelectors.js +16 -0
- data/webpack/scenes/ContentViews/Create/ContentViewFormComponents.js +58 -0
- data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +175 -0
- data/webpack/scenes/ContentViews/Create/CreateContentViewModal.js +27 -0
- data/webpack/scenes/ContentViews/Create/__tests__/contentViewCreateResult.fixtures.json +42 -0
- data/webpack/scenes/ContentViews/Create/__tests__/createContentView.test.js +92 -0
- data/webpack/scenes/ContentViews/Create/index.js +4 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +16 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +20 -1
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +17 -7
- data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +19 -13
- data/webpack/scenes/ContentViews/Details/Filters/ContentType.js +40 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +124 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.fixtures.json +134 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilters.test.js +92 -0
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +44 -25
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.test.js +17 -7
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +24 -0
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +53 -3
- data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +4 -3
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +41 -0
- data/webpack/scenes/ContentViews/helpers.js +13 -0
- data/webpack/scenes/SmartProxy/Content.js +17 -0
- data/webpack/scenes/SmartProxy/SmartProxyContentActions.js +11 -0
- data/webpack/scenes/SmartProxy/SmartProxyContentConstants.js +3 -0
- data/webpack/scenes/SmartProxy/SmartProxyContentSelectors.js +16 -0
- data/webpack/scenes/SmartProxy/SmartProxyContentTable.js +152 -0
- data/webpack/scenes/SmartProxy/__tests__/SmartProxyContentResult.fixtures.json +140 -0
- data/webpack/scenes/SmartProxy/__tests__/SmartProxyContentTest.js +38 -0
- data/webpack/scenes/SmartProxy/index.js +4 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +3 -3
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestActions.test.js +2 -2
- data/webpack/scenes/Subscriptions/Manifest/__tests__/SimpleContentAccess.test.js +2 -2
- data/webpack/test-utils/react-testing-lib-wrapper.js +5 -2
- data/webpack/utils/helpers.js +3 -0
- metadata +160 -40
- data/app/controllers/katello/api/v2/gpg_keys_controller.rb +0 -114
- data/app/lib/actions/pulp/consumer/abstract_content_action.rb +0 -71
- data/app/lib/actions/pulp/consumer/content_install.rb +0 -43
- data/app/lib/actions/pulp/consumer/content_uninstall.rb +0 -26
- data/app/lib/actions/pulp/consumer/content_update.rb +0 -32
- data/app/overrides/disable_turbolinks_on_proxies_index.rb +0 -5
- data/app/services/katello/event_daemon.rb +0 -135
- data/app/services/katello/pulp/content_counts_calculator.rb +0 -60
- data/db/functions/empty_v01.sql +0 -7
- data/db/functions/evr_trigger_v01.sql +0 -9
- data/db/functions/isalpha_v01.sql +0 -11
- data/db/functions/isalphanum_v01.sql +0 -12
- data/db/functions/isdigit_v01.sql +0 -10
- data/db/functions/rpmver_array_v01.sql +0 -60
- data/lib/katello/tasks/common.rake +0 -7
- data/lib/katello/tasks/reports.rake +0 -4
- data/lib/katello/tasks/upgrades/3.10/update_gpg_key_urls.rake +0 -32
- data/webpack/components/TypeAhead/pf4Search/TypeAheadSearch.scss +0 -5
- data/webpack/scenes/ContentViews/Table/actionResolver.js +0 -28
@@ -0,0 +1,59 @@
|
|
1
|
+
module Katello
|
2
|
+
class Api::V2::ContentImportsController < Api::V2::ApiController
|
3
|
+
before_action :find_publishable_content_view, :only => [:version]
|
4
|
+
before_action :find_importable_organization, :only => [:library]
|
5
|
+
before_action :find_default_content_view, :only => [:library]
|
6
|
+
|
7
|
+
api :POST, "/content_imports/version", N_("Import a content view version")
|
8
|
+
param :content_view_id, :number, :desc => N_("Content view identifier"), :required => true
|
9
|
+
param :path, String, :desc => N_("Directory containing the exported Content View Version"), :required => true
|
10
|
+
param :metadata, Hash, :desc => N_("Metadata taken from the upstream export history for this Content View Version"), :required => true
|
11
|
+
def version
|
12
|
+
if @view.default?
|
13
|
+
fail HttpErrors::BadRequest, _("Cannot use this end point for importing to library. "\
|
14
|
+
"If you intented to upload to library, use the library endpoint.")
|
15
|
+
end
|
16
|
+
|
17
|
+
task = async_task(::Actions::Katello::ContentViewVersion::Import, @view, path: params[:path], metadata: metadata_params.to_h)
|
18
|
+
respond_for_async :resource => task
|
19
|
+
end
|
20
|
+
|
21
|
+
api :POST, "/content_imports/library", N_("Import a content view version to the library")
|
22
|
+
param :organization_id, :number, :desc => N_("Organization identifier"), :required => true
|
23
|
+
param :path, String, :desc => N_("Directory containing the exported Content View Version"), :required => true
|
24
|
+
param :metadata, Hash, :desc => N_("Metadata taken from the upstream export history for this Content View Version"), :required => true
|
25
|
+
def library
|
26
|
+
task = async_task(::Actions::Katello::ContentViewVersion::ImportLibrary, @organization, path: params[:path], metadata: metadata_params.to_h)
|
27
|
+
respond_for_async :resource => task
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def find_publishable_content_view
|
33
|
+
@view = ContentView.publishable.find(params[:content_view_id])
|
34
|
+
throw_resource_not_found(name: 'content_view', id: params[:content_view_id]) if @view.blank?
|
35
|
+
end
|
36
|
+
|
37
|
+
def find_default_content_view
|
38
|
+
@view = @organization&.default_content_view
|
39
|
+
throw_resource_not_found(name: 'organization', id: params[:organization_id]) if @view.blank?
|
40
|
+
end
|
41
|
+
|
42
|
+
def find_importable_organization
|
43
|
+
find_organization
|
44
|
+
throw_resource_not_found(name: 'organization', id: params[:organization_id]) unless @organization.can_import_library_content?
|
45
|
+
end
|
46
|
+
|
47
|
+
def metadata_params
|
48
|
+
params.require(:metadata).permit(
|
49
|
+
:organization,
|
50
|
+
:content_view,
|
51
|
+
:repository_mapping,
|
52
|
+
:toc,
|
53
|
+
content_view_version: [:major, :minor]
|
54
|
+
).tap do |nested|
|
55
|
+
nested[:repository_mapping] = params[:metadata].require(:repository_mapping).permit!
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -73,7 +73,7 @@ module Katello
|
|
73
73
|
respond :resource => @filter
|
74
74
|
end
|
75
75
|
|
76
|
-
api :
|
76
|
+
api :delete, "/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
|
@@ -1,11 +1,13 @@
|
|
1
1
|
module Katello
|
2
|
-
# rubocop:disable Metrics/ClassLength
|
3
2
|
class Api::V2::ContentViewVersionsController < Api::V2::ApiController
|
4
3
|
include Concerns::Api::V2::BulkHostsExtensions
|
5
4
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
6
5
|
|
7
|
-
before_action :
|
8
|
-
before_action :
|
6
|
+
before_action :find_authorized_katello_resource, :only => [:show, :update, :promote, :destroy, :export, :republish_repositories]
|
7
|
+
before_action :find_content_view_from_version, :only => [:show, :update, :promote, :destroy, :export, :republish_repositories]
|
8
|
+
before_action :find_optional_readable_content_view, :only => [:index]
|
9
|
+
before_action :find_publishable_content_view, :only => [:import]
|
10
|
+
|
9
11
|
before_action :find_environment, :only => [:index]
|
10
12
|
before_action :find_environments, :only => [:promote]
|
11
13
|
before_action :validate_promotable, :only => [:promote]
|
@@ -47,7 +49,7 @@ module Katello
|
|
47
49
|
api :GET, "/content_view_versions/:id", N_("Show content view version")
|
48
50
|
param :id, :number, :desc => N_("Content view version identifier"), :required => true
|
49
51
|
def show
|
50
|
-
respond :resource => @
|
52
|
+
respond :resource => @content_view_version
|
51
53
|
end
|
52
54
|
|
53
55
|
api :POST, "/content_view_versions/:id/promote", N_("Promote a content view version")
|
@@ -58,7 +60,7 @@ module Katello
|
|
58
60
|
def promote
|
59
61
|
is_force = ::Foreman::Cast.to_bool(params[:force])
|
60
62
|
task = async_task(::Actions::Katello::ContentView::Promote,
|
61
|
-
@
|
63
|
+
@content_view_version, @environments, is_force, params[:description])
|
62
64
|
respond_for_async :resource => task
|
63
65
|
end
|
64
66
|
|
@@ -66,59 +68,54 @@ module Katello
|
|
66
68
|
param :id, :number, :desc => N_("Content view version identifier"), :required => true
|
67
69
|
param :description, String, :desc => N_("The description for the content view version"), :required => true
|
68
70
|
def update
|
69
|
-
history = @
|
71
|
+
history = @content_view_version.history.publish.successful.first
|
70
72
|
if history.blank?
|
71
73
|
fail HttpErrors::BadRequest, _("This content view version doesn't have a history.")
|
72
74
|
else
|
73
75
|
history.notes = params[:description]
|
74
76
|
history.save!
|
75
|
-
respond_for_show(:resource => @
|
77
|
+
respond_for_show(:resource => @content_view_version)
|
76
78
|
end
|
77
79
|
end
|
78
80
|
|
79
81
|
api :PUT, "/content_view_versions/:id/republish_repositories", N_("Forces a republish of the version's repositories' metadata")
|
80
82
|
param :id, :number, :desc => N_("Content view version identifier"), :required => true
|
81
83
|
def republish_repositories
|
82
|
-
task = async_task(::Actions::Katello::ContentViewVersion::RepublishRepositories, @
|
84
|
+
task = async_task(::Actions::Katello::ContentViewVersion::RepublishRepositories, @content_view_version)
|
83
85
|
respond_for_async :resource => task
|
84
86
|
end
|
85
87
|
|
86
|
-
api :
|
87
|
-
param :content_view_version_id, :number, :desc => N_("Content view version identifier"), :required => false
|
88
|
-
param :content_view_id, :number, :desc => N_("Content view identifier"), :required => false
|
89
|
-
param :destination_server, String, :desc => N_("Destination Server name"), :required => false
|
90
|
-
param :organization_id, :number, :desc => N_("Organization identifier"), :required => false
|
91
|
-
param_group :search, Api::V2::ApiController
|
92
|
-
add_scoped_search_description_for(ContentViewVersionExportHistory)
|
93
|
-
def export_histories
|
94
|
-
history = ContentViewVersionExportHistory.readable
|
95
|
-
history = history.where(:content_view_version_id => params[:content_view_version_id]) unless params[:content_view_version_id].blank?
|
96
|
-
history = history.where(:destination_server => params[:destination_server]) unless params[:destination_server].blank?
|
97
|
-
history = history.with_organization_id(params[:organization_id]) unless params[:organization_id].blank?
|
98
|
-
history = history.with_content_view_id(params[:content_view_id]) unless params[:content_view_id].blank?
|
99
|
-
respond_for_index(:collection => scoped_search(history, 'id', 'asc', resource_class: ContentViewVersionExportHistory),
|
100
|
-
:template => '../../../api/v2/content_view_version_export_histories/index')
|
101
|
-
end
|
102
|
-
|
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")
|
88
|
+
api :POST, "/content_view_versions/:id/export", N_("Export a content view version. Relevant only for Pulp 2 repositories.")
|
110
89
|
param :id, :number, :desc => N_("Content view version identifier"), :required => true
|
111
|
-
param :
|
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
|
113
|
-
param :export_to_iso, :bool, :desc => N_("Export to ISO format. Relevant only for Pulp 2 repositories"), :required => false
|
90
|
+
param :export_to_iso, :bool, :desc => N_("Export to ISO format."), :required => false
|
114
91
|
param :iso_mb_size, :number, :desc => N_("maximum size of each ISO in MB. Relevant only for Pulp 2 repositories"), :required => false
|
115
92
|
param :since, Date, :desc => N_("Optional date of last export (ex: 2010-01-01T12:00:00Z). Relevant only for Pulp 2 repositories"), :required => false
|
116
93
|
def export
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
94
|
+
if SmartProxy.pulp_primary.pulp3_repository_type_support?(Katello::Repository::YUM_TYPE)
|
95
|
+
fail HttpErrors::BadRequest, _("Invalid usage for Pulp 3 repositories. "\
|
96
|
+
"Use hammer content-export for Yum repositories")
|
97
|
+
end
|
98
|
+
::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.")
|
99
|
+
if params[:export_to_iso].blank? && params[:iso_mb_size].present?
|
100
|
+
fail HttpErrors::BadRequest, _("ISO export must be enabled when specifying ISO size")
|
101
|
+
end
|
102
|
+
|
103
|
+
if (repos = @content_view_version.content_view.on_demand_repositories).any?
|
104
|
+
fail HttpErrors::BadRequest, _("This content view has on demand repositories that cannot be exported: %{repos}" % {repos: repos.pluck(:label).join(", ")})
|
105
|
+
end
|
106
|
+
|
107
|
+
if params[:since].present?
|
108
|
+
begin
|
109
|
+
params[:since].to_datetime
|
110
|
+
rescue
|
111
|
+
raise HttpErrors::BadRequest, _("Invalid date provided.")
|
112
|
+
end
|
113
|
+
end
|
114
|
+
task = async_task(::Actions::Katello::ContentViewVersion::Export, @content_view_version,
|
115
|
+
::Foreman::Cast.to_bool(params[:export_to_iso]),
|
116
|
+
params[:since].try(:to_datetime),
|
117
|
+
params[:iso_mb_size])
|
118
|
+
|
122
119
|
respond_for_async :resource => task
|
123
120
|
end
|
124
121
|
|
@@ -134,7 +131,7 @@ module Katello
|
|
134
131
|
api :DELETE, "/content_view_versions/:id", N_("Remove content view version")
|
135
132
|
param :id, :number, :desc => N_("Content view version identifier"), :required => true
|
136
133
|
def destroy
|
137
|
-
task = async_task(::Actions::Katello::ContentViewVersion::Destroy, @
|
134
|
+
task = async_task(::Actions::Katello::ContentViewVersion::Destroy, @content_view_version)
|
138
135
|
respond_for_async :resource => task
|
139
136
|
end
|
140
137
|
|
@@ -174,7 +171,7 @@ module Katello
|
|
174
171
|
|
175
172
|
validate_content(params[:add_content])
|
176
173
|
resolve_dependencies = params.fetch(:resolve_dependencies, true)
|
177
|
-
task = async_task(::Actions::Katello::ContentView::IncrementalUpdates, @
|
174
|
+
task = async_task(::Actions::Katello::ContentView::IncrementalUpdates, @content_view_version_environments, @composite_version_environments,
|
178
175
|
params[:add_content], resolve_dependencies, hosts, params[:description])
|
179
176
|
respond_for_async :resource => task
|
180
177
|
end
|
@@ -200,17 +197,22 @@ module Katello
|
|
200
197
|
find_bulk_hosts(:edit_hosts, params[:update_hosts], restrict_hosts)
|
201
198
|
end
|
202
199
|
|
203
|
-
def
|
204
|
-
@
|
205
|
-
end
|
206
|
-
|
207
|
-
def find_content_view
|
208
|
-
@view = @version ? @version.content_view : ContentView.where(:id => params[:content_view_id]).first
|
200
|
+
def find_content_view_from_version
|
201
|
+
@view = @content_view_version.content_view
|
209
202
|
if @view&.default? && params[:action] == "promote"
|
210
203
|
fail HttpErrors::BadRequest, _("The default content view cannot be promoted")
|
211
204
|
end
|
212
205
|
end
|
213
206
|
|
207
|
+
def find_optional_readable_content_view
|
208
|
+
@view = ContentView.readable.find_by(:id => params[:content_view_id])
|
209
|
+
end
|
210
|
+
|
211
|
+
def find_publishable_content_view
|
212
|
+
@view = ContentView.publishable.find_by(:id => params[:content_view_id])
|
213
|
+
throw_resource_not_found(name: 'product', id: params[:product_id]) if @view.nil?
|
214
|
+
end
|
215
|
+
|
214
216
|
def find_version_environments
|
215
217
|
#Generates a data structure for incremental update:
|
216
218
|
# [{:content_view_version => ContentViewVersion, :environments => [KTEnvironment]}]
|
@@ -218,7 +220,7 @@ module Katello
|
|
218
220
|
list = params[:content_view_version_environments]
|
219
221
|
fail _("At least one Content View Version must be specified") if list.empty?
|
220
222
|
|
221
|
-
@
|
223
|
+
@content_view_version_environments = []
|
222
224
|
@composite_version_environments = []
|
223
225
|
list.each do |combination|
|
224
226
|
version_environment = {
|
@@ -242,7 +244,7 @@ module Katello
|
|
242
244
|
if view.composite?
|
243
245
|
@composite_version_environments << version_environment
|
244
246
|
else
|
245
|
-
@
|
247
|
+
@content_view_version_environments << version_environment
|
246
248
|
@composite_version_environments += lookup_all_composites(version_environment[:content_view_version]) if params[:propagate_all_composites]
|
247
249
|
end
|
248
250
|
end
|
@@ -261,7 +263,7 @@ module Katello
|
|
261
263
|
def find_version_environments_for_hosts(include_composites)
|
262
264
|
if include_composites
|
263
265
|
version_environments_for_systems_map = {}
|
264
|
-
@
|
266
|
+
@content_view_version_environments.each do |version_environment|
|
265
267
|
version_environment[:content_view_version].composites.each do |composite_version|
|
266
268
|
version_environments_for_systems_map[composite_version.id] ||= {:content_view_version => composite_version,
|
267
269
|
:environments => composite_version.environments}
|
@@ -270,7 +272,7 @@ module Katello
|
|
270
272
|
|
271
273
|
version_environments_for_systems_map.values
|
272
274
|
else
|
273
|
-
@
|
275
|
+
@content_view_version_environments.select { |ve| !ve[:environments].blank? }
|
274
276
|
end
|
275
277
|
end
|
276
278
|
|
@@ -313,55 +315,15 @@ module Katello
|
|
313
315
|
|
314
316
|
def validate_promotable
|
315
317
|
fail HttpErrors::BadRequest, _("Could not find environments for promotion") if @environments.blank?
|
316
|
-
return deny_access unless @environments.all?(&:promotable_or_removable?) && @
|
318
|
+
return deny_access unless @environments.all?(&:promotable_or_removable?) && @content_view_version.content_view.promotable_or_removable?
|
317
319
|
true
|
318
320
|
end
|
319
321
|
|
320
322
|
def authorize_destroy
|
321
|
-
return deny_access unless @
|
323
|
+
return deny_access unless @content_view_version.content_view.deletable?
|
322
324
|
true
|
323
325
|
end
|
324
326
|
|
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
327
|
def metadata_params
|
366
328
|
params.require(:metadata).permit(
|
367
329
|
:organization,
|
@@ -190,8 +190,8 @@ module Katello
|
|
190
190
|
|
191
191
|
api :PUT, "/content_views/:id/remove", N_("Remove versions and/or environments from a content view and reassign systems and keys")
|
192
192
|
param :id, :number, :desc => N_("content view numeric identifier"), :required => true
|
193
|
-
param :environment_ids, :number, :desc => N_("environment numeric identifiers to be removed")
|
194
|
-
param :content_view_version_ids, :number, :desc => N_("content view version identifiers to be deleted")
|
193
|
+
param :environment_ids, Array, of: :number, :desc => N_("environment numeric identifiers to be removed")
|
194
|
+
param :content_view_version_ids, Array, of: :number, :desc => N_("content view version identifiers to be deleted")
|
195
195
|
param :system_content_view_id, :number, :desc => N_("content view to reassign orphaned systems to")
|
196
196
|
param :system_environment_id, :number, :desc => N_("environment to reassign orphaned systems to")
|
197
197
|
param :key_content_view_id, :number, :desc => N_("content view to reassign orphaned activation keys to")
|
@@ -55,7 +55,7 @@ module Katello
|
|
55
55
|
|
56
56
|
param_group :bulk_errata_ids
|
57
57
|
def apply
|
58
|
-
task = async_task(::Actions::Katello::Host::Erratum::Install, @host, @errata_ids)
|
58
|
+
task = async_task(::Actions::Katello::Host::Erratum::Install, @host, content: @errata_ids)
|
59
59
|
respond_for_async :resource => task
|
60
60
|
end
|
61
61
|
|
@@ -33,14 +33,14 @@ module Katello
|
|
33
33
|
def install
|
34
34
|
if params[:packages]
|
35
35
|
packages = validate_package_list_format(params[:packages])
|
36
|
-
task = async_task(::Actions::Katello::Host::Package::Install, @host, packages)
|
36
|
+
task = async_task(::Actions::Katello::Host::Package::Install, @host, content: packages)
|
37
37
|
respond_for_async :resource => task
|
38
38
|
return
|
39
39
|
end
|
40
40
|
|
41
41
|
if params[:groups]
|
42
42
|
groups = extract_group_names(params[:groups])
|
43
|
-
task = async_task(::Actions::Katello::Host::PackageGroup::Install, @host, groups)
|
43
|
+
task = async_task(::Actions::Katello::Host::PackageGroup::Install, @host, content: groups)
|
44
44
|
respond_for_async :resource => task
|
45
45
|
end
|
46
46
|
end
|
@@ -51,7 +51,7 @@ module Katello
|
|
51
51
|
def upgrade
|
52
52
|
if params[:packages]
|
53
53
|
packages = validate_package_list_format(params[:packages])
|
54
|
-
task = async_task(::Actions::Katello::Host::Package::Update, @host, packages)
|
54
|
+
task = async_task(::Actions::Katello::Host::Package::Update, @host, content: packages)
|
55
55
|
respond_for_async :resource => task
|
56
56
|
end
|
57
57
|
end
|
@@ -59,7 +59,7 @@ module Katello
|
|
59
59
|
api :PUT, "/hosts/:host_id/packages/upgrade_all", N_("Update packages remotely")
|
60
60
|
param :host_id, :number, :required => true, :desc => N_("ID of the host")
|
61
61
|
def upgrade_all
|
62
|
-
task = async_task(::Actions::Katello::Host::Package::Update, @host, [])
|
62
|
+
task = async_task(::Actions::Katello::Host::Package::Update, @host, content: [])
|
63
63
|
respond_for_async :resource => task
|
64
64
|
end
|
65
65
|
|
@@ -69,14 +69,14 @@ module Katello
|
|
69
69
|
def remove
|
70
70
|
if params[:packages]
|
71
71
|
packages = validate_package_list_format(params[:packages])
|
72
|
-
task = async_task(::Actions::Katello::Host::Package::Remove, @host, packages)
|
72
|
+
task = async_task(::Actions::Katello::Host::Package::Remove, @host, content: packages)
|
73
73
|
respond_for_async :resource => task
|
74
74
|
return
|
75
75
|
end
|
76
76
|
|
77
77
|
if params[:groups]
|
78
78
|
groups = extract_group_names(params[:groups])
|
79
|
-
task = async_task(::Actions::Katello::Host::PackageGroup::Remove, @host, groups)
|
79
|
+
task = async_task(::Actions::Katello::Host::PackageGroup::Remove, @host, content: groups)
|
80
80
|
respond_for_async :resource => task
|
81
81
|
end
|
82
82
|
end
|
@@ -42,9 +42,8 @@ module Katello
|
|
42
42
|
def index_response(reload_host = false)
|
43
43
|
# Host needs to be reloaded because of lazy accessor
|
44
44
|
@host.reload if reload_host
|
45
|
-
|
46
|
-
subscriptions
|
47
|
-
full_result_response(subscriptions)
|
45
|
+
presenter = ::Katello::HostSubscriptionsPresenter.new(@host)
|
46
|
+
full_result_response(presenter.subscriptions)
|
48
47
|
end
|
49
48
|
|
50
49
|
api :PUT, "/hosts/:host_id/subscriptions/auto_attach", N_("Trigger an auto-attach of subscriptions")
|
@@ -267,8 +267,9 @@ module Katello
|
|
267
267
|
api :POST, "/hosts/bulk/available_incremental_updates", N_("Given a set of hosts and errata, lists the content view versions" \
|
268
268
|
" and environments that need updating.")
|
269
269
|
param_group :bulk_params
|
270
|
-
param :errata_ids, Array, :desc => N_("List of Errata ids")
|
270
|
+
param :errata_ids, Array, :desc => N_("List of Errata ids"), :required => true
|
271
271
|
def available_incremental_updates
|
272
|
+
fail HttpErrors::BadRequest, _("errata_ids is a required parameter") if params[:errata_ids].empty?
|
272
273
|
version_environments = {}
|
273
274
|
content_facets = Katello::Host::ContentFacet.with_non_installable_errata(@errata, @hosts)
|
274
275
|
|
@@ -364,7 +365,7 @@ module Katello
|
|
364
365
|
if params[:action] == :update_content && params[:update_all]
|
365
366
|
content = []
|
366
367
|
end
|
367
|
-
task = async_task(
|
368
|
+
task = async_task(Actions::Katello::BulkAgentAction, PARAM_ACTIONS[params[:action]][params[:content_type]], @hosts, content: content)
|
368
369
|
respond_for_async :resource => task
|
369
370
|
end
|
370
371
|
end
|
@@ -25,7 +25,6 @@ module Katello
|
|
25
25
|
before_action(:only => [:create, :update]) { find_content_credential CONTENT_CREDENTIAL_SSL_CA_CERT_TYPE }
|
26
26
|
before_action(:only => [:create, :update]) { find_content_credential CONTENT_CREDENTIAL_SSL_CLIENT_CERT_TYPE }
|
27
27
|
before_action(:only => [:create, :update]) { find_content_credential CONTENT_CREDENTIAL_SSL_CLIENT_KEY_TYPE }
|
28
|
-
before_action :check_ignore_global_proxy, :only => [ :update, :create ]
|
29
28
|
skip_before_action :authorize, :only => [:gpg_key_content]
|
30
29
|
skip_before_action :check_media_type, :only => [:upload_content]
|
31
30
|
|
@@ -45,7 +44,7 @@ module Katello
|
|
45
44
|
param :checksum_type, String, :desc => N_("Checksum of the repository, currently 'sha1' & 'sha256' are supported")
|
46
45
|
param :docker_upstream_name, String, :desc => N_("Name of the upstream docker repository")
|
47
46
|
param :docker_tags_whitelist, Array, :desc => N_("Comma-separated list of tags to sync for Container Image repository")
|
48
|
-
param :download_policy, ["immediate", "on_demand"
|
47
|
+
param :download_policy, ["immediate", "on_demand"], :desc => N_("download policy for yum repos (either 'immediate' or 'on_demand')")
|
49
48
|
param :download_concurrency, :number, :desc => N_("Used to determine download concurrency of the repository in pulp3. Use value less than 20. Defaults to 10")
|
50
49
|
param :mirror_on_sync, :bool, :desc => N_("true if this repository when synced has to be mirrored from the source and stale rpms removed")
|
51
50
|
param :verify_ssl_on_sync, :bool, :desc => N_("if true, Katello will verify the upstream url's SSL certifcates are signed by a trusted CA")
|
@@ -56,11 +55,11 @@ module Katello
|
|
56
55
|
param :deb_releases, String, :desc => N_("comma-separated list of releases to be synced from deb-archive")
|
57
56
|
param :deb_components, String, :desc => N_("comma-separated list of repo components to be synced from deb-archive")
|
58
57
|
param :deb_architectures, String, :desc => N_("comma-separated list of architectures to be synced from deb-archive")
|
59
|
-
param :ignore_global_proxy, :bool, :desc => N_("if true, will ignore the globally configured proxy when syncing"), :deprecated => true
|
60
58
|
param :ignorable_content, Array, :desc => N_("List of content units to ignore while syncing a yum repository. Must be subset of %s") % RootRepository::IGNORABLE_CONTENT_UNIT_TYPES.join(",")
|
61
59
|
param :ansible_collection_requirements, String, :desc => N_("Contents of requirement yaml file to sync from URL")
|
62
60
|
param :http_proxy_policy, ::Katello::RootRepository::HTTP_PROXY_POLICIES, :desc => N_("policies for HTTP proxy for content sync")
|
63
61
|
param :http_proxy_id, :number, :desc => N_("ID of a HTTP Proxy")
|
62
|
+
param :arch, String, :desc => N_("Architecture of content in the repository")
|
64
63
|
end
|
65
64
|
|
66
65
|
def_param_group :repo_create do
|
@@ -95,6 +94,7 @@ module Katello
|
|
95
94
|
param :available_for, String, :desc => N_("interpret specified object to return only Repositories that can be associated with specified object. Only 'content_view' & 'content_view_version' are supported."),
|
96
95
|
:required => false
|
97
96
|
param :with_content, RepositoryTypeManager.enabled_content_types, :desc => N_("only repositories having at least one of the specified content type ex: rpm , erratum")
|
97
|
+
param :download_policy, ::Runcible::Models::YumImporter::DOWNLOAD_POLICIES, :desc => N_("limit to only repositories with this download policy")
|
98
98
|
param_group :search, Api::V2::ApiController
|
99
99
|
add_scoped_search_description_for(Repository)
|
100
100
|
def index
|
@@ -138,6 +138,7 @@ module Katello
|
|
138
138
|
def index_relation_product(query)
|
139
139
|
query = query.joins(:root => :product).where("#{Product.table_name}.organization_id" => @organization) if @organization
|
140
140
|
query = query.joins(:root).where("#{RootRepository.table_name}.product_id" => @product.id) if @product
|
141
|
+
query = query.joins(:root).where("#{RootRepository.table_name}.download_policy" => params[:download_policy]) if params[:download_policy]
|
141
142
|
query
|
142
143
|
end
|
143
144
|
|
@@ -224,10 +225,6 @@ module Katello
|
|
224
225
|
fail HttpErrors::UnprocessableEntity, msg
|
225
226
|
end
|
226
227
|
|
227
|
-
if repo_params['content_type'] == "puppet" || repo_params['content_type'] == "ostree"
|
228
|
-
::Foreman::Deprecation.api_deprecation_warning("Puppet and OSTree will no longer be supported in Katello 4.0")
|
229
|
-
end
|
230
|
-
|
231
228
|
gpg_key = get_content_credential(repo_params, CONTENT_CREDENTIAL_GPG_KEY_TYPE)
|
232
229
|
ssl_ca_cert = get_content_credential(repo_params, CONTENT_CREDENTIAL_SSL_CA_CERT_TYPE)
|
233
230
|
ssl_client_cert = get_content_credential(repo_params, CONTENT_CREDENTIAL_SSL_CLIENT_CERT_TYPE)
|
@@ -493,17 +490,6 @@ module Katello
|
|
493
490
|
params.require(:repository).permit(*keys).to_h.with_indifferent_access
|
494
491
|
end
|
495
492
|
|
496
|
-
def check_ignore_global_proxy
|
497
|
-
if params.key?(:ignore_global_proxy)
|
498
|
-
::Foreman::Deprecation.api_deprecation_warning("The parameter ignore_global_proxy will be removed in a future Katello release. Please update to use the http_proxy_policy parameter.")
|
499
|
-
if ::Foreman::Cast.to_bool(params[:ignore_global_proxy])
|
500
|
-
params[:repository][:http_proxy_policy] = RootRepository::NO_DEFAULT_HTTP_PROXY
|
501
|
-
else
|
502
|
-
params[:repository][:http_proxy_policy] = RootRepository::GLOBAL_DEFAULT_HTTP_PROXY
|
503
|
-
end
|
504
|
-
end
|
505
|
-
end
|
506
|
-
|
507
493
|
def get_content_credential(repo_params, content_type)
|
508
494
|
credential_value = @product.send(content_type)
|
509
495
|
|
@@ -515,7 +501,7 @@ module Katello
|
|
515
501
|
end
|
516
502
|
|
517
503
|
# rubocop:disable Metrics/CyclomaticComplexity
|
518
|
-
def construct_repo_from_params(repo_params)
|
504
|
+
def construct_repo_from_params(repo_params) # rubocop:disable Metrics/AbcSize
|
519
505
|
root = @product.add_repo(repo_params.slice(:label, :name, :description, :url, :content_type, :arch, :unprotected,
|
520
506
|
:gpg_key, :ssl_ca_cert, :ssl_client_cert, :ssl_client_key,
|
521
507
|
:checksum_type, :download_policy, :http_proxy_policy).to_h.with_indifferent_access)
|