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