Sha256: 35c52f28a437a1b9fa91c31727be0d91a8076527c7a87199c540ddb2648b5f94

Contents?: true

Size: 855 Bytes

Versions: 55

Compression:

Stored size: 855 Bytes

Contents

class Puppet::Network::HTTP::API::Master::V3
  require 'puppet/network/http/api/master/v3/authorization'
  require 'puppet/network/http/api/master/v3/environments'
  require 'puppet/network/http/api/master/v3/environment'
  require 'puppet/network/http/api/indirected_routes'

  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)

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

Version data entries

55 entries across 55 versions & 2 rubygems

Version Path
puppet-retrospec-1.5.0 vendor/gems/puppet-4.5.2/lib/puppet/network/http/api/master/v3.rb
puppet-retrospec-1.4.1 vendor/gems/puppet-4.5.2/lib/puppet/network/http/api/master/v3.rb
puppet-retrospec-1.4.0 vendor/gems/puppet-4.5.2/lib/puppet/network/http/api/master/v3.rb
puppet-retrospec-1.3.2 vendor/gems/puppet-4.5.2/lib/puppet/network/http/api/master/v3.rb
puppet-retrospec-1.3.1 vendor/gems/puppet-4.5.2/lib/puppet/network/http/api/master/v3.rb
puppet-retrospec-1.3.0 vendor/gems/puppet-4.5.2/lib/puppet/network/http/api/master/v3.rb
puppet-retrospec-1.2.1 vendor/gems/puppet-4.5.2/lib/puppet/network/http/api/master/v3.rb
puppet-retrospec-1.2.0 vendor/gems/puppet-4.5.2/lib/puppet/network/http/api/master/v3.rb
puppet-4.6.2 lib/puppet/network/http/api/master/v3.rb
puppet-4.6.2-x86-mingw32 lib/puppet/network/http/api/master/v3.rb
puppet-4.6.2-x64-mingw32 lib/puppet/network/http/api/master/v3.rb
puppet-4.6.2-universal-darwin lib/puppet/network/http/api/master/v3.rb
puppet-4.6.1-x86-mingw32 lib/puppet/network/http/api/master/v3.rb
puppet-4.6.1 lib/puppet/network/http/api/master/v3.rb
puppet-4.6.1-x64-mingw32 lib/puppet/network/http/api/master/v3.rb
puppet-4.6.1-universal-darwin lib/puppet/network/http/api/master/v3.rb
puppet-retrospec-1.1.0 vendor/gems/puppet-4.5.2/lib/puppet/network/http/api/master/v3.rb
puppet-4.5.3 lib/puppet/network/http/api/master/v3.rb
puppet-4.5.3-x86-mingw32 lib/puppet/network/http/api/master/v3.rb
puppet-4.5.3-x64-mingw32 lib/puppet/network/http/api/master/v3.rb