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

Constants

INDIRECTION_TYPE_MAP

Public Class Methods

ca_url_prefix() click to toggle source
   # File lib/puppet/network/http/api/indirection_type.rb
14 def self.ca_url_prefix
15   "#{Puppet::Network::HTTP::CA_URL_PREFIX}/v1"
16 end
master_url_prefix() click to toggle source
   # File lib/puppet/network/http/api/indirection_type.rb
10 def self.master_url_prefix
11   "#{Puppet::Network::HTTP::MASTER_URL_PREFIX}/v3"
12 end
type_for(indirection) click to toggle source
   # File lib/puppet/network/http/api/indirection_type.rb
18 def self.type_for(indirection)
19   INDIRECTION_TYPE_MAP[indirection] || :master
20 end
url_prefix_for(indirection_name) click to toggle source
   # File lib/puppet/network/http/api/indirection_type.rb
22 def self.url_prefix_for(indirection_name)
23   case type_for(indirection_name)
24   when :ca
25     ca_url_prefix
26   when :master
27     master_url_prefix
28   else
29     raise ArgumentError, _("Not a valid indirection type")
30   end
31 end