Sha256: 3688a9265e26a3b0805cea1a953ed9610c2fa3a10da0f228b87ad7c2b7f6d081

Contents?: true

Size: 1.2 KB

Versions: 8

Compression:

Stored size: 1.2 KB

Contents

require 'pulp_ansible_client'

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

        def api_exception_class
          PulpAnsibleClient::ApiError
        end

        def remote_class
          PulpAnsibleClient::CollectionRemote
        end

        def remotes_api
          PulpAnsibleClient::RemotesCollectionApi.new(api_client)
        end

        def distribution_class
          PulpAnsibleClient::AnsibleDistribution
        end

        def distributions_api
          PulpAnsibleClient::DistributionsAnsibleApi.new(api_client)
        end

        def remote_options
          if root.url.blank?
            super
          else
            common_remote_options.merge(url: root.url, whitelist: root.ansible_collection_whitelist)
          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/ansible_collection.rb
katello-3.13.3 app/services/katello/pulp3/repository/ansible_collection.rb
katello-3.13.2 app/services/katello/pulp3/repository/ansible_collection.rb
katello-3.13.1 app/services/katello/pulp3/repository/ansible_collection.rb
katello-3.13.0 app/services/katello/pulp3/repository/ansible_collection.rb
katello-3.13.0.rc2.1 app/services/katello/pulp3/repository/ansible_collection.rb
katello-3.13.0.rc2 app/services/katello/pulp3/repository/ansible_collection.rb
katello-3.13.0.rc1 app/services/katello/pulp3/repository/ansible_collection.rb