Sha256: 2463c96521e8a3c3c715e1318197c530204f796110dde10d31fb35bfba459e3c

Contents?: true

Size: 627 Bytes

Versions: 2

Compression:

Stored size: 627 Bytes

Contents

module Katello
  module Pulp3
    class MigrationPlan
      def initialize(repository_type_labels)
        @repository_types = repository_type_labels
      end

      def generate
        plan = {}
        plan[:plugins] = generate_plugins
        plan
      end

      def generate_plugins
        @repository_types.map do |repository_type|
          {
            type: pulp2_repository_type(repository_type)
          }
        end
      end

      def pulp2_repository_type(repository_type)
        Katello::RepositoryTypeManager.repository_types[repository_type].service_class::REPOSITORY_TYPE
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
katello-3.15.0.rc1.1 app/services/katello/pulp3/migration_plan.rb
katello-3.15.0.rc1 app/services/katello/pulp3/migration_plan.rb