I just removed all the lines that contained !ruby. It seems to work fine after that. Well I am only getting facts right now, I am sure the catalog may require additional effort.
tempstring = re.sub('.*\!ruby\/.*','',tempstring) If anyone is interested my git repo is here: git://github.com/logicminds/devops.git On Mar 16, 11:28 am, Markus Roberts <mar...@puppetlabs.com> wrote: > >> I am very new to yaml so I have to research your suggestions. It > > >> sounds like I'll need to create an object for the yaml output to map > > >> to though. > > > >> I'll respond back in the thread once I figure this out. > > > > It looks likr pyyaml does support loading foreign types (by mapping > > them). > > > Look for add_constructor on this page: > > >http://pyyaml.org/wiki/PyYAMLDocumentationfor some examples of how to > > do > > > this. You can probably get away with just making all ruby objects into > > > dictionaries for a start. > > > I've always done this in Python by specifying yaml tags, > > >http://groups.google.com/group/puppet-users/browse_thread/thread/eded... > > > 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 > > > but there are a few options here depending on what you're doing. > > I like that way! Nicely coupled to the intent. > > -- M > ----------------------------------------------------------- > When in trouble or in doubt, run in circles, > scream and shout. -- 1920's parody of the > maritime general prudential rule > ------------------------------------------------------------ -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.