1
class Puppet::Client::PElement < Puppet::Client
2
@drivername = :PElementServer
4
@handler = Puppet::Server::PElement
9
when Puppet::TransObject
10
tmp = Puppet::TransBucket.new
13
bucket.name = Facter["hostname"].value
14
bucket.type = "pelement"
15
when Puppet::TransBucket
18
raise Puppet::DevError, "You must pass a transportable object, not a %s" %
23
bucket = Base64.encode64(YAML::dump(bucket))
25
report = @driver.apply(bucket, "yaml")
30
def describe(type, name, retrieve = false, ignore = false)
31
Puppet.info "Describing %s[%s]" % [type, name]
32
text = @driver.describe(type, name, retrieve, ignore, "yaml")
38
object = YAML::load(Base64.decode64(text))
44
def initialize(hash = {})
45
if hash.include?(:PElementServer)
46
unless hash[:PElementServer].is_a?(Puppet::Server::PElement)
47
raise Puppet::DevError, "Must pass an actual PElement server object"
54
def list(type, ignore = false, base = false)
55
bucket = @driver.list(type, ignore, base, "yaml")
58
bucket = YAML::load(Base64.decode64(bucket))
65
# $Id: pelement.rb 1145 2006-04-28 04:08:38Z luke $