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
@@ -19,8 +19,6 @@ module Katello
|
|
19
19
|
validates :host, :presence => true, :allow_blank => false
|
20
20
|
validates_with Validators::ContentViewEnvironmentValidator
|
21
21
|
|
22
|
-
attr_accessible :content_view_id, :lifecycle_environment_id, :host, :kickstart_repository_id
|
23
|
-
|
24
22
|
def update_repositories_by_paths(paths)
|
25
23
|
paths = paths.map { |path| path.gsub('/pulp/repos/', '') }
|
26
24
|
repos = Repository.where(:relative_path => paths)
|
@@ -30,10 +28,12 @@ module Katello
|
|
30
28
|
Rails.logger.warn("System #{self.host.name} (#{self.host.id}) requested binding to unknown repo #{repo_path}")
|
31
29
|
end
|
32
30
|
|
33
|
-
self.bound_repositories
|
34
|
-
|
35
|
-
|
36
|
-
|
31
|
+
unless self.bound_repositories.sort == repos.sort
|
32
|
+
self.bound_repositories = repos
|
33
|
+
self.save!
|
34
|
+
self.propagate_yum_repos
|
35
|
+
ForemanTasks.async_task(Actions::Katello::Host::GenerateApplicability, [self.host])
|
36
|
+
end
|
37
37
|
self.bound_repositories.pluck(:relative_path)
|
38
38
|
end
|
39
39
|
|
@@ -9,10 +9,8 @@ module Katello
|
|
9
9
|
|
10
10
|
validates :host, :presence => true, :allow_blank => false
|
11
11
|
|
12
|
-
DEFAULT_TYPE =
|
12
|
+
DEFAULT_TYPE = 'system'.freeze
|
13
13
|
|
14
|
-
attr_accessible :release_version, :autoheal, :service_level, :host,
|
15
|
-
:installed_products, :facts, :hypervisor_guest_uuids
|
16
14
|
attr_accessor :installed_products, :facts, :hypervisor_guest_uuids
|
17
15
|
|
18
16
|
def update_from_consumer_attributes(consumer_params)
|
@@ -91,11 +89,7 @@ module Katello
|
|
91
89
|
end
|
92
90
|
|
93
91
|
def remove_subscriptions(pools_with_quantities)
|
94
|
-
|
95
|
-
candlepin_consumer.filter_entitlements(pool_with_quantities.pool.cp_id, pool_with_quantities.quantities)
|
96
|
-
end
|
97
|
-
|
98
|
-
ForemanTasks.sync_task(Actions::Katello::Host::RemoveSubscriptions, self.host, entitlements.flatten)
|
92
|
+
ForemanTasks.sync_task(Actions::Katello::Host::RemoveSubscriptions, self.host, pools_with_quantities)
|
99
93
|
end
|
100
94
|
|
101
95
|
def self.find_host(name, organization)
|
@@ -108,6 +102,10 @@ module Katello
|
|
108
102
|
hosts.first
|
109
103
|
end
|
110
104
|
|
105
|
+
def self.sanitize_name(name)
|
106
|
+
name.gsub('_', '-').chomp('.').downcase
|
107
|
+
end
|
108
|
+
|
111
109
|
def candlepin_consumer
|
112
110
|
@candlepin_consumer ||= Katello::Candlepin::Consumer.new(self.uuid)
|
113
111
|
end
|
@@ -21,8 +21,6 @@ module Katello
|
|
21
21
|
:association_foreign_key => :environment_id, :readonly => true
|
22
22
|
|
23
23
|
has_many :repositories, :class_name => "Katello::Repository", dependent: :destroy, foreign_key: :environment_id
|
24
|
-
has_many :systems, :class_name => "Katello::System", :inverse_of => :environment,
|
25
|
-
:dependent => :restrict_with_exception, :foreign_key => :environment_id
|
26
24
|
has_many :content_view_environments, :class_name => "Katello::ContentViewEnvironment",
|
27
25
|
:foreign_key => :environment_id, :inverse_of => :environment, :dependent => :restrict_with_exception
|
28
26
|
has_many :content_view_puppet_environments, :class_name => "Katello::ContentViewPuppetEnvironment",
|
@@ -153,10 +151,10 @@ module Katello
|
|
153
151
|
errors.add :base, _("Lifecycle Environment %s has a successor. Only the last lifecycle environment on a path can be deleted") % self.name
|
154
152
|
end
|
155
153
|
|
156
|
-
if
|
154
|
+
if content_facets.any?
|
157
155
|
errors.add(:base,
|
158
|
-
_("Lifecycle Environment %s has associated
|
159
|
-
" Please unregister or move the associated
|
156
|
+
_("Lifecycle Environment %s has associated Hosts." \
|
157
|
+
" Please unregister or move the associated Hosts before trying to delete this lifecycle environment.") % self.name)
|
160
158
|
end
|
161
159
|
|
162
160
|
if activation_keys.any?
|
@@ -20,9 +20,7 @@ module Katello
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def update_from_json(json)
|
23
|
-
|
24
|
-
custom_json = json.clone.delete_if { |key, _value| !keys.include?(key) }
|
25
|
-
self.update_attributes!(custom_json)
|
23
|
+
self.update_attributes!(json.slice('name', 'description'))
|
26
24
|
end
|
27
25
|
|
28
26
|
def self.list_by_filter_clauses(clauses)
|
data/app/models/katello/pool.rb
CHANGED
@@ -2,14 +2,15 @@ module Katello
|
|
2
2
|
class Pool < Katello::Model
|
3
3
|
include Katello::Authorization::Pool
|
4
4
|
|
5
|
-
attr_accessor :quantity_attached
|
6
|
-
|
7
5
|
belongs_to :subscription, :inverse_of => :pools, :class_name => "Katello::Subscription"
|
8
6
|
|
9
7
|
has_many :activation_keys, :through => :pool_activation_keys, :class_name => "Katello::ActivationKey"
|
10
8
|
has_many :pool_activation_keys, :class_name => "Katello::PoolActivationKey", :dependent => :destroy, :inverse_of => :pool
|
11
9
|
|
12
10
|
scope :in_org, -> (org_id) { joins(:subscription).where("#{Katello::Subscription.table_name}.organization_id = ?", org_id) }
|
11
|
+
scope :for_activation_key, ->(ak) {
|
12
|
+
where(cp_id: ak.get_key_pools.map { |pool| pool['id'] })
|
13
|
+
}
|
13
14
|
|
14
15
|
self.include_root_in_json = false
|
15
16
|
|
@@ -63,6 +64,10 @@ module Katello
|
|
63
64
|
self.subscription.products if self.subscription
|
64
65
|
end
|
65
66
|
|
67
|
+
def host
|
68
|
+
Katello::Host::SubscriptionFacet.find_by_uuid(host_id).try(:host) if host_id
|
69
|
+
end
|
70
|
+
|
66
71
|
private
|
67
72
|
|
68
73
|
def default_sort
|
@@ -7,5 +7,17 @@ module Katello
|
|
7
7
|
@quantities = quantities
|
8
8
|
@quantities = [@quantities] if !@quantities.nil? && !@quantities.is_a?(Array)
|
9
9
|
end
|
10
|
+
|
11
|
+
def to_hash
|
12
|
+
{"pool_id" => pool.id, "quantities" => quantities.as_json}
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.fetch(params)
|
16
|
+
if params.is_a?(PoolWithQuantities)
|
17
|
+
params
|
18
|
+
else
|
19
|
+
PoolWithQuantities.new(Pool.find(params["pool_id"]), params["quantities"])
|
20
|
+
end
|
21
|
+
end
|
10
22
|
end
|
11
23
|
end
|
@@ -148,6 +148,12 @@ module Katello
|
|
148
148
|
where("#{Katello::Repository.table_name}.product_id" => self.id)
|
149
149
|
end
|
150
150
|
|
151
|
+
def published_content_view_versions
|
152
|
+
Katello::ContentViewVersion.joins(:content_view).joins(:repositories).
|
153
|
+
where("#{Katello::ContentView.table_name}.default" => false).
|
154
|
+
where("#{Katello::Repository.table_name}.product_id" => self.id).order(:content_view_id)
|
155
|
+
end
|
156
|
+
|
151
157
|
def anonymous?
|
152
158
|
provider.anonymous_provider?
|
153
159
|
end
|
@@ -116,7 +116,7 @@ module Katello
|
|
116
116
|
:ssl_client_cert => OpenSSL::X509::Certificate.new(product.certificate),
|
117
117
|
:ssl_client_key => OpenSSL::PKey::RSA.new(product.key)).substitutor
|
118
118
|
product.productContent.each do |pc|
|
119
|
-
if url_to_releases = pc.content.contentUrl[/^.*\$releasever/]
|
119
|
+
if (url_to_releases = pc.content.contentUrl[/^.*\$releasever/])
|
120
120
|
begin
|
121
121
|
cdn_var_substitutor.substitute_vars(url_to_releases).each do |(substitutions, _path)|
|
122
122
|
releases << Resources::CDN::Utils.parse_version(substitutions['releasever'])[:minor]
|
@@ -73,8 +73,7 @@ module Katello
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def update_from_json(json)
|
76
|
-
|
77
|
-
custom_json = json.clone.delete_if { |key, _value| !keys.include?(key) }
|
76
|
+
custom_json = json.slice('name', 'author', 'title', 'version', 'summary')
|
78
77
|
self.update_attributes!(custom_json)
|
79
78
|
end
|
80
79
|
|
@@ -43,6 +43,9 @@ module Katello
|
|
43
43
|
has_many :repository_rpms, :class_name => "Katello::RepositoryRpm", :dependent => :delete_all
|
44
44
|
has_many :rpms, :through => :repository_rpms
|
45
45
|
|
46
|
+
has_many :repository_files, :class_name => "Katello::RepositoryFile", :dependent => :destroy
|
47
|
+
has_many :files, :through => :repository_files
|
48
|
+
|
46
49
|
has_many :repository_puppet_modules, :class_name => "Katello::RepositoryPuppetModule", :dependent => :delete_all
|
47
50
|
has_many :puppet_modules, :through => :repository_puppet_modules
|
48
51
|
|
@@ -54,9 +57,6 @@ module Katello
|
|
54
57
|
has_many :repository_ostree_branches, :class_name => "Katello::RepositoryOstreeBranch", :dependent => :delete_all
|
55
58
|
has_many :ostree_branches, :through => :repository_ostree_branches
|
56
59
|
|
57
|
-
has_many :system_repositories, :class_name => "Katello::SystemRepository", :dependent => :destroy
|
58
|
-
has_many :systems, :through => :system_repositories
|
59
|
-
|
60
60
|
has_many :content_facet_repositories, :class_name => "Katello::ContentFacetRepository", :dependent => :destroy
|
61
61
|
has_many :content_facets, :through => :content_facet_repositories
|
62
62
|
|
@@ -549,6 +549,8 @@ module Katello
|
|
549
549
|
self.puppet_modules -= units
|
550
550
|
elsif ostree?
|
551
551
|
self.ostree_branches -= units
|
552
|
+
elsif file?
|
553
|
+
self.files -= units
|
552
554
|
elsif docker?
|
553
555
|
remove_docker_content(units)
|
554
556
|
end
|
@@ -586,6 +588,8 @@ module Katello
|
|
586
588
|
self.puppet_modules
|
587
589
|
elsif ostree?
|
588
590
|
self.ostree_branches
|
591
|
+
elsif file?
|
592
|
+
self.files
|
589
593
|
else
|
590
594
|
fail "Content type not supported for removal"
|
591
595
|
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
module Katello
|
2
|
+
class RepositoryFile < Katello::Model
|
3
|
+
self.include_root_in_json = false
|
4
|
+
|
5
|
+
# Do not use active record callbacks in this join model. Direct INSERTs and DELETEs are done
|
6
|
+
belongs_to :repository, :inverse_of => :repository_files, :class_name => 'Katello::Repository'
|
7
|
+
belongs_to :file, :inverse_of => :repository_files, :class_name => 'Katello::FileUnit', :foreign_key => :file_id
|
8
|
+
end
|
9
|
+
end
|
data/app/models/katello/rpm.rb
CHANGED
@@ -39,7 +39,7 @@ module Katello
|
|
39
39
|
|
40
40
|
def update_from_json(json)
|
41
41
|
keys = Pulp::Rpm::PULP_INDEXED_FIELDS - ['_id']
|
42
|
-
custom_json = json.
|
42
|
+
custom_json = json.slice(*keys)
|
43
43
|
if custom_json.any? { |name, value| self.send(name) != value }
|
44
44
|
custom_json[:release_sortable] = Util::Package.sortable_version(custom_json[:release])
|
45
45
|
custom_json[:version_sortable] = Util::Package.sortable_version(custom_json[:version])
|
@@ -93,7 +93,8 @@ module Katello
|
|
93
93
|
end
|
94
94
|
next_sync = now.advance(:hours => hours, :minutes => minutes, :seconds => seconds)
|
95
95
|
when WEEKLY
|
96
|
-
days =
|
96
|
+
days = self.sync_date.wday - now.wday
|
97
|
+
days += 7 if days <= 0
|
97
98
|
next_sync = now.change(:hour => self.sync_date.hour, :min => self.sync_date.min,
|
98
99
|
:sec => self.sync_date.sec).advance(:days => days)
|
99
100
|
end
|
@@ -20,8 +20,6 @@ module Katello
|
|
20
20
|
belongs_to :user, :inverse_of => :task_statuses, :class_name => "::User"
|
21
21
|
|
22
22
|
belongs_to :task_owner, :polymorphic => true
|
23
|
-
# adding belongs_to :system allows us to perform joins with the owning system, if there is one
|
24
|
-
belongs_to :system, :foreign_key => :task_owner_id, :class_name => "Katello::System", :inverse_of => :task_statuses
|
25
23
|
|
26
24
|
# needed to delete providers w/ task status
|
27
25
|
has_one :provider, :class_name => "Katello::Provider", :dependent => :nullify
|
@@ -109,18 +107,6 @@ module Katello
|
|
109
107
|
PulpTaskStatus.refresh(self)
|
110
108
|
end
|
111
109
|
|
112
|
-
def as_json(_options = {})
|
113
|
-
json = super :methods => :pending?
|
114
|
-
|
115
|
-
if ('Katello::System' == task_owner_type)
|
116
|
-
methods = [:description, :result_description, :overall_status]
|
117
|
-
json.merge!(super(:only => methods, :methods => methods))
|
118
|
-
json[:system_name] = task_owner.name
|
119
|
-
end
|
120
|
-
|
121
|
-
json
|
122
|
-
end
|
123
|
-
|
124
110
|
def human_readable_message
|
125
111
|
task_template = TaskStatus::TYPES[self.task_type]
|
126
112
|
return '' if task_template.nil?
|
@@ -131,12 +117,6 @@ module Katello
|
|
131
117
|
end
|
132
118
|
end
|
133
119
|
|
134
|
-
# used by search to filter tasks by systems :)
|
135
|
-
def system_filter_clause
|
136
|
-
system_id = task_owner_id if (task_owner_type == 'Katello::System')
|
137
|
-
{:system_id => system_id}
|
138
|
-
end
|
139
|
-
|
140
120
|
def pending_message
|
141
121
|
# Retrieve a text message that may be rendered for a 'pending' task's status. This is used in various places,
|
142
122
|
# such as System Event history.
|
@@ -220,13 +200,13 @@ module Katello
|
|
220
200
|
|
221
201
|
def humanize_parameters
|
222
202
|
humanized_parameters = []
|
223
|
-
if packages = self.parameters[:packages]
|
203
|
+
if (packages = self.parameters[:packages])
|
224
204
|
humanized_parameters.concat(packages)
|
225
205
|
end
|
226
|
-
if groups = self.parameters[:groups]
|
206
|
+
if (groups = self.parameters[:groups])
|
227
207
|
humanized_parameters.concat(groups.map { |g| g =~ /^@/ ? g : "@#{g}" })
|
228
208
|
end
|
229
|
-
if errata = self.parameters[:errata_ids]
|
209
|
+
if (errata = self.parameters[:errata_ids])
|
230
210
|
humanized_parameters.concat(errata)
|
231
211
|
end
|
232
212
|
humanized_parameters.join(", ")
|
@@ -308,19 +288,6 @@ module Katello
|
|
308
288
|
end
|
309
289
|
end
|
310
290
|
|
311
|
-
def self.make(system, pulp_task, task_type, parameters)
|
312
|
-
task_status = PulpTaskStatus.new(
|
313
|
-
:organization => system.organization,
|
314
|
-
:task_owner => system,
|
315
|
-
:task_type => task_type,
|
316
|
-
:parameters => parameters,
|
317
|
-
:systems => [system]
|
318
|
-
)
|
319
|
-
task_status.merge_pulp_task!(pulp_task)
|
320
|
-
task_status.save!
|
321
|
-
task_status
|
322
|
-
end
|
323
|
-
|
324
291
|
protected
|
325
292
|
|
326
293
|
def setup_task_type
|
@@ -1,4 +1,5 @@
|
|
1
1
|
class Setting::Content < Setting
|
2
|
+
#rubocop:disable Metrics/MethodLength
|
2
3
|
def self.load_defaults
|
3
4
|
return unless super
|
4
5
|
|
@@ -22,11 +23,13 @@ class Setting::Content < Setting
|
|
22
23
|
self.set('check_services_before_actions', N_("Whether or not to check the status of backend services such as pulp and candlepin prior to performing some actions."), true),
|
23
24
|
self.set('force_post_sync_actions', N_("Force post sync actions such as indexing and email even if no content was available."), false),
|
24
25
|
self.set('default_download_policy', N_("Default download policy for repositories (either 'immediate', 'on_demand', or 'background')"), "immediate"),
|
26
|
+
self.set('pulp_docker_registry_port', N_("The port used by Pulp Crane to provide Docker Registries"), 5000),
|
25
27
|
self.set('pulp_export_destination', N_("On-disk location for exported repositories"), N_("/var/lib/pulp/katello-export")),
|
26
28
|
self.set('pulp_client_key', N_("Path for ssl key used for pulp server auth"), "/etc/pki/katello/private/pulp-client.key"),
|
27
29
|
self.set('pulp_client_cert', N_("Path for ssl cert used for pulp server auth"), "/etc/pki/katello/certs/pulp-client.crt"),
|
28
30
|
self.set('remote_execution_by_default', N_("If set to true, use the remote execution over katello-agent for remote actions"), false),
|
29
|
-
self.set('use_pulp_oauth', N_("use oauth authentication for pulp instead of the default cert based authentication"), false)
|
31
|
+
self.set('use_pulp_oauth', N_("use oauth authentication for pulp instead of the default cert based authentication"), false),
|
32
|
+
self.set('unregister_delete_host', N_("When unregistering host via subscription-manager, also delete server-side host record"), false)
|
30
33
|
].each { |s| self.create! s.update(:category => "Setting::Content") }
|
31
34
|
end
|
32
35
|
true
|
@@ -10,12 +10,12 @@ Deface::Override.new(:virtual_path => "hostgroups/_form",
|
|
10
10
|
|
11
11
|
Deface::Override.new(:virtual_path => "hostgroups/_form",
|
12
12
|
:name => "hostgroups_update_environments_select",
|
13
|
-
:
|
13
|
+
:insert_before => 'erb[loud]:contains("hostgroup_puppet_environment_field")',
|
14
14
|
:partial => 'overrides/activation_keys/host_environment_select')
|
15
15
|
|
16
16
|
Deface::Override.new(:virtual_path => "hosts/_form",
|
17
17
|
:name => "hosts_update_environments_select",
|
18
|
-
:
|
18
|
+
:insert_before => 'erb[loud]:contains("host_puppet_environment_field")',
|
19
19
|
:partial => 'overrides/activation_keys/host_environment_select')
|
20
20
|
|
21
21
|
Deface::Override.new(:virtual_path => "common/os_selection/_operatingsystem",
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module Katello
|
2
|
+
class ActivationKeySubscriptionsPresenter < SimpleDelegator
|
3
|
+
attr_reader :quantity_attached
|
4
|
+
|
5
|
+
def initialize(pool, key_pools)
|
6
|
+
@quantity_attached ||= key_pools.find { |sub| sub['id'] == pool.cp_id }.try(:[], :amount)
|
7
|
+
super(pool)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -90,13 +90,17 @@ module Katello
|
|
90
90
|
filtered
|
91
91
|
end
|
92
92
|
|
93
|
+
def pool_ids
|
94
|
+
entitlements.map { |ent| ent['pool']['id'].to_s }
|
95
|
+
end
|
96
|
+
|
93
97
|
def virtual_guests
|
94
98
|
guest_uuids = Resources::Candlepin::Consumer.virtual_guests(self.uuid).map { |guest| guest['uuid'] }
|
95
99
|
::Host.joins(:subscription_facet).where("#{Katello::Host::SubscriptionFacet.table_name}.uuid" => guest_uuids)
|
96
100
|
end
|
97
101
|
|
98
102
|
def virtual_host
|
99
|
-
if virtual_host_info = Resources::Candlepin::Consumer.virtual_host(self.uuid)
|
103
|
+
if (virtual_host_info = Resources::Candlepin::Consumer.virtual_host(self.uuid))
|
100
104
|
::Host.joins(:subscription_facet).where("#{Katello::Host::SubscriptionFacet.table_name}.uuid" => virtual_host_info[:uuid]).first
|
101
105
|
end
|
102
106
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Katello
|
2
|
+
module Pulp
|
3
|
+
class FileUnit < PulpContentUnit
|
4
|
+
include LazyAccessor
|
5
|
+
|
6
|
+
PULP_SELECT_FIELDS = %w(name checksum).freeze
|
7
|
+
PULP_INDEXED_FIELDS = %w(name checksum _id).freeze
|
8
|
+
CONTENT_TYPE = "file".freeze
|
9
|
+
|
10
|
+
lazy_accessor :pulp_facts, :initializer => :backend_data
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<th class="" title="<%= erratum.errata_type %>"><%= erratum.errata_type %></th>
|
25
25
|
<th>
|
26
26
|
<a href="/errata/<%= erratum.uuid %>/info">
|
27
|
-
<%= erratum.errata_id %> (<%= hosts.length %> _('Hosts'))
|
27
|
+
<%= erratum.errata_id %> (<%= hosts.length %> <%= _('Hosts') %>)
|
28
28
|
</a>
|
29
29
|
</th>
|
30
30
|
</tr>
|
@@ -18,20 +18,42 @@
|
|
18
18
|
</thead>
|
19
19
|
<tbody>
|
20
20
|
<tr>
|
21
|
-
<td
|
22
|
-
|
21
|
+
<td>
|
22
|
+
<%= link_to('/content_hosts?search=subscription_status=invalid') do %>
|
23
|
+
<i class="label label-danger" style="margin-right: 6px"> </i><%= _("Invalid") %>
|
24
|
+
<% end %>
|
25
|
+
</td>
|
26
|
+
<td style="text-align:right">
|
27
|
+
<%= link_to( "#{invalid_consumer_count}", '/content_hosts?search=subscription_status=invalid')%>
|
28
|
+
</td>
|
23
29
|
</tr>
|
24
30
|
<tr>
|
25
|
-
<td
|
26
|
-
|
31
|
+
<td>
|
32
|
+
<%= link_to('/content_hosts?search=subscription_status=partial') do %>
|
33
|
+
<i class="label label-warning" style="margin-right: 6px"> </i><%= _("Partial") %>
|
34
|
+
<% end %>
|
35
|
+
</td>
|
36
|
+
<td style="text-align:right">
|
37
|
+
<%= link_to( "#{partial_consumer_count}", '/content_hosts?search=subscription_status=partial')%>
|
38
|
+
</td>
|
27
39
|
</tr>
|
28
40
|
<tr>
|
29
|
-
<td
|
30
|
-
|
41
|
+
<td>
|
42
|
+
<%= link_to('/content_hosts?search=subscription_status=valid') do %>
|
43
|
+
<i class="label label-success" style="margin-right: 6px"> </i><%= _("Valid") %>
|
44
|
+
<% end %>
|
45
|
+
</td>
|
46
|
+
<td style="text-align:right">
|
47
|
+
<%= link_to( "#{valid_consumer_count}", '/content_hosts?search=subscription_status=valid')%>
|
48
|
+
</td>
|
31
49
|
</tr>
|
32
50
|
<tr>
|
33
|
-
<td><h4
|
34
|
-
|
51
|
+
<td><h4>
|
52
|
+
<%= link_to("Total Content Hosts", '/content_hosts')%>
|
53
|
+
</h4></td>
|
54
|
+
<td style="text-align:right;">
|
55
|
+
<%= link_to( "#{total_count}", '/content_hosts')%>
|
56
|
+
</td>
|
35
57
|
</tr>
|
36
58
|
</tbody>
|
37
59
|
</table>
|