katello 3.10.2 → 3.11.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/controllers/katello/api/registry/registry_proxies_controller.rb +16 -22
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +4 -7
- data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +4 -5
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +4 -4
- data/app/controllers/katello/api/v2/content_views_controller.rb +3 -3
- data/app/controllers/katello/api/v2/docker_manifests_controller.rb +1 -1
- data/app/controllers/katello/api/v2/errata_controller.rb +2 -2
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -3
- data/app/controllers/katello/api/v2/package_groups_controller.rb +3 -3
- data/app/controllers/katello/api/v2/repositories_controller.rb +5 -24
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +1 -1
- data/app/controllers/katello/application_controller.rb +4 -4
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +1 -1
- data/app/controllers/katello/sync_management_controller.rb +1 -1
- data/app/helpers/katello/errata_mailer_helper.rb +1 -1
- data/app/helpers/katello/sync_management_helper.rb +1 -1
- data/app/lib/actions/candlepin/environment/add_content_to_environment.rb +18 -0
- data/app/lib/actions/katello/content_view_puppet_environment/clone.rb +1 -4
- data/app/lib/actions/katello/content_view_puppet_environment/clone_content_for_version.rb +20 -0
- data/app/lib/actions/katello/content_view_puppet_environment/create_for_version.rb +3 -2
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +15 -16
- data/app/lib/actions/katello/host/hypervisors_update.rb +17 -6
- data/app/lib/actions/katello/organization/manifest_delete.rb +1 -3
- data/app/lib/actions/katello/organization/manifest_import.rb +1 -3
- data/app/lib/actions/katello/organization/manifest_refresh.rb +1 -3
- data/app/lib/actions/katello/provider/update.rb +1 -1
- data/app/lib/actions/katello/repository/check_matching_content.rb +8 -2
- data/app/lib/actions/katello/repository/clone_contents.rb +52 -0
- data/app/lib/actions/katello/repository/clone_to_environment.rb +1 -11
- data/app/lib/actions/katello/repository/clone_to_version.rb +19 -29
- data/app/lib/actions/katello/repository/create.rb +3 -4
- data/app/lib/actions/katello/repository/export.rb +1 -2
- data/app/lib/actions/katello/repository/import_upload.rb +7 -5
- data/app/lib/actions/katello/repository/purge_empty_content.rb +16 -0
- data/app/lib/actions/katello/repository/remove_content.rb +2 -2
- data/app/lib/actions/katello/repository/sync.rb +1 -1
- data/app/lib/actions/pulp/content_view_puppet_environment/copy_contents.rb +36 -0
- data/app/lib/actions/pulp/repository/copy_all_units.rb +27 -0
- data/app/lib/actions/pulp/repository/copy_units.rb +29 -0
- data/app/lib/actions/pulp/repository/refresh.rb +3 -7
- data/app/lib/actions/pulp/repository/regenerate_applicability.rb +5 -2
- data/app/lib/katello/concerns/renderer_extensions.rb +1 -1
- data/app/lib/katello/http_resource.rb +5 -1
- data/app/lib/katello/resources/candlepin/consumer.rb +9 -0
- data/app/lib/katello/resources/candlepin/content.rb +2 -3
- data/app/lib/katello/util/cdn_var_substitutor.rb +1 -2
- data/app/lib/katello/util/path_with_substitutions.rb +18 -1
- data/app/lib/katello/validators/content_view_puppet_module_validator.rb +2 -2
- data/app/lib/katello/validators/environment_docker_repositories_validator.rb +7 -5
- data/app/models/katello/concerns/hostgroup_extensions.rb +2 -7
- data/app/models/katello/concerns/organization_extensions.rb +11 -1
- data/app/models/katello/concerns/pulp_database_unit.rb +40 -24
- data/app/models/katello/concerns/redhat_extensions.rb +7 -3
- data/app/models/katello/content_view.rb +5 -7
- data/app/models/katello/content_view_docker_filter.rb +3 -3
- data/app/models/katello/content_view_puppet_environment.rb +1 -1
- data/app/models/katello/content_view_puppet_module.rb +2 -3
- data/app/models/katello/docker_meta_tag.rb +1 -1
- data/app/models/katello/docker_tag.rb +4 -6
- data/app/models/katello/erratum.rb +1 -1
- data/app/models/katello/glue/pulp/repo.rb +3 -0
- data/app/models/katello/glue/pulp/repos.rb +4 -0
- data/app/models/katello/host/info_provider.rb +2 -2
- data/app/models/katello/host/subscription_facet.rb +0 -1
- data/app/models/katello/module_stream.rb +10 -4
- data/app/models/katello/ostree_branch.rb +4 -2
- data/app/models/katello/package_group.rb +2 -2
- data/app/models/katello/ping.rb +1 -1
- data/app/models/katello/puppet_module.rb +3 -3
- data/app/models/katello/repository.rb +15 -2
- data/app/models/katello/root_repository.rb +10 -0
- data/app/models/katello/yum_metadata_file.rb +46 -0
- data/app/services/katello/abstract/pulp/content.rb +19 -0
- data/app/services/katello/applicable_content_helper.rb +5 -5
- data/app/services/katello/pulp/content.rb +17 -0
- data/app/services/katello/pulp/repository.rb +45 -15
- data/app/services/katello/pulp/repository/deb.rb +8 -0
- data/app/services/katello/pulp/repository/docker.rb +19 -0
- data/app/services/katello/pulp/repository/file.rb +10 -0
- data/app/services/katello/pulp/repository/ostree.rb +4 -0
- data/app/services/katello/pulp/repository/puppet.rb +10 -0
- data/app/services/katello/pulp/repository/yum.rb +73 -0
- data/app/services/katello/pulp/yum_metadata_file.rb +7 -0
- data/app/services/katello/repository_type.rb +5 -0
- data/app/views/dashboard/_errata_widget.html.erb +1 -1
- data/app/views/katello/api/v2/debs/base.json.rabl +2 -1
- data/app/views/katello/api/v2/docker_tags/_base.json.rabl +3 -3
- data/app/views/katello/api/v2/errata/show.json.rabl +2 -1
- data/app/views/katello/api/v2/file_units/base.json.rabl +2 -1
- data/app/views/katello/api/v2/module_streams/base.json.rabl +2 -1
- data/app/views/katello/api/v2/ostree_branches/show.json.rabl +3 -2
- data/app/views/katello/api/v2/package_groups/base.json.rabl +2 -1
- data/app/views/katello/api/v2/package_groups/show.json.rabl +1 -1
- data/app/views/katello/api/v2/packages/base.json.rabl +2 -1
- data/app/views/katello/api/v2/packages/show.json.rabl +1 -1
- data/app/views/katello/api/v2/puppet_modules/base.json.rabl +2 -1
- data/app/views/katello/api/v2/puppet_modules/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repositories/base.json.rabl +1 -0
- data/app/views/katello/layouts/react.html.erb +3 -3
- data/db/migrate/20181219205642_create_yum_metadata_file.rb +20 -0
- data/db/migrate/20190107160723_units_uuid_to_backend_ident.rb +8 -0
- data/db/seeds.d/101-locations.rb +11 -13
- data/db/seeds.d/102-organizations.rb +5 -3
- data/db/seeds.d/111-upgrade_tasks.rb +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/subscription-add-or-remove.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.module.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-events.html +1 -1
- 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-provisioning-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.module.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/errata-filter-details.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filter-repositories.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filters.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/views/content-view-history.html +20 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-deb-repositories.html +1 -1
- 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 +1 -1
- 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 +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-errata.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-ostree-branches.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/views/content-views.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js +50 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-content-views.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-details.html +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-errata.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-ostree.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.module.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch-info.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-sync-plan-modal.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-ostree-branches.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-info.html +5 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +7 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/partials/product-table-sync-status.html +5 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-info.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-details.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-import-history.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-start-date.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscriptions.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/views/sync-plans.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/task-details.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-table.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/user-tasks-table.html +1 -1
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +6 -1
- data/lib/katello/engine.rb +3 -3
- data/lib/katello/plugin.rb +3 -3
- data/lib/katello/repository_types/deb.rb +1 -0
- data/lib/katello/repository_types/yum.rb +1 -0
- data/lib/katello/tasks/reimport.rake +1 -0
- data/lib/katello/tasks/repository.rake +1 -1
- data/lib/katello/tasks/upgrades/3.11/import_yum_metadata_file.rake +12 -0
- data/lib/katello/version.rb +1 -1
- data/package.json +3 -1
- data/webpack/__mocks__/foremanReact/components/Pagination/PaginationWrapper.js +2 -0
- data/webpack/__mocks__/foremanReact/components/common/EmptyState.js +8 -0
- data/webpack/common_index.js +6 -0
- data/webpack/containers/Application/config.js +3 -3
- data/webpack/move_to_foreman/components/common/table/components/Table.js +3 -3
- data/webpack/move_to_foreman/components/common/table/components/Table.test.js +2 -0
- data/webpack/move_to_foreman/components/common/table/components/__snapshots__/Table.test.js.snap +1 -17
- data/webpack/redux/actions/RedHatRepositories/helpers.js +19 -10
- data/webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ModuleStreamDetailProfiles.test.js +2 -0
- data/webpack/scenes/ModuleStreams/Details/Repositories/__tests__/ModuleStreamDetailRepositories.test.js +2 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetails.test.js +2 -0
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js +1 -0
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js +1 -0
- data/webpack/scenes/RedHatRepositories/helpers.js +3 -3
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailProductContent.test.js.snap +1 -0
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +1 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +1 -1
- data/webpack/scenes/Subscriptions/SubscriptionActions.js +10 -0
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +6 -0
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +16 -0
- data/webpack/scenes/Subscriptions/SubscriptionValidations.js +3 -3
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +28 -25
- data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +6 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +0 -1
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsPage.test.js +1 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +0 -1
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionValidations.test.js +9 -4
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +14 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +2 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +24 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +6 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsActions.test.js.snap +24 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +1 -1
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +138 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsSelectors.test.js.snap +6 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/EntitlementsInlineEditFormatter.js +8 -6
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +23 -11
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/EntitlementsInlineEditFormatter.test.js +14 -10
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.fixtures.js +105 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +2 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTableHelpers.test.js +44 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/EntitlementsInlineEditFormatter.test.js.snap +3 -3
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +2 -222
- data/webpack/scenes/Subscriptions/index.js +4 -0
- metadata +41 -44
- data/app/lib/actions/katello/content_view_puppet_environment/clone_content.rb +0 -32
- data/app/lib/actions/katello/repository/clone_deb_content.rb +0 -70
- data/app/lib/actions/katello/repository/clone_docker_content.rb +0 -26
- data/app/lib/actions/katello/repository/clone_file_content.rb +0 -17
- data/app/lib/actions/katello/repository/clone_ostree_content.rb +0 -17
- data/app/lib/actions/katello/repository/clone_yum_content.rb +0 -105
- data/app/lib/actions/katello/repository/clone_yum_metadata.rb +0 -36
- data/app/lib/actions/pulp/repository/copy_deb.rb +0 -15
- data/app/lib/actions/pulp/repository/copy_deb_component.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_deb_release.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_distribution.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_docker_manifest.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_docker_tag.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_errata.rb +0 -15
- data/app/lib/actions/pulp/repository/copy_files.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_module_default.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_module_stream.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_ostree_branch.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_package_group.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_puppet_module.rb +0 -15
- data/app/lib/actions/pulp/repository/copy_rpm.rb +0 -15
- data/app/lib/actions/pulp/repository/copy_srpm.rb +0 -16
- data/app/lib/actions/pulp/repository/copy_yum_metadata_file.rb +0 -11
- data/app/lib/actions/pulp/repository/purge_empty_errata.rb +0 -19
- data/app/lib/actions/pulp/repository/purge_empty_package_groups.rb +0 -24
- data/db/migrate/20190326145039_remove_version_date_from_ostree_branch.rb +0 -5
- data/lib/katello/tasks/upgrades/3.10/update_gpg_key_urls.rake +0 -32
- data/webpack/components/PaginationRow/PaginationRow.test.js +0 -25
- data/webpack/components/PaginationRow/__snapshots__/PaginationRow.test.js.snap +0 -35
- data/webpack/components/PaginationRow/index.js +0 -94
- data/webpack/move_to_foreman/components/common/EmptyState/index.js +0 -68
@@ -1,36 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Katello
|
3
|
-
module Repository
|
4
|
-
class CloneYumMetadata < Actions::Base
|
5
|
-
def plan(source_repo, target_repo)
|
6
|
-
sequence do
|
7
|
-
# Check for matching content before indexing happens, the content in pulp is
|
8
|
-
# actually updated, but it is not reflected in the database yet.
|
9
|
-
output = {}
|
10
|
-
if !target_repo.root.previous_changes.include?(:unprotected) &&
|
11
|
-
target_repo.environment
|
12
|
-
output = plan_action(Katello::Repository::CheckMatchingContent,
|
13
|
-
:source_repo_id => source_repo.id,
|
14
|
-
:target_repo_id => target_repo.id).output
|
15
|
-
end
|
16
|
-
|
17
|
-
plan_action(Katello::Repository::IndexContent, id: target_repo.id)
|
18
|
-
|
19
|
-
plan_action(Katello::Repository::MetadataGenerate,
|
20
|
-
target_repo,
|
21
|
-
:source_repository => source_repo,
|
22
|
-
:matching_content => output[:matching_content])
|
23
|
-
|
24
|
-
plan_self(:source_checksum_type => source_repo.saved_checksum_type, :target_repo_id => target_repo.id) unless source_repo.saved_checksum_type == target_repo.saved_checksum_type
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
def finalize
|
29
|
-
repository = ::Katello::Repository.find(input[:target_repo_id])
|
30
|
-
source_checksum_type = input[:source_checksum_type]
|
31
|
-
repository.update_attributes!(saved_checksum_type: source_checksum_type) if (repository && source_checksum_type)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Repository
|
4
|
-
class CopyDeb < Pulp::Repository::AbstractCopyContent
|
5
|
-
def content_extension
|
6
|
-
pulp_extensions.deb
|
7
|
-
end
|
8
|
-
|
9
|
-
def criteria
|
10
|
-
super.merge(fields: ::Katello::Pulp::Deb::PULP_SELECT_FIELDS)
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Repository
|
4
|
-
class CopyErrata < Pulp::Repository::AbstractCopyContent
|
5
|
-
def content_extension
|
6
|
-
pulp_extensions.errata
|
7
|
-
end
|
8
|
-
|
9
|
-
def criteria
|
10
|
-
super.merge(fields: ::Katello::Pulp::Erratum::PULP_SELECT_FIELDS)
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Repository
|
4
|
-
class CopyPuppetModule < Pulp::Repository::AbstractCopyContent
|
5
|
-
def content_extension
|
6
|
-
pulp_extensions.puppet_module
|
7
|
-
end
|
8
|
-
|
9
|
-
def criteria
|
10
|
-
{ filters: {:association => input[:clauses] } }
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Repository
|
4
|
-
class CopyRpm < Pulp::Repository::AbstractCopyContent
|
5
|
-
def content_extension
|
6
|
-
pulp_extensions.rpm
|
7
|
-
end
|
8
|
-
|
9
|
-
def criteria
|
10
|
-
super.merge(fields: ::Katello::Pulp::Rpm::PULP_SELECT_FIELDS)
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Repository
|
4
|
-
class CopySrpm < Pulp::Repository::AbstractCopyContent
|
5
|
-
def content_extension
|
6
|
-
pulp_extensions.srpm
|
7
|
-
end
|
8
|
-
|
9
|
-
def criteria
|
10
|
-
#Use the same RPM select fields
|
11
|
-
super.merge(fields: ::Katello::Pulp::Srpm::PULP_SELECT_FIELDS)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Repository
|
4
|
-
class PurgeEmptyErrata < Pulp::AbstractAsyncTask
|
5
|
-
input_format do
|
6
|
-
param :pulp_id, Integer
|
7
|
-
end
|
8
|
-
|
9
|
-
def invoke_external_task
|
10
|
-
repo = ::Katello::Repository.where(:pulp_id => input[:pulp_id]).first
|
11
|
-
errata_to_delete = repo.empty_errata
|
12
|
-
|
13
|
-
repo.unassociate_by_filter(::Katello::ContentViewErratumFilter::CONTENT_TYPE,
|
14
|
-
"id" => { "$in" => errata_to_delete.map(&:errata_id) })
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module Actions
|
2
|
-
module Pulp
|
3
|
-
module Repository
|
4
|
-
class PurgeEmptyPackageGroups < Pulp::AbstractAsyncTask
|
5
|
-
input_format do
|
6
|
-
param :pulp_id, Integer
|
7
|
-
end
|
8
|
-
|
9
|
-
def invoke_external_task
|
10
|
-
repo = ::Katello::Repository.where(:pulp_id => input[:pulp_id]).first
|
11
|
-
rpm_names = repo.rpms.pluck(:name).uniq
|
12
|
-
|
13
|
-
# Remove all package groups with no packages
|
14
|
-
package_groups_to_delete = repo.package_groups.select do |group|
|
15
|
-
(rpm_names & group.package_names).empty?
|
16
|
-
end
|
17
|
-
criteria = {:association => {"unit_id" => {"$in" => package_groups_to_delete.compact}}}
|
18
|
-
|
19
|
-
::Katello.pulp_server.extensions.repository.unassociate_units(repo.pulp_id, :filters => criteria)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
namespace :katello do
|
2
|
-
namespace :upgrades do
|
3
|
-
namespace '3.10' do
|
4
|
-
desc "Update repositories with API V1 GPG URLs"
|
5
|
-
task :update_gpg_key_urls => ["environment", "katello:check_ping"] do
|
6
|
-
User.current = User.anonymous_admin
|
7
|
-
|
8
|
-
::Organization.all.each do |org|
|
9
|
-
org_contents = Katello::Resources::Candlepin::Content.all(org.label, include_only: [:id, :gpgUrl])
|
10
|
-
|
11
|
-
org_contents.each do |cp_content|
|
12
|
-
gpg_url = cp_content['gpgUrl']
|
13
|
-
if gpg_url && gpg_url.match(/katello\/api\/repositories/)
|
14
|
-
content = Katello::Content.where(cp_content_id: cp_content['id'], organization: org).first
|
15
|
-
|
16
|
-
if content.nil?
|
17
|
-
Rails.logger.warn("Candlepin Content id=#{cp_content['id']} isn't in our DB. Try running 'rake katello:reimport' first.")
|
18
|
-
else
|
19
|
-
root_repo = Katello::RootRepository.in_organization(org).where(content_id: content.cp_content_id).first
|
20
|
-
new_gpg_url = root_repo.library_instance.yum_gpg_key_url
|
21
|
-
cp_content['gpgUrl'] = new_gpg_url
|
22
|
-
Katello::Resources::Candlepin::Content.update(org.label, cp_content)
|
23
|
-
content.gpg_url = new_gpg_url
|
24
|
-
content.save!
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { shallow } from 'enzyme';
|
3
|
-
import toJson from 'enzyme-to-json';
|
4
|
-
|
5
|
-
import PaginationRow from '../PaginationRow';
|
6
|
-
|
7
|
-
describe('PaginationRow component', () => {
|
8
|
-
const getBaseProps = () => ({
|
9
|
-
pagination: {
|
10
|
-
page: 2,
|
11
|
-
perPage: 5,
|
12
|
-
perPageOptions: [5, 10, 25],
|
13
|
-
},
|
14
|
-
itemCount: 52,
|
15
|
-
viewType: 'list',
|
16
|
-
});
|
17
|
-
|
18
|
-
describe('rendering', () => {
|
19
|
-
it('renders correctly', () => {
|
20
|
-
const component = shallow(<PaginationRow {...getBaseProps()} />);
|
21
|
-
|
22
|
-
expect(toJson(component)).toMatchSnapshot();
|
23
|
-
});
|
24
|
-
});
|
25
|
-
});
|
@@ -1,35 +0,0 @@
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
-
|
3
|
-
exports[`PaginationRow component rendering renders correctly 1`] = `
|
4
|
-
<Paginator
|
5
|
-
className=""
|
6
|
-
dropdownButtonId="pagination-row-dropdown"
|
7
|
-
itemCount={52}
|
8
|
-
messages={
|
9
|
-
Object {
|
10
|
-
"currentPage": "Current Page",
|
11
|
-
"firstPage": "First Page",
|
12
|
-
"lastPage": "Last Page",
|
13
|
-
"nextPage": "Next Page",
|
14
|
-
"of": "of",
|
15
|
-
"perPage": "per page",
|
16
|
-
"previousPage": "Previous Page",
|
17
|
-
}
|
18
|
-
}
|
19
|
-
onChange={[Function]}
|
20
|
-
onPageSet={[Function]}
|
21
|
-
onPerPageSelect={[Function]}
|
22
|
-
pagination={
|
23
|
-
Object {
|
24
|
-
"page": 2,
|
25
|
-
"perPage": 5,
|
26
|
-
"perPageOptions": Array [
|
27
|
-
5,
|
28
|
-
10,
|
29
|
-
25,
|
30
|
-
],
|
31
|
-
}
|
32
|
-
}
|
33
|
-
viewType="list"
|
34
|
-
/>
|
35
|
-
`;
|
@@ -1,94 +0,0 @@
|
|
1
|
-
import React, { Component } from 'react';
|
2
|
-
import PropTypes from 'prop-types';
|
3
|
-
import { Paginator } from 'patternfly-react';
|
4
|
-
import { isEqual } from 'lodash';
|
5
|
-
|
6
|
-
const defaultPerPageOptions = [5, 10, 15, 20, 25, 50];
|
7
|
-
|
8
|
-
const initPagination = (props) => {
|
9
|
-
const pagination = props.pagination || {};
|
10
|
-
// The default pagination is normally returned from server.
|
11
|
-
// This values are used only when there's some error in the server response.
|
12
|
-
const defaultPagination = {
|
13
|
-
page: 1,
|
14
|
-
perPage: 10,
|
15
|
-
perPageOptions: defaultPerPageOptions,
|
16
|
-
};
|
17
|
-
return { ...defaultPagination, ...pagination };
|
18
|
-
};
|
19
|
-
|
20
|
-
class PaginationRow extends Component {
|
21
|
-
constructor(props) {
|
22
|
-
super(props);
|
23
|
-
|
24
|
-
this.state = initPagination(this.props);
|
25
|
-
|
26
|
-
this.onPageSet = this.onPageSet.bind(this);
|
27
|
-
this.onPerPageSelect = this.onPerPageSelect.bind(this);
|
28
|
-
}
|
29
|
-
|
30
|
-
static getDerivedStateFromProps(newProps, prevState) {
|
31
|
-
if (!isEqual(newProps.pagination, prevState.pagination)) {
|
32
|
-
return { ...newProps.pagination };
|
33
|
-
}
|
34
|
-
return null;
|
35
|
-
}
|
36
|
-
|
37
|
-
onPageSet(page) {
|
38
|
-
this.update({ page });
|
39
|
-
this.props.onPageSet(page);
|
40
|
-
}
|
41
|
-
|
42
|
-
onPerPageSelect(perPage) {
|
43
|
-
this.update({ perPage, page: 1 });
|
44
|
-
this.props.onPerPageSelect(perPage);
|
45
|
-
}
|
46
|
-
|
47
|
-
update(changes) {
|
48
|
-
const newState = { ...this.state, ...changes };
|
49
|
-
this.setState(newState);
|
50
|
-
|
51
|
-
this.props.onChange({
|
52
|
-
page: newState.page,
|
53
|
-
perPage: newState.perPage,
|
54
|
-
});
|
55
|
-
}
|
56
|
-
|
57
|
-
render() {
|
58
|
-
const {
|
59
|
-
onPageSet, onPerPageSelect, pagination, ...otherProps
|
60
|
-
} = this.props;
|
61
|
-
|
62
|
-
return (
|
63
|
-
<Paginator
|
64
|
-
{...otherProps}
|
65
|
-
pagination={this.state}
|
66
|
-
onPageSet={this.onPageSet}
|
67
|
-
onPerPageSelect={this.onPerPageSelect}
|
68
|
-
/>
|
69
|
-
);
|
70
|
-
}
|
71
|
-
}
|
72
|
-
|
73
|
-
PaginationRow.defaultPerPageOptions = defaultPerPageOptions;
|
74
|
-
|
75
|
-
PaginationRow.defaultProps = {
|
76
|
-
onChange: () => {},
|
77
|
-
...Paginator.defaultProps,
|
78
|
-
};
|
79
|
-
|
80
|
-
PaginationRow.propTypes = {
|
81
|
-
/** page and per-page selection callback */
|
82
|
-
onChange: PropTypes.func,
|
83
|
-
pagination: PropTypes.shape({
|
84
|
-
/** the current page */
|
85
|
-
page: PropTypes.number,
|
86
|
-
/** the current per page setting */
|
87
|
-
perPage: PropTypes.number,
|
88
|
-
/** per page options */
|
89
|
-
perPageOptions: PropTypes.array,
|
90
|
-
}),
|
91
|
-
...Paginator.propTypes,
|
92
|
-
};
|
93
|
-
|
94
|
-
export default PaginationRow;
|