Sha256: ba416cdd8dadcc8c1bf6090e1e82f58d728995b9d498eaea7e4b22d3d8e68c67

Contents?: true

Size: 715 Bytes

Versions: 205

Compression:

Stored size: 715 Bytes

Contents

class Puppet::Network::HTTP::API::IndirectionType

  INDIRECTION_TYPE_MAP = {
    "certificate" => :ca,
    "certificate_request" => :ca,
    "certificate_revocation_list" => :ca,
    "certificate_status" => :ca
  }

  def self.master_url_prefix
    "#{Puppet::Network::HTTP::MASTER_URL_PREFIX}/v3"
  end

  def self.ca_url_prefix
    "#{Puppet::Network::HTTP::CA_URL_PREFIX}/v1"
  end

  def self.type_for(indirection)
    INDIRECTION_TYPE_MAP[indirection] || :master
  end

  def self.url_prefix_for(indirection_name)
    case type_for(indirection_name)
    when :ca
      ca_url_prefix
    when :master
      master_url_prefix
    else
      raise ArgumentError, "Not a valid indirection type"
    end
  end
end

Version data entries

205 entries across 205 versions & 3 rubygems

Version Path
puppet-retrospec-1.8.0 vendor/pup410/lib/puppet/network/http/api/indirection_type.rb
puppet-retrospec-1.7.0 vendor/pup410/lib/puppet/network/http/api/indirection_type.rb
puppet-4.10.12 lib/puppet/network/http/api/indirection_type.rb
puppet-4.10.12-x86-mingw32 lib/puppet/network/http/api/indirection_type.rb
puppet-4.10.12-x64-mingw32 lib/puppet/network/http/api/indirection_type.rb
puppet-4.10.12-universal-darwin lib/puppet/network/http/api/indirection_type.rb
puppet-4.10.11 lib/puppet/network/http/api/indirection_type.rb
puppet-4.10.11-x86-mingw32 lib/puppet/network/http/api/indirection_type.rb
puppet-4.10.11-x64-mingw32 lib/puppet/network/http/api/indirection_type.rb
puppet-4.10.11-universal-darwin lib/puppet/network/http/api/indirection_type.rb
puppet-4.10.10 lib/puppet/network/http/api/indirection_type.rb
puppet-4.10.10-x86-mingw32 lib/puppet/network/http/api/indirection_type.rb
puppet-4.10.10-x64-mingw32 lib/puppet/network/http/api/indirection_type.rb
puppet-4.10.10-universal-darwin lib/puppet/network/http/api/indirection_type.rb
bolt-0.15.0 vendored/puppet/lib/puppet/network/http/api/indirection_type.rb
bolt-0.14.0 vendored/puppet/lib/puppet/network/http/api/indirection_type.rb
bolt-0.13.0 vendored/puppet/lib/puppet/network/http/api/indirection_type.rb
puppet-retrospec-1.6.1 vendor/pup410/lib/puppet/network/http/api/indirection_type.rb
bolt-0.12.0 vendored/puppet/lib/puppet/network/http/api/indirection_type.rb
bolt-0.11.0 vendored/puppet/lib/puppet/network/http/api/indirection_type.rb