Sha256: a99d397d1b6488e09ca1ecde4ebaf4879daa0fef1f554ef53a8f5edd5cbedf42
Contents?: true
Size: 843 Bytes
Versions: 235
Compression:
Stored size: 843 Bytes
Contents
require 'puppet/util/json' class Puppet::Network::HTTP::API::Master::V3::Environments def initialize(env_loader) @env_loader = env_loader end def call(request, response) response.respond_with(200, "application/json", Puppet::Util::Json.dump({ "search_paths" => @env_loader.search_paths, "environments" => Hash[@env_loader.list.collect do |env| [env.name, { "settings" => { "modulepath" => env.full_modulepath, "manifest" => env.manifest, "environment_timeout" => timeout(env), "config_version" => env.config_version || '', } }] end] })) end private def timeout(env) ttl = @env_loader.get_conf(env.name).environment_timeout if ttl == Float::INFINITY "unlimited" else ttl end end end
Version data entries
235 entries across 235 versions & 2 rubygems