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:
45:
46: transaction = catalog.apply
47:
48:
49: catalog.clear(true)
50:
51:
52:
53: return "success"
54: end