Sha256: f0ba2b4df57525a14f389f29820df3cfd5c47e69e20a275e7e550add7b534905
Contents?: true
Size: 781 Bytes
Versions: 20
Compression:
Stored size: 781 Bytes
Contents
class Puppet::Network::HTTP::API::Master::V3 require 'puppet/network/http/api/master/v3/environments' require 'puppet/network/http/api/indirected_routes' def self.wrap(&block) lambda do |request, response| Puppet::Network::Authorization.check_external_authorization(request.method, request.path) block.call.call(request, response) end end INDIRECTED = Puppet::Network::HTTP::Route. path(/.*/). any(wrap { Puppet::Network::HTTP::API::IndirectedRoutes.new } ) ENVIRONMENTS = Puppet::Network::HTTP::Route. path(%r{^/environments$}). get(wrap { Environments.new(Puppet.lookup(:environments)) } ) def self.routes Puppet::Network::HTTP::Route.path(%r{v3}). any. chain(ENVIRONMENTS, INDIRECTED) end end
Version data entries
20 entries across 20 versions & 1 rubygems