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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 996910969d6d4ff148a675b6b33a47798743ba85
|
4
|
+
data.tar.gz: 51a18935709cc696fe29b52ad02acbf2478f530e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99084c79da2747ace8491c61e5878abc7b157bd1091df4b68808f905e44eabd9faa0b8ba10c04bcf2263f8f5e158fa4f6b9f37c21d5e8c15ae3524d0eae96615
|
7
|
+
data.tar.gz: 4dad440d277ac638c6ef7809c8f981c1528a9eed57695bc1751cffd54dbcea8f00a0ec79dd3c84371d00f7113519a7444e4566b95b43506da19d490c35fe056d
|
data/README.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
-
# Katello
|
1
|
+
# Katello
|
2
2
|
|
3
|
-
|
3
|
+
[![Build Status](http://ci.theforeman.org/buildStatus/icon?job=test_katello)](http://ci.theforeman.org/job/test_katello)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/Katello/katello/badges/gpa.svg)](https://codeclimate.com/github/Katello/katello)
|
5
|
+
[![Dependency Status](https://gemnasium.com/Katello/katello.svg)](https://gemnasium.com/Katello/katello)
|
6
|
+
|
7
|
+
Full documentation is at http://www.katello.org
|
4
8
|
|
5
9
|
## About
|
6
10
|
|
@@ -66,54 +70,11 @@ See the [developer documentation](http://www.katello.org/developers/index.html).
|
|
66
70
|
## Contact & Resources
|
67
71
|
|
68
72
|
* [Katello.org](http://katello.org)
|
69
|
-
* [Wiki](https://fedorahosted.org/katello/wiki)
|
70
73
|
* [Foreman User Mailing List](https://groups.google.com/forum/?fromgroups#!forum/foreman-users)
|
71
74
|
* [Foreman Developer mailing list](https://groups.google.com/forum/?fromgroups#!forum/foreman-dev)
|
72
75
|
* [IRC Freenode](http://freenode.net/using_the_network.shtml): #theforeman-dev
|
73
|
-
* [Twitter](https://twitter.com/Katello_Project)
|
74
76
|
|
75
77
|
## Documentation
|
76
78
|
|
77
|
-
|
78
|
-
|
79
|
-
[wiki](https://fedorahosted.org/katello/). Developer documentation contains:
|
80
|
-
|
81
|
-
- code documentation
|
82
|
-
- high level guides to architectures and implementation details
|
83
|
-
- how-tos
|
84
|
-
|
85
|
-
*Note: older developer guides can be found on our wiki, they are being migrated.*
|
86
|
-
|
87
|
-
### How to
|
88
|
-
|
89
|
-
- to see YARD documentation start Katello server and find the link on "About" page or go directly to
|
90
|
-
<http://path.to.katello/url_prefix/yard/docs/katello/frames>
|
91
|
-
|
92
|
-
- if it fails run `bundle exec yard doc --no-cache` first, which will rebuild whole documentation
|
93
|
-
|
94
|
-
- see {file:doc/YARDDocumentation.md}
|
95
|
-
|
96
|
-
## Current documentation
|
97
|
-
|
98
|
-
- {file:doc/YARDDocumentation.md}
|
99
|
-
- {file:doc/Graphs.md}
|
100
|
-
|
101
|
-
### Debugging
|
102
|
-
|
103
|
-
- {file:doc/how_to/add_praise.md Enabling Praise} - raise/exception investigation
|
104
|
-
|
105
|
-
### Packaging
|
106
|
-
|
107
|
-
- {file:doc/how_to/package_new_gem.md How to package new gem}
|
108
|
-
|
109
|
-
### Other
|
110
|
-
|
111
|
-
- {file:doc/katellodb.html DB schema documentation}
|
112
|
-
- Original Rails generated README {file:doc/RailsReadme}, we may do certain things differently
|
113
|
-
|
114
|
-
- we use `doc` directory for storing markdown guides instead of a generated documentation
|
115
|
-
|
116
|
-
### Source
|
117
|
-
|
118
|
-
- {Katello::Configuration}
|
119
|
-
- {Notifications}
|
79
|
+
Most of our documentation (both for users and developers) can be found at
|
80
|
+
[Katello.org](http://www.katello.org).
|
@@ -4,14 +4,12 @@
|
|
4
4
|
|
5
5
|
@import "katello/fancyqueries";
|
6
6
|
@import "katello/widgets/chosen";
|
7
|
-
@import "katello/widgets/scrollpane";
|
8
7
|
@import "katello/widgets/tabs";
|
9
8
|
@import "katello/katello_sprites";
|
10
9
|
|
11
10
|
@import "katello/jquery.loadmask";
|
12
11
|
@import "katello/jquery-ui-1.8.11.custom";
|
13
12
|
@import "katello/jquery.treeTable";
|
14
|
-
@import "katello/jquery.jscrollpane";
|
15
13
|
@import "katello/ui.spinner";
|
16
14
|
|
17
15
|
@import "katello/contents";
|
@@ -2,26 +2,26 @@ module Katello
|
|
2
2
|
class Api::Rhsm::CandlepinProxiesController < Api::V2::ApiController
|
3
3
|
include Katello::Authentication::ClientAuthentication
|
4
4
|
|
5
|
-
|
5
|
+
before_action :disable_strong_params
|
6
6
|
|
7
7
|
wrap_parameters false
|
8
8
|
|
9
|
-
|
10
|
-
|
9
|
+
around_action :repackage_message
|
10
|
+
before_action :find_host, :only => [:consumer_show, :consumer_destroy, :consumer_checkin, :enabled_repos,
|
11
11
|
:upload_package_profile, :regenerate_identity_certificates, :facts,
|
12
12
|
:available_releases, :serials]
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
before_action :authorize, :only => [:consumer_create, :list_owners, :rhsm_index]
|
14
|
+
before_action :authorize_client_or_user, :only => [:consumer_show, :upload_package_profile, :regenerate_identity_certificates]
|
15
|
+
before_action :authorize_client_or_admin, :only => [:hypervisors_update]
|
16
|
+
before_action :authorize_proxy_routes, :only => [:get, :post, :put, :delete]
|
17
|
+
before_action :authorize_client, :only => [:consumer_destroy, :consumer_checkin,
|
18
18
|
:enabled_repos, :facts, :available_releases]
|
19
19
|
|
20
|
-
|
20
|
+
before_action :add_candlepin_version_header
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
before_action :proxy_request_path, :proxy_request_body
|
23
|
+
before_action :set_organization_id, :except => :hypervisors_update
|
24
|
+
before_action :find_hypervisor_organization, :only => [:hypervisors_update]
|
25
25
|
|
26
26
|
def repackage_message
|
27
27
|
yield
|
@@ -113,8 +113,9 @@ module Katello
|
|
113
113
|
def hypervisors_update
|
114
114
|
login = User.consumer? ? User.anonymous_api_admin.login : User.current.login
|
115
115
|
task = User.as(login) do
|
116
|
-
|
117
|
-
|
116
|
+
params['owner'] = @organization.label #override owner label if
|
117
|
+
params['env'] = nil #hypervisors don't need an environment
|
118
|
+
sync_task(::Actions::Katello::Host::Hypervisors, params.except(:controller, :action, :format))
|
118
119
|
end
|
119
120
|
render :json => task.output[:results]
|
120
121
|
end
|
@@ -182,7 +183,6 @@ module Katello
|
|
182
183
|
|
183
184
|
result = nil
|
184
185
|
User.as_anonymous_admin do
|
185
|
-
@host.content_host.save_bound_repos_by_path!(paths.compact)
|
186
186
|
result = @host.content_facet.update_repositories_by_paths(paths.compact)
|
187
187
|
end
|
188
188
|
|
@@ -195,9 +195,11 @@ module Katello
|
|
195
195
|
host = Katello::Host::SubscriptionFacet.find_or_create_host(params[:facts]['network.hostname'],
|
196
196
|
content_view_environment.environment.organization, rhsm_params)
|
197
197
|
|
198
|
-
sync_task(::Actions::Katello::Host::Register, host,
|
198
|
+
sync_task(::Actions::Katello::Host::Register, host, rhsm_params, content_view_environment)
|
199
199
|
host.reload
|
200
200
|
|
201
|
+
update_host_registered_through(host, request.headers)
|
202
|
+
|
201
203
|
render :json => Resources::Candlepin::Consumer.get(host.subscription_facet.uuid)
|
202
204
|
end
|
203
205
|
|
@@ -205,7 +207,11 @@ module Katello
|
|
205
207
|
#param :id, String, :desc => N_("UUID of the consumer"), :required => true
|
206
208
|
def consumer_destroy
|
207
209
|
User.as_anonymous_admin do
|
208
|
-
|
210
|
+
if Setting['unregister_delete_host']
|
211
|
+
sync_task(::Actions::Katello::Host::Destroy, @host)
|
212
|
+
else
|
213
|
+
sync_task(::Actions::Katello::Host::Unregister, @host)
|
214
|
+
end
|
209
215
|
end
|
210
216
|
render :text => _("Deleted consumer '%s'") % params[:id], :status => 204
|
211
217
|
end
|
@@ -221,7 +227,9 @@ module Katello
|
|
221
227
|
host = Katello::Host::SubscriptionFacet.find_or_create_host(params[:facts]['network.hostname'],
|
222
228
|
activation_keys.first.organization, rhsm_params)
|
223
229
|
|
224
|
-
sync_task(::Actions::Katello::Host::Register, host,
|
230
|
+
sync_task(::Actions::Katello::Host::Register, host, rhsm_params, nil, activation_keys)
|
231
|
+
|
232
|
+
update_host_registered_through(host, request.headers)
|
225
233
|
host.reload
|
226
234
|
|
227
235
|
render :json => Resources::Candlepin::Consumer.get(host.subscription_facet.uuid)
|
@@ -243,8 +251,9 @@ module Katello
|
|
243
251
|
|
244
252
|
def facts
|
245
253
|
User.as_anonymous_admin do
|
246
|
-
sync_task(::Actions::Katello::Host::Update, @host, rhsm_params)
|
254
|
+
sync_task(::Actions::Katello::Host::Update, @host, rhsm_params.except(:facts))
|
247
255
|
Katello::Host::SubscriptionFacet.update_facts(@host, rhsm_params[:facts]) unless rhsm_params[:facts].nil?
|
256
|
+
update_host_registered_through(@host, request.headers)
|
248
257
|
end
|
249
258
|
render :json => {:content => _("Facts successfully updated.")}, :status => 200
|
250
259
|
end
|
@@ -255,6 +264,12 @@ module Katello
|
|
255
264
|
render :json => Katello::Resources::Candlepin::Consumer.serials(@host.subscription_facet.uuid)
|
256
265
|
end
|
257
266
|
|
267
|
+
def get_parent_host(headers)
|
268
|
+
hostnames = headers["HTTP_X_FORWARDED_SERVER"]
|
269
|
+
host = hostnames.split(",")[0] if hostnames
|
270
|
+
host || Facter.value(:fqdn) || SETTINGS[:fqdn]
|
271
|
+
end
|
272
|
+
|
258
273
|
private
|
259
274
|
|
260
275
|
def disable_strong_params
|
@@ -297,31 +312,14 @@ module Katello
|
|
297
312
|
environment
|
298
313
|
end
|
299
314
|
|
300
|
-
|
301
|
-
def find_hypervisor_environment_and_content_view
|
315
|
+
def find_hypervisor_organization
|
302
316
|
if User.consumer?
|
303
|
-
|
304
|
-
@organization =
|
305
|
-
|
306
|
-
@content_view = @host.content_facet.content_view
|
307
|
-
params[:owner] = @organization.label
|
308
|
-
params[:env] = @content_view.cp_environment_label(@environment)
|
309
|
-
else
|
317
|
+
host = find_host(User.current.uuid)
|
318
|
+
@organization = host.organization
|
319
|
+
elsif params[:owner]
|
310
320
|
@organization = Organization.find_by(:label => params[:owner])
|
311
|
-
deny_access unless @organization
|
312
|
-
if params[:env] == 'Library'
|
313
|
-
@environment = @organization.library
|
314
|
-
deny_access unless @environment && @environment.readable?
|
315
|
-
@content_view = @environment.default_content_view
|
316
|
-
deny_access unless @content_view && @content_view.readable?
|
317
|
-
else
|
318
|
-
(env_name, cv_name) = params[:env].split('/')
|
319
|
-
@environment = @organization.kt_environments.find_by(:label => env_name)
|
320
|
-
deny_access unless @environment && @environment.readable?
|
321
|
-
@content_view = @environment.content_views.find_by(:label => cv_name)
|
322
|
-
deny_access unless @content_view && @content_view.readable?
|
323
|
-
end
|
324
321
|
end
|
322
|
+
deny_access unless @organization
|
325
323
|
end
|
326
324
|
|
327
325
|
def find_organization
|
@@ -347,7 +345,7 @@ module Katello
|
|
347
345
|
def find_activation_keys
|
348
346
|
organization = find_organization
|
349
347
|
|
350
|
-
if ak_names = params[:activation_keys]
|
348
|
+
if (ak_names = params[:activation_keys])
|
351
349
|
ak_names = ak_names.split(",")
|
352
350
|
activation_keys = ak_names.map do |ak_name|
|
353
351
|
activation_key = organization.activation_keys.find_by(:name => ak_name)
|
@@ -432,6 +430,11 @@ module Katello
|
|
432
430
|
authorized
|
433
431
|
end
|
434
432
|
|
433
|
+
def update_host_registered_through(host, headers)
|
434
|
+
parent_host = get_parent_host(headers)
|
435
|
+
host.subscription_facet.update_attribute(:registered_through, parent_host)
|
436
|
+
end
|
437
|
+
|
435
438
|
# rubocop:disable MethodLength
|
436
439
|
def authorize_proxy_routes
|
437
440
|
deny_access unless (authenticate || authenticate_client)
|
@@ -2,15 +2,15 @@ module Katello
|
|
2
2
|
class Api::V2::ActivationKeysController < Api::V2::ApiController
|
3
3
|
include Katello::Concerns::FilteredAutoCompleteSearch
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
before_action :verify_presence_of_organization_or_environment, :only => [:index]
|
6
|
+
before_action :find_environment, :only => [:index, :create, :update]
|
7
|
+
before_action :find_optional_organization, :only => [:index, :create, :show]
|
8
|
+
before_action :find_content_view, :only => [:index]
|
9
|
+
before_action :find_activation_key, :only => [:show, :update, :destroy, :available_releases, :copy, :product_content,
|
10
10
|
:available_host_collections, :add_host_collections, :remove_host_collections,
|
11
11
|
:content_override, :add_subscriptions, :remove_subscriptions,
|
12
12
|
:subscriptions]
|
13
|
-
|
13
|
+
before_action :authorize
|
14
14
|
|
15
15
|
wrap_parameters :include => (ActivationKey.attribute_names + %w(host_collection_ids service_level auto_attach content_view_environment))
|
16
16
|
|
@@ -103,7 +103,7 @@ module Katello
|
|
103
103
|
respond_for_show(:resource => @new_activation_key)
|
104
104
|
end
|
105
105
|
|
106
|
-
api :GET, "/activation_keys/:id/host_collections/available", N_("List host collections the
|
106
|
+
api :GET, "/activation_keys/:id/host_collections/available", N_("List host collections the activation key does not belong to")
|
107
107
|
param_group :search, Api::V2::ApiController
|
108
108
|
param :name, String, :desc => N_("host collection name to filter by")
|
109
109
|
def available_host_collections
|
@@ -216,18 +216,6 @@ module Katello
|
|
216
216
|
activation_keys
|
217
217
|
end
|
218
218
|
|
219
|
-
api :GET, "/activation_keys/:id/subscriptions", N_("List an activation key's subscriptions")
|
220
|
-
param :activation_key_id, String, :desc => N_("Activation key ID"), :required => true
|
221
|
-
def subscriptions
|
222
|
-
subscriptions = @activation_key.get_key_pools.map { |sub| ActivationKeySubscriptionPresenter.new(sub) }
|
223
|
-
collection = subscriptions.map(&:subscription)
|
224
|
-
@collection = { :results => collection,
|
225
|
-
:total => collection.count,
|
226
|
-
:page => 1,
|
227
|
-
:per_page => collection.count,
|
228
|
-
:subtotal => collection.count }
|
229
|
-
end
|
230
|
-
|
231
219
|
def find_activation_key
|
232
220
|
@activation_key = ActivationKey.find(params[:id])
|
233
221
|
fail HttpErrors::NotFound, _("Couldn't find activation key '%s'") % params[:id] if @activation_key.nil?
|
@@ -8,7 +8,7 @@ module Katello
|
|
8
8
|
# support for session (thread-local) variables must be the last filter in this class
|
9
9
|
include Foreman::ThreadSession::Cleaner
|
10
10
|
|
11
|
-
|
11
|
+
skip_before_action :setup_has_many_params # TODO: get this working #8862
|
12
12
|
|
13
13
|
resource_description do
|
14
14
|
api_version 'v2'
|
@@ -20,7 +20,7 @@ module Katello
|
|
20
20
|
param :page, :number, :desc => N_("Page number, starting at 1")
|
21
21
|
param :per_page, :number, :desc => N_("Number of results per page to return")
|
22
22
|
param :order, String, :desc => N_("Sort field and order, eg. 'name DESC'")
|
23
|
-
param :
|
23
|
+
param :full_result, :bool, :desc => N_("Whether or not to show all results")
|
24
24
|
param :sort, Hash, :desc => N_("Hash version of 'order' param") do
|
25
25
|
param :by, String, :desc => N_("Field to sort the results on")
|
26
26
|
param :order, String, :desc => N_("How to order the sorted results (e.g. ASC for ascending)")
|
@@ -68,7 +68,7 @@ module Katello
|
|
68
68
|
query = query.order("#{query.table_name}.id DESC") unless group #secondary order to ensure sort is deterministic
|
69
69
|
query = query.includes(includes) if includes.length > 0
|
70
70
|
|
71
|
-
if params[:full_result]
|
71
|
+
if ::Foreman::Cast.to_bool(params[:full_result])
|
72
72
|
params[:per_page] = total
|
73
73
|
else
|
74
74
|
query = query.paginate(paginate_options)
|
@@ -4,9 +4,9 @@ module Katello
|
|
4
4
|
api_base_url "/katello/api"
|
5
5
|
end
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
before_action :find_capsule
|
8
|
+
before_action :find_environment, :only => [:add_lifecycle_environment, :remove_lifecycle_environment]
|
9
|
+
before_action :find_optional_organization, :only => [:sync_status]
|
10
10
|
|
11
11
|
def_param_group :lifecycle_environments do
|
12
12
|
param :id, Integer, :desc => N_('Id of the capsule'), :required => true
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Katello
|
2
2
|
class Api::V2::ContentUploadsController < Api::V2::ApiController
|
3
|
-
|
4
|
-
|
3
|
+
before_action :find_repository
|
4
|
+
skip_before_action :check_content_type, :only => [:update]
|
5
5
|
|
6
6
|
include ::Foreman::Controller::FilterParameters
|
7
7
|
filter_parameters :content
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Katello
|
2
2
|
class Api::V2::ContentViewFilterRulesController < Api::V2::ApiController
|
3
|
-
|
4
|
-
|
3
|
+
before_action :find_filter
|
4
|
+
before_action :find_rule, :except => [:index, :create]
|
5
5
|
|
6
6
|
api :GET, "/content_view_filters/:content_view_filter_id/rules", N_("List filter rules")
|
7
7
|
param :content_view_filter_id, :identifier, :desc => N_("filter identifier"), :required => true
|
@@ -19,7 +19,7 @@ module Katello
|
|
19
19
|
api :POST, "/content_view_filters/:content_view_filter_id/rules",
|
20
20
|
N_("Create a filter rule. The parameters included should be based upon the filter type.")
|
21
21
|
param :content_view_filter_id, :identifier, :desc => N_("filter identifier"), :required => true
|
22
|
-
param :name, String, :desc => N_("package
|
22
|
+
param :name, [String, Array], :desc => N_("package and package group names")
|
23
23
|
param :version, String, :desc => N_("package: version")
|
24
24
|
param :min_version, String, :desc => N_("package: minimum version")
|
25
25
|
param :max_version, String, :desc => N_("package: maximum version")
|
@@ -32,19 +32,23 @@ module Katello
|
|
32
32
|
def create
|
33
33
|
rule_clazz = ContentViewFilter.rule_class_for(@filter)
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
35
|
+
rules = (rule_params[:name] || []).map do |name|
|
36
|
+
rule_clazz.create!(rule_params.except(:name).merge(:filter => @filter, name: name))
|
37
|
+
end
|
38
|
+
|
39
|
+
rules += (rule_params[:errata_ids] || []).map do |errata_id|
|
40
|
+
rule_clazz.create!(rule_params.except(:errata_ids)
|
41
|
+
.merge(filter: @filter, errata_id: errata_id))
|
42
42
|
end
|
43
43
|
|
44
|
-
if rules
|
44
|
+
if rules.empty?
|
45
|
+
rules = [rule_clazz.create!(rule_params.merge(:filter => @filter))]
|
46
|
+
end
|
47
|
+
|
48
|
+
if rules.many?
|
45
49
|
respond_for_index(:collection => {:results => rules}, :template => 'index')
|
46
50
|
else
|
47
|
-
respond :
|
51
|
+
respond resource: rules.first
|
48
52
|
end
|
49
53
|
end
|
50
54
|
|
@@ -69,6 +73,7 @@ module Katello
|
|
69
73
|
param :types, Array, :desc => N_("erratum: types (enhancement, bugfix, security)")
|
70
74
|
def update
|
71
75
|
update_params = rule_params
|
76
|
+
update_params[:name] = update_params[:name].first if update_params[:name]
|
72
77
|
|
73
78
|
if @rule.filter.content_type == ContentViewPackageFilter::CONTENT_TYPE
|
74
79
|
update_params[:version] = "" unless rule_params[:version]
|
@@ -100,15 +105,21 @@ module Katello
|
|
100
105
|
end
|
101
106
|
|
102
107
|
def rule_params
|
103
|
-
|
104
|
-
|
105
|
-
|
108
|
+
unless @rule_params
|
109
|
+
if params[:content_view_filter_rule][:errata_ids].is_a?(Hash)
|
110
|
+
ids = process_errata_ids(params[:content_view_filter_rule][:errata_ids])
|
111
|
+
params[:content_view_filter_rule][:errata_ids] = ids
|
112
|
+
end
|
113
|
+
|
114
|
+
if params[:name]
|
115
|
+
params[:content_view_filter_rule][:name] = params[:name] = [params[:name]].flatten
|
116
|
+
end
|
106
117
|
end
|
107
118
|
|
108
|
-
params.fetch(:content_view_filter_rule, {}).
|
109
|
-
permit(:uuid, :
|
119
|
+
@rule_params ||= params.fetch(:content_view_filter_rule, {}).
|
120
|
+
permit(:uuid, :version, :min_version, :max_version,
|
110
121
|
:errata_id, :start_date, :end_date, :date_type,
|
111
|
-
:types => [], :errata_ids => [])
|
122
|
+
:types => [], :errata_ids => [], name: [])
|
112
123
|
end
|
113
124
|
|
114
125
|
def process_errata_ids(select_all_params)
|