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
@@ -0,0 +1,19 @@
|
|
1
|
+
module Katello
|
2
|
+
module Resources
|
3
|
+
module Candlepin
|
4
|
+
class UpstreamEntitlement < UpstreamCandlepinResource
|
5
|
+
class << self
|
6
|
+
def path(id = nil)
|
7
|
+
"#{self.prefix}/entitlements/#{id}"
|
8
|
+
end
|
9
|
+
|
10
|
+
def update(entitlement_id, quantity)
|
11
|
+
body = {quantity: quantity}.to_json
|
12
|
+
|
13
|
+
self[entitlement_id].put(body)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Katello
|
2
|
+
module Resources
|
3
|
+
module Candlepin
|
4
|
+
class UpstreamPool < UpstreamCandlepinResource
|
5
|
+
extend PoolResource
|
6
|
+
|
7
|
+
class << self
|
8
|
+
def path(id = nil, owner_label = nil)
|
9
|
+
super(id, owner_label || upstream_owner_id)
|
10
|
+
end
|
11
|
+
|
12
|
+
delegate :get, to: :resource
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -5,10 +5,8 @@ module Katello
|
|
5
5
|
variable.map { |x| x.with_indifferent_access }
|
6
6
|
end
|
7
7
|
|
8
|
-
def self.
|
9
|
-
|
10
|
-
md5.update(string)
|
11
|
-
md5.hexdigest
|
8
|
+
def self.hexdigest(string)
|
9
|
+
defined?(ActiveSupport::Digest) ? ActiveSupport::Digest.hexdigest(string) : Digest::MD5.hexdigest(string)
|
12
10
|
end
|
13
11
|
|
14
12
|
def self.ostructize(obj, options = {})
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Katello
|
2
|
+
module Util
|
3
|
+
module HttpProxy
|
4
|
+
def proxy_uri
|
5
|
+
URI("#{proxy_scheme}://#{proxy_user_info}@#{proxy_host}:#{proxy_port}").to_s if proxy_host
|
6
|
+
end
|
7
|
+
|
8
|
+
def proxy_user_info
|
9
|
+
"#{proxy_config[:user]}:#{proxy_config[:password]}" if proxy_config && proxy_config[:user]
|
10
|
+
end
|
11
|
+
|
12
|
+
def proxy_config
|
13
|
+
SETTINGS[:katello][:cdn_proxy]
|
14
|
+
end
|
15
|
+
|
16
|
+
def proxy_host
|
17
|
+
proxy_config && URI.parse(proxy_config[:host]).host
|
18
|
+
end
|
19
|
+
|
20
|
+
def proxy_scheme
|
21
|
+
proxy_config && URI.parse(proxy_config[:host]).scheme
|
22
|
+
end
|
23
|
+
|
24
|
+
def proxy_port
|
25
|
+
proxy_config && proxy_config[:port]
|
26
|
+
end
|
27
|
+
end # HttpProxy
|
28
|
+
end # Util
|
29
|
+
end # Katello
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Katello
|
2
|
+
module Validators
|
3
|
+
class ContainerImageNameValidator < ActiveModel::EachValidator
|
4
|
+
def validate_each(record, attribute, value)
|
5
|
+
if value && !ContainerImageNameValidator.validate_name(value)
|
6
|
+
record.errors[attribute] << N_("invalid container image name")
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.validate_name(name)
|
11
|
+
if name.empty? || name.length > 255 || !/\A([a-z0-9]+[a-z0-9\-\_\.]*)+(\/[a-z0-9]+[a-z0-9\-\_\.]*)*\z/.match?(name)
|
12
|
+
return false
|
13
|
+
end
|
14
|
+
true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Katello
|
2
|
+
module Validators
|
3
|
+
class ContentViewEnvironmentOrgValidator < ActiveModel::Validator
|
4
|
+
def validate(record)
|
5
|
+
environment_id = record.respond_to?(:lifecycle_environment_id) ? record.lifecycle_environment_id : record.environment_id
|
6
|
+
view = ContentView.where(:id => record.content_view_id).first
|
7
|
+
environment = KTEnvironment.where(:id => environment_id).first
|
8
|
+
unless view.organization == environment.organization
|
9
|
+
record.errors[:base] << _("%{view_label} could not be promoted to %{environment_label} because the content view and the environment are not in the same organization!") % {:view_label => view.label, :environment_label => environment.label}
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
module Katello
|
2
|
+
module Validators
|
3
|
+
class EnvironmentDockerRepositoriesValidator < ActiveModel::Validator
|
4
|
+
def validate(environment)
|
5
|
+
return true if environment.registry_name_pattern.empty?
|
6
|
+
|
7
|
+
unless ContainerImageNameValidator.validate_name(Katello::Repository.safe_render_container_name(test_repository, environment.registry_name_pattern))
|
8
|
+
environment.errors.add(:registry_name_pattern, N_("Registry name pattern will result in invalid container image name of member repositories"))
|
9
|
+
return false
|
10
|
+
end
|
11
|
+
|
12
|
+
error_messages = EnvironmentDockerRepositoriesValidator.validate_repositories(environment.registry_name_pattern, environment.repositories.docker_type)
|
13
|
+
return true if error_messages.empty?
|
14
|
+
|
15
|
+
error_messages.each do |message|
|
16
|
+
environment.errors.add(:registry_name_pattern, message)
|
17
|
+
end
|
18
|
+
false
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.validate_repositories(registry_name_pattern, repositories)
|
22
|
+
error_messages = []
|
23
|
+
names = []
|
24
|
+
repositories.each do |repository|
|
25
|
+
name = Katello::Repository.safe_render_container_name(repository, registry_name_pattern)
|
26
|
+
|
27
|
+
unless ContainerImageNameValidator.validate_name(name)
|
28
|
+
error_messages << N_("Registry name pattern results in invalid container image name of member repository '%{name}'") % {name: repository.name}
|
29
|
+
return error_messages
|
30
|
+
end
|
31
|
+
names << name
|
32
|
+
end
|
33
|
+
|
34
|
+
if names.length != names.uniq.length
|
35
|
+
error_messages << N_("Registry name pattern results in duplicate container image names")
|
36
|
+
return error_messages
|
37
|
+
end
|
38
|
+
|
39
|
+
[]
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_repository
|
43
|
+
Katello::Validators::EnvironmentDockerRepositoriesValidator::RepositoryOpenStruct.new(
|
44
|
+
name: "bad name!", label: "good_label", docker_upstream_name: "image/name", url: "https://registry.example.com",
|
45
|
+
organization: SafeOpenStruct.new(name: "bad name!", label: "good_label"),
|
46
|
+
product: SafeOpenStruct.new(name: "bad name!", label: "good_label"),
|
47
|
+
environment: SafeOpenStruct.new(name: "bad name!", label: "good_label"),
|
48
|
+
content_view_version: OpenStruct.new(content_view: ContentViewOpenStruct.new(name: "bad name!", label: "good_label", version: "1.2"))
|
49
|
+
)
|
50
|
+
end
|
51
|
+
|
52
|
+
class RepositoryOpenStruct < OpenStruct
|
53
|
+
class Jail < ::Safemode::Jail
|
54
|
+
allow :name, :label, :version, :docker_upstream_name, :url
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
class ContentViewOpenStruct < OpenStruct
|
59
|
+
class Jail < ::Safemode::Jail
|
60
|
+
allow :name, :label, :version
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
class SafeOpenStruct < OpenStruct
|
65
|
+
class Jail < ::Safemode::Jail
|
66
|
+
allow :name, :label
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Katello
|
2
|
+
module Validators
|
3
|
+
class GpgKeyContentTypeValidator < ActiveModel::Validator
|
4
|
+
def validate(record)
|
5
|
+
# need to verify, that gpg_key is of GpgKey.content type "gpg_key" and
|
6
|
+
# ssl_ca_cert, ssl_client_cert, ssl_client_key of GpgKey.content type "cert"
|
7
|
+
|
8
|
+
if !record.gpg_key.blank? && record.gpg_key.content_type != "gpg_key"
|
9
|
+
record.errors[:gpg_key] << _("Wrong content type submitted.")
|
10
|
+
end
|
11
|
+
|
12
|
+
if record.instance_of?(Katello::Product)
|
13
|
+
[:ssl_ca_cert, :ssl_client_cert, :ssl_client_key].each do |cert|
|
14
|
+
if !record.send(cert).blank? && record.send(cert).content_type != "cert"
|
15
|
+
record.errors[cert] << _("Wrong content type submitted.")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module Katello
|
2
2
|
class ActivationKey < Katello::Model
|
3
|
+
audited :except => [:cp_id], :associations => [:host_collections]
|
3
4
|
include Glue::Candlepin::ActivationKey if SETTINGS[:katello][:use_cp]
|
4
5
|
include Glue if SETTINGS[:katello][:use_cp]
|
5
6
|
include Katello::Authorization::ActivationKey
|
@@ -9,7 +10,7 @@ module Katello
|
|
9
10
|
belongs_to :organization, :inverse_of => :activation_keys
|
10
11
|
belongs_to :environment, :class_name => "KTEnvironment", :inverse_of => :activation_keys
|
11
12
|
belongs_to :user, :inverse_of => :activation_keys, :class_name => "::User"
|
12
|
-
belongs_to :content_view, :inverse_of => :activation_keys
|
13
|
+
belongs_to :content_view, :class_name => "Katello::ContentView", :inverse_of => :activation_keys
|
13
14
|
|
14
15
|
has_many :key_host_collections, :class_name => "Katello::KeyHostCollection", :dependent => :destroy
|
15
16
|
has_many :host_collections, :through => :key_host_collections
|
@@ -17,6 +18,7 @@ module Katello
|
|
17
18
|
has_many :pool_activation_keys, :class_name => "Katello::PoolActivationKey", :dependent => :destroy, :inverse_of => :activation_key
|
18
19
|
has_many :pools, :through => :pool_activation_keys, :class_name => "Katello::Pool"
|
19
20
|
has_many :subscriptions, :through => :pools
|
21
|
+
|
20
22
|
has_many :subscription_facet_activation_keys, :class_name => "Katello::SubscriptionFacetActivationKey", :dependent => :destroy
|
21
23
|
has_many :subscription_facets, :through => :subscription_facet_activation_keys
|
22
24
|
|
@@ -92,7 +94,7 @@ module Katello
|
|
92
94
|
end
|
93
95
|
|
94
96
|
def products
|
95
|
-
Katello::Product.joins(:
|
97
|
+
Katello::Product.joins(:pools => :activation_keys).where("#{Katello::ActivationKey.table_name}.id" => self.id).enabled.uniq
|
96
98
|
end
|
97
99
|
|
98
100
|
def valid_content_override_label?(content_label)
|
@@ -49,7 +49,11 @@ module Katello
|
|
49
49
|
)
|
50
50
|
|
51
51
|
def content_facet_ignore_update?(attributes)
|
52
|
-
self.content_facet.blank? &&
|
52
|
+
self.content_facet.blank? && (
|
53
|
+
attributes.values.all?(&:blank?) ||
|
54
|
+
attributes['content_view_id'].blank? ||
|
55
|
+
attributes['lifecycle_environment_id'].blank?
|
56
|
+
)
|
53
57
|
end
|
54
58
|
end
|
55
59
|
|
@@ -4,6 +4,7 @@ module Katello
|
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
6
|
included do
|
7
|
+
audited :only => [:manifest_refreshed_at]
|
7
8
|
ALLOWED_DEFAULT_INFO_TYPES = %w(system distributor).freeze
|
8
9
|
|
9
10
|
include ForemanTasks::Concerns::ActionSubject
|
@@ -27,6 +28,8 @@ module Katello
|
|
27
28
|
has_many :content_view_environments, :through => :content_views
|
28
29
|
has_many :task_statuses, :class_name => "Katello::TaskStatus", :dependent => :destroy, :as => :task_owner
|
29
30
|
has_many :subscriptions, :class_name => "Katello::Subscription", :dependent => :destroy, :inverse_of => :organization
|
31
|
+
has_many :pools, :class_name => "Katello::Pool", :dependent => :destroy, :inverse_of => :organization
|
32
|
+
has_many :product_contents, :through => :products
|
30
33
|
|
31
34
|
#older association
|
32
35
|
has_many :org_tasks, :dependent => :destroy, :class_name => "Katello::TaskStatus", :inverse_of => :organization
|
@@ -40,6 +43,10 @@ module Katello
|
|
40
43
|
validates_with Validators::KatelloLabelFormatValidator, :attributes => :label
|
41
44
|
validates :label, :uniqueness => true
|
42
45
|
|
46
|
+
# intentionally placed this callback here after all associations
|
47
|
+
# so that it will execute after :dependent => :destroy
|
48
|
+
before_destroy :destroy_taxable_taxonomies
|
49
|
+
|
43
50
|
def default_content_view
|
44
51
|
ContentView.default.where(:organization_id => self.id).first
|
45
52
|
end
|
@@ -179,6 +186,21 @@ module Katello
|
|
179
186
|
def regenerate_ueber_cert
|
180
187
|
::Katello::Resources::Candlepin::Owner.generate_ueber_cert(self.label)
|
181
188
|
end
|
189
|
+
|
190
|
+
def expiring_subscriptions
|
191
|
+
subscriptions.select(&:expiring_soon?)
|
192
|
+
end
|
193
|
+
|
194
|
+
def notification_recipients_ids
|
195
|
+
users = User.unscoped.all.find_all do |user|
|
196
|
+
user.can?(:import_manifest) && user.can?(:view_organizations, self)
|
197
|
+
end
|
198
|
+
users.pluck(:id)
|
199
|
+
end
|
200
|
+
|
201
|
+
class Jail < ::Safemode::Jail
|
202
|
+
allow :name, :label
|
203
|
+
end
|
182
204
|
end
|
183
205
|
end
|
184
206
|
end
|
@@ -92,7 +92,8 @@ module Katello
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def pulp_url
|
95
|
-
|
95
|
+
uri = URI.parse(url)
|
96
|
+
"#{uri.scheme}://#{uri.host}/pulp/api/v2/"
|
96
97
|
end
|
97
98
|
|
98
99
|
def default_capsule?
|
@@ -116,7 +117,7 @@ module Katello
|
|
116
117
|
end
|
117
118
|
|
118
119
|
def set_default_download_policy
|
119
|
-
self.download_policy ||= ::Setting[:default_proxy_download_policy]
|
120
|
+
self.download_policy ||= ::Setting[:default_proxy_download_policy] || ::Runcible::Models::YumImporter::DOWNLOAD_ON_DEMAND
|
120
121
|
end
|
121
122
|
|
122
123
|
def associate_lifecycle_environments
|
@@ -7,6 +7,11 @@ module Katello
|
|
7
7
|
validates :label, :uniqueness => true
|
8
8
|
validates :cp_content_id, :uniqueness => true
|
9
9
|
|
10
|
+
scoped_search :on => :name, :complete_value => true
|
11
|
+
scoped_search :on => :content_type, :complete_value => true
|
12
|
+
scoped_search :on => :label, :complete_value => true
|
13
|
+
scoped_search :relation => :products, :on => :name, :rename => :product_name, :complete_value => true
|
14
|
+
|
10
15
|
def self.import_all
|
11
16
|
Organization.all.each do |org|
|
12
17
|
org.products.each do |product|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module Katello
|
2
2
|
class ContentFacetApplicableRpm < Katello::Model
|
3
|
+
# Do not use active record callbacks in this join model. Direct INSERTs and DELETEs are done
|
3
4
|
belongs_to :content_facet, :inverse_of => :content_facet_applicable_rpms, :class_name => 'Katello::Host::ContentFacet'
|
4
5
|
belongs_to :rpm, :inverse_of => :content_facet_applicable_rpms, :class_name => 'Katello::Rpm'
|
5
6
|
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module Katello
|
2
2
|
# rubocop:disable Metrics/ClassLength
|
3
3
|
class ContentView < Katello::Model
|
4
|
+
audited :associations => [:repositories, :environments]
|
5
|
+
has_associated_audits
|
4
6
|
include Ext::LabelFromName
|
5
7
|
include Katello::Authorization::ContentView
|
6
8
|
include ForemanTasks::Concerns::ActionSubject
|
@@ -27,7 +29,8 @@ module Katello
|
|
27
29
|
has_many :component_composites, :class_name => "Katello::ContentViewComponent",
|
28
30
|
:dependent => :destroy, :inverse_of => :content_view, :foreign_key => :content_view_id
|
29
31
|
|
30
|
-
has_many :content_view_repositories, :
|
32
|
+
has_many :content_view_repositories, :class_name => 'Katello::ContentViewRepository',
|
33
|
+
:dependent => :destroy, :inverse_of => :content_view
|
31
34
|
has_many :repositories, :through => :content_view_repositories, :class_name => "Katello::Repository",
|
32
35
|
:after_remove => :remove_repository
|
33
36
|
|
@@ -53,6 +56,8 @@ module Katello
|
|
53
56
|
validates :organization_id, :presence => true
|
54
57
|
validate :check_non_composite_components
|
55
58
|
validate :check_puppet_conflicts
|
59
|
+
validate :check_docker_conflicts
|
60
|
+
validate :check_non_composite_auto_publish
|
56
61
|
validates :composite, :inclusion => [true, false]
|
57
62
|
|
58
63
|
validates_with Validators::KatelloNameFormatValidator, :attributes => :name
|
@@ -349,17 +354,7 @@ module Katello
|
|
349
354
|
|
350
355
|
def products(env = nil)
|
351
356
|
repos = repos(env)
|
352
|
-
Product.joins(:repositories).where("#{Katello::Repository.table_name}.id" => repos.map(&:id)).
|
353
|
-
end
|
354
|
-
|
355
|
-
def version_products(env)
|
356
|
-
repos = repos(env)
|
357
|
-
Product.joins(:repositories).where("#{Katello::Repository.table_name}.id" => repos.map(&:id)).uniq
|
358
|
-
end
|
359
|
-
|
360
|
-
#list all products associated to this view across all versions
|
361
|
-
def all_version_products
|
362
|
-
Product.joins(:repositories).where("#{Katello::Repository.table_name}.id" => self.all_version_repos).uniq
|
357
|
+
Product.joins(:repositories).where("#{Katello::Repository.table_name}.id" => repos.map(&:id)).distinct
|
363
358
|
end
|
364
359
|
|
365
360
|
#get the library instances of all repos within this view
|
@@ -415,12 +410,22 @@ module Katello
|
|
415
410
|
counts.select { |_k, v| v > 1 }.keys
|
416
411
|
end
|
417
412
|
|
413
|
+
def duplicate_docker_repos
|
414
|
+
duplicate_repositories.where(:content_type => Katello::Repository::DOCKER_TYPE)
|
415
|
+
end
|
416
|
+
|
418
417
|
def check_non_composite_components
|
419
418
|
if !composite? && components.present?
|
420
419
|
errors.add(:base, _("Cannot add component versions to a non-composite content view"))
|
421
420
|
end
|
422
421
|
end
|
423
422
|
|
423
|
+
def check_non_composite_auto_publish
|
424
|
+
if !composite? && auto_publish
|
425
|
+
errors.add(:base, _("Cannot set auto publish to a non-composite content view"))
|
426
|
+
end
|
427
|
+
end
|
428
|
+
|
424
429
|
def check_puppet_conflicts
|
425
430
|
duplicate_puppet_modules.each do |name|
|
426
431
|
versions = components.select { |v| v.puppet_modules.map(&:name).include?(name) }
|
@@ -430,6 +435,13 @@ module Katello
|
|
430
435
|
end
|
431
436
|
end
|
432
437
|
|
438
|
+
def check_docker_conflicts
|
439
|
+
duplicate_docker_repos.each do |repo|
|
440
|
+
msg = _("Container Image repo '%{repo}' is present in multiple component content views.") % {repo: repo.name}
|
441
|
+
errors.add(:base, msg)
|
442
|
+
end
|
443
|
+
end
|
444
|
+
|
433
445
|
def content_view_environment(environment)
|
434
446
|
self.content_view_environments.where(:environment_id => environment.try(:id)).first
|
435
447
|
end
|
@@ -545,6 +557,23 @@ module Katello
|
|
545
557
|
fail _("User must be logged in.") if ::User.current.nil?
|
546
558
|
fail _("Cannot publish default content view") if default?
|
547
559
|
check_composite_action_allowed!(organization.library)
|
560
|
+
check_docker_repository_names!([organization.library])
|
561
|
+
true
|
562
|
+
end
|
563
|
+
|
564
|
+
def check_docker_repository_names!(environments)
|
565
|
+
environments.each do |environment|
|
566
|
+
repositories = []
|
567
|
+
publish_repositories do |all_repositories|
|
568
|
+
repositories += all_repositories.keep_if { |repository| repository.content_type == Katello::Repository::DOCKER_TYPE }
|
569
|
+
end
|
570
|
+
next if repositories.empty?
|
571
|
+
|
572
|
+
error_messages = ::Katello::Validators::EnvironmentDockerRepositoriesValidator.validate_repositories(environment.registry_name_pattern, repositories)
|
573
|
+
unless error_messages.empty?
|
574
|
+
fail _("Content View publish to environment %{name} will result in invalid container image name of member repositories") % {name: environment.name}
|
575
|
+
end
|
576
|
+
end
|
548
577
|
true
|
549
578
|
end
|
550
579
|
|
@@ -609,6 +638,10 @@ module Katello
|
|
609
638
|
content_view_versions.count
|
610
639
|
end
|
611
640
|
|
641
|
+
def on_demand_repositories
|
642
|
+
repositories.where(download_policy: ::Runcible::Models::YumImporter::DOWNLOAD_ON_DEMAND)
|
643
|
+
end
|
644
|
+
|
612
645
|
protected
|
613
646
|
|
614
647
|
def remove_repository(repository)
|
@@ -638,7 +671,7 @@ module Katello
|
|
638
671
|
# for a default view, the same candlepin environment will be referenced
|
639
672
|
# by the kt_environment and content_view_environment.
|
640
673
|
value = self.default ? env.organization.label.to_s : [env.organization.label, env.label, self.label].join('-')
|
641
|
-
Katello::Util::Data.
|
674
|
+
Katello::Util::Data.hexdigest(value)
|
642
675
|
end
|
643
676
|
|
644
677
|
def confirm_not_promoted
|
@@ -649,77 +682,12 @@ module Katello
|
|
649
682
|
return true
|
650
683
|
end
|
651
684
|
|
652
|
-
def associate_puppet_content(puppet_env)
|
653
|
-
unless content_view_puppet_modules.empty?
|
654
|
-
modules_by_repoid = computed_module_ids_by_repoid
|
655
|
-
async_tasks = []
|
656
|
-
modules_by_repoid.each_pair do |repoid, puppet_module_ids|
|
657
|
-
async_tasks << Katello.pulp_server.extensions.puppet_module.copy(repoid,
|
658
|
-
puppet_env.pulp_id,
|
659
|
-
:ids => puppet_module_ids)
|
660
|
-
end
|
661
|
-
PulpTaskStatus.wait_for_tasks(async_tasks)
|
662
|
-
end
|
663
|
-
end
|
664
|
-
|
665
|
-
def associate_yum_content(cloned)
|
666
|
-
# Intended Behaviour
|
667
|
-
# Includes are cumulative -> If you say include errata and include packages, its the sum
|
668
|
-
# Excludes are processed after includes
|
669
|
-
# Excludes dont handle dependency. So if you say Include errata with pkgs P1, P2ve# and exclude P1 and P1 has a dependency P1d1, what gets copied over is P1d1, P2
|
670
|
-
|
671
|
-
# Another important aspect. PackageGroups & Errata are merely convinient ways to say "copy packages"
|
672
|
-
# Its all about the packages
|
673
|
-
|
674
|
-
# Algorithm:
|
675
|
-
# 1) Compute all the packages to be whitelist/blacklist. In this process grok all the packages
|
676
|
-
# belonging to Errata/Package groups etc (work done by PackageClauseGenerator)
|
677
|
-
# 2) Copy Packages (Whitelist - Blacklist) with their dependencies
|
678
|
-
# 3) Unassociate the blacklisted items from the clone. This is so that if the deps were among
|
679
|
-
# the blacklisted packages, they would have gotten copied along in the previous step.
|
680
|
-
# 4) Copy all errata and package groups
|
681
|
-
# 5) Prune errata and package groups that have no existing packagea in the cloned repo
|
682
|
-
# 6) Index for search.
|
683
|
-
|
684
|
-
repo = cloned.library_instance_id ? cloned.library_instance : cloned
|
685
|
-
applicable_filters = filters.applicable(repo).yum
|
686
|
-
copy_clauses = nil
|
687
|
-
remove_clauses = nil
|
688
|
-
process_errata_and_groups = false
|
689
|
-
|
690
|
-
if applicable_filters.any?
|
691
|
-
clause_gen = Util::PackageClauseGenerator.new(repo, applicable_filters)
|
692
|
-
clause_gen.generate
|
693
|
-
copy_clauses = clause_gen.copy_clause
|
694
|
-
remove_clauses = clause_gen.remove_clause
|
695
|
-
end
|
696
|
-
|
697
|
-
if applicable_filters.empty? || copy_clauses
|
698
|
-
pulp_task = repo.clone_contents_by_filter(cloned, ContentViewFilter::PACKAGE, copy_clauses)
|
699
|
-
PulpTaskStatus.wait_for_tasks([pulp_task])
|
700
|
-
process_errata_and_groups = true
|
701
|
-
end
|
702
|
-
|
703
|
-
if remove_clauses
|
704
|
-
pulp_task = cloned.unassociate_by_filter(ContentViewFilter::PACKAGE, remove_clauses)
|
705
|
-
PulpTaskStatus.wait_for_tasks([pulp_task])
|
706
|
-
process_errata_and_groups = true
|
707
|
-
end
|
708
|
-
|
709
|
-
if process_errata_and_groups
|
710
|
-
group_tasks = [ContentViewFilter::ERRATA, ContentViewFilter::PACKAGE_GROUP].collect do |content_type|
|
711
|
-
repo.clone_contents_by_filter(cloned, content_type, nil)
|
712
|
-
end
|
713
|
-
PulpTaskStatus.wait_for_tasks(group_tasks)
|
714
|
-
cloned.purge_empty_groups_errata
|
715
|
-
end
|
716
|
-
|
717
|
-
PulpTaskStatus.wait_for_tasks([repo.clone_distribution(cloned)])
|
718
|
-
PulpTaskStatus.wait_for_tasks([repo.clone_file_metadata(cloned)])
|
719
|
-
end
|
720
|
-
|
721
685
|
def related_resources
|
722
686
|
self.organization
|
723
687
|
end
|
688
|
+
|
689
|
+
class Jail < ::Safemode::Jail
|
690
|
+
allow :name, :label
|
691
|
+
end
|
724
692
|
end
|
725
693
|
end
|