katello 4.0.3 → 4.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/katello/hosts/host_and_hostgroup_edit.js +0 -33
- data/app/assets/stylesheets/katello/contents.scss +1 -1
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +5 -11
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +2 -9
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +10 -24
- data/app/controllers/katello/api/v2/api_controller.rb +15 -3
- data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +1 -8
- data/app/controllers/katello/api/v2/content_exports_controller.rb +1 -14
- data/app/controllers/katello/api/v2/content_imports_controller.rb +38 -15
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +22 -1
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +6 -1
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +2 -59
- data/app/controllers/katello/api/v2/content_views_controller.rb +3 -58
- data/app/controllers/katello/api/v2/host_errata_controller.rb +7 -6
- data/app/controllers/katello/api/v2/host_packages_controller.rb +4 -4
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +18 -22
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +16 -16
- data/app/controllers/katello/api/v2/organizations_controller.rb +2 -1
- data/app/controllers/katello/api/v2/package_groups_controller.rb +4 -0
- data/app/controllers/katello/api/v2/repositories_controller.rb +13 -12
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +50 -4
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +7 -1
- data/app/controllers/katello/concerns/api/api_controller.rb +10 -0
- data/app/controllers/katello/concerns/api/v2/registration_commands_controller_extensions.rb +46 -0
- data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +8 -0
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +31 -22
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +0 -8
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +1 -1
- data/app/controllers/katello/concerns/registration_commands_controller_extensions.rb +34 -0
- data/app/helpers/katello/katello_urls_helper.rb +23 -0
- data/app/lib/actions/candlepin/owner/import.rb +10 -3
- data/app/lib/actions/candlepin/product/content_update.rb +1 -1
- data/app/lib/actions/foreman/environment/destroy.rb +2 -2
- data/app/lib/actions/katello/agent_action.rb +1 -6
- data/app/lib/actions/katello/capsule_content/refresh_repos.rb +0 -7
- data/app/lib/actions/katello/capsule_content/sync.rb +1 -1
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +1 -2
- data/app/lib/actions/katello/content_view/add_to_environment.rb +9 -7
- data/app/lib/actions/katello/content_view/incremental_updates.rb +3 -10
- data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +2 -3
- data/app/lib/actions/katello/content_view/promote_to_environment.rb +1 -4
- data/app/lib/actions/katello/content_view/publish.rb +21 -31
- data/app/lib/actions/katello/content_view_environment/destroy.rb +0 -5
- data/app/lib/actions/katello/content_view_version/auto_create_products.rb +22 -0
- data/app/lib/actions/katello/content_view_version/auto_create_repositories.rb +22 -0
- data/app/lib/actions/katello/content_view_version/destroy.rb +0 -10
- data/app/lib/actions/katello/content_view_version/export.rb +20 -22
- data/app/lib/actions/katello/content_view_version/import.rb +27 -13
- data/app/lib/actions/katello/content_view_version/import_library.rb +4 -2
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +12 -67
- data/app/lib/actions/katello/content_view_version/republish_repositories.rb +0 -4
- data/app/lib/actions/katello/content_view_version/reset_content_view_repositories_from_metadata.rb +11 -0
- data/app/lib/actions/katello/foreman/content_update.rb +0 -3
- data/app/lib/actions/katello/host/auto_attach_subscriptions.rb +0 -4
- data/app/lib/actions/katello/organization/manifest_import.rb +7 -1
- data/app/lib/actions/katello/organization/manifest_refresh.rb +28 -7
- data/app/lib/actions/katello/orphan_cleanup/remove_orphans.rb +2 -2
- data/app/lib/actions/katello/product/create.rb +0 -1
- data/app/lib/actions/katello/repository/check_matching_content.rb +4 -3
- data/app/lib/actions/katello/repository/destroy.rb +1 -1
- data/app/lib/actions/katello/repository/discover.rb +1 -1
- data/app/lib/actions/katello/repository/filtered_index_content.rb +1 -4
- data/app/lib/actions/katello/repository/import_upload.rb +0 -1
- data/app/lib/actions/katello/repository/update.rb +0 -1
- data/app/lib/actions/middleware/record_smart_proxy_sync_history.rb +0 -5
- data/app/lib/actions/pulp/repository/create.rb +1 -7
- data/app/lib/actions/pulp/repository/distributor_publish.rb +2 -10
- data/app/lib/actions/pulp/repository/sync.rb +1 -3
- data/app/lib/actions/pulp3/capsule_content/refresh_content_guard.rb +17 -0
- data/app/lib/actions/pulp3/content_guard/refresh.rb +10 -6
- data/app/lib/actions/pulp3/content_view_version/create_export_history.rb +57 -0
- data/app/lib/actions/pulp3/content_view_version/create_import_history.rb +34 -0
- data/app/lib/actions/pulp3/orchestration/content_view_version/copy_version_units_to_library.rb +2 -3
- data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +34 -51
- data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +2 -2
- data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +13 -1
- data/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb +1 -1
- data/app/lib/actions/pulp3/orchestration/repository/sync.rb +1 -0
- data/app/lib/actions/pulp3/repository/refresh_remote.rb +17 -0
- data/app/lib/katello/agent/client_message_handler.rb +3 -11
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +117 -3
- data/app/lib/katello/errors.rb +6 -11
- data/app/lib/katello/event_daemon/monitor.rb +0 -1
- data/app/lib/katello/event_daemon/runner.rb +2 -2
- data/app/lib/katello/event_daemon/services/agent_event_receiver.rb +10 -6
- data/app/lib/katello/http_resource.rb +1 -6
- data/app/lib/katello/logging.rb +11 -6
- data/app/lib/katello/qpid/connection.rb +1 -3
- data/app/lib/katello/repo_discovery.rb +15 -1
- data/app/lib/katello/resources/candlepin/owner.rb +3 -2
- data/app/lib/katello/resources/candlepin/pool.rb +6 -2
- data/app/lib/katello/resources/candlepin.rb +10 -0
- data/app/lib/katello/util/package.rb +1 -1
- data/app/lib/katello/util/pulpcore_content_filters.rb +1 -1
- data/app/lib/katello/validators/hostgroup_kickstart_repository_validator.rb +0 -6
- data/app/models/katello/authorization/content_view.rb +8 -0
- data/app/models/katello/authorization/content_view_version_import_history.rb +11 -0
- data/app/models/katello/concerns/content_facet_host_extensions.rb +1 -1
- data/app/models/katello/concerns/content_view_filter_rule_common.rb +2 -2
- data/app/models/katello/concerns/host_managed_extensions.rb +1 -32
- data/app/models/katello/concerns/hostgroup_extensions.rb +2 -9
- data/app/models/katello/concerns/http_proxy_extensions.rb +2 -4
- data/app/models/katello/concerns/location_extensions.rb +2 -25
- data/app/models/katello/concerns/operatingsystem_extensions.rb +0 -2
- data/app/models/katello/concerns/organization_extensions.rb +4 -18
- data/app/models/katello/concerns/redhat_extensions.rb +10 -18
- data/app/models/katello/concerns/smart_proxy_extensions.rb +6 -31
- data/app/models/katello/content_view.rb +17 -113
- data/app/models/katello/content_view_component.rb +5 -0
- data/app/models/katello/content_view_docker_filter_rule.rb +1 -0
- data/app/models/katello/content_view_package_filter_rule.rb +4 -0
- data/app/models/katello/content_view_package_group_filter.rb +1 -0
- data/app/models/katello/content_view_repository.rb +4 -5
- data/app/models/katello/content_view_version.rb +9 -33
- data/app/models/katello/content_view_version_export_history.rb +18 -4
- data/app/models/katello/content_view_version_import_history.rb +42 -0
- data/app/models/katello/erratum.rb +1 -1
- data/app/models/katello/events/delete_pool.rb +19 -0
- data/app/models/katello/glue/candlepin/environment.rb +7 -0
- data/app/models/katello/glue/candlepin/owner.rb +12 -1
- data/app/models/katello/glue/candlepin/pool.rb +42 -25
- data/app/models/katello/glue/provider.rb +3 -6
- data/app/models/katello/glue/pulp/repo.rb +19 -9
- data/app/models/katello/host/content_facet.rb +1 -0
- data/app/models/katello/host/subscription_facet.rb +3 -1
- data/app/models/katello/kt_environment.rb +0 -6
- data/app/models/katello/package_group.rb +4 -0
- data/app/models/katello/ping.rb +15 -4
- data/app/models/katello/pool.rb +9 -0
- data/app/models/katello/product.rb +0 -6
- data/app/models/katello/product_content.rb +3 -1
- data/app/models/katello/pulp_sync_status.rb +0 -10
- data/app/models/katello/repository.rb +20 -35
- data/app/models/katello/root_repository.rb +0 -5
- data/app/models/katello/subscription.rb +10 -0
- data/app/models/katello/sync_plan.rb +7 -0
- data/app/models/setting/content.rb +7 -8
- data/app/presenters/katello/content_view_version_compare_presenter.rb +2 -6
- data/app/presenters/katello/product_content_presenter.rb +3 -5
- data/app/services/cert/certs.rb +3 -7
- data/app/services/katello/applicability/applicable_content_helper.rb +1 -2
- data/app/services/katello/candlepin/event_handler.rb +22 -22
- data/app/services/katello/candlepin/message_handler.rb +24 -15
- data/app/services/katello/content_view_manager.rb +24 -0
- data/app/services/katello/event_monitor/poller_thread.rb +25 -20
- data/app/services/katello/managed_content_medium_provider.rb +4 -0
- data/app/services/katello/organization_creator.rb +120 -0
- data/app/services/katello/product_content_finder.rb +5 -1
- data/app/services/katello/pulp/pulp_content_unit.rb +6 -6
- data/app/services/katello/pulp/smart_proxy_repository.rb +2 -17
- data/app/services/katello/pulp3/api/ansible_collection.rb +14 -2
- data/app/services/katello/pulp3/api/apt.rb +1 -1
- data/app/services/katello/pulp3/api/content_guard.rb +6 -40
- data/app/services/katello/pulp3/api/core.rb +27 -2
- data/app/services/katello/pulp3/api/docker.rb +1 -1
- data/app/services/katello/pulp3/api/file.rb +5 -1
- data/app/services/katello/pulp3/api/yum.rb +9 -1
- data/app/services/katello/pulp3/content_view_version/export.rb +18 -40
- data/app/services/katello/pulp3/content_view_version/import.rb +75 -30
- data/app/services/katello/pulp3/content_view_version/import_gpg_keys.rb +32 -0
- data/app/services/katello/pulp3/content_view_version/import_validator.rb +53 -21
- data/app/services/katello/pulp3/content_view_version/importable_products.rb +47 -0
- data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +52 -0
- data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +99 -0
- data/app/services/katello/pulp3/pulp_content_unit.rb +1 -1
- data/app/services/katello/pulp3/repository/ansible_collection.rb +5 -1
- data/app/services/katello/pulp3/repository/apt.rb +2 -1
- data/app/services/katello/pulp3/repository/yum.rb +0 -16
- data/app/services/katello/pulp3/repository.rb +20 -1
- data/app/services/katello/pulp3/rpm.rb +5 -1
- data/app/services/katello/pulp3/task.rb +12 -5
- data/app/services/katello/pulp3/task_group.rb +10 -5
- data/app/services/katello/smart_proxy_helper.rb +1 -8
- data/app/services/katello/ui_notifications/pulp/proxy_disk_space.rb +0 -1
- data/app/services/katello/ui_notifications/system_error.rb +25 -0
- data/app/views/katello/api/v2/content_view_components/show.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_filters/show.json.rabl +0 -1
- data/app/views/katello/api/v2/{puppet_modules → content_view_version_import_histories}/index.json.rabl +1 -1
- data/app/views/katello/api/v2/content_view_version_import_histories/show.json.rabl +14 -0
- data/app/views/katello/api/v2/content_view_versions/base.json.rabl +2 -2
- data/app/views/katello/api/v2/content_view_versions/show.json.rabl +0 -7
- data/app/views/katello/api/v2/content_views/base.json.rabl +20 -9
- data/app/views/katello/api/v2/environments/show.json.rabl +0 -1
- data/app/views/katello/api/v2/package_groups/index.json.rabl +4 -0
- data/app/views/katello/api/v2/repositories/base.json.rabl +0 -1
- data/app/views/katello/api/v2/repositories/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repository_sets/index.json.rabl +4 -1
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +22 -0
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +1 -1
- data/app/views/overrides/activation_keys/_host_media_type_select.html.erb +1 -1
- data/app/views/overrides/smart_proxies/_download_policy.erb +1 -1
- data/config/initializers/monkeys.rb +0 -1
- data/config/katello.yaml.example +0 -1
- data/config/routes/api/v2.rb +9 -21
- data/config/routes/overrides.rb +1 -2
- data/db/migrate/20140422000001_update_products_add_organization.rb +3 -2
- data/db/migrate/20160701180402_add_sortable_version_to_puppet_modules.rb +2 -0
- data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +1 -1
- data/db/migrate/20210119162528_delete_puppet_and_ostree_repos.rb +14 -20
- data/db/migrate/20210224160921_remove_disabled_products_from_sync_plans.rb +6 -0
- data/db/migrate/20210302165636_remove_katello_puppet_modules.rb +62 -0
- data/db/migrate/20210309160925_create_katello_content_view_version_import_histories.rb +13 -0
- data/db/migrate/20210318204533_add_import_type_to_import_histories.rb +8 -0
- data/db/migrate/20210319123300_add_foreign_keys_to_import_export_histories.rb +6 -0
- data/db/migrate/20210322142311_add_auth_url_token_to_root_repositories.rb +6 -0
- data/db/migrate/20210331180353_katello_pool_organization_id_not_nullable.rb +16 -0
- data/db/migrate/20210409033915_add_created_in_katello_to_taxonomy.rb +9 -0
- data/db/seeds.d/101-locations.rb +0 -3
- data/db/seeds.d/102-organizations.rb +1 -5
- data/db/seeds.d/109-katello-notification-blueprints.rb +12 -0
- data/db/seeds.d/111-upgrade_tasks.rb +3 -2
- data/engines/bastion/vendor/assets/javascripts/bastion/angular/angular.js +325 -156
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-animate/angular-animate.js +3 -3
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-resource/angular-resource.js +3 -3
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-route/angular-route.js +3 -3
- data/engines/bastion/vendor/assets/javascripts/bastion/angular-sanitize/angular-sanitize.js +21 -43
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +9 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-repository-sets.html +2 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +11 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +18 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html +10 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-actions.controller.js +5 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js +7 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +7 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +7 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +14 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.routes.js +0 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-repository-sets.controller.js +9 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-repository-sets.html +2 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +3 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register.html +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-view.factory.js +0 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +0 -56
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-available-content-views.html +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-content-views-list.html +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +2 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-info.html +0 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +2 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +0 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/content.service.js +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js +0 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/environments.html +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +21 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +9 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +71 -311
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +0 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +2 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +13 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +21 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repositories.routes.js +0 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +0 -6
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +3 -3
- data/lib/katello/engine.rb +16 -15
- data/lib/katello/middleware/organization_created_enforcer.rb +22 -0
- data/lib/katello/permission_creator.rb +12 -28
- data/lib/katello/permissions/host_permissions.rb +3 -2
- data/lib/katello/plugin.rb +6 -19
- data/lib/katello/repository_types/ansible_collection.rb +1 -1
- data/lib/katello/repository_types/deb.rb +1 -1
- data/lib/katello/repository_types/docker.rb +1 -1
- data/lib/katello/repository_types/file.rb +1 -1
- data/lib/katello/repository_types/yum.rb +1 -1
- data/lib/katello/tasks/clean_backend_objects.rake +25 -0
- data/lib/katello/tasks/jenkins.rake +6 -0
- data/lib/katello/tasks/receptor/extract_orgs.rake +1 -3
- data/lib/katello/tasks/reimport.rake +0 -1
- data/lib/katello/tasks/repository.rake +0 -30
- data/lib/katello/tasks/update_subscription_facet_backend_data.rake +3 -3
- data/lib/katello/tasks/upgrades/4.0/remove_ostree_puppet_content.rake +2 -4
- data/lib/katello/tasks/upgrades/4.1/fix_invalid_pools.rake +62 -0
- data/lib/katello/tasks/upgrades/4.1/sync_noarch_content.rake +15 -0
- data/lib/katello/version.rb +1 -1
- data/lib/katello.rb +1 -1
- data/locale/action_names.rb +65 -63
- data/locale/bn/katello.edit.po +1357 -1606
- data/locale/bn/katello.po +465 -744
- data/locale/cs/katello.edit.po +1213 -1087
- data/locale/cs/katello.po +307 -219
- data/locale/de/katello.edit.po +1498 -1520
- data/locale/de/katello.po +589 -625
- data/locale/en/katello.edit.po +1198 -1074
- data/locale/en/katello.po +304 -213
- data/locale/es/katello.edit.po +2344 -2304
- data/locale/es/katello.po +1407 -1407
- data/locale/fr/katello.edit.po +2720 -2642
- data/locale/fr/katello.po +1703 -1750
- data/locale/gu/katello.edit.po +1546 -1797
- data/locale/gu/katello.po +654 -935
- data/locale/hi/katello.edit.po +1545 -1793
- data/locale/hi/katello.po +653 -931
- data/locale/it/katello.edit.po +1323 -1310
- data/locale/it/katello.po +407 -409
- data/locale/ja/katello.edit.po +2645 -2557
- data/locale/ja/katello.po +1646 -1664
- data/locale/katello.pot +1435 -1289
- data/locale/kn/katello.edit.po +1546 -1795
- data/locale/kn/katello.po +654 -933
- data/locale/ko/katello.edit.po +1464 -1449
- data/locale/ko/katello.po +554 -554
- data/locale/mr/katello.edit.po +1545 -1758
- data/locale/mr/katello.po +653 -896
- data/locale/or/katello.edit.po +1546 -1795
- data/locale/or/katello.po +654 -933
- data/locale/pa/katello.edit.po +1541 -1775
- data/locale/pa/katello.po +649 -913
- data/locale/pt/katello.edit.po +1289 -1255
- data/locale/pt/katello.po +398 -394
- data/locale/pt_BR/katello.edit.po +2370 -2315
- data/locale/pt_BR/katello.po +1435 -1421
- data/locale/ru/katello.edit.po +1611 -1608
- data/locale/ru/katello.po +704 -716
- data/locale/ta/katello.edit.po +1358 -1605
- data/locale/ta/katello.po +465 -742
- data/locale/te/katello.edit.po +1545 -1792
- data/locale/te/katello.po +653 -930
- data/locale/zh_CN/katello.edit.po +3052 -2930
- data/locale/zh_CN/katello.po +2055 -2039
- data/locale/zh_TW/katello.edit.po +1571 -1669
- data/locale/zh_TW/katello.po +649 -777
- data/package.json +2 -2
- data/webpack/{scenes/ContentViews/Details/Repositories/RepoAddedStatus.js → components/AddedStatusLabel.js} +5 -5
- data/webpack/components/RoutedTabs/RoutedTabs.js +91 -0
- data/webpack/components/RoutedTabs/__tests__/RoutedTabs.test.js +32 -0
- data/webpack/components/RoutedTabs/index.js +4 -0
- data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageConstants.js +2 -0
- data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageHelpers.js +21 -0
- data/webpack/components/extensions/RegistrationCommands/RegistrationCommandsPageSelectors.js +21 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/ActivationKeys.test.js +18 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/Force.test.js +9 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/IgnoreSubmanErrors.test.js +9 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/LifeCycleEnvironment.test.js +11 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/ActivationKeys.test.js.snap +58 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/Force.test.js.snap +25 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/IgnoreSubmanErrors.test.js.snap +25 -0
- data/webpack/components/extensions/RegistrationCommands/__tests__/__snapshots__/LifeCycleEnvironment.test.js.snap +27 -0
- data/webpack/components/extensions/RegistrationCommands/fields/ActivationKeys.js +99 -0
- data/webpack/components/extensions/RegistrationCommands/fields/Force.js +38 -0
- data/webpack/components/extensions/RegistrationCommands/fields/IgnoreSubmanErrors.js +38 -0
- data/webpack/components/extensions/RegistrationCommands/fields/LifecycleEnvironment.js +56 -0
- data/webpack/components/extensions/RegistrationCommands/index.js +81 -0
- data/webpack/components/pf3Table/formatters/EntitlementsInlineEditFormatter.js +23 -24
- data/webpack/components/pf3Table/formatters/__tests__/__snapshots__/EntitlementsInlineEditFormatter.test.js.snap +3 -1
- data/webpack/components/pf3Table/formatters/entitlementsValueFormatter.js +16 -0
- data/webpack/containers/Application/overrides.scss +3 -0
- data/webpack/fills_index.js +3 -0
- data/webpack/redux/reducers/RedHatRepositories/enabled.fixtures.js +0 -2
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +8 -1
- data/webpack/scenes/ContentViews/Copy/__tests__/contentViewCopyResult.fixtures.json +1 -3
- data/webpack/scenes/ContentViews/Create/__tests__/contentViewCreateResult.fixtures.json +1 -3
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentEnvironments.js +28 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentVersion.js +45 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +124 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.fixtures.json +161 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +163 -0
- data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/unpublishedCVComponents.fixtures.json +64 -0
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +67 -7
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +61 -4
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +34 -11
- data/webpack/scenes/ContentViews/Details/Filters/CVFilterDetailType.js +33 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +117 -0
- data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +115 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentType.js +7 -10
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetails.js +49 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilterDetailsHeader.js +56 -0
- data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +3 -17
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +116 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/allFilterPackageGroups.fixtures.json +69 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetail.fixtures.json +103 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/contentViewFilterDetails.test.js +116 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterDetail.fixtures.json +147 -0
- data/webpack/scenes/ContentViews/Details/Filters/__tests__/cvPackageFilterRules.fixtures.json +30 -0
- data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +136 -0
- data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.fixtures.json +370 -0
- data/webpack/scenes/ContentViews/Details/Histories/__tests__/contentViewHistory.test.js +94 -0
- data/webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js +0 -1
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +106 -13
- data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +11 -5
- data/webpack/scenes/ContentViews/Details/Repositories/RepoIcon.js +5 -1
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +138 -0
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +0 -2
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.test.js +1 -1
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewRepoAdd.fixture.json +57 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +73 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionEnvironments.js +31 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.js +64 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionErrata.scss +8 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionPackages.js +0 -0
- data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +105 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +728 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +154 -0
- data/webpack/scenes/ContentViews/Details/Versions/__tests__/emptyCVVersion.fixtures.json +13 -0
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +3 -1
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetails.fixtures.json +0 -2
- data/webpack/scenes/ContentViews/Table/ContentViewVersionCell.js +33 -0
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +17 -22
- data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +51 -102
- data/webpack/scenes/ContentViews/__tests__/basicContentViews.fixtures.js +5 -3
- data/webpack/scenes/ContentViews/__tests__/contentViewList.fixtures.json +30 -5
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +95 -0
- data/webpack/scenes/ContentViews/components/ContentViewIcon.js +11 -5
- data/webpack/scenes/ContentViews/components/EnvironmentLabels.js +16 -0
- data/webpack/scenes/ContentViews/components/IconWithCount.js +1 -1
- data/webpack/scenes/ContentViews/components/InactiveText.js +15 -0
- data/webpack/scenes/ContentViews/expansions/DetailsExpansion.js +19 -1
- data/webpack/scenes/Subscriptions/Details/SubscriptionPurposeAttributes.js +1 -1
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailInfo.test.js.snap +1 -1
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +3 -3
- data/webpack/scenes/Subscriptions/Details/__tests__/subscriptionDetails.fixtures.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +17 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +2 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +1 -1
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +144 -0
- data/webpack/scenes/Tasks/helpers.js +2 -2
- data/webpack/test-utils/react-testing-lib-wrapper.js +11 -3
- data/webpack/utils/__tests__/useParamsWithHash.test.js +22 -0
- data/webpack/utils/helpers.js +2 -0
- data/webpack/utils/paramsFromHash.js +16 -0
- data/webpack/utils/useUrlParams.js +14 -0
- metadata +122 -206
- data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +0 -82
- data/app/controllers/katello/api/v2/puppet_modules_controller.rb +0 -19
- data/app/controllers/katello/concerns/registration_controller_extensions.rb +0 -16
- data/app/helpers/katello/concerns/hosts_and_hostgroups_helper_extensions.rb +0 -20
- data/app/lib/actions/candlepin/owner/create.rb +0 -16
- data/app/lib/actions/katello/content_view_puppet_environment/clear.rb +0 -11
- data/app/lib/actions/katello/content_view_puppet_environment/clone.rb +0 -78
- data/app/lib/actions/katello/content_view_puppet_environment/clone_content_for_version.rb +0 -20
- data/app/lib/actions/katello/content_view_puppet_environment/create.rb +0 -34
- data/app/lib/actions/katello/content_view_puppet_environment/create_for_version.rb +0 -23
- data/app/lib/actions/katello/content_view_puppet_environment/destroy.rb +0 -28
- data/app/lib/actions/katello/content_view_puppet_module/destroy.rb +0 -46
- data/app/lib/actions/katello/environment/library_create.rb +0 -35
- data/app/lib/actions/katello/organization/create.rb +0 -38
- data/app/lib/actions/pulp/content_view_puppet_environment/copy_contents.rb +0 -36
- data/app/lib/actions/pulp/content_view_puppet_environment/index_content.rb +0 -19
- data/app/lib/actions/pulp/repository/presenters/puppet_presenter.rb +0 -54
- data/app/lib/actions/pulp3/content_migration.rb +0 -31
- data/app/lib/actions/pulp3/content_migration_presenter.rb +0 -59
- data/app/lib/actions/pulp3/content_migration_reset.rb +0 -22
- data/app/lib/katello/foreman.rb +0 -32
- data/app/lib/katello/mapping.rb +0 -31
- data/app/lib/katello/util/hostgroup_facets_helper.rb +0 -126
- data/app/lib/katello/validators/content_view_puppet_module_validator.rb +0 -32
- data/app/models/katello/concerns/environment_extensions.rb +0 -74
- data/app/models/katello/content_view_puppet_environment.rb +0 -116
- data/app/models/katello/content_view_puppet_environment_puppet_module.rb +0 -11
- data/app/models/katello/content_view_puppet_module.rb +0 -63
- data/app/models/katello/puppet_module.rb +0 -77
- data/app/models/katello/repository_puppet_module.rb +0 -7
- data/app/services/katello/pulp/puppet_module.rb +0 -21
- data/app/services/katello/pulp/repository/puppet.rb +0 -68
- data/app/services/katello/pulp3/migration.rb +0 -329
- data/app/services/katello/pulp3/migration_plan.rb +0 -178
- data/app/services/katello/pulp3/migration_switchover.rb +0 -126
- data/app/services/katello/puppet_class_importer_extensions.rb +0 -32
- data/app/views/foreman/hosts/_registration.html.erb +0 -12
- data/app/views/katello/api/v2/activation_keys/product_content.json.rabl +0 -30
- data/app/views/katello/api/v2/content_view_puppet_modules/create.json.rabl +0 -3
- data/app/views/katello/api/v2/content_view_puppet_modules/index.json.rabl +0 -7
- data/app/views/katello/api/v2/content_view_puppet_modules/show.json.rabl +0 -9
- data/app/views/katello/api/v2/content_views/puppet_modules.json.rabl +0 -7
- data/app/views/katello/api/v2/host_subscriptions/content_override.json.rabl +0 -3
- data/app/views/katello/api/v2/host_subscriptions/product_content.json.rabl +0 -29
- data/app/views/katello/api/v2/puppet_modules/backend.json.rabl +0 -7
- data/app/views/katello/api/v2/puppet_modules/base.json.rabl +0 -9
- data/app/views/katello/api/v2/puppet_modules/compare.json.rabl +0 -10
- data/app/views/katello/api/v2/puppet_modules/name.json.rabl +0 -3
- data/app/views/katello/api/v2/puppet_modules/names.json.rabl +0 -7
- data/app/views/katello/api/v2/puppet_modules/show.json.rabl +0 -4
- data/db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb +0 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register-client.directive.js +0 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register-os-client.directive.js +0 -17
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register.controller.js +0 -44
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html +0 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-deb-client.html +0 -38
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-oracle-client.html +0 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-sles-client.html +0 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-puppet-modules.controller.js +0 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-names.controller.js +0 -45
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-versions.controller.js +0 -61
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module.factory.js +0 -23
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-modules.controller.js +0 -74
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-names.html +0 -57
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-module-versions.html +0 -64
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/views/content-view-puppet-modules.html +0 -54
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-puppet-modules.html +0 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-puppet-modules.html +0 -25
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +0 -6903
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +0 -7094
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +0 -7303
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +0 -6895
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +0 -6865
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +0 -6720
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +0 -7077
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +0 -6832
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +0 -6766
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_TW.po +0 -6703
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-puppet-modules.html +0 -66
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-content-views.controller.js +0 -44
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module-repositories.controller.js +0 -36
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module.controller.js +0 -34
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-content-views.html +0 -41
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-info.html +0 -32
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module-repositories.html +0 -52
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-module.html +0 -37
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-module.factory.js +0 -28
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.controller.js +0 -35
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.module.js +0 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.routes.js +0 -71
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/views/puppet-modules.html +0 -47
- data/lib/katello/repository_types/puppet.rb +0 -5
- data/lib/katello/tasks/fix_hostgroup_facets.rake +0 -8
- data/lib/katello/tasks/pulp3_content_switchover.rake +0 -32
- data/lib/katello/tasks/pulp3_migration.rake +0 -41
- data/lib/katello/tasks/pulp3_migration_abort.rake +0 -22
- data/lib/katello/tasks/pulp3_migration_reset.rake +0 -26
- data/lib/katello/tasks/pulp3_migration_stats.rake +0 -41
- data/lib/katello/tasks/pulp3_post_migration_check.rake +0 -51
- data/lib/monkeys/passenger_tee_input.rb +0 -20
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/webpack/components/TabWrapper/TabWrapper.js +0 -26
- data/webpack/components/TabWrapper/index.js +0 -3
- data/webpack/components/TabbedView/TabbedView.js +0 -38
- data/webpack/components/TabbedView/TabbedView.scss +0 -3
- data/webpack/components/TabbedView/index.js +0 -3
- data/webpack/scenes/ContentViews/expansions/EnvironmentsExpansion.js +0 -19
- data/webpack/scenes/ContentViews/expansions/VersionsExpansion.js +0 -11
@@ -2,6 +2,8 @@ module Katello
|
|
2
2
|
module EventDaemon
|
3
3
|
module Services
|
4
4
|
class AgentEventReceiver
|
5
|
+
STATUS_CACHE_KEY = 'katello_agent_events'.freeze
|
6
|
+
|
5
7
|
class Handler
|
6
8
|
attr_accessor :processed, :failed
|
7
9
|
|
@@ -46,12 +48,14 @@ module Katello
|
|
46
48
|
@agent_connection&.open? && @thread&.status.present?
|
47
49
|
end
|
48
50
|
|
49
|
-
def self.status
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
def self.status(refresh: true)
|
52
|
+
Rails.cache.fetch(STATUS_CACHE_KEY, force: refresh) do
|
53
|
+
{
|
54
|
+
running: running?,
|
55
|
+
processed_count: @handler&.processed || 0,
|
56
|
+
failed_count: @handler&.failed || 0
|
57
|
+
}
|
58
|
+
end
|
55
59
|
end
|
56
60
|
end
|
57
61
|
end
|
@@ -137,13 +137,8 @@ module Katello
|
|
137
137
|
|
138
138
|
# re-raise the same exception with nicer error message
|
139
139
|
def raise_rest_client_exception(e, a_path, http_method)
|
140
|
-
# message method in rest-client is hardcoded - we need to override it
|
141
140
|
msg = "#{name}: #{e.message} #{e.http_body} (#{http_method} #{a_path})"
|
142
|
-
|
143
|
-
define_method(:message) do
|
144
|
-
msg
|
145
|
-
end
|
146
|
-
end
|
141
|
+
e.message = msg
|
147
142
|
fail e
|
148
143
|
end
|
149
144
|
|
data/app/lib/katello/logging.rb
CHANGED
@@ -2,13 +2,18 @@ module Katello
|
|
2
2
|
module Logging
|
3
3
|
def self.time(message, data: {}, logger: Rails.logger, level: :info)
|
4
4
|
start = Time.now
|
5
|
+
data[:success] = true
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
begin
|
8
|
+
yield(data)
|
9
|
+
rescue => e
|
10
|
+
data[:success] = false
|
11
|
+
raise e
|
12
|
+
ensure
|
13
|
+
data[:duration] = ((Time.now - start) * 1000).truncate(2)
|
14
|
+
data_string = data.map { |k, v| "#{k}=#{v}" }.join(' ')
|
15
|
+
logger.send(level, "#{message} #{data_string}")
|
16
|
+
end
|
12
17
|
end
|
13
18
|
|
14
19
|
class Timer
|
@@ -74,13 +74,11 @@ module Katello
|
|
74
74
|
def initialize(url:, ssl_cert_file:, ssl_key_file:, ssl_ca_file:)
|
75
75
|
@url = url
|
76
76
|
ssl_domain = ::Qpid::Proton::SSLDomain.new(::Qpid::Proton::SSLDomain::MODE_CLIENT)
|
77
|
-
ssl_domain.peer_authentication(::Qpid::Proton::SSLDomain::VERIFY_PEER_NAME)
|
78
77
|
ssl_domain.credentials(ssl_cert_file, ssl_key_file, nil) if ssl_cert_file && ssl_key_file
|
79
78
|
ssl_domain.trusted_ca_db(ssl_ca_file) if ssl_ca_file
|
80
79
|
@connection_options = {
|
81
80
|
ssl_domain: ssl_domain,
|
82
|
-
sasl_allowed_mechs: 'external'
|
83
|
-
virtual_host: URI.parse(url).host
|
81
|
+
sasl_allowed_mechs: 'external'
|
84
82
|
}
|
85
83
|
end
|
86
84
|
|
@@ -3,7 +3,9 @@ module Katello
|
|
3
3
|
attr_reader :found, :crawled, :to_follow
|
4
4
|
|
5
5
|
# rubocop:disable Metrics/ParameterLists
|
6
|
-
def initialize(url, content_type = 'yum', upstream_username = nil,
|
6
|
+
def initialize(url, content_type = 'yum', upstream_username = nil,
|
7
|
+
upstream_password = nil, search = '*', proxy = {}, crawled = [],
|
8
|
+
found = [], to_follow = [])
|
7
9
|
@uri = uri(url)
|
8
10
|
@content_type = content_type
|
9
11
|
@upstream_username = upstream_username.empty? ? nil : upstream_username
|
@@ -45,6 +47,18 @@ module Katello
|
|
45
47
|
}
|
46
48
|
params[:user] = @upstream_username unless @upstream_username.empty?
|
47
49
|
params[:password] = @upstream_password unless @upstream_password.empty?
|
50
|
+
|
51
|
+
RestClient.proxy = nil
|
52
|
+
|
53
|
+
if @proxy && @proxy[:proxy_host]
|
54
|
+
proxy_uri = URI(@proxy[:proxy_host])
|
55
|
+
proxy_uri.user = @proxy[:proxy_user] if @proxy[:proxy_user]
|
56
|
+
proxy_uri.password = @proxy[:proxy_password] if @proxy[:proxy_password]
|
57
|
+
proxy_uri.port = @proxy[:proxy_port] if @proxy[:proxy_port]
|
58
|
+
|
59
|
+
RestClient.proxy = proxy_uri.to_s
|
60
|
+
end
|
61
|
+
|
48
62
|
begin
|
49
63
|
results = RestClient.get(@uri.to_s + "v1/search?q=#{@search}", params)
|
50
64
|
JSON.parse(results)['results'].each do |result|
|
@@ -40,12 +40,13 @@ module Katello
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def import(organization_name, path_to_file, options)
|
43
|
-
path = join_path(path(organization_name), 'imports')
|
43
|
+
path = join_path(path(organization_name), 'imports/async')
|
44
44
|
if options[:force] || SETTINGS[:katello].key?(:force_manifest_import)
|
45
45
|
path += "?force=#{SETTINGS[:katello][:force_manifest_import]}"
|
46
46
|
end
|
47
47
|
|
48
|
-
self.post(path, {:import => File.new(path_to_file, 'rb')}, self.default_headers.except('content-type'))
|
48
|
+
response = self.post(path, {:import => File.new(path_to_file, 'rb')}, self.default_headers.except('content-type'))
|
49
|
+
JSON.parse(response)
|
49
50
|
end
|
50
51
|
|
51
52
|
def product_content(organization_name)
|
@@ -18,8 +18,12 @@ module Katello
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def find(pool_id)
|
21
|
-
|
22
|
-
|
21
|
+
begin
|
22
|
+
pool_json = self.get(path(pool_id), self.default_headers).body
|
23
|
+
rescue RestClient::ResourceNotFound
|
24
|
+
raise Katello::Errors::CandlepinPoolGone
|
25
|
+
end
|
26
|
+
|
23
27
|
JSON.parse(pool_json).with_indifferent_access
|
24
28
|
end
|
25
29
|
|
@@ -19,6 +19,16 @@ module Katello
|
|
19
19
|
logger.send(debug_level, "Candlepin request #{response.headers[:x_candlepin_request_uuid]} returned with code #{response.code}")
|
20
20
|
super
|
21
21
|
end
|
22
|
+
|
23
|
+
def raise_rest_client_exception(error, path, http_method)
|
24
|
+
# this differentiates between Tomcat returning a 404 (candlepin is down or not deployed)
|
25
|
+
# vs a 404 from Candlepin itself
|
26
|
+
unless error&.response&.headers&.dig(:x_version)
|
27
|
+
fail ::Katello::Errors::CandlepinNotRunning
|
28
|
+
end
|
29
|
+
|
30
|
+
super
|
31
|
+
end
|
22
32
|
end
|
23
33
|
|
24
34
|
def self.logger
|
@@ -59,7 +59,7 @@ module Katello
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def self.format_requires(requires)
|
62
|
-
flags = {'GT' => '>', 'LT' => '
|
62
|
+
flags = {'GT' => '>', 'LT' => '<', 'EQ' => '=', 'GE' => '>=', 'LE' => '<='}
|
63
63
|
if requires['flags']
|
64
64
|
"#{requires['name']} #{flags[requires['flags']]} #{build_vrea(requires, false)}"
|
65
65
|
else
|
@@ -8,7 +8,7 @@ module Katello
|
|
8
8
|
def filter_package_groups_by_pulp_href(package_groups, package_pulp_hrefs)
|
9
9
|
rpms = Katello::Rpm.where(:pulp_id => package_pulp_hrefs)
|
10
10
|
package_groups.reject do |package_group|
|
11
|
-
(package_group.package_names
|
11
|
+
(package_group.package_names - rpms.pluck(:name)).any?
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -2,12 +2,6 @@ module Katello
|
|
2
2
|
module Validators
|
3
3
|
class HostgroupKickstartRepositoryValidator < ActiveModel::Validator
|
4
4
|
def validate(facet)
|
5
|
-
# check content source first, otherwise it's meaningless to proceed
|
6
|
-
if facet.content_source && facet.lifecycle_environment
|
7
|
-
valid = facet.content_source.lifecycle_environments.include?(facet.lifecycle_environment)
|
8
|
-
facet.errors.add(:base, _("The selected content source and lifecycle environment do not match")) && return unless valid
|
9
|
-
end
|
10
|
-
|
11
5
|
return unless facet.kickstart_repository_id
|
12
6
|
|
13
7
|
msg = if facet.content_source.blank?
|
@@ -49,6 +49,14 @@ module Katello
|
|
49
49
|
::User.current.can?(:view_content_views)
|
50
50
|
end
|
51
51
|
|
52
|
+
def creatable?
|
53
|
+
::User.current.can?(:create_content_views)
|
54
|
+
end
|
55
|
+
|
56
|
+
def publishable?
|
57
|
+
::User.current.can?(:publish_content_views)
|
58
|
+
end
|
59
|
+
|
52
60
|
def editable
|
53
61
|
authorized(:edit_content_views)
|
54
62
|
end
|
@@ -63,7 +63,7 @@ module Katello
|
|
63
63
|
property :content_view, 'ContentView', desc: 'Returns content view associated with the host'
|
64
64
|
property :lifecycle_environment, 'KTEnvironment', desc: 'Returns lifecycle environment object associated with the host'
|
65
65
|
property :content_source, 'SmartProxy', desc: 'Returns Smart Proxy object as the content source for the host'
|
66
|
-
property :applicable_errata, array_of: 'Erratum', desc: 'Returns
|
66
|
+
property :applicable_errata, array_of: 'Erratum', desc: 'Returns errata applicable to the host'
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
@@ -50,7 +50,6 @@ module Katello
|
|
50
50
|
|
51
51
|
has_many :hypervisor_pools, :class_name => '::Katello::Pool', :foreign_key => :hypervisor_id, :dependent => :nullify
|
52
52
|
|
53
|
-
before_save :correct_puppet_environment
|
54
53
|
before_validation :correct_kickstart_repository
|
55
54
|
before_update :check_host_registration, :if => proc { organization_id_changed? }
|
56
55
|
|
@@ -148,23 +147,6 @@ module Katello
|
|
148
147
|
[:update]
|
149
148
|
end
|
150
149
|
|
151
|
-
def correct_puppet_environment
|
152
|
-
if content_and_puppet_matched?
|
153
|
-
new_environment = content_facet.content_view.puppet_env(content_facet.lifecycle_environment).try(:puppet_environment)
|
154
|
-
self.environment = new_environment if new_environment
|
155
|
-
end
|
156
|
-
end
|
157
|
-
|
158
|
-
def content_and_puppet_matched?
|
159
|
-
content_facet && content_facet.content_view_id_was == environment.try(:content_view).try(:id) &&
|
160
|
-
content_facet.lifecycle_environment_id_was == self.environment.try(:lifecycle_environment).try(:id)
|
161
|
-
end
|
162
|
-
|
163
|
-
def content_and_puppet_match?
|
164
|
-
content_facet && content_facet.content_view_id == environment.try(:content_view).try(:id) &&
|
165
|
-
content_facet.lifecycle_environment_id == self.environment.try(:lifecycle_environment).try(:id)
|
166
|
-
end
|
167
|
-
|
168
150
|
def import_package_profile(simple_packages)
|
169
151
|
found = import_package_profile_in_bulk(simple_packages)
|
170
152
|
sync_package_associations(found.map(&:id).uniq)
|
@@ -233,15 +215,10 @@ module Katello
|
|
233
215
|
new_ids = new_available_module_streams.keys - old_associated_ids
|
234
216
|
new_ids.each do |new_id|
|
235
217
|
module_stream = new_available_module_streams[new_id]
|
236
|
-
status = module_stream["status"]
|
237
|
-
# Set status to "unknown" only if the active field is in use and set to false and the module is enabled
|
238
|
-
if enabled_module_stream_inactive?(module_stream)
|
239
|
-
status = "unknown"
|
240
|
-
end
|
241
218
|
self.host_available_module_streams.create!(host_id: self.id,
|
242
219
|
available_module_stream_id: new_id,
|
243
220
|
installed_profiles: module_stream["installed_profiles"],
|
244
|
-
status: status)
|
221
|
+
status: module_stream["status"])
|
245
222
|
end
|
246
223
|
|
247
224
|
upgradable_streams.each do |hams|
|
@@ -251,10 +228,6 @@ module Katello
|
|
251
228
|
if hams.attributes.slice(*shared_keys) != module_stream_data
|
252
229
|
hams.update!(module_stream_data)
|
253
230
|
end
|
254
|
-
# Set status to "unknown" only if the active field is in use and set to false and the module is enabled
|
255
|
-
if enabled_module_stream_inactive?(module_stream)
|
256
|
-
hams.update!(status: "unknown")
|
257
|
-
end
|
258
231
|
end
|
259
232
|
end
|
260
233
|
|
@@ -374,10 +347,6 @@ module Katello
|
|
374
347
|
self.get_status(::Katello::TraceStatus).refresh!
|
375
348
|
self.refresh_global_status!
|
376
349
|
end
|
377
|
-
|
378
|
-
def enabled_module_stream_inactive?(module_stream)
|
379
|
-
!module_stream["active"].nil? && module_stream["active"] == false && module_stream["status"] == "enabled"
|
380
|
-
end
|
381
350
|
end
|
382
351
|
end
|
383
352
|
end
|
@@ -90,11 +90,6 @@ module Katello
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
-
def content_and_puppet_match?
|
94
|
-
self.content_view && self.lifecycle_environment && self.content_view == self.environment.try(:content_view) &&
|
95
|
-
self.lifecycle_environment == self.environment.try(:lifecycle_environment)
|
96
|
-
end
|
97
|
-
|
98
93
|
def equivalent_kickstart_repository
|
99
94
|
return unless operatingsystem &&
|
100
95
|
kickstart_repository &&
|
@@ -107,9 +102,7 @@ module Katello
|
|
107
102
|
return true unless operatingsystem
|
108
103
|
|
109
104
|
if operatingsystem.respond_to? :kickstart_repos
|
110
|
-
operatingsystem.kickstart_repos(self
|
111
|
-
repo[:id] == (content_facet&.kickstart_repository_id || content_facet&.kickstart_repository&.id)
|
112
|
-
end
|
105
|
+
return operatingsystem.kickstart_repos(self).any? { |repo| repo[:id] == (content_facet&.kickstart_repository_id || content_facet&.kickstart_repository&.id) }
|
113
106
|
end
|
114
107
|
end
|
115
108
|
|
@@ -128,7 +121,7 @@ module Katello
|
|
128
121
|
facet_model = Facets.registered_facets[facet].hostgroup_configuration.model
|
129
122
|
value = facet_model.where.not(attribute => nil).joins(:hostgroup).merge(
|
130
123
|
::Hostgroup.where(id: self.ancestor_ids).reorder(ancestry: :desc)
|
131
|
-
).limit(1).pluck(attribute)
|
124
|
+
).limit(1).pluck(attribute)
|
132
125
|
end
|
133
126
|
value
|
134
127
|
end
|
@@ -49,10 +49,8 @@ module Katello
|
|
49
49
|
changes = self.previous_changes
|
50
50
|
if changes.key?(:name)
|
51
51
|
previous_name = changes[:name].first
|
52
|
-
|
53
|
-
|
54
|
-
if setting && setting.value == previous_name && !previous_name.blank?
|
55
|
-
setting.update_attribute(:value, self.name)
|
52
|
+
if !previous_name.blank? && Setting['content_default_http_proxy'] == previous_name
|
53
|
+
Setting['content_default_http_proxy'] = self.name
|
56
54
|
end
|
57
55
|
end
|
58
56
|
end
|
@@ -20,9 +20,6 @@ module Katello
|
|
20
20
|
if ::Setting[:default_location_subscribed_hosts] == self.title_before_last_save
|
21
21
|
::Setting[:default_location_subscribed_hosts] = self.title
|
22
22
|
end
|
23
|
-
if ::Setting[:default_location_puppet_content] == self.title_before_last_save
|
24
|
-
::Setting[:default_location_puppet_content] = self.title
|
25
|
-
end
|
26
23
|
end
|
27
24
|
end
|
28
25
|
|
@@ -34,9 +31,7 @@ module Katello
|
|
34
31
|
if ::Location.unscoped.count == 1
|
35
32
|
errors.add(
|
36
33
|
:base,
|
37
|
-
_('Cannot delete the last Location.
|
38
|
-
'Foreman needs at least one Location to put newly published '\
|
39
|
-
'Puppet content and Hosts registered via subscription-manager'))
|
34
|
+
_('Cannot delete the last Location.'))
|
40
35
|
false
|
41
36
|
elsif title == ::Setting[:default_location_subscribed_hosts]
|
42
37
|
errors.add(
|
@@ -46,14 +41,6 @@ module Katello
|
|
46
41
|
'subscribed hosts under Administer > Settings, tab Content.')
|
47
42
|
)
|
48
43
|
false
|
49
|
-
elsif title == ::Setting[:default_location_puppet_content]
|
50
|
-
errors.add(
|
51
|
-
:base,
|
52
|
-
_('Cannot delete the default Location for Puppet content. If you '\
|
53
|
-
'no longer want this Location, change the default Location for '\
|
54
|
-
'Puppet content under Administer > Settings, tab Content.')
|
55
|
-
)
|
56
|
-
false
|
57
44
|
else
|
58
45
|
true
|
59
46
|
end
|
@@ -67,16 +54,6 @@ module Katello
|
|
67
54
|
end
|
68
55
|
|
69
56
|
module ClassMethods
|
70
|
-
def default_puppet_content_location
|
71
|
-
::Location.unscoped.find_by_title(::Setting[:default_location_puppet_content]) if ::Setting[:default_location_puppet_content].present?
|
72
|
-
end
|
73
|
-
|
74
|
-
def default_puppet_content_location!
|
75
|
-
location = default_puppet_content_location
|
76
|
-
fail _("Setting 'default_location_puppet_content' is not set to a valid location.") if location.nil?
|
77
|
-
location
|
78
|
-
end
|
79
|
-
|
80
57
|
def default_host_subscribe_location
|
81
58
|
::Location.unscoped.find_by_title(::Setting[:default_location_subscribed_hosts]) if ::Setting[:default_location_subscribed_hosts].present?
|
82
59
|
end
|
@@ -88,7 +65,7 @@ module Katello
|
|
88
65
|
end
|
89
66
|
|
90
67
|
def default_location_ids
|
91
|
-
[default_host_subscribe_location
|
68
|
+
[default_host_subscribe_location].compact.map(&:id).uniq
|
92
69
|
end
|
93
70
|
end
|
94
71
|
end
|
@@ -17,8 +17,6 @@ module Katello
|
|
17
17
|
TemplateKind.all.each do |kind|
|
18
18
|
if name == ::Operatingsystem::REDHAT_ATOMIC_HOST_OS && kind.name == "provision"
|
19
19
|
provisioning_template_name = Setting["katello_default_atomic_provision"]
|
20
|
-
elsif kind.name == 'registration'
|
21
|
-
provisioning_template_name = 'Linux registration default'
|
22
20
|
else
|
23
21
|
provisioning_template_name = Setting["katello_default_#{kind.name}"]
|
24
22
|
end
|
@@ -39,6 +39,8 @@ module Katello
|
|
39
39
|
|
40
40
|
scope :with_upstream_pools, -> { joins(:pools).merge(Katello::Pool.upstream).distinct }
|
41
41
|
scope :having_name_or_label, ->(name_or_label) { where("name = :id or label = :id", :id => name_or_label) }
|
42
|
+
scope :created_in_katello, -> { where(created_in_katello: true) }
|
43
|
+
scope :not_created_in_katello, -> { where.not(created_in_katello: true) }
|
42
44
|
scoped_search :on => :label, :complete_value => :true
|
43
45
|
|
44
46
|
after_create :associate_default_capsule
|
@@ -104,14 +106,6 @@ module Katello
|
|
104
106
|
self.task_statuses.where(:task_type => :repo_discovery).order('created_at DESC').first
|
105
107
|
end
|
106
108
|
|
107
|
-
def create_library
|
108
|
-
self.library = Katello::KTEnvironment.new(:name => "Library", :label => "Library", :library => true, :organization => self)
|
109
|
-
end
|
110
|
-
|
111
|
-
def create_redhat_provider
|
112
|
-
self.providers << Katello::Provider.new(:name => "Red Hat", :provider_type => Katello::Provider::REDHAT)
|
113
|
-
end
|
114
|
-
|
115
109
|
def associate_default_capsule
|
116
110
|
smart_proxy = SmartProxy.pulp_primary
|
117
111
|
smart_proxy.organizations << self if smart_proxy
|
@@ -124,10 +118,6 @@ module Katello
|
|
124
118
|
end
|
125
119
|
end
|
126
120
|
|
127
|
-
def create_anonymous_provider
|
128
|
-
self.providers << Katello::Provider.new(:name => Katello::Provider::ANONYMOUS, :provider_type => Katello::Provider::ANONYMOUS)
|
129
|
-
end
|
130
|
-
|
131
121
|
def validate_destroy(current_org)
|
132
122
|
def_error = _("Could not delete organization '%s'.") % [self.name]
|
133
123
|
if (current_org == self)
|
@@ -174,12 +164,8 @@ module Katello
|
|
174
164
|
end
|
175
165
|
|
176
166
|
def enabled_product_content_for(roots)
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
filtered_product_content do |pc|
|
181
|
-
content_ids.include?(pc.content.cp_content_id) && pc.product.enabled?
|
182
|
-
end
|
167
|
+
Katello::ProductContent.joins(:content).where(:product_id => self.products.enabled,
|
168
|
+
"#{::Katello::Content.table_name}.cp_content_id" => roots.select(:content_id))
|
183
169
|
end
|
184
170
|
|
185
171
|
def enabled_product_content
|
@@ -10,15 +10,8 @@ module Katello
|
|
10
10
|
minor ||= '' # treat minor versions as empty string to not confuse with nil
|
11
11
|
os = ::Redhat.where(:name => os_name, :major => major, :minor => minor).try(:first)
|
12
12
|
return os if os
|
13
|
-
|
14
|
-
|
15
|
-
description = "#{os_name} #{repo.distribution_version} #{SecureRandom.uuid}"
|
16
|
-
create_os = lambda do
|
17
|
-
::Redhat.create!(:name => os_name, :major => major, :minor => minor, :description => description)
|
18
|
-
end
|
19
|
-
else
|
20
|
-
create_os = lambda { ::Redhat.create!(:name => os_name, :major => major, :minor => minor) }
|
21
|
-
end
|
13
|
+
description = "#{os_name}-#{repo.distribution_version}"
|
14
|
+
create_os = lambda { ::Redhat.create!(:name => os_name, :major => major, :minor => minor, :description => description) }
|
22
15
|
|
23
16
|
begin
|
24
17
|
create_os.call
|
@@ -49,11 +42,10 @@ module Katello
|
|
49
42
|
end
|
50
43
|
end
|
51
44
|
|
52
|
-
def kickstart_repos(host
|
53
|
-
distros = distribution_repositories(host
|
54
|
-
|
55
|
-
|
56
|
-
distros.map { |distro| distro.to_hash(content_facet.content_source) }
|
45
|
+
def kickstart_repos(host)
|
46
|
+
distros = distribution_repositories(host).where(distribution_bootable: true)
|
47
|
+
if distros && host&.content_facet&.content_source
|
48
|
+
distros.map { |distro| distro.to_hash(host.content_facet.content_source) }
|
57
49
|
else
|
58
50
|
[]
|
59
51
|
end
|
@@ -70,10 +62,10 @@ module Katello
|
|
70
62
|
end
|
71
63
|
end
|
72
64
|
|
73
|
-
def distribution_repositories(host
|
74
|
-
content_facet
|
75
|
-
|
76
|
-
|
65
|
+
def distribution_repositories(host)
|
66
|
+
content_view = host.try(:content_facet).try(:content_view) || host.try(:content_view)
|
67
|
+
lifecycle_environment = host.try(:content_facet).try(:lifecycle_environment) || host.try(:lifecycle_environment)
|
68
|
+
|
77
69
|
if content_view && lifecycle_environment && host.os && host.architecture
|
78
70
|
Katello::Repository.in_environment(lifecycle_environment).in_content_views([content_view]).
|
79
71
|
where(:distribution_arch => host.architecture.name).
|
@@ -10,7 +10,6 @@ module Katello
|
|
10
10
|
module Overrides
|
11
11
|
def refresh
|
12
12
|
errors = super
|
13
|
-
update_puppet_path
|
14
13
|
errors
|
15
14
|
end
|
16
15
|
end
|
@@ -90,10 +89,6 @@ module Katello
|
|
90
89
|
end
|
91
90
|
|
92
91
|
def self.with_environment(environment, include_default = false)
|
93
|
-
(pulp2_proxies_with_environment(environment, include_default) + pulpcore_proxies_with_environment(environment)).try(:uniq)
|
94
|
-
end
|
95
|
-
|
96
|
-
def self.pulp2_proxies_with_environment(environment, include_default = false)
|
97
92
|
features = [PULP_NODE_FEATURE]
|
98
93
|
features << PULP_FEATURE if include_default
|
99
94
|
|
@@ -101,11 +96,6 @@ module Katello
|
|
101
96
|
where(katello_capsule_lifecycle_environments: { lifecycle_environment_id: environment.id })
|
102
97
|
end
|
103
98
|
|
104
|
-
def self.pulpcore_proxies_with_environment(environment)
|
105
|
-
unscoped.where(id: unscoped.select { |p| p.pulp_mirror? }.pluck(:id)).joins(:capsule_lifecycle_environments).
|
106
|
-
where(katello_capsule_lifecycle_environments: { lifecycle_environment_id: environment.id })
|
107
|
-
end
|
108
|
-
|
109
99
|
def self.sync_needed?(environment)
|
110
100
|
Setting[:foreman_proxy_content_auto_sync] && unscoped.with_environment(environment).any?
|
111
101
|
end
|
@@ -115,20 +105,6 @@ module Katello
|
|
115
105
|
ProxyAPI::ContainerGateway.new(url: self.url).unauthenticated_repository_list("repositories": repo_names)
|
116
106
|
end
|
117
107
|
|
118
|
-
def puppet_path
|
119
|
-
self[:puppet_path] || update_puppet_path
|
120
|
-
end
|
121
|
-
|
122
|
-
def update_puppet_path
|
123
|
-
if has_feature?(PULP_FEATURE)
|
124
|
-
path = ::ProxyAPI::Pulp.new(:url => self.url).capsule_puppet_path['puppet_content_dir']
|
125
|
-
elsif has_feature?(PULP_NODE_FEATURE)
|
126
|
-
path = ::ProxyAPI::PulpNode.new(:url => self.url).capsule_puppet_path['puppet_content_dir']
|
127
|
-
end
|
128
|
-
self.update_attribute(:puppet_path, path || '') if persisted?
|
129
|
-
path
|
130
|
-
end
|
131
|
-
|
132
108
|
def update_container_repo_list(repo_list)
|
133
109
|
ProxyAPI::ContainerGateway.new(url: self.url).repository_list({ repositories: repo_list })
|
134
110
|
end
|
@@ -250,7 +226,8 @@ module Katello
|
|
250
226
|
|
251
227
|
pulp3_supported = repository_type_obj.pulp3_plugin.present? &&
|
252
228
|
pulp3_enabled? &&
|
253
|
-
self.capabilities(PULP3_FEATURE).try(:include?, repository_type_obj.pulp3_plugin)
|
229
|
+
(self.capabilities(PULP3_FEATURE).try(:include?, repository_type_obj.pulp3_plugin) ||
|
230
|
+
self.capabilities(PULP3_FEATURE).try(:include?, 'pulp_' + repository_type_obj.pulp3_plugin))
|
254
231
|
|
255
232
|
check_pulp2_preferred ? pulp3_supported && !pulp2_preferred_for_type?(repository_type_obj.id) : pulp3_supported
|
256
233
|
end
|
@@ -318,12 +295,10 @@ module Katello
|
|
318
295
|
|
319
296
|
def associate_default_locations
|
320
297
|
return unless self.pulp_primary?
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
self.locations << default_location
|
326
|
-
end
|
298
|
+
default_location = ::Location.unscoped.find_by_title(
|
299
|
+
::Setting[:default_location_subscribed_hosts])
|
300
|
+
if default_location.present? && !locations.include?(default_location)
|
301
|
+
self.locations << default_location
|
327
302
|
end
|
328
303
|
end
|
329
304
|
|