katello 3.6.0.1.rc2 → 3.7.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/hosts/activation_key_edit.js +2 -2
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +6 -4
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +1 -3
- data/app/controllers/katello/api/v2/api_controller.rb +13 -3
- data/app/controllers/katello/api/v2/content_credentials_controller.rb +116 -0
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +6 -0
- data/app/controllers/katello/api/v2/content_views_controller.rb +2 -1
- data/app/controllers/katello/api/v2/environments_controller.rb +20 -3
- data/app/controllers/katello/api/v2/gpg_keys_controller.rb +5 -0
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +14 -7
- data/app/controllers/katello/api/v2/products_controller.rb +31 -1
- data/app/controllers/katello/api/v2/repositories_controller.rb +103 -34
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +22 -15
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +31 -7
- data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +93 -0
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +2 -2
- data/app/helpers/katello/katello_urls_helper.rb +21 -4
- data/app/jobs/create_pulp_disk_space_notifications.rb +4 -0
- data/app/jobs/send_expire_soon_notifications.rb +13 -0
- data/app/lib/actions/candlepin/import_pool_handler.rb +5 -4
- data/app/lib/actions/candlepin/owner/import_products.rb +4 -2
- data/app/lib/actions/helpers/notifications.rb +35 -0
- data/app/lib/actions/katello/capsule_content/sync.rb +12 -1
- data/app/lib/actions/katello/content_view/{capsule_generate_and_sync.rb → capsule_sync.rb} +1 -1
- data/app/lib/actions/katello/content_view/promote_to_environment.rb +1 -1
- data/app/lib/actions/katello/content_view/publish.rb +40 -11
- data/app/lib/actions/katello/content_view/remove.rb +2 -2
- data/app/lib/actions/katello/environment/publish_repositories.rb +41 -0
- data/app/lib/actions/katello/event_queue/poller_thread.rb +10 -8
- data/app/lib/actions/katello/host/attach_subscriptions.rb +1 -1
- data/app/lib/actions/katello/host/remove_subscriptions.rb +1 -1
- data/app/lib/actions/katello/organization/manifest_delete.rb +22 -0
- data/app/lib/actions/katello/organization/manifest_import.rb +22 -0
- data/app/lib/actions/katello/organization/manifest_refresh.rb +22 -0
- data/app/lib/actions/katello/product/create.rb +3 -6
- data/app/lib/actions/katello/product/reindex_subscriptions.rb +3 -4
- data/app/lib/actions/katello/repository/{capsule_generate_and_sync.rb → capsule_sync.rb} +1 -1
- data/app/lib/actions/katello/repository/clone_yum_metadata.rb +2 -1
- data/app/lib/actions/katello/repository/create.rb +2 -1
- data/app/lib/actions/katello/repository/filtered_index_content.rb +2 -0
- data/app/lib/actions/katello/repository/import_upload.rb +38 -6
- data/app/lib/actions/katello/repository/remove_content.rb +1 -1
- data/app/lib/actions/katello/repository/sync.rb +8 -1
- data/app/lib/actions/katello/repository/sync_hook.rb +11 -0
- data/app/lib/actions/katello/repository/update.rb +4 -1
- data/app/lib/actions/katello/sync_plan/add_products.rb +1 -1
- data/app/lib/actions/katello/upstream_subscriptions/bind_entitlement.rb +31 -0
- data/app/lib/actions/katello/upstream_subscriptions/bind_entitlements.rb +28 -0
- data/app/lib/actions/katello/upstream_subscriptions/remove_entitlement.rb +22 -0
- data/app/lib/actions/katello/upstream_subscriptions/remove_entitlements.rb +35 -0
- data/app/lib/actions/katello/upstream_subscriptions/update_entitlement.rb +23 -0
- data/app/lib/actions/katello/upstream_subscriptions/update_entitlements.rb +37 -0
- data/app/lib/actions/middleware/execute_if_contents_changed.rb +1 -1
- data/app/lib/actions/pulp/repository/create.rb +3 -0
- data/app/lib/actions/pulp/repository/ensure_sync_notification.rb +11 -0
- data/app/lib/actions/pulp/repository/import_upload.rb +2 -2
- data/app/lib/katello/resources/candlepin.rb +68 -801
- data/app/lib/katello/resources/candlepin/activation_key.rb +101 -0
- data/app/lib/katello/resources/candlepin/c_p_user.rb +17 -0
- data/app/lib/katello/resources/candlepin/candlepin_ping.rb +19 -0
- data/app/lib/katello/resources/candlepin/consumer.rb +204 -0
- data/app/lib/katello/resources/candlepin/content.rb +36 -0
- data/app/lib/katello/resources/candlepin/entitlement.rb +22 -0
- data/app/lib/katello/resources/candlepin/environment.rb +44 -0
- data/app/lib/katello/resources/candlepin/job.rb +25 -0
- data/app/lib/katello/resources/candlepin/owner.rb +130 -0
- data/app/lib/katello/resources/candlepin/owner_info.rb +18 -0
- data/app/lib/katello/resources/candlepin/pool.rb +39 -0
- data/app/lib/katello/resources/candlepin/product.rb +116 -0
- data/app/lib/katello/resources/candlepin/proxy.rb +41 -0
- data/app/lib/katello/resources/candlepin/subscription.rb +31 -0
- data/app/lib/katello/resources/candlepin/upstream_consumer.rb +41 -0
- data/app/lib/katello/resources/candlepin/upstream_entitlement.rb +19 -0
- data/app/lib/katello/resources/candlepin/upstream_owner.rb +15 -0
- data/app/lib/katello/resources/candlepin/upstream_pool.rb +17 -0
- data/app/lib/katello/util/data.rb +2 -4
- data/app/lib/katello/util/http_proxy.rb +29 -0
- data/app/lib/katello/util/model.rb +1 -1
- data/app/lib/katello/validators/container_image_name_validator.rb +18 -0
- data/app/lib/katello/validators/content_view_environment_org_validator.rb +14 -0
- data/app/lib/katello/validators/environment_docker_repositories_validator.rb +71 -0
- data/app/lib/katello/validators/gpg_key_content_type_validator.rb +22 -0
- data/app/models/katello/activation_key.rb +4 -2
- data/app/models/katello/authorization/content_view_history.rb +0 -1
- data/app/models/katello/authorization/pool.rb +0 -2
- data/app/models/katello/authorization/repository.rb +0 -2
- data/app/models/katello/capsule_lifecycle_environment.rb +2 -0
- data/app/models/katello/compliance_reason.rb +5 -0
- data/app/models/katello/concerns/content_facet_host_extensions.rb +5 -1
- data/app/models/katello/concerns/organization_extensions.rb +22 -0
- data/app/models/katello/concerns/smart_proxy_extensions.rb +3 -2
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +2 -0
- data/app/models/katello/content.rb +5 -0
- data/app/models/katello/content_facet_applicable_rpm.rb +1 -0
- data/app/models/katello/content_view.rb +50 -82
- data/app/models/katello/content_view_component.rb +1 -0
- data/app/models/katello/content_view_docker_filter_rule.rb +0 -1
- data/app/models/katello/content_view_environment.rb +5 -3
- data/app/models/katello/content_view_filter.rb +2 -1
- data/app/models/katello/content_view_history.rb +3 -0
- data/app/models/katello/content_view_puppet_environment.rb +12 -0
- data/app/models/katello/content_view_puppet_module.rb +1 -0
- data/app/models/katello/content_view_version.rb +18 -1
- data/app/models/katello/docker_manifest.rb +2 -1
- data/app/models/katello/docker_manifest_list.rb +2 -1
- data/app/models/katello/docker_meta_tag.rb +22 -1
- data/app/models/katello/erratum.rb +17 -5
- data/app/models/katello/event.rb +2 -0
- data/app/models/katello/glue/candlepin/activation_key.rb +2 -2
- data/app/models/katello/glue/candlepin/candlepin_object.rb +7 -6
- data/app/models/katello/glue/candlepin/owner.rb +4 -3
- data/app/models/katello/glue/candlepin/pool.rb +51 -20
- data/app/models/katello/glue/candlepin/product.rb +3 -2
- data/app/models/katello/glue/candlepin/subscription.rb +16 -35
- data/app/models/katello/glue/pulp/repo.rb +26 -6
- data/app/models/katello/glue/pulp/repos.rb +6 -3
- data/app/models/katello/gpg_key.rb +29 -4
- data/app/models/katello/host/content_facet.rb +5 -3
- data/app/models/katello/host/subscription_facet.rb +55 -23
- data/app/models/katello/host_collection.rb +1 -0
- data/app/models/katello/host_collection_hosts.rb +1 -1
- data/app/models/katello/installed_package.rb +4 -0
- data/app/models/katello/installed_product.rb +33 -0
- data/app/models/katello/key_host_collection.rb +2 -2
- data/app/models/katello/kt_environment.rb +8 -0
- data/app/models/katello/ostree_branch.rb +1 -1
- data/app/models/katello/ping.rb +1 -0
- data/app/models/katello/pool.rb +13 -7
- data/app/models/katello/pool_product.rb +6 -0
- data/app/models/katello/product.rb +16 -6
- data/app/models/katello/product_content.rb +4 -0
- data/app/models/katello/pulp_task_status.rb +0 -46
- data/app/models/katello/repository.rb +96 -19
- data/app/models/katello/repository_docker_manifest.rb +1 -1
- data/app/models/katello/repository_docker_manifest_list.rb +1 -1
- data/app/models/katello/repository_ostree_branch.rb +1 -1
- data/app/models/katello/rhsm_fact_importer.rb +2 -17
- data/app/models/katello/subscription.rb +5 -5
- data/app/models/katello/subscription_facet_installed_product.rb +6 -0
- data/app/models/katello/subscription_facet_pool.rb +2 -0
- data/app/models/katello/sync_plan.rb +1 -0
- data/app/models/katello/upstream_pool.rb +112 -0
- data/app/models/setting/content.rb +11 -7
- data/app/services/katello/candlepin/consumer.rb +9 -2
- data/app/services/katello/candlepin/message_handler.rb +18 -35
- data/app/services/katello/candlepin/pool_service.rb +17 -0
- data/app/services/katello/event_queue.rb +11 -6
- data/app/services/katello/pulp/server.rb +3 -1
- data/app/services/katello/registration_manager.rb +9 -2
- data/app/services/katello/repository_type_manager.rb +2 -1
- data/app/services/katello/ui_notifications/abstract_notification.rb +29 -0
- data/app/services/katello/ui_notifications/content_view/auto_publish_failure.rb +22 -0
- data/app/services/katello/ui_notifications/pulp/proxy_disk_space.rb +3 -4
- data/app/services/katello/ui_notifications/subscriptions/expire_soon.rb +65 -0
- data/app/services/katello/ui_notifications/subscriptions/manifest_delete_error.rb +13 -0
- data/app/services/katello/ui_notifications/subscriptions/manifest_delete_success.rb +13 -0
- data/app/services/katello/ui_notifications/subscriptions/manifest_import_error.rb +13 -0
- data/app/services/katello/ui_notifications/subscriptions/manifest_import_success.rb +13 -0
- data/app/services/katello/ui_notifications/subscriptions/manifest_refresh_error.rb +13 -0
- data/app/services/katello/ui_notifications/subscriptions/manifest_refresh_success.rb +13 -0
- data/app/services/katello/ui_notifications/task_notification.rb +26 -0
- data/app/views/foreman/job_templates/install_errata.erb +7 -2
- data/app/views/foreman/job_templates/install_errata_-_katello_ansible_default.erb +18 -0
- data/app/views/foreman/job_templates/install_group_-_katello_ansible_default.erb +16 -0
- data/app/views/foreman/job_templates/install_package_-_katello_ansible_default.erb +16 -0
- data/app/views/foreman/job_templates/remove_group_-_katello_ansible_default.erb +16 -0
- data/app/views/foreman/job_templates/remove_package_-_katello_ansible_default.erb +16 -0
- data/app/views/foreman/job_templates/restart_services_-_katello_ansible_default.erb +20 -0
- data/app/views/foreman/job_templates/update_group_-_katello_ansible_default.erb +16 -0
- data/app/views/foreman/job_templates/update_package_-_katello_ansible_default.erb +16 -0
- data/app/views/foreman/smart_proxies/_content_tab.html.erb +1 -1
- data/app/views/katello/api/v2/content_credentials/index.json.rabl +3 -0
- data/app/views/katello/api/v2/content_credentials/show.json.rabl +101 -0
- data/app/views/katello/api/v2/content_view_histories/show.json.rabl +13 -1
- data/app/views/katello/api/v2/content_views/base.json.rabl +1 -0
- data/app/views/katello/api/v2/environments/show.json.rabl +1 -0
- data/app/views/katello/api/v2/errata/{available_errata.rabl → available_errata.json.rabl} +0 -0
- data/app/views/katello/api/v2/errata/show.json.rabl +4 -0
- data/app/views/katello/api/v2/products/_product_content.json.rabl +6 -6
- data/app/views/katello/api/v2/products/base.json.rabl +3 -0
- data/app/views/katello/api/v2/products/show.json.rabl +12 -0
- data/app/views/katello/api/v2/repositories/base.json.rabl +2 -1
- data/app/views/katello/api/v2/repositories/show.json.rabl +19 -5
- data/app/views/katello/api/v2/subscription_facet/show.json.rabl +10 -14
- data/app/views/katello/api/v2/subscriptions/base.json.rabl +2 -1
- data/app/views/katello/api/v2/upstream_subscriptions/base.json.rabl +18 -0
- data/app/views/katello/api/v2/upstream_subscriptions/index.json.rabl +7 -0
- data/app/views/katello/sync_management/_products.html.erb +1 -1
- data/config/katello.yaml.example +10 -0
- data/config/routes.rb +3 -14
- data/config/routes/api/rhsm.rb +1 -0
- data/config/routes/api/v2.rb +16 -0
- data/db/migrate/20161014133811_move_content_view_version_description_to_histories.rb +2 -1
- data/db/migrate/20161214151548_move_content_source_id_to_content_facets.rb +2 -2
- data/db/migrate/20171110082124_add_ssl_certs_to_products_and_repos.rb +42 -0
- data/db/migrate/20171214050230_add_auto_publish_to_content_views.rb +5 -0
- data/db/migrate/20180117202932_sub_facet_add_installed_products.rb +20 -0
- data/db/migrate/20180119152210_add_compliance_reasons.rb +11 -0
- data/db/migrate/20180207232901_add_triggered_by_to_content_view_history.rb +7 -0
- data/db/migrate/20180218191449_add_manifest_refreshed_at_to_organization.rb +9 -0
- data/db/migrate/20180227094827_use_uuid_for_task_id.rb +26 -0
- data/db/migrate/20180323175122_add_registry_name_pattern_to_environment.rb +11 -0
- data/db/migrate/20180326145716_subscription_cp_id_change.rb +10 -0
- data/db/migrate/20180326150339_move_stacking_id.rb +25 -0
- data/db/migrate/20180326190408_move_subscription_products.rb +75 -0
- data/db/migrate/20180402160223_clean_up_force_post_sync_action_setting.rb +5 -0
- data/db/migrate/20180410140909_add_organization_id_to_pool.rb +15 -0
- data/db/migrate/20180413153126_content_facet_applicable_rpms_index.rb +5 -0
- data/db/migrate/20180417031215_add_ignorable_content_to_repository.rb +5 -0
- data/db/migrate/20180521200848_drop_repo_rpms_timestamp_not_null.rb +18 -0
- data/db/seeds.d/109-katello-notification-blueprints.rb +42 -0
- data/db/seeds.d/110-content-view-autopublish.rb +15 -0
- data/db/seeds.d/75-job_templates.rb +3 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-add-subscriptions.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details-info.controller.js +34 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-subscriptions.controller.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-info.html +3 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/subscription-add-or-remove.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/content-credential.factory.js +83 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/{gpg-keys/gpg-keys.controller.js → content-credentials/content-credentials.controller.js} +8 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/{gpg-keys/gpg-keys.module.js → content-credentials/content-credentials.module.js} +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/content-credentials.routes.js +76 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/content-type.filter.js +25 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/{gpg-keys/details/gpg-key-details-info.controller.js → content-credentials/details/content-credential-details-info.controller.js} +10 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-details.controller.js +48 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-products.controller.js +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/content-credential-repositories.controller.js +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/details/views/content-credential-details.html +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/{gpg-keys/details/views/gpg-key-info.html → content-credentials/details/views/content-credential-info.html} +21 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/{gpg-keys/details/views/gpg-key-products.html → content-credentials/details/views/content-credential-products.html} +6 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/{gpg-keys/details/views/gpg-key-repositories.html → content-credentials/details/views/content-credential-repositories.html} +6 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/new/new-content-credential.controller.js +39 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/new/views/new-content-credential.html +53 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/views/content-credentials.html +55 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +31 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-host-collections-modal.controller.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-environment-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +108 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-host-collections-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +9 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-subscriptions.controller.js +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-subscriptions.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +4 -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 +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register.html +14 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/content-view-composite-available-content-views.controller.js +7 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-deb-repositories.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-docker-repositories.controller.js +5 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-file-repositories.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-ostree-repositories.controller.js +5 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-repositories.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-deb-repositories-list.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-details.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-docker-repositories-list.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-file-repositories-list.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-ostree-repositories-list.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-repositories-list.controller.js +4 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-versions.controller.js +5 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/date-type-errata-filter.controller.js +8 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter-helper.service.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/new-filter.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/date-type-errata.html +6 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/docker-filter.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/new-filter.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-modules.controller.js +5 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +8 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-docker-repositories.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-info.html +14 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +12 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/new/views/content-view-new.html +16 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-errata.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-details.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-environments.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/docker-tags.routes.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/views/docker-tags.html +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/content.service.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/environment.controller.js +3 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-details.html +8 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-docker.html +9 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-errata.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/environments.html +18 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum-content-hosts.controller.js +22 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum-repositories.controller.js +18 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-content-hosts.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/incremental-update.service.js +3 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +17 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/README +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +3465 -1541
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +10 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/katello-features.run.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branch-repositories.controller.js +18 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/package-repositories.controller.js +18 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/package-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/package-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/package.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/packages.routes.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/views/packages.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-details-info.controller.js +32 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +34 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.filter.js +16 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +15 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +42 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-debs.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-docker-manifest-lists.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-docker-manifests.html +7 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-docker-tags.html +47 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-files.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-packages.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +10 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +43 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repositories.routes.js +11 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository-types.service.js +39 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/yum-content-units.service.js +24 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-info.html +24 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/discovery-create.controller.js +7 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/discovery.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/views/discovery-create.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/new/product-form.controller.js +7 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/new/views/product-new-form.html +29 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +9 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.module.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/products.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-details.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/manifest-import.controller.js +12 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-delete-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-import.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task.factory.js +4 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/tasks-nutupane.factory.js +6 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/tasks-table.directive.js +6 -3
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +1 -1
- data/lib/katello/apipie/validators.rb +0 -56
- data/lib/katello/engine.rb +6 -43
- data/lib/katello/permission_creator.rb +31 -4
- data/lib/katello/plugin.rb +124 -73
- data/lib/katello/scheduled_jobs.rb +10 -4
- data/lib/katello/tasks/job_templates.rake +16 -0
- data/lib/katello/tasks/reset.rake +0 -3
- data/lib/katello/tasks/upgrades/3.6/import_backend_consumer_attributes.rake +32 -0
- data/lib/katello/tasks/upgrades/3.7/make_all_ks_repos_bootable.rake +11 -0
- data/lib/katello/version.rb +1 -1
- data/locale/action_names.rb +52 -48
- data/locale/katello.pot +3136 -1999
- data/package.json +83 -0
- data/webpack/__mocks__/foremanReact/common/helpers.js +5 -0
- data/webpack/__mocks__/foremanReact/components/common/table.js +6 -0
- data/webpack/__mocks__/react-bootstrap-tooltip-button.js +6 -0
- data/webpack/components/MultiSelect/index.js +35 -0
- data/webpack/components/PaginationRow/PaginationRow.test.js +25 -0
- data/webpack/components/PaginationRow/__snapshots__/PaginationRow.test.js.snap +35 -0
- data/webpack/components/PaginationRow/index.js +90 -0
- data/webpack/components/Search/Search.test.js +20 -0
- data/webpack/components/Search/__snapshots__/Search.test.js.snap +18 -0
- data/webpack/components/Search/helpers.js +6 -0
- data/webpack/components/Search/index.js +86 -0
- data/webpack/containers/Application/Routes.js +11 -0
- data/webpack/containers/Application/config.js +21 -0
- data/webpack/containers/Application/index.js +39 -0
- data/webpack/containers/Application/overrides.scss +38 -0
- data/webpack/index.js +18 -0
- data/webpack/mockRequest.js +32 -0
- data/webpack/move_to_foreman/Settings/SettingsActions.js +28 -0
- data/webpack/move_to_foreman/Settings/SettingsConstants.js +3 -0
- data/webpack/move_to_foreman/Settings/__tests__/SettingsActions.test.js +41 -0
- data/webpack/move_to_foreman/Settings/__tests__/settings.fixtures.js +34 -0
- data/webpack/move_to_foreman/__mocks__/foreman_toast_notifications.js +3 -0
- data/webpack/move_to_foreman/common/helpers.js +36 -0
- data/webpack/move_to_foreman/components/common/ConfirmDialog/ConfirmDialog.js +50 -0
- data/webpack/move_to_foreman/components/common/ConfirmDialog/__tests__/ConfirmDialog.test.js +40 -0
- data/webpack/move_to_foreman/components/common/ConfirmDialog/__tests__/__snapshots__/ConfirmDialog.test.js.snap +125 -0
- data/webpack/move_to_foreman/components/common/ConfirmDialog/index.js +3 -0
- data/webpack/move_to_foreman/components/common/Dialog/Dialog.js +65 -0
- data/webpack/move_to_foreman/components/common/Dialog/__tests__/Dialog.test.js +61 -0
- data/webpack/move_to_foreman/components/common/Dialog/__tests__/__snapshots__/Dialog.test.js.snap +349 -0
- data/webpack/move_to_foreman/components/common/Dialog/index.js +3 -0
- data/webpack/move_to_foreman/components/common/ModalProgressBar/ModalProgressBar.js +43 -0
- data/webpack/move_to_foreman/components/common/ModalProgressBar/ModalProgressBar.scss +15 -0
- data/webpack/move_to_foreman/components/common/ModalProgressBar/__tests__/ModalProgressBar.test.js +22 -0
- data/webpack/move_to_foreman/components/common/ModalProgressBar/__tests__/__snapshots__/ModalProgressBar.test.js.snap +60 -0
- data/webpack/move_to_foreman/components/common/ModalProgressBar/index.js +4 -0
- data/webpack/move_to_foreman/components/common/emptyState/index.js +49 -0
- data/webpack/move_to_foreman/components/common/table/index.js +88 -0
- data/webpack/move_to_foreman/foreman_toast_notifications.js +22 -0
- data/webpack/move_to_pf/TypeAhead/TypeAhead.js +125 -0
- data/webpack/move_to_pf/TypeAhead/TypeAhead.scss +7 -0
- data/webpack/move_to_pf/TypeAhead/TypeAheadInput.js +47 -0
- data/webpack/move_to_pf/TypeAhead/TypeAheadItems.js +60 -0
- data/webpack/move_to_pf/TypeAhead/helpers.js +5 -0
- data/webpack/move_to_pf/react-bootstrap-select/index.js +65 -0
- data/webpack/redux/actions/RedHatRepositories/enabled.js +53 -0
- data/webpack/redux/actions/RedHatRepositories/helpers.js +38 -0
- data/webpack/redux/actions/RedHatRepositories/repositorySetRepositories.js +50 -0
- data/webpack/redux/actions/RedHatRepositories/sets.js +42 -0
- data/webpack/redux/consts.js +18 -0
- data/webpack/redux/index.js +9 -0
- data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +149 -0
- data/webpack/redux/reducers/RedHatRepositories/enabled.js +80 -0
- data/webpack/redux/reducers/RedHatRepositories/enabled.test.js +36 -0
- data/webpack/redux/reducers/RedHatRepositories/filters.fixtures.js +5 -0
- data/webpack/redux/reducers/RedHatRepositories/index.js +10 -0
- data/webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.fixtures.js +135 -0
- data/webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.js +97 -0
- data/webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.test.js +66 -0
- data/webpack/redux/reducers/RedHatRepositories/sets.fixtures.js +123 -0
- data/webpack/redux/reducers/RedHatRepositories/sets.js +41 -0
- data/webpack/redux/reducers/RedHatRepositories/sets.test.js +36 -0
- data/webpack/redux/reducers/index.js +14 -0
- data/webpack/scenes/Organizations/OrganizationActions.js +60 -0
- data/webpack/scenes/Organizations/OrganizationConstants.js +7 -0
- data/webpack/scenes/Organizations/OrganizationReducer.js +32 -0
- data/webpack/scenes/Organizations/__tests__/OrganizationActions.test.js +59 -0
- data/webpack/scenes/Organizations/__tests__/OrganizationReducer.test.js +56 -0
- data/webpack/scenes/Organizations/__tests__/organizations.fixtures.js +99 -0
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository.js +114 -0
- data/webpack/scenes/RedHatRepositories/components/EnabledRepository.stories.js +13 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySet.js +35 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepositories.js +64 -0
- data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository.js +127 -0
- data/webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js +33 -0
- data/webpack/scenes/RedHatRepositories/components/Search.js +91 -0
- data/webpack/scenes/RedHatRepositories/components/SearchBar.js +145 -0
- data/webpack/scenes/RedHatRepositories/components/__tests__/RepositoryTypeIcon.test.js +28 -0
- data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/RepositoryTypeIcon.test.js.snap +143 -0
- data/webpack/scenes/RedHatRepositories/helpers.js +72 -0
- data/webpack/scenes/RedHatRepositories/index.js +91 -0
- data/webpack/scenes/RedHatRepositories/index.scss +63 -0
- data/webpack/scenes/Subscriptions/EntitlementsInlineEditFormatter.js +87 -0
- data/webpack/scenes/Subscriptions/Manifest/DeleteManifestModalText.js +22 -0
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +243 -0
- data/webpack/scenes/Subscriptions/Manifest/Manifest.scss +3 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +114 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestConstants.js +15 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryReducer.js +34 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryTableSchema.js +46 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +26 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestActions.test.js +113 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestHistoryReducer.test.js +36 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +363 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/manifest.fixtures.js +216 -0
- data/webpack/scenes/Subscriptions/Manifest/index.js +28 -0
- data/webpack/scenes/Subscriptions/SubscriptionActions.js +119 -0
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +27 -0
- data/webpack/scenes/Subscriptions/SubscriptionHelpers.js +3 -0
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +123 -0
- data/webpack/scenes/Subscriptions/SubscriptionValidations.js +25 -0
- data/webpack/scenes/Subscriptions/Subscriptions.scss +14 -0
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +275 -0
- data/webpack/scenes/Subscriptions/SubscriptionsTable.js +336 -0
- data/webpack/scenes/Subscriptions/SubscriptionsTableSchema.js +117 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js +61 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsContstants.js +7 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +246 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsReducer.js +59 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsTableSchema.js +120 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsActions.test.js +64 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsPage.test.js +22 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js +57 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +226 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/upstreamSubscriptions.fixtures.js +162 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/index.js +20 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionValidations.test.js +66 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +126 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +26 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +67 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsTable.test.js +47 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +198 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +419 -0
- data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +364 -0
- data/webpack/scenes/Subscriptions/index.js +27 -0
- data/webpack/scenes/Tasks/TaskActions.js +75 -0
- data/webpack/scenes/Tasks/TaskConstants.js +7 -0
- data/webpack/scenes/Tasks/__tests__/TaskActions.test.js +81 -0
- data/webpack/scenes/Tasks/__tests__/task.fixtures.js +123 -0
- data/webpack/services/api/fixtures.js +353 -0
- data/webpack/services/api/index.js +105 -0
- data/webpack/services/api/setupMocks.js +17 -0
- data/webpack/services/index.js +59 -0
- data/webpack/stories/index.js +12 -0
- data/webpack/test_setup.js +9 -0
- metadata +265 -61
- data/app/assets/javascripts/katello/providers/provider_redhat.js +0 -185
- data/app/assets/javascripts/katello/providers/redhat/index.js +0 -3
- data/app/controllers/katello/products_controller.rb +0 -106
- data/app/controllers/katello/providers_controller.rb +0 -64
- data/app/helpers/katello/providers_helper.rb +0 -93
- data/app/models/katello/subscription_product.rb +0 -6
- data/app/views/foreman/unattended/finish-katello.erb +0 -60
- data/app/views/foreman/unattended/kickstart-katello-atomic.erb +0 -51
- data/app/views/foreman/unattended/kickstart-katello.erb +0 -139
- data/app/views/foreman/unattended/snippets/_subscription_manager_registration.erb +0 -18
- data/app/views/foreman/unattended/userdata-katello.erb +0 -92
- data/app/views/katello/providers/redhat/_enable_errors.html.erb +0 -12
- data/app/views/katello/providers/redhat/_errors.html.erb +0 -19
- data/app/views/katello/providers/redhat/_repo_sets.html.erb +0 -56
- data/app/views/katello/providers/redhat/_repos.html.erb +0 -60
- data/app/views/katello/providers/redhat/_tab.html.erb +0 -9
- data/app/views/katello/providers/redhat/show.html.erb +0 -35
- data/db/seeds.d/103-provisioning_templates.rb +0 -42
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/errata-content-hosts.html +0 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/errata-details.html +0 -59
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/gpg-key-details.controller.js +0 -48
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/gpg-key-products.controller.js +0 -36
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/gpg-key-repositories.controller.js +0 -36
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/views/gpg-key-details.html +0 -36
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-key.factory.js +0 -43
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-keys.routes.js +0 -76
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/new/new-gpg-key.controller.js +0 -39
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/new/views/new-gpg-key.html +0 -44
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/views/gpg-keys.html +0 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 147daad6f060ba123d7cb4ccf889e33540fd1224
|
4
|
+
data.tar.gz: 0a970ddfacc20136330150f3d535fb06473210c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a577fcdf1949cd2b761cb098dc2cdf809c39daf235ba45e1e27f1d5c9fb101a63bd47280eaca2ecfffff8a42e98e082216ab50383572d4fab3090e0913d7461e
|
7
|
+
data.tar.gz: a7bd9315164c9fac9f35c07e81f33ec3095f944392412d1fe17decc664aa707017fe8b5694e5249126bcb79ea5fdd2393633ce0b08bbc685dc3cbeabc93dc87b
|
@@ -79,7 +79,7 @@ function ktSetParam(name, value) {
|
|
79
79
|
if(! paramContainer) { // we create the param for kt_activation_keys
|
80
80
|
$("div#parameters a[target~='#global_parameters_table']").click();
|
81
81
|
paramContainer = $("div#parameters .fields").last();
|
82
|
-
paramContainer.find("input").val(name);
|
82
|
+
paramContainer.find("input[name*='name']").val(name);
|
83
83
|
}
|
84
84
|
paramContainer.find("textarea").val(value);
|
85
85
|
} else if(paramContainer) {
|
@@ -179,4 +179,4 @@ $(document).on('ContentLoad', function(){
|
|
179
179
|
ktLoadActivationKeys();
|
180
180
|
return false;
|
181
181
|
});
|
182
|
-
});
|
182
|
+
});
|
@@ -1,4 +1,5 @@
|
|
1
1
|
module Katello
|
2
|
+
# rubocop:disable Metrics/ClassLength
|
2
3
|
class Api::Rhsm::CandlepinProxiesController < Api::V2::ApiController
|
3
4
|
include Katello::Authentication::ClientAuthentication
|
4
5
|
|
@@ -345,7 +346,8 @@ module Katello
|
|
345
346
|
organization = nil
|
346
347
|
|
347
348
|
if params.key?(key)
|
348
|
-
|
349
|
+
label = params[key].is_a?(ActionController::Parameters) ? params[key]['key'] : params[key]
|
350
|
+
organization = Organization.find_by(:label => label)
|
349
351
|
end
|
350
352
|
|
351
353
|
if organization.nil?
|
@@ -490,9 +492,9 @@ module Katello
|
|
490
492
|
(User.consumer? || ::User.current.can?(:view_organizations, self))
|
491
493
|
when "rhsm_proxy_consumer_certificates_path", "rhsm_proxy_consumer_releases_path", "rhsm_proxy_certificate_serials_path",
|
492
494
|
"rhsm_proxy_consumer_entitlements_path", "rhsm_proxy_consumer_entitlements_post_path",
|
493
|
-
"rhsm_proxy_consumer_entitlements_delete_path", "
|
494
|
-
"
|
495
|
-
"rhsm_proxy_consumer_compliance_path"
|
495
|
+
"rhsm_proxy_consumer_entitlements_delete_path", "rhsm_proxy_consumer_entitlements_pool_delete_path",
|
496
|
+
"rhsm_proxy_consumer_certificates_put_path", "rhsm_proxy_consumer_dryrun_path",
|
497
|
+
"rhsm_proxy_consumer_owners_path", "rhsm_proxy_consumer_compliance_path"
|
496
498
|
User.consumer? && current_user.uuid == params[:id]
|
497
499
|
when "rhsm_proxy_consumer_certificates_delete_path"
|
498
500
|
User.consumer? && current_user.uuid == params[:consumer_id]
|
@@ -94,12 +94,10 @@ module Katello
|
|
94
94
|
:release_version => @activation_key.release_version,
|
95
95
|
:auto_attach => @activation_key.auto_attach
|
96
96
|
)
|
97
|
-
@activation_key.content_overrides.each do |content|
|
98
|
-
@new_activation_key.set_content_override(content['contentLabel'], content[:name], content[:value])
|
99
|
-
end
|
100
97
|
@activation_key.pools.each do |pool|
|
101
98
|
@new_activation_key.subscribe(pool[:id])
|
102
99
|
end
|
100
|
+
@new_activation_key.set_content_overrides(@activation_key.content_overrides) unless @activation_key.content_overrides.blank?
|
103
101
|
respond_for_show(:resource => @new_activation_key)
|
104
102
|
end
|
105
103
|
|
@@ -4,6 +4,7 @@ module Katello
|
|
4
4
|
include Api::Version2
|
5
5
|
include Api::V2::Rendering
|
6
6
|
include Api::V2::ErrorHandling
|
7
|
+
include ::Foreman::Controller::CsvResponder
|
7
8
|
|
8
9
|
# support for session (thread-local) variables must be the last filter in this class
|
9
10
|
include Foreman::ThreadSession::Cleaner
|
@@ -56,6 +57,8 @@ module Katello
|
|
56
57
|
resource = options[:resource_class] || resource_class
|
57
58
|
includes = options.fetch(:includes, [])
|
58
59
|
group = options.fetch(:group, nil)
|
60
|
+
params[:full_result] = true if options[:csv]
|
61
|
+
blank_query = resource.none
|
59
62
|
|
60
63
|
if params[:order]
|
61
64
|
(params[:sort_by], params[:sort_order]) = params[:order].split(' ')
|
@@ -96,16 +99,17 @@ module Katello
|
|
96
99
|
end
|
97
100
|
page = params[:page] || 1
|
98
101
|
per_page = params[:per_page] || Setting[:entries_per_page]
|
99
|
-
query = (total.zero? || sub_total.zero?) ?
|
102
|
+
query = (total.zero? || sub_total.zero?) ? blank_query : query
|
100
103
|
|
101
|
-
scoped_search_results(query, sub_total, total, page, per_page)
|
104
|
+
options[:csv] ? query : scoped_search_results(query, sub_total, total, page, per_page)
|
102
105
|
rescue ScopedSearch::QueryNotSupported, ActiveRecord::StatementInvalid => error
|
103
106
|
message = error.message
|
104
107
|
if error.class == ActiveRecord::StatementInvalid
|
105
108
|
Rails.logger.error("Invalid search: #{error.message}")
|
106
109
|
message = _('Your search query was invalid. Please revise it and try again. The full error has been sent to the application logs.')
|
107
110
|
end
|
108
|
-
|
111
|
+
|
112
|
+
scoped_search_results(blank_query, sub_total, total, page, per_page, message)
|
109
113
|
end
|
110
114
|
|
111
115
|
protected
|
@@ -187,5 +191,11 @@ module Katello
|
|
187
191
|
@host = resource_finder(::Host::Managed.authorized(permission, ::Host::Managed), id)
|
188
192
|
fail HttpErrors::BadRequest, _("Host has not been registered with subscription-manager") if @host.subscription_facet.nil?
|
189
193
|
end
|
194
|
+
|
195
|
+
def check_disconnected
|
196
|
+
msg = "You are currently operating in disconnected mode where access to Red Hat Subcription Management " \
|
197
|
+
"is prohibited. If you would like to change this, please update the content setting 'Disconnected mode'."
|
198
|
+
fail HttpErrors::BadRequest, _(msg) if Setting[:content_disconnected]
|
199
|
+
end
|
190
200
|
end
|
191
201
|
end
|
@@ -0,0 +1,116 @@
|
|
1
|
+
module Katello
|
2
|
+
class Api::V2::ContentCredentialsController < Api::V2::ApiController
|
3
|
+
include Katello::Concerns::FilteredAutoCompleteSearch
|
4
|
+
before_action :authorize
|
5
|
+
before_action :find_organization, :only => [:create, :index, :auto_complete_search]
|
6
|
+
before_action :find_content_credential, :only => [:show, :update, :destroy, :content, :set_content]
|
7
|
+
skip_before_action :check_content_type, :only => [:create, :content, :set_content]
|
8
|
+
|
9
|
+
def resource_class
|
10
|
+
Katello::GpgKey
|
11
|
+
end
|
12
|
+
|
13
|
+
def_param_group :content_credential do
|
14
|
+
param :name, :identifier, :action_aware => true, :required => true, :desc => N_("identifier of the content credential")
|
15
|
+
param :content_type, String, :action_aware => true, :required => true, :desc => N_("type of content")
|
16
|
+
param :content, String, :action_aware => true, :required => true, :desc => N_("public key block in DER encoding or certificate content")
|
17
|
+
end
|
18
|
+
|
19
|
+
resource_description do
|
20
|
+
description <<-DESC
|
21
|
+
# Description
|
22
|
+
|
23
|
+
Content Credentials are used to store credentials like GPG Keys and Certificates for the authentication
|
24
|
+
to Products / Repositories.
|
25
|
+
DESC
|
26
|
+
api_version "v2"
|
27
|
+
end
|
28
|
+
|
29
|
+
api :GET, "/content_credentials", N_("List content credentials")
|
30
|
+
param :organization_id, :number, :desc => N_("organization identifier"), :required => true
|
31
|
+
param :name, String, :desc => N_("name of the Content Credential"), :required => false
|
32
|
+
param :content_type, String, :desc => N_("type of content"), :required => false
|
33
|
+
param_group :search, Api::V2::ApiController
|
34
|
+
def index
|
35
|
+
respond(:collection => scoped_search(index_relation.distinct, :name, :asc))
|
36
|
+
end
|
37
|
+
|
38
|
+
def index_relation
|
39
|
+
query = GpgKey.readable.where(:organization_id => @organization.id)
|
40
|
+
query = query.where(:name => params[:name]) if params[:name]
|
41
|
+
query = query.where(:content_type => params[:content_type]) if params[:content_type]
|
42
|
+
query
|
43
|
+
end
|
44
|
+
|
45
|
+
api :POST, "/content_credentials", N_("Create a content credential")
|
46
|
+
param :organization_id, :number, :desc => N_("organization identifier"), :required => true
|
47
|
+
param_group :content_credential, :as => :create
|
48
|
+
def create
|
49
|
+
filepath = params.try(:[], :file_path).try(:path)
|
50
|
+
|
51
|
+
content = nil
|
52
|
+
if filepath
|
53
|
+
content = File.open(filepath, "rb") { |file| file.read }
|
54
|
+
else
|
55
|
+
content = params[:content]
|
56
|
+
end
|
57
|
+
|
58
|
+
content_credential = @organization.gpg_keys.create!(content_credential_params.merge(:content => content))
|
59
|
+
respond_for_show(:resource => content_credential)
|
60
|
+
end
|
61
|
+
|
62
|
+
api :GET, "/content_credentials/:id", N_("Show a content credential")
|
63
|
+
param :id, :number, :desc => N_("content credential numeric identifier"), :required => true
|
64
|
+
def show
|
65
|
+
respond_for_show(:resource => @content_credential)
|
66
|
+
end
|
67
|
+
|
68
|
+
api :PUT, "/content_credentials/:id", N_("Update a content credential")
|
69
|
+
param :id, :number, :desc => N_("content credential numeric identifier"), :required => true
|
70
|
+
param_group :content_credential
|
71
|
+
def update
|
72
|
+
@content_credential.update_attributes!(content_credential_params)
|
73
|
+
respond_for_show(:resource => @content_credential)
|
74
|
+
end
|
75
|
+
|
76
|
+
api :DELETE, "/content_credentials/:id", N_("Destroy a content credential")
|
77
|
+
param :id, :number, :desc => N_("content credential numeric identifier"), :required => true
|
78
|
+
def destroy
|
79
|
+
@content_credential.destroy
|
80
|
+
respond_for_destroy
|
81
|
+
end
|
82
|
+
|
83
|
+
api :GET, "/content_credentials/:id/content", N_("Return the content of a content credential, used directly by yum")
|
84
|
+
param :id, :number, :required => true
|
85
|
+
def content
|
86
|
+
render(:plain => @content_credential.content, :layout => false)
|
87
|
+
end
|
88
|
+
|
89
|
+
api :POST, "/content_credentials/:id/content", N_("Upload content credential contents")
|
90
|
+
param :id, :number, :desc => N_("content credential numeric identifier"), :required => true
|
91
|
+
param :content, File, :desc => N_("file contents"), :required => true
|
92
|
+
def set_content
|
93
|
+
filepath = params.try(:[], :content).try(:path)
|
94
|
+
|
95
|
+
if filepath
|
96
|
+
content = File.open(filepath, "rb") { |file| file.read }
|
97
|
+
@content_credential.update_attributes!(:content => content)
|
98
|
+
render :json => {:status => "success"}
|
99
|
+
else
|
100
|
+
fail HttpErrors::BadRequest, _("No file uploaded")
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
protected
|
105
|
+
|
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
|
+
def content_credential_params
|
113
|
+
params.permit(:name, :content_type, :content)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
@@ -18,7 +18,7 @@ module Katello
|
|
18
18
|
api :POST, "/content_view_filters/:content_view_filter_id/rules",
|
19
19
|
N_("Create a filter rule. The parameters included should be based upon the filter type.")
|
20
20
|
param :content_view_filter_id, :number, :desc => N_("filter identifier"), :required => true
|
21
|
-
param :name, [String
|
21
|
+
param :name, Array, of: [String], :desc => N_("package, package group, or docker tag names")
|
22
22
|
param :uuid, String, :desc => N_("package group: uuid")
|
23
23
|
param :version, String, :desc => N_("package: version")
|
24
24
|
param :architecture, String, :desc => N_("package: architecture")
|
@@ -20,6 +20,7 @@ module Katello
|
|
20
20
|
param :version, String, :desc => N_("Filter versions by version number"), :required => false
|
21
21
|
param :composite_version_id, :number, :desc => N_("Filter versions that are components in the specified composite version"), :required => false
|
22
22
|
param :organization_id, :number, :desc => N_("Organization identifier")
|
23
|
+
param :triggered_by_id, :number, :desc => N_("Filter composite versions whose publish was triggered by the specified component version"), :required => false
|
23
24
|
param_group :search, Api::V2::ApiController
|
24
25
|
def index
|
25
26
|
options = {
|
@@ -32,6 +33,7 @@ module Katello
|
|
32
33
|
def index_relation
|
33
34
|
version_number = params.permit(:version)[:version]
|
34
35
|
versions = ContentViewVersion.readable
|
36
|
+
versions = versions.triggered_by(params[:triggered_by_id]) if params[:triggered_by_id]
|
35
37
|
versions = versions.with_organization_id(params[:organization_id]) if params[:organization_id]
|
36
38
|
versions = versions.where(:content_view_id => @view.id) if @view
|
37
39
|
versions = versions.for_version(version_number) if version_number
|
@@ -80,6 +82,10 @@ module Katello
|
|
80
82
|
fail HttpErrors::BadRequest, _("ISO export must be enabled when specifying ISO size")
|
81
83
|
end
|
82
84
|
|
85
|
+
if (repos = @version.content_view.on_demand_repositories).any?
|
86
|
+
fail HttpErrors::BadRequest, _("This content view has on demand repositories that cannot be exported: %{repos}" % {repos: repos.pluck(:label).join(", ")})
|
87
|
+
end
|
88
|
+
|
83
89
|
if params[:since].present?
|
84
90
|
begin
|
85
91
|
params[:since].to_datetime
|
@@ -18,6 +18,7 @@ module Katello
|
|
18
18
|
param :description, String, :desc => N_("Description for the content view")
|
19
19
|
param :repository_ids, Array, :desc => N_("List of repository ids")
|
20
20
|
param :component_ids, Array, :desc => N_("List of component content view version ids for composite views")
|
21
|
+
param :auto_publish, :bool, :desc => N_("Enable/Disable auto publish of composite view")
|
21
22
|
end
|
22
23
|
|
23
24
|
api :GET, "/organizations/:organization_id/content_views", N_("List content views")
|
@@ -209,7 +210,7 @@ module Katello
|
|
209
210
|
def view_params
|
210
211
|
attrs = [:name, :description, :force_puppet_environment, {:repository_ids => []}, {:component_ids => []}]
|
211
212
|
attrs.push(:label, :composite) if action_name == "create"
|
212
|
-
attrs.push(:component_ids, :repository_ids) # For deep_munge; Remove for Rails 5
|
213
|
+
attrs.push(:component_ids, :repository_ids, :auto_publish) # For deep_munge; Remove for Rails 5
|
213
214
|
params.require(:content_view).permit(*attrs).to_h
|
214
215
|
end
|
215
216
|
|
@@ -74,6 +74,7 @@ module Katello
|
|
74
74
|
param :name, String, :desc => N_("name of the environment"), :required => true
|
75
75
|
param :label, String, :desc => N_("label of the environment"), :required => false
|
76
76
|
param :description, String, :desc => N_("description of the environment")
|
77
|
+
param :registry_name_pattern, String, :desc => N_("pattern for container image names")
|
77
78
|
param :prior_id, Integer, :required => true, :desc => <<-DESC
|
78
79
|
ID of an environment that is prior to the new environment in the chain. It has to be
|
79
80
|
either the ID of Library or the ID of an environment at the end of a chain.
|
@@ -93,12 +94,24 @@ module Katello
|
|
93
94
|
param :organization_id, :number, :desc => N_("name of the organization")
|
94
95
|
param :new_name, String, :desc => N_("new name to be given to the environment")
|
95
96
|
param :description, String, :desc => N_("description of the environment")
|
97
|
+
param :registry_name_pattern, String, :desc => N_("pattern for container image names")
|
98
|
+
param :async, :bool, desc: N_("Do not wait for the update action to finish. Default: true")
|
96
99
|
def update
|
97
|
-
|
100
|
+
async = ::Foreman::Cast.to_bool(params.fetch(:async, true))
|
98
101
|
update_params = environment_params
|
102
|
+
fail HttpErrors::BadRequest, _("Can't update the '%s' environment") % "Library" if @environment.library? && update_params.empty?
|
99
103
|
update_params[:name] = params[:environment][:new_name] if params[:environment][:new_name]
|
100
104
|
@environment.update_attributes!(update_params)
|
101
|
-
|
105
|
+
if update_params[:registry_name_pattern]
|
106
|
+
task = send(async ? :async_task : :sync_task, ::Actions::Katello::Environment::PublishRepositories,
|
107
|
+
@environment, content_type: Katello::Repository::DOCKER_TYPE)
|
108
|
+
end
|
109
|
+
|
110
|
+
if params.include?(:async) && async && task
|
111
|
+
respond_for_async(resource: task)
|
112
|
+
else
|
113
|
+
respond
|
114
|
+
end
|
102
115
|
end
|
103
116
|
|
104
117
|
api :DELETE, "/environments/:id", N_("Destroy an environment")
|
@@ -156,7 +169,11 @@ module Katello
|
|
156
169
|
end
|
157
170
|
|
158
171
|
def environment_params
|
159
|
-
|
172
|
+
if @environment && @environment.library?
|
173
|
+
attrs = [:registry_name_pattern]
|
174
|
+
else
|
175
|
+
attrs = [:name, :description, :registry_name_pattern]
|
176
|
+
end
|
160
177
|
attrs << :label if params[:action] == "create"
|
161
178
|
parms = params.require(:environment).permit(*attrs)
|
162
179
|
parms
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module Katello
|
2
2
|
class Api::V2::GpgKeysController < Api::V2::ApiController
|
3
3
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
4
|
+
before_action :deprecated
|
4
5
|
before_action :authorize
|
5
6
|
before_action :find_organization, :only => [:create, :index, :auto_complete_search]
|
6
7
|
before_action :find_gpg_key, :only => [:show, :update, :destroy, :content, :set_content]
|
@@ -103,5 +104,9 @@ module Katello
|
|
103
104
|
def gpg_key_params
|
104
105
|
params.permit(:name, :content)
|
105
106
|
end
|
107
|
+
|
108
|
+
def deprecated
|
109
|
+
::Foreman::Deprecation.api_deprecation_warning("it will be removed in Katello 4.0, Please see /api/v2/content_credentials")
|
110
|
+
end
|
106
111
|
end
|
107
112
|
end
|
@@ -6,11 +6,22 @@ module Katello
|
|
6
6
|
before_action :find_content_view_environment, :only => :create
|
7
7
|
before_action :check_registration_services, :only => [:destroy, :create]
|
8
8
|
|
9
|
+
def_param_group :installed_products do
|
10
|
+
param :product_id, String, :desc => N_("Product id as listed from a host's installed products, \
|
11
|
+
this is not the same product id as the products api returns")
|
12
|
+
param :product_name, String, :desc => N_("Product name as listed from a host's installed products")
|
13
|
+
param :arch, String, :desc => N_("Product architecture")
|
14
|
+
param :version, String, :desc => N_("Product version")
|
15
|
+
end
|
16
|
+
|
9
17
|
def_param_group :subscription_facet_attributes do
|
10
18
|
param :release_version, String, :desc => N_("Release version for this Host to use (7Server, 7.1, etc)")
|
11
19
|
param :autoheal, :bool, :desc => N_("Sets whether the Host will autoheal subscriptions upon checkin")
|
12
20
|
param :service_level, Integer, :desc => N_("Service level to be used for autoheal.")
|
13
21
|
param :hypervisor_guest_uuids, Array, :desc => N_("List of hypervisor guest uuids")
|
22
|
+
param :installed_products_attributes, Array, :desc => N_("List of products installed on the host") do
|
23
|
+
param_group :installed_products
|
24
|
+
end
|
14
25
|
end
|
15
26
|
|
16
27
|
resource_description do
|
@@ -59,11 +70,7 @@ module Katello
|
|
59
70
|
param :facts, Hash, :desc => N_("Key-value hash of subscription-manager facts, nesting uses a period delimiter (.)")
|
60
71
|
param :hypervisor_guest_uuids, Array, :desc => N_("UUIDs of the virtual guests from the host's hypervisor")
|
61
72
|
param :installed_products, Array, :desc => N_("List of products installed on the host") do
|
62
|
-
|
63
|
-
this is not the same product id as the products api returns")
|
64
|
-
param :product_name, String, :desc => N_("Product name as listed from a host's installed products")
|
65
|
-
param :arch, String, :desc => N_("Product architecture")
|
66
|
-
param :version, String, :desc => N_("Product version")
|
73
|
+
param_group :installed_products, ::Katello::Api::V2::HostSubscriptionsController
|
67
74
|
end
|
68
75
|
param :release_version, String, :desc => N_("Release version of the content host")
|
69
76
|
param :service_level, String, :desc => N_("A service level for auto-healing process, e.g. SELF-SUPPORT")
|
@@ -89,7 +96,7 @@ module Katello
|
|
89
96
|
rhsm_params[:facts] ||= {}
|
90
97
|
rhsm_params[:facts]['network.hostname'] ||= rhsm_params[:name]
|
91
98
|
|
92
|
-
if params['installed_products']
|
99
|
+
if params['installed_products'] #convert api installed_product to candlepin params
|
93
100
|
rhsm_params[:installedProducts] = params['installed_products'].map do |product|
|
94
101
|
product_params = { :productId => product['product_id'], :productName => product['product_name'] }
|
95
102
|
product_params[:arch] = product['arch'] if product['arch']
|
@@ -126,7 +133,7 @@ module Katello
|
|
126
133
|
end
|
127
134
|
def add_subscriptions
|
128
135
|
pools_with_quantities = params.require(:subscriptions).map do |sub_params|
|
129
|
-
PoolWithQuantities.new(Pool.with_identifier(sub_params['id']), sub_params['quantity'])
|
136
|
+
PoolWithQuantities.new(Pool.with_identifier(sub_params['id']), sub_params['quantity'].to_i)
|
130
137
|
end
|
131
138
|
|
132
139
|
sync_task(::Actions::Katello::Host::AttachSubscriptions, @host, pools_with_quantities)
|
@@ -7,6 +7,9 @@ module Katello
|
|
7
7
|
before_action :find_product, :only => [:update, :destroy, :sync]
|
8
8
|
before_action :find_organization_from_product, :only => [:update]
|
9
9
|
before_action :authorize_gpg_key, :only => [:update, :create]
|
10
|
+
before_action :authorize_ssl_ca_cert, :only => [:update, :create]
|
11
|
+
before_action :authorize_ssl_client_cert, :only => [:update, :create]
|
12
|
+
before_action :authorize_ssl_client_key, :only => [:update, :create]
|
10
13
|
|
11
14
|
resource_description do
|
12
15
|
api_version "v2"
|
@@ -15,6 +18,9 @@ module Katello
|
|
15
18
|
def_param_group :product do
|
16
19
|
param :description, String, :desc => N_("Product description")
|
17
20
|
param :gpg_key_id, :number, :desc => N_("Identifier of the GPG key")
|
21
|
+
param :ssl_ca_cert_id, :number, :desc => N_("Idenifier of the SSL CA Cert")
|
22
|
+
param :ssl_client_cert_id, :number, :desc => N_("Identifier of the SSL Client Cert")
|
23
|
+
param :ssl_client_key_id, :number, :desc => N_("Identifier of the SSL Client Key")
|
18
24
|
param :sync_plan_id, :number, :desc => N_("Plan numeric identifier"), :allow_nil => true
|
19
25
|
end
|
20
26
|
|
@@ -145,12 +151,36 @@ module Katello
|
|
145
151
|
end
|
146
152
|
end
|
147
153
|
|
154
|
+
def authorize_ssl_ca_cert
|
155
|
+
ssl_ca_cert_id = product_params[:ssl_ca_cert_id]
|
156
|
+
if ssl_ca_cert_id
|
157
|
+
ssl_ca_cert = GpgKey.readable.where(:id => ssl_ca_cert_id, :organization_id => @organization).first
|
158
|
+
fail HttpErrors::NotFound, _("Couldn't find ssl ca cert '%s'") % ssl_ca_cert_id if ssl_ca_cert.nil?
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
def authorize_ssl_client_cert
|
163
|
+
ssl_client_cert_id = product_params[:ssl_client_cert_id]
|
164
|
+
if ssl_client_cert_id
|
165
|
+
ssl_client_cert = GpgKey.readable.where(:id => ssl_client_cert_id, :organization_id => @organization).first
|
166
|
+
fail HttpErrors::NotFound, _("Couldn't find ssl client cert '%s'") % ssl_client_cert_id if ssl_client_cert.nil?
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
def authorize_ssl_client_key
|
171
|
+
ssl_client_key_id = product_params[:ssl_client_key_id]
|
172
|
+
if ssl_client_key_id
|
173
|
+
ssl_client_key = GpgKey.readable.where(:id => ssl_client_key_id, :organization_id => @organization).first
|
174
|
+
fail HttpErrors::NotFound, _("Couldn't find ssl client key '%s'") % ssl_client_key_id if ssl_client_key.nil?
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
148
178
|
def product_params
|
149
179
|
# only allow sync plan id to be updated if the product is a Red Hat product
|
150
180
|
if @product && @product.redhat?
|
151
181
|
params.require(:product).permit(:sync_plan_id)
|
152
182
|
else
|
153
|
-
params.require(:product).permit(:name, :label, :description, :provider_id, :gpg_key_id, :sync_plan_id)
|
183
|
+
params.require(:product).permit(:name, :label, :description, :provider_id, :gpg_key_id, :ssl_ca_cert_id, :ssl_client_cert_id, :ssl_client_key_id, :sync_plan_id)
|
154
184
|
end
|
155
185
|
end
|
156
186
|
end
|