Sha256: 6eb3607f705dedd3740438c648cfc106724eec95de7ca9b140ff57f576c9aa40

Contents?: true

Size: 1.08 KB

Versions: 5

Compression:

Stored size: 1.08 KB

Contents

module Katello
  module Pulp
    class Repository
      class File < ::Katello::Pulp::Repository
        def unit_keys(uploads)
          uploads.map do |upload|
            upload.except('id')
          end
        end

        def generate_master_importer
          config = { feed: root.url }
          importer_class.new(config.merge(master_importer_connection_options))
        end

        def generate_mirror_importer
          config = {
            feed: external_url
          }
          importer_class.new(config.merge(mirror_importer_connection_options))
        end

        def generate_distributors
          [Runcible::Models::IsoDistributor.new(repo.relative_path, repo.unprotected, true, auto_publish: true)]
        end

        def partial_repo_path
          "/pulp/isos/#{repo.relative_path}/"
        end

        def importer_class
          Runcible::Models::IsoImporter
        end

        def copy_contents(destination_repo, _options = {})
          @smart_proxy.pulp_api.extensions.file.copy(@repo.pulp_id, destination_repo.pulp_id, {})
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
katello-3.11.2 app/services/katello/pulp/repository/file.rb
katello-3.11.1 app/services/katello/pulp/repository/file.rb
katello-3.11.0 app/services/katello/pulp/repository/file.rb
katello-3.11.0.rc2 app/services/katello/pulp/repository/file.rb
katello-3.11.0.rc1 app/services/katello/pulp/repository/file.rb