# File lib/puppet/network/handler/resource.rb, line 28
28:         def apply(bucket, format = "yaml", client = nil, clientip = nil)
29:             unless local?
30:                 begin
31:                     case format
32:                     when "yaml"
33:                         bucket = YAML::load(Base64.decode64(bucket))
34:                     else
35:                         raise Puppet::Error, "Unsupported format '%s'" % format
36:                     end
37:                 rescue => detail
38:                     raise Puppet::Error, "Could not load YAML TransBucket: %s" % detail
39:                 end
40:             end
41: 
42:             catalog = bucket.to_catalog
43: 
44:             # And then apply the catalog.  This way we're reusing all
45:             # the code in there.  It should probably just be separated out, though.
46:             transaction = catalog.apply
47: 
48:             # And then clean up
49:             catalog.clear(true)
50: 
51:             # It'd be nice to return some kind of report, but... at this point
52:             # we have no such facility.
53:             return "success"
54:         end