search for: yaml_tag

Displaying 2 results from an estimated 2 matches for "yaml_tag".

2011 Oct 12
4
Python yaml help
...he object: The inventory document, from Puppet dashboard inventory service, looks like: --- !ruby/object:Puppet::Node::Facts name: pirates.uis.example.com values: productname: VMware Virtual Platform kernelmajversion: "2.6" My code: class PuppetFacts(yaml.YAMLObject): yaml_tag = u''!ruby/object:Puppet::Node::Facts'' def __init__(self, name, values): self.name = name self.values = values The attempt to load the doc results in: ConstructorError: could not determine a constructor for the tag ''!ruby/object:Puppet::Node::Facts&...
2010 Sep 28
13
Reading Puppet reports with Python
Has anyone got/seen Python code to read puppet reports? I added a bunch of these: class PuppetReport(yaml.YAMLObject): yaml_tag = u''!ruby/object:Puppet::Transaction::Report'' def __init__(self, host, logs, metrics, records, time): self.host = host self.logs = logs self.metrics = metrics self.records = records self.time = time However, the Python YAML parser fails with: "yaml.cons...