Class: Puppet::Network::HTTP::API::Master::V3

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/network/http/api/master/v3.rb

Defined Under Namespace

Classes: Authorization, Environment, Environments

Constant Summary collapse

AUTHZ =
Authorization.new
INDIRECTED =
Puppet::Network::HTTP::Route.
path(/.*/).
any(Puppet::Network::HTTP::API::IndirectedRoutes.new)
ENVIRONMENTS =
Puppet::Network::HTTP::Route.
    path(%r{^/environments$}).get(AUTHZ.wrap do
  Environments.new(Puppet.lookup(:environments))
end)
ENVIRONMENT =
Puppet::Network::HTTP::Route.
    path(%r{^/environment/[^/]+$}).get(AUTHZ.wrap do
  Environment.new
end)

Class Method Summary collapse

Class Method Details

.routesObject


23
24
25
26
27
# File 'lib/puppet/network/http/api/master/v3.rb', line 23

def self.routes
  Puppet::Network::HTTP::Route.path(%r{v3}).
      any.
      chain(ENVIRONMENTS, ENVIRONMENT, INDIRECTED)
end