Sha256: d9a4d1a24f70b9c2be1a665637f338549873e338b20e7648141789cefee09806

Contents?: true

Size: 1.36 KB

Versions: 28

Compression:

Stored size: 1.36 KB

Contents

module Katello
  module Pulp
    class Repository
      class File < ::Katello::Pulp::Repository
        REPOSITORY_TYPE = 'iso'.freeze

        def unit_keys(uploads)
          uploads.map do |upload|
            upload.except('id', 'content_unit_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
          yum_dist_id = repo.pulp_id
          options = {
            id: yum_dist_id,
            auto_publish: true
          }
          [Runcible::Models::IsoDistributor.new(repo.relative_path, repo.unprotected, true, options)]
        end

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

        def importer_class
          Runcible::Models::IsoImporter
        end

        def distributors_to_publish(_options)
          {Runcible::Models::IsoDistributor => {}}
        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

28 entries across 28 versions & 1 rubygems

Version Path
katello-3.16.2 app/services/katello/pulp/repository/file.rb
katello-3.16.1.2 app/services/katello/pulp/repository/file.rb
katello-3.16.1.1 app/services/katello/pulp/repository/file.rb
katello-3.16.1 app/services/katello/pulp/repository/file.rb
katello-3.17.0.rc1 app/services/katello/pulp/repository/file.rb
katello-3.16.0 app/services/katello/pulp/repository/file.rb
katello-3.16.0.rc5.1 app/services/katello/pulp/repository/file.rb
katello-3.16.0.rc5 app/services/katello/pulp/repository/file.rb
katello-3.16.0.rc4.1 app/services/katello/pulp/repository/file.rb
katello-3.15.3.1 app/services/katello/pulp/repository/file.rb
katello-3.15.3 app/services/katello/pulp/repository/file.rb
katello-3.16.0.rc4 app/services/katello/pulp/repository/file.rb
katello-3.16.0.rc3.1 app/services/katello/pulp/repository/file.rb
katello-3.15.2 app/services/katello/pulp/repository/file.rb
katello-3.16.0.rc3 app/services/katello/pulp/repository/file.rb
katello-3.16.0.rc2.1 app/services/katello/pulp/repository/file.rb
katello-3.16.0.rc2 app/services/katello/pulp/repository/file.rb
katello-3.15.1.1 app/services/katello/pulp/repository/file.rb
katello-3.16.0.rc1.1 app/services/katello/pulp/repository/file.rb
katello-3.15.1 app/services/katello/pulp/repository/file.rb