HI, i''m currently trying to connect a rails app using the "her" gem/library (since active ressource is gone since rails 4) to Puppet''s REST API. Now, "her" or activeressource both speak json, while Puppet speaks pson, which should be nearly the same according to some posts here. Communication already works but it seems that the response objects are not decoded as they should. Is there any documentation around where the differences are? Google does not offer too much for "pson" :) BTW.: I''ve seen that there is a Ruby Puppet Module included since some releases, there''s not much documentation around there, has anyone already used it? thanks & best regards, Björn -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
> Found that pson ist just the pure json ruby gem, rebundled to aviod > conflicts, >but it seems that while normal json code gives me some kind of this {key:value, key2:value2}, puppet returns something like this: Puppet.find("johndoe.local") => #<Puppet(/production/facts) expiration="Tue Jul 02 10:21:52 +0200 2013" values={"blockdevice_hda_size"=>"4294965248", "blockdevices"=>"fd0,hda,sda", [...] so, key/value separated by "=>" instead of a colon. Any Ideas what I''m doing wrong? Or do I have a general comprehension problem how to handle this? :) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Seems that I had my Head in the sand... to close this: puppet sends a valid json structure, but there''s just one key ("values") returning a simle ruby hash: When having received a response ( with activeRessource or her) all it takes to get the values is: #"Puppet" is a module connected to my puppetmaster using the "her" gem. 2.0.0-p247 :023 > Puppet.find("johndoe.local").values[''uptime''] => "286 days" thats it :) Am Dienstag, 2. Juli 2013 13:08:46 UTC+2 schrieb bjoern pohl:> > HI, > i''m currently trying to connect a rails app using the "her" gem/library > (since active ressource is gone since rails 4) to Puppet''s REST API. > Now, "her" or activeressource both speak json, while Puppet speaks pson, > which should be nearly the same according to some posts here. > Communication already works but it seems that the response objects are not > decoded as they should. > Is there any documentation around where the differences are? Google does > not offer too much for "pson" :) > BTW.: I''ve seen that there is a Ruby Puppet Module included since some > releases, there''s not much documentation around there, has anyone already > used it? > > thanks & best regards, > Björn > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Possibly Parallel Threads
- handy tip against unhelpful "Could not intern from pson" error
- Puppet catalog transfer often gets truncated (Could not intern from pson: error)
- strange pson error...
- err: Could not retrieve catalog from remote server: Could not intern from pson: Could not convert from pson: Could not find relationship target "File[]"
- error: Could not intern from pson: source did not contain any PSON!