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
@@ -0,0 +1,14 @@
|
|
1
|
+
module Actions
|
2
|
+
module Katello
|
3
|
+
module Host
|
4
|
+
class Reassign < Actions::Base
|
5
|
+
def plan(host, content_view_id, environment_id)
|
6
|
+
host.content_facet.content_view = ::Katello::ContentView.find(content_view_id)
|
7
|
+
host.content_facet.lifecycle_environment = ::Katello::KTEnvironment.find(environment_id)
|
8
|
+
|
9
|
+
plan_action(::Actions::Katello::Host::Update, host)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -4,7 +4,7 @@ module Actions
|
|
4
4
|
class Register < Actions::EntryAction
|
5
5
|
middleware.use ::Actions::Middleware::RemoteAction
|
6
6
|
|
7
|
-
def plan(host,
|
7
|
+
def plan(host, consumer_params, content_view_environment, activation_keys = [])
|
8
8
|
sequence do
|
9
9
|
unless host.new_record?
|
10
10
|
host.save!
|
@@ -19,10 +19,6 @@ module Actions
|
|
19
19
|
|
20
20
|
fail _('Content View and Environment not set for registration.') if content_view_environment.nil?
|
21
21
|
|
22
|
-
system = plan_system(system, content_view_environment, consumer_params)
|
23
|
-
system.save!
|
24
|
-
|
25
|
-
host.content_host = system
|
26
22
|
host.save!
|
27
23
|
host.content_facet = plan_content_facet(host, content_view_environment)
|
28
24
|
host.subscription_facet = plan_subscription_facet(host, activation_keys, consumer_params)
|
@@ -36,7 +32,7 @@ module Actions
|
|
36
32
|
consumer_parameters: consumer_params, activation_keys: activation_keys.map(&:cp_name))
|
37
33
|
return if cp_create.error
|
38
34
|
|
39
|
-
plan_self(uuid: cp_create.output[:response][:uuid], host_id: host.id, hostname: host.name
|
35
|
+
plan_self(uuid: cp_create.output[:response][:uuid], host_id: host.id, hostname: host.name)
|
40
36
|
plan_action(Pulp::Consumer::Create, uuid: cp_create.output[:response][:uuid], name: host.name)
|
41
37
|
end
|
42
38
|
end
|
@@ -60,10 +56,6 @@ module Actions
|
|
60
56
|
host.subscription_facet.update_subscription_status
|
61
57
|
host.content_facet.update_errata_status
|
62
58
|
host.refresh_global_status!
|
63
|
-
|
64
|
-
system = ::Katello::System.find(input[:system_id])
|
65
|
-
system.uuid = input[:uuid]
|
66
|
-
system.save!
|
67
59
|
end
|
68
60
|
|
69
61
|
private
|
@@ -73,8 +65,7 @@ module Actions
|
|
73
65
|
|
74
66
|
host_collection_ids.each do |host_collection_id|
|
75
67
|
host_collection = ::Katello::HostCollection.find(host_collection_id)
|
76
|
-
if !host_collection.unlimited_hosts && host_collection.max_hosts >= 0
|
77
|
-
host_collection.systems.length >= host_collection.max_hosts
|
68
|
+
if !host_collection.unlimited_hosts && host_collection.max_hosts >= 0
|
78
69
|
fail _("Host collection '%{name}' exceeds maximum usage limit of '%{limit}'") %
|
79
70
|
{:limit => host_collection.max_hosts, :name => host_collection.name}
|
80
71
|
end
|
@@ -93,16 +84,6 @@ module Actions
|
|
93
84
|
end
|
94
85
|
end
|
95
86
|
|
96
|
-
def plan_system(system, content_view_environment, consumer_params)
|
97
|
-
system.facts = consumer_params[:facts]
|
98
|
-
system.cp_type = consumer_params[:type]
|
99
|
-
system.name = consumer_params[:name]
|
100
|
-
system.serviceLevel = consumer_params[:serviceLevel]
|
101
|
-
system.content_view = content_view_environment.content_view
|
102
|
-
system.environment = content_view_environment.environment
|
103
|
-
system
|
104
|
-
end
|
105
|
-
|
106
87
|
def plan_content_facet(host, content_view_environment)
|
107
88
|
content_facet = host.content_facet || ::Katello::Host::ContentFacet.new(:host => host)
|
108
89
|
content_facet.content_view = content_view_environment.content_view
|
@@ -4,16 +4,29 @@ module Actions
|
|
4
4
|
class RemoveSubscriptions < Actions::EntryAction
|
5
5
|
middleware.use Actions::Middleware::KeepCurrentUser
|
6
6
|
|
7
|
-
def plan(host,
|
7
|
+
def plan(host, pools_with_quantities_params)
|
8
8
|
action_subject(host)
|
9
|
+
pools_with_quantities = pools_with_quantities_params.map do |pool_with_quantity|
|
10
|
+
::Katello::PoolWithQuantities.fetch(pool_with_quantity)
|
11
|
+
end
|
12
|
+
cp_consumer = host.subscription_facet.candlepin_consumer
|
13
|
+
entitlements = pools_with_quantities.map do |pool_with_quantities|
|
14
|
+
cp_consumer.filter_entitlements(pool_with_quantities.pool.cp_id, pool_with_quantities.quantities)
|
15
|
+
end
|
9
16
|
|
10
|
-
entitlements.each do |entitlement|
|
17
|
+
entitlements.flatten.each do |entitlement|
|
11
18
|
plan_action(::Actions::Candlepin::Consumer::RemoveSubscription, :uuid => host.subscription_facet.uuid,
|
12
19
|
:entitlement_id => entitlement['id'], :pool_id => entitlement['pool']['id'])
|
13
20
|
plan_self(:host_name => host.name)
|
14
21
|
end
|
15
22
|
end
|
16
23
|
|
24
|
+
def finalize
|
25
|
+
::Katello::Pool.where(:id => input[:pool_ids]).each(&:import_data)
|
26
|
+
host = ::Host.find_by(:id => input[:managed][:id])
|
27
|
+
host.subscription_facet.update_subscription_status
|
28
|
+
end
|
29
|
+
|
17
30
|
def rescue_strategy
|
18
31
|
Dynflow::Action::Rescue::Skip
|
19
32
|
end
|
@@ -22,12 +22,6 @@ module Actions
|
|
22
22
|
plan_action(::Actions::Candlepin::Consumer::Update, host.subscription_facet.uuid, consumer_params)
|
23
23
|
end
|
24
24
|
|
25
|
-
if host.content_facet && host.content_host
|
26
|
-
host.content_host.content_view = host.content_facet.try(:content_view)
|
27
|
-
host.content_host.environment = host.content_facet.try(:lifecycle_environment)
|
28
|
-
host.content_host.save!
|
29
|
-
end
|
30
|
-
|
31
25
|
if host.subscription_facet.try(:autoheal)
|
32
26
|
plan_action(::Actions::Candlepin::Consumer::AutoAttachSubscriptions, :uuid => host.subscription_facet.uuid)
|
33
27
|
end
|
@@ -47,8 +47,8 @@ module Actions
|
|
47
47
|
|
48
48
|
def remove_consumers(organization)
|
49
49
|
concurrence do
|
50
|
-
organization.
|
51
|
-
plan_action(Katello::
|
50
|
+
organization.hosts.each do |host|
|
51
|
+
plan_action(Katello::Host::Destroy, host, skip_candlepin: true)
|
52
52
|
end
|
53
53
|
|
54
54
|
organization.activation_keys.each do |key|
|
@@ -3,16 +3,14 @@ module Actions
|
|
3
3
|
module Product
|
4
4
|
class ContentDestroy < Actions::Base
|
5
5
|
def plan(repository)
|
6
|
-
if
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
fail _("Cannot delete redhat product content") if repository.product.redhat?
|
7
|
+
sequence do
|
8
|
+
plan_action(Candlepin::Product::ContentRemove,
|
9
|
+
product_id: repository.product.cp_id,
|
10
|
+
content_id: repository.content_id)
|
11
|
+
if repository.other_repos_with_same_content.empty?
|
12
|
+
plan_action(Candlepin::Product::ContentDestroy,
|
11
13
|
content_id: repository.content_id)
|
12
|
-
if repository.other_repos_with_same_content.empty?
|
13
|
-
plan_action(Candlepin::Product::ContentDestroy,
|
14
|
-
content_id: repository.content_id)
|
15
|
-
end
|
16
14
|
end
|
17
15
|
end
|
18
16
|
end
|
@@ -7,7 +7,12 @@ module Actions
|
|
7
7
|
organization_destroy = options.fetch(:organization_destroy, false)
|
8
8
|
|
9
9
|
unless organization_destroy || product.user_deletable?
|
10
|
-
|
10
|
+
if product.redhat?
|
11
|
+
fail _("Cannot delete Red Hat product: %{product}") % { :product => product.name }
|
12
|
+
elsif !product.published_content_view_versions.empty?
|
13
|
+
fail _("Cannot delete product with repositories published in a content view. Product: %{product}, %{view_versions}") %
|
14
|
+
{ :product => product.name, :view_versions => view_versions(product) }
|
15
|
+
end
|
11
16
|
end
|
12
17
|
|
13
18
|
action_subject(product)
|
@@ -21,12 +26,10 @@ module Actions
|
|
21
26
|
plan_action(Katello::Repository::Destroy, repo, repo_options)
|
22
27
|
end
|
23
28
|
end
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
cp_id: product.cp_id, organization_label: product.organization.label)
|
29
|
-
end
|
29
|
+
plan_action(Candlepin::Product::DeletePools,
|
30
|
+
cp_id: product.cp_id, organization_label: product.organization.label)
|
31
|
+
plan_action(Candlepin::Product::DeleteSubscriptions,
|
32
|
+
cp_id: product.cp_id, organization_label: product.organization.label)
|
30
33
|
end
|
31
34
|
|
32
35
|
if !product.used_by_another_org? && !organization_destroy
|
@@ -52,6 +55,19 @@ module Actions
|
|
52
55
|
def humanized_name
|
53
56
|
_("Delete Product")
|
54
57
|
end
|
58
|
+
|
59
|
+
def view_versions(product)
|
60
|
+
cvvs = product.published_content_view_versions.uniq
|
61
|
+
views = cvvs.inject({}) do |result, version|
|
62
|
+
result[version.content_view.name] ||= []
|
63
|
+
result[version.content_view.name] << version.version
|
64
|
+
result
|
65
|
+
end
|
66
|
+
results = views.map do |view, versions|
|
67
|
+
_("Content View %{view}: Versions: %{versions}") % {:view => view, :versions => versions.join(', ')}
|
68
|
+
end
|
69
|
+
results.join(', ')
|
70
|
+
end
|
55
71
|
end
|
56
72
|
end
|
57
73
|
end
|
@@ -7,6 +7,7 @@ module Actions
|
|
7
7
|
Pulp::Repository::RemoveErrata,
|
8
8
|
Pulp::Repository::RemovePackageGroup,
|
9
9
|
Pulp::Repository::RemoveDistribution,
|
10
|
+
Pulp::Repository::RemoveFile,
|
10
11
|
Pulp::Repository::RemovePuppetModule].each do |action_class|
|
11
12
|
plan_action(action_class, pulp_id: repo.pulp_id)
|
12
13
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Actions
|
2
|
+
module Katello
|
3
|
+
module Repository
|
4
|
+
class CloneFileContent < Actions::Base
|
5
|
+
def plan(source_repo, target_repo)
|
6
|
+
sequence do
|
7
|
+
plan_action(Pulp::Repository::CopyFiles,
|
8
|
+
source_pulp_id: source_repo.pulp_id,
|
9
|
+
target_pulp_id: target_repo.pulp_id)
|
10
|
+
plan_action(Katello::Repository::MetadataGenerate, target_repo)
|
11
|
+
plan_action(Katello::Repository::IndexContent, id: target_repo.id)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -20,6 +20,8 @@ module Actions
|
|
20
20
|
plan_action(Repository::CloneDockerContent, repository, clone)
|
21
21
|
elsif repository.ostree?
|
22
22
|
plan_action(Repository::CloneOstreeContent, repository, clone)
|
23
|
+
elsif repository.file?
|
24
|
+
plan_action(Repository::CloneFileContent, repository, clone)
|
23
25
|
end
|
24
26
|
end
|
25
27
|
end
|
@@ -20,6 +20,8 @@ module Actions
|
|
20
20
|
plan_action(Repository::CloneDockerContent, repository, new_repository)
|
21
21
|
elsif new_repository.ostree?
|
22
22
|
plan_action(Repository::CloneOstreeContent, repository, new_repository)
|
23
|
+
elsif new_repository.file?
|
24
|
+
plan_action(Repository::CloneFileContent, repository, new_repository)
|
23
25
|
end
|
24
26
|
end
|
25
27
|
end
|
@@ -27,7 +27,8 @@ module Actions
|
|
27
27
|
path: path,
|
28
28
|
download_policy: repository.download_policy,
|
29
29
|
with_importer: true,
|
30
|
-
mirror_on_sync: repository.mirror_on_sync
|
30
|
+
mirror_on_sync: repository.mirror_on_sync?,
|
31
|
+
ssl_validation: certs[:ssl_validation])
|
31
32
|
|
32
33
|
return if create_action.error
|
33
34
|
|
@@ -3,6 +3,7 @@ module Actions
|
|
3
3
|
module Repository
|
4
4
|
class Destroy < Actions::EntryAction
|
5
5
|
middleware.use ::Actions::Middleware::RemoteAction
|
6
|
+
middleware.use ::Actions::Middleware::KeepCurrentUser
|
6
7
|
|
7
8
|
# options:
|
8
9
|
# skip_environment_update - defaults to false. skips updating the CP environment
|
@@ -23,15 +24,14 @@ module Actions
|
|
23
24
|
plan_action(ContentViewPuppetModule::Destroy, repository) if repository.puppet?
|
24
25
|
plan_action(Pulp::Repository::Destroy, pulp_id: repository.pulp_id)
|
25
26
|
sequence do
|
26
|
-
plan_action(Product::ContentDestroy, repository)
|
27
|
-
plan_action(Repository::DestroyMedium, repository)
|
28
|
-
|
29
|
-
view_env = repository.content_view.content_view_environment(repository.environment)
|
30
27
|
repository.destroy! if planned_destroy
|
31
|
-
|
32
|
-
|
33
|
-
|
28
|
+
if repository.redhat?
|
29
|
+
handle_redhat_content(repository)
|
30
|
+
else
|
31
|
+
handle_custom_content(repository) unless skip_environment_update
|
34
32
|
end
|
33
|
+
|
34
|
+
plan_action(Repository::DestroyMedium, repository)
|
35
35
|
end
|
36
36
|
|
37
37
|
plan_self(:user_id => ::User.current.id, :planned_destroy => planned_destroy)
|
@@ -39,12 +39,22 @@ module Actions
|
|
39
39
|
|
40
40
|
def finalize
|
41
41
|
unless input[:planned_destroy]
|
42
|
-
::User.current = ::User.find(input[:user_id])
|
43
42
|
repository = ::Katello::Repository.find(input[:repository][:id])
|
44
43
|
repository.destroy!
|
45
44
|
end
|
46
|
-
|
47
|
-
|
45
|
+
end
|
46
|
+
|
47
|
+
def handle_custom_content(repository)
|
48
|
+
#if this is the last instance of a custom repo, destroy the content
|
49
|
+
if repository.other_repos_with_same_product_and_content.empty?
|
50
|
+
plan_action(Product::ContentDestroy, repository)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def handle_redhat_content(repository)
|
55
|
+
if repository.content_view.content_view_environment(repository.environment)
|
56
|
+
plan_action(ContentView::UpdateEnvironment, repository.content_view, repository.environment)
|
57
|
+
end
|
48
58
|
end
|
49
59
|
|
50
60
|
def humanized_name
|
@@ -13,11 +13,11 @@ module Actions
|
|
13
13
|
::User.current = ::User.anonymous_admin
|
14
14
|
|
15
15
|
repo = ::Katello::Repository.find(input[:repo])
|
16
|
-
users = ::User.select { |user| user.receives?(:
|
16
|
+
users = ::User.select { |user| user.receives?(:sync_errata) && user.can?(:view_products, repo.product) }.compact
|
17
17
|
errata = ::Katello::Erratum.where(:id => repo.repository_errata.where('katello_repository_errata.updated_at > ?', input[:last_updated].to_datetime).pluck(:erratum_id))
|
18
18
|
|
19
19
|
begin
|
20
|
-
MailNotification[:
|
20
|
+
MailNotification[:sync_errata].deliver_now(:users => users, :repo => repo, :errata => errata) unless users.blank?
|
21
21
|
rescue => e
|
22
22
|
message = _('Unable to send errata e-mail notification: %{error}' % {:error => e})
|
23
23
|
Rails.logger.error(message)
|
@@ -2,17 +2,21 @@ module Actions
|
|
2
2
|
module Katello
|
3
3
|
module Repository
|
4
4
|
class ImportUpload < Actions::EntryAction
|
5
|
-
def plan(repository, upload_id)
|
5
|
+
def plan(repository, upload_id, unit_key = {})
|
6
6
|
action_subject(repository)
|
7
7
|
import_upload = plan_action(Pulp::Repository::ImportUpload,
|
8
8
|
pulp_id: repository.pulp_id,
|
9
9
|
unit_type_id: repository.unit_type_id,
|
10
|
-
unit_key:
|
10
|
+
unit_key: unit_key,
|
11
11
|
upload_id: upload_id)
|
12
12
|
|
13
13
|
plan_action(FinishUpload, repository, import_upload.output)
|
14
14
|
end
|
15
15
|
|
16
|
+
def rescue_strategy
|
17
|
+
Dynflow::Action::Rescue::Skip
|
18
|
+
end
|
19
|
+
|
16
20
|
def humanized_name
|
17
21
|
_("Upload into")
|
18
22
|
end
|
File without changes
|
@@ -23,18 +23,14 @@ module Actions
|
|
23
23
|
fail _("Unable to sync repo. This repository does not have a feed url.")
|
24
24
|
end
|
25
25
|
|
26
|
-
if incremental && URI(source_url).scheme != 'file'
|
27
|
-
fail _("URL must be of scheme 'file' for incremental import")
|
28
|
-
end
|
29
|
-
|
30
26
|
sequence do
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
27
|
+
sync_args = {:pulp_id => repo.pulp_id,
|
28
|
+
:task_id => pulp_sync_task_id,
|
29
|
+
:source_url => source_url}
|
30
|
+
|
31
|
+
sync_args[:remove_missing] = false if incremental
|
32
|
+
|
33
|
+
output = plan_action(Pulp::Repository::Sync, sync_args).output
|
38
34
|
|
39
35
|
contents_changed = output[:contents_changed]
|
40
36
|
plan_action(Katello::Repository::IndexContent, :id => repo.id, :contents_changed => contents_changed)
|
@@ -65,7 +61,7 @@ module Actions
|
|
65
61
|
|
66
62
|
def pulp_task_id
|
67
63
|
pulp_action = planned_actions(Pulp::Repository::Sync).first
|
68
|
-
if pulp_task = Array(pulp_action.external_task).first
|
64
|
+
if (pulp_task = Array(pulp_action.external_task).first)
|
69
65
|
pulp_task.fetch(:task_id)
|
70
66
|
end
|
71
67
|
end
|
@@ -7,12 +7,13 @@ module Actions
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def plan(product, content, options)
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
repository = repository_mapper(product,
|
11
|
+
content,
|
12
|
+
options,
|
13
|
+
options[:registry_name]).find_repository
|
14
|
+
if repository
|
14
15
|
action_subject(repository)
|
15
|
-
plan_action(Repository::Destroy, repository)
|
16
|
+
plan_action(Repository::Destroy, repository, :planned_destroy => true)
|
16
17
|
else
|
17
18
|
fail ::Katello::Errors::NotFound, _('Repository not found')
|
18
19
|
end
|
@@ -13,7 +13,7 @@ module Actions
|
|
13
13
|
fail ::Katello::Errors::ConflictException, _("The repository is already enabled")
|
14
14
|
end
|
15
15
|
repository = mapper.build_repository
|
16
|
-
plan_action(Repository::Create, repository)
|
16
|
+
plan_action(Repository::Create, repository, false, true)
|
17
17
|
action_subject(repository)
|
18
18
|
end
|
19
19
|
|