Ask Your Question

How to get class descriptions from RAKE API

asked 2014-10-02 13:56:18 -0600


I'm attempting to do some integration with VMware vCAC and need to retrieve class descriptions via the RAKE API (or other programmatic interface)

I'm getting the class list like this:

sudo /opt/puppet/bin/rake -f /opt/puppet/share/puppet-dashboard/Rakefile RAILS_ENV=production nodeclass:list

However, all I get back is the list of classes (no descriptions)

Is there a way to do this?



edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-05 08:35:14 -0600

jonn gravatar image

There sure is, you can use the resource types API (though I think it's only available via the HTTP API at the moment, not via a rake task).

The output from the API should look something like this:

# curl -k -H "Accept: pson" "https://puppetmaster:8140/production/resource_type/stdlib"  
{"doc":"Class: stdlib\n\nThis module manages stdlib. Most of stdlib's features are automatically\nloaded by Puppet, but this class should be declared in order to use the\nstandardized run stages.\n\nParameters: none\n\nActions:\n\n  Declares all other classes in the stdlib module. Currently, this consists\n  of stdlib::stages.\n\nRequires: nothing\n\n","line":16,"file":"/opt/puppet/share/puppet/modules/stdlib/manifests/init.pp","name":"stdlib","kind":"class"}
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2014-10-02 13:56:18 -0600

Seen: 68 times

Last updated: Oct 05 '14