Sha256: 5faba8a610421c085e551ac52a88fa5c972ddd486d2a413346c648e0e5a785ea

Contents?: true

Size: 1.42 KB

Versions: 8

Compression:

Stored size: 1.42 KB

Contents

require 'pulp_docker_client'

module Katello
  module Pulp3
    class Repository
      class Docker < ::Katello::Pulp3::Repository
        def self.api_client(smart_proxy)
          PulpDockerClient::ApiClient.new(smart_proxy.pulp3_configuration(PulpDockerClient::Configuration))
        end

        def api_exception_class
          PulpDockerClient::ApiError
        end

        def remote_class
          PulpDockerClient::DockerRemote
        end

        def remotes_api
          PulpDockerClient::RemotesDockerApi.new(api_client)
        end

        def distribution_class
          PulpDockerClient::DockerDistribution
        end

        def distributions_api
          PulpDockerClient::DistributionsDockerApi.new(api_client)
        end

        def remote_options
          if root.url.blank?
            super
          else
            options = {url: root.url, upstream_name: root.docker_upstream_name}
            if root.docker_tags_whitelist && root.docker_tags_whitelist.any?
              options[:whitelist_tags] = root.docker_tags_whitelist.join(",")
            else
              options[:whitelist_tags] = nil
            end
            common_remote_options.merge(options)
          end
        end

        def distribution_options(path)
          {
            base_path: path,
            repository_version: repo.version_href,
            name: "#{backend_object_name}"
          }
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
katello-3.13.4 app/services/katello/pulp3/repository/docker.rb
katello-3.13.3 app/services/katello/pulp3/repository/docker.rb
katello-3.13.2 app/services/katello/pulp3/repository/docker.rb
katello-3.13.1 app/services/katello/pulp3/repository/docker.rb
katello-3.13.0 app/services/katello/pulp3/repository/docker.rb
katello-3.13.0.rc2.1 app/services/katello/pulp3/repository/docker.rb
katello-3.13.0.rc2 app/services/katello/pulp3/repository/docker.rb
katello-3.13.0.rc1 app/services/katello/pulp3/repository/docker.rb