katello 3.1.0.1 → 3.2.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/README.md +8 -47
- data/app/assets/javascripts/katello/common/index.js +0 -1
- data/app/assets/javascripts/katello/providers/redhat/index.js +0 -1
- data/app/assets/stylesheets/katello/_katello_colors.scss +0 -2
- data/app/assets/stylesheets/katello/katello.scss +0 -2
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +45 -42
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +7 -19
- data/app/controllers/katello/api/v2/api_controller.rb +3 -3
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +3 -3
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +2 -2
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +29 -18
- data/app/controllers/katello/api/v2/content_view_filters_controller.rb +2 -2
- data/app/controllers/katello/api/v2/content_view_histories_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +2 -2
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +10 -8
- data/app/controllers/katello/api/v2/content_views_controller.rb +5 -5
- data/app/controllers/katello/api/v2/environments_controller.rb +10 -9
- data/app/controllers/katello/api/v2/file_units_controller.rb +16 -0
- data/app/controllers/katello/api/v2/gpg_keys_controller.rb +4 -4
- data/app/controllers/katello/api/v2/host_autocomplete_controller.rb +2 -2
- data/app/controllers/katello/api/v2/host_collections_controller.rb +41 -13
- data/app/controllers/katello/api/v2/host_errata_controller.rb +12 -5
- data/app/controllers/katello/api/v2/host_packages_controller.rb +4 -4
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +9 -9
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +52 -13
- data/app/controllers/katello/api/v2/organizations_controller.rb +3 -3
- data/app/controllers/katello/api/v2/packages_controller.rb +1 -1
- data/app/controllers/katello/api/v2/ping_controller.rb +2 -2
- data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +2 -2
- data/app/controllers/katello/api/v2/products_controller.rb +6 -16
- data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/repositories_controller.rb +60 -21
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +3 -3
- data/app/controllers/katello/api/v2/root_controller.rb +2 -2
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +19 -10
- data/app/controllers/katello/api/v2/sync_controller.rb +3 -3
- data/app/controllers/katello/api/v2/sync_plans_controller.rb +2 -2
- data/app/controllers/katello/api/v2/uebercerts_controller.rb +1 -1
- data/app/controllers/katello/application_controller.rb +7 -7
- data/app/controllers/katello/auto_complete_search_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/api_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb +19 -16
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +8 -6
- data/app/controllers/katello/concerns/authorization/api/v2/content_views_controller.rb +10 -6
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +1 -1
- data/app/controllers/katello/concerns/smart_proxies_controller_extensions.rb +1 -1
- data/app/controllers/katello/errors_controller.rb +2 -2
- data/app/controllers/katello/organizations_controller.rb +1 -1
- data/app/controllers/katello/products_controller.rb +4 -4
- data/app/controllers/katello/providers_controller.rb +2 -2
- data/app/helpers/katello/application_helper.rb +0 -240
- data/app/helpers/katello/concerns/hosts_and_hostgroups_helper_extensions.rb +19 -0
- data/app/lib/actions/candlepin/import_pool_handler.rb +11 -6
- data/app/lib/actions/katello/capsule_content/create_repos.rb +3 -3
- data/app/lib/actions/katello/capsule_content/sync.rb +23 -9
- data/app/lib/actions/katello/content_view/add_to_environment.rb +1 -1
- data/app/lib/actions/katello/content_view/errata_mail.rb +2 -2
- data/app/lib/actions/katello/content_view/incremental_updates.rb +60 -1
- data/app/lib/actions/katello/content_view/remove.rb +2 -2
- data/app/lib/actions/katello/content_view_environment/destroy.rb +1 -1
- data/app/lib/actions/katello/content_view_environment/reassign_objects.rb +2 -2
- data/app/lib/actions/katello/content_view_puppet_environment/create.rb +3 -1
- data/app/lib/actions/katello/host/attach_subscriptions.rb +13 -6
- data/app/lib/actions/katello/host/destroy.rb +0 -19
- data/app/lib/actions/katello/host/generate_applicability.rb +8 -3
- data/app/lib/actions/katello/host/hypervisors.rb +17 -9
- data/app/lib/actions/katello/host/hypervisors_update.rb +19 -44
- data/app/lib/actions/katello/host/reassign.rb +14 -0
- data/app/lib/actions/katello/host/register.rb +3 -22
- data/app/lib/actions/katello/host/remove_subscriptions.rb +15 -2
- data/app/lib/actions/katello/host/update.rb +0 -6
- data/app/lib/actions/katello/organization/destroy.rb +2 -2
- data/app/lib/actions/katello/product/content_destroy.rb +7 -9
- data/app/lib/actions/katello/product/destroy.rb +23 -7
- data/app/lib/actions/katello/repository/clear.rb +1 -0
- data/app/lib/actions/katello/repository/clone_file_content.rb +17 -0
- data/app/lib/actions/katello/repository/clone_to_environment.rb +2 -0
- data/app/lib/actions/katello/repository/clone_to_version.rb +2 -0
- data/app/lib/actions/katello/repository/create.rb +2 -1
- data/app/lib/actions/katello/repository/destroy.rb +20 -10
- data/app/lib/actions/katello/repository/errata_mail.rb +2 -2
- data/app/lib/actions/katello/repository/filtered_index_content.rb +2 -0
- data/app/lib/actions/katello/repository/import_upload.rb +6 -2
- data/app/lib/actions/katello/repository/{refresh_repostiory.rb → refresh_repository.rb} +0 -0
- data/app/lib/actions/katello/repository/remove_content.rb +2 -0
- data/app/lib/actions/katello/repository/sync.rb +8 -12
- data/app/lib/actions/katello/repository_set/disable_repository.rb +6 -5
- data/app/lib/actions/katello/repository_set/enable_repository.rb +1 -1
- data/app/lib/actions/katello/repository_set/scan_cdn.rb +1 -1
- data/app/lib/actions/pulp/abstract_async_task.rb +1 -1
- data/app/lib/actions/pulp/consumer/unassociate_units.rb +20 -0
- data/app/lib/actions/pulp/repository/copy_files.rb +11 -0
- data/app/lib/actions/pulp/repository/create.rb +5 -1
- data/app/lib/actions/pulp/repository/presenters/file_presenter.rb +1 -1
- data/app/lib/actions/pulp/repository/refresh.rb +4 -2
- data/app/lib/actions/pulp/repository/remove_file.rb +15 -0
- data/app/lib/actions/pulp/repository/sync.rb +3 -1
- data/app/lib/actions/pulp/repository_group/export.rb +1 -1
- data/app/lib/katello/errors.rb +1 -1
- data/app/lib/katello/lazy_accessor.rb +1 -1
- data/app/lib/katello/resources/candlepin.rb +14 -0
- data/app/lib/katello/util/cdn_var_substitutor.rb +5 -2
- data/app/lib/katello/util/model.rb +1 -2
- data/app/lib/katello/util/package.rb +2 -2
- data/app/models/katello/activation_key.rb +0 -49
- data/app/models/katello/authorization/content_view_version.rb +7 -0
- data/app/models/katello/candlepin/content.rb +15 -3
- data/app/models/katello/concerns/container_extensions.rb +1 -2
- data/app/models/katello/concerns/content_facet_host_extensions.rb +11 -1
- data/app/models/katello/concerns/host_managed_extensions.rb +4 -13
- data/app/models/katello/concerns/hostgroup_extensions.rb +0 -2
- data/app/models/katello/concerns/medium_extensions.rb +2 -2
- data/app/models/katello/concerns/organization_extensions.rb +0 -5
- data/app/models/katello/concerns/pulp_database_unit.rb +5 -1
- data/app/models/katello/concerns/smart_proxy_extensions.rb +21 -1
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +1 -2
- data/app/models/katello/content_view.rb +12 -6
- data/app/models/katello/content_view_component.rb +0 -3
- data/app/models/katello/content_view_environment.rb +2 -2
- data/app/models/katello/content_view_package_filter_rule.rb +13 -0
- data/app/models/katello/content_view_puppet_environment.rb +2 -2
- data/app/models/katello/content_view_repository.rb +2 -1
- data/app/models/katello/content_view_version.rb +9 -2
- data/app/models/katello/erratum.rb +1 -5
- data/app/models/katello/file_unit.rb +41 -0
- data/app/models/katello/glue/candlepin/activation_key.rb +2 -2
- data/app/models/katello/glue/candlepin/pool.rb +19 -14
- data/app/models/katello/glue/pulp/repo.rb +44 -10
- data/app/models/katello/host/content_facet.rb +6 -6
- data/app/models/katello/host/subscription_facet.rb +6 -8
- data/app/models/katello/kt_environment.rb +3 -5
- data/app/models/katello/package_group.rb +1 -3
- data/app/models/katello/pool.rb +7 -2
- data/app/models/katello/pool_with_quantities.rb +12 -0
- data/app/models/katello/product.rb +6 -0
- data/app/models/katello/provider.rb +1 -1
- data/app/models/katello/puppet_module.rb +1 -2
- data/app/models/katello/repository.rb +7 -3
- data/app/models/katello/repository_file.rb +9 -0
- data/app/models/katello/rpm.rb +1 -1
- data/app/models/katello/subscription_status.rb +1 -1
- data/app/models/katello/sync_plan.rb +2 -1
- data/app/models/katello/task_status.rb +3 -36
- data/app/models/setting/content.rb +4 -1
- data/app/overrides/add_activation_keys_input.rb +2 -2
- data/app/presenters/katello/activation_key_subscriptions_presenter.rb +10 -0
- data/app/services/katello/candlepin/consumer.rb +5 -1
- data/app/services/katello/pulp/file_unit.rb +13 -0
- data/app/views/dashboard/_errata_widget.html.erb +1 -1
- data/app/views/dashboard/_subscription_widget.html.erb +30 -8
- data/app/views/foreman/job_templates/install_errata.erb +1 -1
- data/app/views/katello/api/v2/activation_keys/product_content.json.rabl +1 -0
- data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +2 -2
- data/app/views/katello/api/v2/content_facet/base.json.rabl +2 -4
- data/app/views/katello/api/v2/{systems → content_facet}/erratum.json.rabl +0 -0
- data/app/views/katello/api/v2/content_facet/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +5 -4
- data/app/views/katello/api/v2/environments/show.json.rabl +1 -1
- data/app/views/katello/api/v2/file_units/base.json.rabl +7 -0
- data/app/views/katello/api/v2/{systems → file_units}/index.json.rabl +1 -1
- data/app/views/katello/api/v2/file_units/show.json.rabl +3 -0
- data/app/views/katello/api/v2/host_errata/index.json.rabl +1 -1
- data/app/views/katello/api/v2/host_errata/show.json.rabl +1 -1
- data/app/views/katello/api/v2/package_groups/base.json.rabl +1 -1
- data/app/views/katello/api/v2/ping/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repositories/base.json.rabl +2 -1
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -1
- data/app/views/katello/api/v2/subscription_facet/base.json.rabl +1 -1
- data/app/views/katello/api/v2/subscription_facet/base_with_root.json.rabl +0 -4
- data/app/views/katello/api/v2/subscription_facet/show.json.rabl +1 -5
- data/app/views/katello/api/v2/subscriptions/base.json.rabl +3 -3
- data/app/views/katello/api/v2/subscriptions/index.json.rabl +1 -0
- data/app/views/katello/api/v2/tasks/task_status_show.json.rabl +0 -1
- data/app/views/katello/providers/redhat/show.html.erb +1 -1
- data/app/views/katello/sync_management/_products.html.erb +5 -1
- data/app/views/overrides/activation_keys/_host_environment_select.html.erb +1 -9
- data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +1 -0
- data/config/routes/api/v2.rb +9 -2
- data/config/routes/overrides.rb +9 -0
- data/db/migrate/20150930183738_migrate_content_hosts.rb +1 -1
- data/db/migrate/20160617124149_remove_duplicate_view_filters.rb +38 -0
- data/db/migrate/20160627125310_delete_system.rb +7 -0
- data/db/migrate/20160722193256_add_verify_ssl_on_sync_to_repository.rb +9 -0
- data/db/migrate/20160727144242_add_registered_through_to_katello_subscription_facets.rb +5 -0
- data/db/migrate/20160808002834_add_files.rb +30 -0
- data/db/migrate/20160906181923_add_puppet_path_to_smart_proxy.rb +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +7 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-add-subscriptions.html +6 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-details.html +101 -102
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-subscriptions-list.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/views/activation-key-new.html +82 -83
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/views/activation-keys.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.module.js +3 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsules/capsules.module.js +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/common.module.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/registration.html +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-action-subscriptions.controller.js +46 -72
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-action.controller.js +1 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/bulk-actions-errata.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/bulk-actions-host-collections.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/bulk-actions-subscriptions.html +79 -33
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +27 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages.html +57 -45
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-subscriptions.controller.js +5 -18
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js +2 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-subscriptions.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-add-subscriptions.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +117 -118
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +13 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions-list.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +26 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-content-hosts.controller.js +11 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-environments.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/content-view-deletion.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-content-hosts.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-environments.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-file-repositories.controller.js +47 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-details.controller.js +8 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-file-repositories-list.controller.js +45 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/errata-filter-details.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filters.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/package-filter-details.html +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-names.html +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-modules.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-composite-available-content-views.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-composite-content-views-list.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +151 -140
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-docker-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-file-repositories.html +118 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-ostree-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +13 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +8 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-details.html +8 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-file.html +22 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +6 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/views/content-views.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-manifests/docker-manifests.module.js +6 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tags-details.html +59 -61
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/docker-tags.module.js +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/views/docker-tags.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-content-views.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-docker.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-errata.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-ostree.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-packages.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-puppet-modules.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-repositories.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/errata-content-hosts.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/errata-details-content-hosts.html +6 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/errata-details-repositories.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/errata-details.html +44 -45
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.module.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/gpg-key-details-info.controller.js +11 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/gpg-key-details.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/views/gpg-key-details.html +52 -48
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/views/gpg-key-info.html +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/views/gpg-key-products.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/views/gpg-key-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-keys.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/new/views/gpg-key-new.html +62 -63
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/views/gpg-keys.html +6 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-add-hosts.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-details.html +85 -86
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-hosts-list.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/host-collections.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/new/views/host-collection-new.html +16 -17
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/views/host-collections.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +28 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-erratum.factory.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js +1 -27
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/hosts.module.js +3 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/organization.factory.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/organizations.module.js +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branches-details-repositories.controller.js +60 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/ostree-branches-details.controller.js +31 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branches-details-info.html +23 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branches-details-repositories.html +83 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branches-details.html +43 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.controller.js +67 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.module.js +5 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.routes.js +53 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/views/ostree-branches-table-collapsed.html +19 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/views/ostree-branches-table-full.html +21 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/views/ostree-branches.html +19 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/package-groups/package-groups.module.js +7 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/package-details.controller.js +17 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/packages-details-info.html +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/packages-details-repositories.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/packages-details.html +51 -52
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/packages.module.js +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/views/packages.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-details.html +72 -73
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-repositories.html +19 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/views/discovery-create.html +144 -145
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/new/views/product-new.html +17 -18
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/products.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-modules-details.html +44 -40
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.module.js +7 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/views/puppet-modules.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/repository-details-info.controller.js +11 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/views/repository-info.html +343 -324
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/new/new-repository.controller.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/new/views/repository-new.html +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/repositories.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/settings/settings.module.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-associations-content-hosts.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-details.html +46 -47
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/manifest-import.controller.js +10 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-import.html +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest.html +41 -42
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions-helper.service.js +15 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscriptions.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-details.html +54 -55
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/views/sync-plans.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/tasks.module.js +3 -1
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +1 -0
- data/lib/katello/engine.rb +11 -1
- data/lib/katello/permissions/host_permissions.rb +13 -1
- data/lib/katello/plugin.rb +20 -1
- data/lib/katello/tasks/reimport.rake +1 -0
- data/lib/katello/tasks/test.rake +8 -0
- data/lib/katello/tasks/unify_hosts.rake +91 -0
- data/lib/katello/tasks/upgrade_check.rake +3 -2
- data/lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake +2 -4
- data/lib/katello/version.rb +1 -1
- data/lib/proxy_api/pulp.rb +7 -0
- data/lib/proxy_api/pulp_node.rb +7 -0
- metadata +79 -67
- data/app/assets/javascripts/katello/common/jquery.jeditable.custominputs.js +0 -180
- data/app/assets/javascripts/katello/widgets/jquery.jeditable.helpers.js +0 -247
- data/app/assets/stylesheets/katello/widgets/_scrollpane.scss +0 -66
- data/app/controllers/katello/api/v2/systems_controller.rb +0 -213
- data/app/helpers/katello/activation_keys_helper.rb +0 -4
- data/app/helpers/katello/host_collection_events_helper.rb +0 -7
- data/app/helpers/katello/katello_form_builder.rb +0 -150
- data/app/helpers/katello/packages_helper.rb +0 -67
- data/app/helpers/katello/subscriptions_helper.rb +0 -32
- data/app/helpers/katello/system_events_helper.rb +0 -4
- data/app/helpers/katello/system_packages_helper.rb +0 -42
- data/app/lib/actions/katello/repository/incremental_import.rb +0 -61
- data/app/lib/actions/katello/subscription/subscribe.rb +0 -26
- data/app/lib/actions/katello/system/destroy.rb +0 -17
- data/app/lib/actions/katello/system/reassign.rb +0 -14
- data/app/models/katello/authorization/system.rb +0 -53
- data/app/models/katello/glue/candlepin/consumer.rb +0 -386
- data/app/models/katello/glue/pulp/consumer.rb +0 -171
- data/app/models/katello/hypervisor.rb +0 -15
- data/app/models/katello/system.rb +0 -283
- data/app/models/katello/system_activation_key.rb +0 -8
- data/app/models/katello/system_repository.rb +0 -8
- data/app/presenters/katello/activation_key_subscription_presenter.rb +0 -10
- data/app/views/katello/api/v2/errata/_applicable_errata.json.rabl +0 -3
- data/app/views/katello/api/v2/subscriptions/create.json.rabl +0 -3
- data/app/views/katello/api/v2/systems/_pool.json.rabl +0 -6
- data/app/views/katello/api/v2/systems/activate.json.rabl +0 -3
- data/app/views/katello/api/v2/systems/add_host_collections.json.rabl +0 -3
- data/app/views/katello/api/v2/systems/available_host_collections.json.rabl +0 -5
- data/app/views/katello/api/v2/systems/base.json.rabl +0 -35
- data/app/views/katello/api/v2/systems/enabled_repos.json.rabl +0 -3
- data/app/views/katello/api/v2/systems/events.json.rabl +0 -3
- data/app/views/katello/api/v2/systems/package.json.rabl +0 -5
- data/app/views/katello/api/v2/systems/package_profile.json.rabl +0 -7
- data/app/views/katello/api/v2/systems/pools.json.rabl +0 -7
- data/app/views/katello/api/v2/systems/regenerate_identity_certificates.json.rabl +0 -3
- data/app/views/katello/api/v2/systems/remove_host_collections.json.rabl +0 -3
- data/app/views/katello/api/v2/systems/show.json.rabl +0 -64
- data/app/views/katello/api/v2/systems/subscriptions.json.rabl +0 -8
- data/app/views/katello/api/v2/systems/upload_package_profile.json.rabl +0 -3
- data/db/seeds.d/105-roles_permissions.rb +0 -71
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host.factory.js +0 -25
- data/lib/katello/permissions/content_host_permissions.rb +0 -30
- data/lib/katello/tasks/yard.rake +0 -9
- data/vendor/assets/stylesheets/katello/jquery.jscrollpane.css +0 -120
@@ -5,7 +5,7 @@ module Katello
|
|
5
5
|
include Api::V2::Rendering
|
6
6
|
include ForemanTasks::Triggers
|
7
7
|
|
8
|
-
|
8
|
+
before_action :local_find_taxonomy, :only => %w(repo_discover cancel_repo_discover
|
9
9
|
download_debug_certificate
|
10
10
|
redhat_provider update
|
11
11
|
autoattach_subscriptions)
|
@@ -74,7 +74,7 @@ module Katello
|
|
74
74
|
param :description, String, :desc => N_("description")
|
75
75
|
param_group :resource
|
76
76
|
def create
|
77
|
-
@organization = Organization.new(
|
77
|
+
@organization = Organization.new(resource_params)
|
78
78
|
sync_task(::Actions::Katello::Organization::Create, @organization)
|
79
79
|
@organization.reload
|
80
80
|
respond_for_show :resource => @organization
|
@@ -116,7 +116,7 @@ module Katello
|
|
116
116
|
:type => "application/text"
|
117
117
|
end
|
118
118
|
|
119
|
-
api :POST, "/organizations/:id/autoattach_subscriptions", N_("Auto-attach available subscriptions to all
|
119
|
+
api :POST, "/organizations/:id/autoattach_subscriptions", N_("Auto-attach available subscriptions to all hosts within an organization. Asynchronous operation."), :deprecated => true
|
120
120
|
def autoattach_subscriptions
|
121
121
|
task = async_task(::Actions::Katello::Organization::AutoAttachSubscriptions, @organization)
|
122
122
|
respond_for_async :resource => task
|
@@ -3,7 +3,7 @@ module Katello
|
|
3
3
|
apipie_concern_subst(:a_resource => N_("a package"), :resource => "packages")
|
4
4
|
include Katello::Concerns::Api::V2::RepositoryContentController
|
5
5
|
|
6
|
-
|
6
|
+
before_action :find_repositories, :only => :auto_complete_name
|
7
7
|
|
8
8
|
def auto_complete_name
|
9
9
|
page_size = Katello::Concerns::FilteredAutoCompleteSearch::PAGE_SIZE
|
@@ -4,8 +4,8 @@ module Katello
|
|
4
4
|
api_version "v2"
|
5
5
|
end
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
skip_before_action :authorize
|
8
|
+
before_action :require_login, :only => [:index]
|
9
9
|
|
10
10
|
api :GET, "/ping", N_("Shows status of system and it's subcomponents")
|
11
11
|
description N_("This service is only available for authenticated users")
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module Katello
|
2
2
|
class Api::V2::ProductsBulkActionsController < Api::V2::ApiController
|
3
|
-
|
3
|
+
before_action :find_products
|
4
4
|
|
5
5
|
api :PUT, "/products/bulk/destroy", N_("Destroy one or more products")
|
6
6
|
param :ids, Array, :desc => N_("List of product ids"), :required => true
|
7
7
|
def destroy_products
|
8
|
-
deletable_products = @products.deletable
|
8
|
+
deletable_products = @products.deletable
|
9
9
|
deletable_products.each do |prod|
|
10
10
|
async_task(::Actions::Katello::Product::Destroy, prod)
|
11
11
|
end
|
@@ -2,12 +2,11 @@ module Katello
|
|
2
2
|
class Api::V2::ProductsController < Api::V2::ApiController
|
3
3
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
before_filter :authorize_gpg_key, :only => [:update, :create]
|
5
|
+
before_action :find_activation_key, :only => [:index]
|
6
|
+
before_action :find_organization, :only => [:create, :index, :auto_complete_search]
|
7
|
+
before_action :find_product, :only => [:update, :destroy, :sync]
|
8
|
+
before_action :find_organization_from_product, :only => [:update]
|
9
|
+
before_action :authorize_gpg_key, :only => [:update, :create]
|
11
10
|
|
12
11
|
resource_description do
|
13
12
|
api_version "v2"
|
@@ -46,7 +45,6 @@ module Katello
|
|
46
45
|
query = query.where(:name => params[:name]) if params[:name]
|
47
46
|
query = query.enabled if params[:enabled]
|
48
47
|
query = query.where(:id => @activation_key.products) if @activation_key
|
49
|
-
query = query.where(:id => @system.products) if @system
|
50
48
|
|
51
49
|
if params[:subscription_id]
|
52
50
|
pool = Pool.with_identifier(params[:subscription_id])
|
@@ -54,7 +52,7 @@ module Katello
|
|
54
52
|
end
|
55
53
|
|
56
54
|
# filter by sync plan
|
57
|
-
if sync_plan_id = params[:sync_plan_id]
|
55
|
+
if (sync_plan_id = params[:sync_plan_id])
|
58
56
|
query = if params[:available_for] == "sync_plan"
|
59
57
|
query.enabled.where("sync_plan_id != ? OR sync_plan_id IS NULL", sync_plan_id)
|
60
58
|
else
|
@@ -135,14 +133,6 @@ module Katello
|
|
135
133
|
end
|
136
134
|
end
|
137
135
|
|
138
|
-
def find_system
|
139
|
-
if params[:system_id]
|
140
|
-
@system = System.find_by(:uuid => params[:system_id])
|
141
|
-
fail HttpErrors::NotFound, _("Couldn't find content host '%s'") % params[:system_id] if @system.nil?
|
142
|
-
@organization = @system.organization
|
143
|
-
end
|
144
|
-
end
|
145
|
-
|
146
136
|
def find_organization_from_product
|
147
137
|
@organization = @product.organization
|
148
138
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Katello
|
2
2
|
class Api::V2::RepositoriesBulkActionsController < Api::V2::ApiController
|
3
|
-
|
3
|
+
before_action :find_repositories
|
4
4
|
|
5
5
|
api :PUT, "/repositories/bulk/destroy", N_("Destroy one or more repositories")
|
6
6
|
param :ids, Array, :desc => N_("List of repository ids"), :required => true
|
@@ -2,23 +2,23 @@ module Katello
|
|
2
2
|
class Api::V2::RepositoriesController < Api::V2::ApiController
|
3
3
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
before_action :find_optional_organization, :only => [:index, :auto_complete_search]
|
6
|
+
before_action :find_product, :only => [:index, :auto_complete_search]
|
7
|
+
before_action :find_product_for_create, :only => [:create]
|
8
|
+
before_action :find_organization_from_product, :only => [:create]
|
9
|
+
before_action :find_repository, :only => [:show, :update, :destroy, :sync, :export,
|
10
10
|
:remove_content, :upload_content,
|
11
11
|
:import_uploads, :gpg_key_content]
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
before_action :find_content, :only => :remove_content
|
13
|
+
before_action :find_organization_from_repo, :only => [:update]
|
14
|
+
before_action :find_gpg_key, :only => [:create, :update]
|
15
|
+
before_action :error_on_rh_product, :only => [:create]
|
16
|
+
before_action :error_on_rh_repo, :only => [:destroy]
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
skip_before_action :authorize, :only => [:sync_complete, :gpg_key_content]
|
19
|
+
skip_before_action :require_org, :only => [:sync_complete]
|
20
|
+
skip_before_action :require_user, :only => [:sync_complete]
|
21
|
+
skip_before_action :check_content_type, :only => [:upload_content]
|
22
22
|
|
23
23
|
def_param_group :repo do
|
24
24
|
param :name, String, :required => true
|
@@ -32,10 +32,12 @@ module Katello
|
|
32
32
|
param :docker_upstream_name, String, :desc => N_("name of the upstream docker repository")
|
33
33
|
param :download_policy, ["immediate", "on_demand", "background"], :desc => N_("download policy for yum repos (either 'immediate', 'on_demand', or 'background')")
|
34
34
|
param :mirror_on_sync, :bool, :desc => N_("true if this repository when synced has to be mirrored from the source and stale rpms removed.")
|
35
|
+
param :verify_ssl_on_sync, :bool, :desc => N_("if true, Katello will verify the upstream url's SSL certifcates are signed by a trusted CA.")
|
35
36
|
end
|
36
37
|
|
37
38
|
api :GET, "/repositories", N_("List of enabled repositories")
|
38
39
|
api :GET, "/content_views/:id/repositories", N_("List of repositories for a content view")
|
40
|
+
api :GET, "/organizations/:organization_id/repositories", N_("List of repositories in an organization")
|
39
41
|
api :GET, "/organizations/:organization_id/environments/:environment_id/repositories", _("List repositories in the environment")
|
40
42
|
api :GET, "/products/:product_id/repositories", N_("List of repositories for a product")
|
41
43
|
api :GET, "/environments/:environment_id/products/:product_id/repositories", N_("List of repositories belonging to a product in an environment")
|
@@ -46,6 +48,7 @@ module Katello
|
|
46
48
|
param :content_view_version_id, :number, :desc => N_("ID of a content view version to show repositories in")
|
47
49
|
param :erratum_id, String, :desc => N_("Id of an erratum to find repositories that contain the erratum")
|
48
50
|
param :rpm_id, String, :desc => N_("Id of a package to find repositories that contain the rpm")
|
51
|
+
param :ostree_branch_id, String, :desc => N_("Id of an ostree branch to find repositories that contain that branch")
|
49
52
|
param :library, :bool, :desc => N_("show repositories in Library and the default content view")
|
50
53
|
param :content_type, RepositoryTypeManager.repository_types.keys, :desc => N_("limit to only repositories of this type")
|
51
54
|
param :name, String, :desc => N_("name of the repository"), :required => false
|
@@ -71,6 +74,10 @@ module Katello
|
|
71
74
|
query = query.joins(:rpms).where("#{Rpm.table_name}.id" => Rpm.with_identifiers(params[:rpm_id]))
|
72
75
|
end
|
73
76
|
|
77
|
+
if params[:ostree_branch_id]
|
78
|
+
query = query.joins(:ostree_branches).where("#{OstreeBranch.table_name}.id" => OstreeBranch.with_identifiers(params[:ostree_branch_id]))
|
79
|
+
end
|
80
|
+
|
74
81
|
if params[:puppet_module_id]
|
75
82
|
query = query
|
76
83
|
.joins(:puppet_modules)
|
@@ -139,6 +146,8 @@ module Katello
|
|
139
146
|
gpg_key, repository_params[:checksum_type], repo_params[:download_policy])
|
140
147
|
repository.docker_upstream_name = repo_params[:docker_upstream_name] if repo_params[:docker_upstream_name]
|
141
148
|
repository.mirror_on_sync = ::Foreman::Cast.to_bool(repo_params[:mirror_on_sync]) if repo_params.key?(:mirror_on_sync)
|
149
|
+
repository.verify_ssl_on_sync = ::Foreman::Cast.to_bool(repo_params[:verify_ssl_on_sync]) if repo_params.key?(:verify_ssl_on_sync)
|
150
|
+
|
142
151
|
sync_task(::Actions::Katello::Repository::Create, repository, false, true)
|
143
152
|
repository = Repository.find(repository.id)
|
144
153
|
respond_for_show(:resource => repository)
|
@@ -212,6 +221,7 @@ module Katello
|
|
212
221
|
param :docker_upstream_name, String, :desc => N_("name of the upstream docker repository")
|
213
222
|
param :download_policy, ["immediate", "on_demand", "background"], :desc => N_("download policy for yum repos (either 'immediate', 'on_demand', or 'background')")
|
214
223
|
param :mirror_on_sync, :bool, :desc => N_("true if this repository when synced has to be mirrored from the source and stale rpms removed.")
|
224
|
+
param :verify_ssl_on_sync, :bool, :desc => N_("if true, Katello will verify the upstream url's SSL certifcates are signed by a trusted CA.")
|
215
225
|
def update
|
216
226
|
repo_params = repository_params
|
217
227
|
sync_task(::Actions::Katello::Repository::Update, @repository, repo_params)
|
@@ -294,13 +304,42 @@ module Katello
|
|
294
304
|
|
295
305
|
api :PUT, "/repositories/:id/import_uploads", N_("Import uploads into a repository")
|
296
306
|
param :id, :identifier, :required => true, :desc => N_("Repository id")
|
297
|
-
param :upload_ids, Array, :
|
307
|
+
param :upload_ids, Array, :desc => N_("Array of upload ids to import"), :deprecated => true
|
308
|
+
param :uploads, Array, :desc => N_("Array of uploads to import") do
|
309
|
+
param 'id', String, :required => true
|
310
|
+
param 'size', String
|
311
|
+
param 'checksum', String
|
312
|
+
param 'name', String
|
313
|
+
end
|
298
314
|
def import_uploads
|
299
|
-
params[
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
315
|
+
if params['upload_ids'].empty? && params['uploads'].empty?
|
316
|
+
fail HttpErrors::BadRequest, _('No upload param specified. Either uploads or upload_ids (deprecated) is required.')
|
317
|
+
end
|
318
|
+
|
319
|
+
if params.key?(:upload_ids)
|
320
|
+
Foreman::Deprecation.api_deprecation_warning("The parameter upload_ids will be removed in Katello 3.3. Please update to use the uploads parameter.")
|
321
|
+
|
322
|
+
params[:upload_ids].each do |upload_id|
|
323
|
+
begin
|
324
|
+
sync_task(::Actions::Katello::Repository::ImportUpload, @repository, upload_id)
|
325
|
+
rescue => e
|
326
|
+
raise HttpErrors::BadRequest, e.message
|
327
|
+
end
|
328
|
+
end
|
329
|
+
end
|
330
|
+
|
331
|
+
if params.key?(:uploads)
|
332
|
+
params[:uploads].each do |upload|
|
333
|
+
begin
|
334
|
+
sync_task(
|
335
|
+
::Actions::Katello::Repository::ImportUpload,
|
336
|
+
@repository,
|
337
|
+
upload['id'],
|
338
|
+
upload.except('id')
|
339
|
+
)
|
340
|
+
rescue => e
|
341
|
+
raise HttpErrors::BadRequest, e.message
|
342
|
+
end
|
304
343
|
end
|
305
344
|
end
|
306
345
|
|
@@ -343,7 +382,7 @@ module Katello
|
|
343
382
|
end
|
344
383
|
|
345
384
|
def repository_params
|
346
|
-
keys = [:download_policy, :mirror_on_sync]
|
385
|
+
keys = [:download_policy, :mirror_on_sync, :verify_ssl_on_sync]
|
347
386
|
keys += [:label, :content_type] if params[:action] == "create"
|
348
387
|
if params[:action] == 'create' || @repository.custom?
|
349
388
|
keys += [:url, :gpg_key_id, :unprotected, :name, :checksum_type, :docker_upstream_name]
|
@@ -2,9 +2,9 @@ module Katello
|
|
2
2
|
class Api::V2::RepositorySetsController < Api::V2::ApiController
|
3
3
|
respond_to :json
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
before_action :find_product
|
6
|
+
before_action :custom_product?
|
7
|
+
before_action :find_product_content, :except => [:index]
|
8
8
|
|
9
9
|
resource_description do
|
10
10
|
api_version "v2"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Katello
|
2
2
|
class Api::V2::RootController < Api::V2::ApiController
|
3
|
-
|
4
|
-
|
3
|
+
skip_before_action :authorize # ok - only shows URLs available
|
4
|
+
skip_before_action :require_user
|
5
5
|
|
6
6
|
resource_description do
|
7
7
|
api_version 'v2'
|
@@ -2,15 +2,15 @@ module Katello
|
|
2
2
|
class Api::V2::SubscriptionsController < Api::V2::ApiController
|
3
3
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
before_action :find_activation_key
|
6
|
+
before_action :find_host, :only => :index
|
7
|
+
before_action :find_optional_organization, :only => [:index, :available, :show]
|
8
|
+
before_action :find_organization, :only => [:upload, :delete_manifest,
|
9
9
|
:refresh_manifest, :manifest_history]
|
10
|
-
|
11
|
-
|
10
|
+
before_action :find_provider
|
11
|
+
before_action :deprecated, :only => [:create, :destroy]
|
12
12
|
|
13
|
-
|
13
|
+
skip_before_action :check_content_type, :only => [:upload]
|
14
14
|
|
15
15
|
resource_description do
|
16
16
|
description "Subscriptions management."
|
@@ -18,6 +18,7 @@ module Katello
|
|
18
18
|
end
|
19
19
|
|
20
20
|
api :GET, "/organizations/:organization_id/subscriptions", N_("List organization subscriptions")
|
21
|
+
api :GET, "/activation_keys/:activation_key_id/subscriptions", N_("List an activation key's subscriptions")
|
21
22
|
api :GET, "/subscriptions"
|
22
23
|
param_group :search, Api::V2::ApiController
|
23
24
|
param :organization_id, :number, :desc => N_("Organization ID"), :required => true
|
@@ -28,7 +29,15 @@ module Katello
|
|
28
29
|
param :match_installed, :bool, :desc => N_("Return subscriptions that match installed products of the specified host")
|
29
30
|
param :no_overlap, :bool, :desc => N_("Return subscriptions which do not overlap with a currently-attached subscription")
|
30
31
|
def index
|
31
|
-
|
32
|
+
collection = scoped_search(
|
33
|
+
index_relation.uniq, :cp_id, :asc, resource_class: Pool, includes: [:subscription])
|
34
|
+
if params[:activation_key_id]
|
35
|
+
key_pools = @activation_key.get_key_pools
|
36
|
+
collection[:results] = collection[:results].map do |pool|
|
37
|
+
ActivationKeySubscriptionsPresenter.new(pool, key_pools)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
respond(:collection => collection)
|
32
41
|
end
|
33
42
|
|
34
43
|
def index_relation
|
@@ -37,6 +46,7 @@ module Katello
|
|
37
46
|
collection = Pool.readable
|
38
47
|
collection = collection.where(:unmapped_guest => false)
|
39
48
|
collection = collection.get_for_organization(Organization.find(params[:organization_id])) if params[:organization_id]
|
49
|
+
collection = collection.for_activation_key(@activation_key) if params[:activation_key_id]
|
40
50
|
collection
|
41
51
|
end
|
42
52
|
|
@@ -96,7 +106,7 @@ module Katello
|
|
96
106
|
end
|
97
107
|
|
98
108
|
# repository url
|
99
|
-
if repo_url = params[:repository_url]
|
109
|
+
if (repo_url = params[:repository_url])
|
100
110
|
@provider.repository_url = repo_url
|
101
111
|
@provider.save!
|
102
112
|
end
|
@@ -149,7 +159,6 @@ module Katello
|
|
149
159
|
end
|
150
160
|
|
151
161
|
def find_provider
|
152
|
-
@organization = @system.organization if @system
|
153
162
|
@organization = @activation_key.organization if @activation_key
|
154
163
|
@organization = @subscription.organization if @subscription
|
155
164
|
@provider = @organization.redhat_provider if @organization
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Katello
|
2
2
|
class Api::V2::SyncController < Api::V2::ApiController
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
before_action :find_optional_organization, :only => [:index]
|
4
|
+
before_action :find_object, :only => [:index]
|
5
|
+
before_action :ensure_library, :only => [:index]
|
6
6
|
|
7
7
|
api :GET, "/organizations/:organization_id/products/:product_id/sync", N_("Get status of repo synchronisation for given product")
|
8
8
|
api :GET, "/repositories/:repository_id/sync", N_("Get status of synchronisation for given repository")
|
@@ -3,8 +3,8 @@ module Katello
|
|
3
3
|
respond_to :json
|
4
4
|
|
5
5
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
6
|
-
|
7
|
-
|
6
|
+
before_action :find_organization, :only => [:create, :index, :auto_complete_search]
|
7
|
+
before_action :find_plan, :only => [:update, :show, :destroy, :sync,
|
8
8
|
:add_products, :remove_products]
|
9
9
|
|
10
10
|
def_param_group :sync_plan do
|
@@ -11,20 +11,20 @@ module Katello
|
|
11
11
|
|
12
12
|
helper ::ApplicationHelper
|
13
13
|
helper ::TaxonomyHelper
|
14
|
-
|
14
|
+
before_action :set_gettext_locale
|
15
15
|
helper_method :current_organization
|
16
|
-
|
16
|
+
before_action :require_org
|
17
17
|
#before_filter :check_deleted_org
|
18
18
|
|
19
19
|
protect_from_forgery # See ActionController::RequestForgeryProtection for details
|
20
20
|
|
21
|
-
|
21
|
+
after_action :flash_to_headers
|
22
22
|
|
23
23
|
# Skipping Foreman's filter that clears the user
|
24
24
|
# from the current thread. If this filter is enabled
|
25
25
|
# Katello's rescue_from don't have access to User.current.
|
26
|
-
|
27
|
-
|
26
|
+
skip_around_action :clear_thread
|
27
|
+
after_action :clear_katello_thread
|
28
28
|
|
29
29
|
#custom 404 (render_404) and 500 (render_error) pages
|
30
30
|
# this is always in the top
|
@@ -411,7 +411,7 @@ module Katello
|
|
411
411
|
if @environment && !@environment.library?
|
412
412
|
@paths.each do |path|
|
413
413
|
path.each do |env|
|
414
|
-
if @path = path
|
414
|
+
if (@path = path)
|
415
415
|
return if env.id == @environment.id
|
416
416
|
end
|
417
417
|
end
|
@@ -419,7 +419,7 @@ module Katello
|
|
419
419
|
elsif next_env
|
420
420
|
@paths.each do |path|
|
421
421
|
path.each do |env|
|
422
|
-
if @path = path
|
422
|
+
if (@path = path)
|
423
423
|
return if env.id == next_env.id
|
424
424
|
end
|
425
425
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Katello
|
2
2
|
class AutoCompleteSearchController < Katello::ApplicationController
|
3
|
-
include Foreman::Controller::AutoCompleteSearch
|
3
|
+
include ::Foreman::Controller::AutoCompleteSearch
|
4
4
|
|
5
5
|
def model_of_controller
|
6
6
|
Organization.current ? model.where(:organization_id => Organization.current.id) : model
|