Sha256: 17e7674a83bf29e7db1a9adbdd1633be1ffc1092122cfa6501cbfc1a854c957a

Contents?: true

Size: 1.52 KB

Versions: 6

Compression:

Stored size: 1.52 KB

Contents

module Katello
  module Pulp
    class Repository
      class Docker < ::Katello::Pulp::Repository
        def generate_master_importer
          config = {
            feed: root.url,
            upstream_name: root.docker_upstream_name,
            tags: root.docker_tags_whitelist,
            enable_v1: false
          }
          importer_class.new(config.merge(master_importer_connection_options))
        end

        def generate_mirror_importer
          pulp_uri = URI.parse(SmartProxy.pulp_master.pulp_url)
          config = {
            feed: "https://#{pulp_uri.host.downcase}:#{Setting['pulp_docker_registry_port']}",
            upstream_name: repo.container_repository_name,
            enable_v1: false
          }
          importer_class.new(config.merge(mirror_importer_connection_options))
        end

        def generate_distributors
          [Runcible::Models::DockerDistributor.new(:protected => !root.unprotected,
                                                  :id => repo.pulp_id,
                                                  :auto_publish => true,
                                                  :repo_registry_id => repo.container_repository_name)]
        end

        def external_url(_force_https = false)
          pulp_uri = URI.parse(SmartProxy.pulp_master.pulp_url)
          "#{pulp_uri.host.downcase}:#{Setting['pulp_docker_registry_port']}/#{repo.container_repository_name}"
        end

        def importer_class
          Runcible::Models::DockerImporter
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
katello-3.10.2 app/services/katello/pulp/repository/docker.rb
katello-3.10.1.1 app/services/katello/pulp/repository/docker.rb
katello-3.10.1 app/services/katello/pulp/repository/docker.rb
katello-3.10.0 app/services/katello/pulp/repository/docker.rb
katello-3.10.0.rc1.1 app/services/katello/pulp/repository/docker.rb
katello-3.10.0.rc1 app/services/katello/pulp/repository/docker.rb