Douglas, I've started my tests with Python + Puppet Yaml yesterday, based on http://www.mailinglistarchive.com/html/[email protected]/2010-05/msg00539.html, and I'm having the same difficulties. I shall keep working on this script today and I'll post the solution, if I can find it.
2010/9/28 Douglas Garstang <[email protected]> > 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.constructor.ConstructorError: expected a mapping node, but found > scalar" > > On the ruby/sym line: > !ruby/sym config_retrieval: 0.853000164031982 > > I don't know how to define the classes to accept a scalar data type rather > than a mapping node data type, and Mr Google is giving me ZERO answers. > > Doug. > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<puppet-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- Eduardo S. Scarpellini <[email protected]> -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
