# File lib/puppet/network/handler/master.rb, line 44 44: def getconfig(facts, format = "marshal", client = nil, clientip = nil) 45: facts = decode_facts(facts) 46: 47: client ||= facts["hostname"] 48: 49: # Pass the facts to the fact handler 50: Puppet::Node::Facts.new(client, facts).save unless local? 51: 52: catalog = Puppet::Resource::Catalog.find(client) 53: 54: case format 55: when "yaml" 56: return CGI.escape(catalog.extract.to_yaml) 57: when "marshal" 58: return CGI.escape(Marshal.dump(catalog.extract)) 59: else 60: raise "Invalid markup format '#{format}'" 61: end 62: end