From 3008d4da0da3faa03b1c5f50eee08dfffc14c51d Mon Sep 17 00:00:00 2001 From: Ian Ballou Date: Tue, 10 Oct 2023 16:19:20 +0000 Subject: [PATCH] Fixes #36820 - translate modulemd content counts --- app/models/katello/module_stream.rb | 2 +- app/services/katello/pulp3/pulp_content_unit.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/katello/module_stream.rb b/app/models/katello/module_stream.rb index 3885bb4eacb..a1cf82e3105 100644 --- a/app/models/katello/module_stream.rb +++ b/app/models/katello/module_stream.rb @@ -30,7 +30,7 @@ class ModuleStream < Katello::Model complete_value: false, operators: ["=", "~"] - CONTENT_TYPE = "modulemd".freeze + CONTENT_TYPE = "module_stream".freeze MODULE_STREAM_DEFAULT_CONTENT_TYPE = "modulemd_defaults".freeze def self.default_sort diff --git a/app/services/katello/pulp3/pulp_content_unit.rb b/app/services/katello/pulp3/pulp_content_unit.rb index 6dfc3b894d8..9718ca6fb5a 100644 --- a/app/services/katello/pulp3/pulp_content_unit.rb +++ b/app/services/katello/pulp3/pulp_content_unit.rb @@ -7,6 +7,7 @@ class PulpContentUnit # Any class that extends this class should define: # Class#update_model + # rubocop:disable Metrics/MethodLength def self.katello_name_from_pulpcore_name(pulpcore_name, repo) # Counts shouldn't be needed for more than the default generic content unit type. if repo.generic? @@ -25,6 +26,8 @@ def self.katello_name_from_pulpcore_name(pulpcore_name, repo) ::Katello::PackageGroup::CONTENT_TYPE when ::Katello::Pulp3::Erratum::PULPCORE_CONTENT_TYPE ::Katello::Erratum::CONTENT_TYPE + when ::Katello::Pulp3::ModuleStream::PULPCORE_CONTENT_TYPE + ::Katello::ModuleStream::CONTENT_TYPE when ::Katello::Pulp3::DockerTag::PULPCORE_CONTENT_TYPE ::Katello::DockerTag::CONTENT_TYPE when ::Katello::Pulp3::DockerManifest::PULPCORE_CONTENT_TYPE @@ -41,6 +44,7 @@ def self.katello_name_from_pulpcore_name(pulpcore_name, repo) pulpcore_name end end + # rubocop:enable Metrics/MethodLength def self.content_api fail NotImplementedError