Sha256: 35c1b1ce59d7c4c741434957af49d7b30786c76dfa333d039801bbb853a0281c

Contents?: true

Size: 1.33 KB

Versions: 4

Compression:

Stored size: 1.33 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 client_class
          PulpAnsibleClient
        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.chomp("/"), requirements_file: root.ansible_collection_requirements.blank? ? nil : root.ansible_collection_requirements)
          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

4 entries across 4 versions & 1 rubygems

Version Path
katello-3.14.1 app/services/katello/pulp3/repository/ansible_collection.rb
katello-3.14.0 app/services/katello/pulp3/repository/ansible_collection.rb
katello-3.14.0.rc2 app/services/katello/pulp3/repository/ansible_collection.rb
katello-3.14.0.rc1 app/services/katello/pulp3/repository/ansible_collection.rb