Hello all,

We're working on some minor changes to the API for the resource_type
service (indirector) for Telly.  One of the main goals here is to improve /
enable support for parameterized classes in external tools by making it
easier to request information about them.

The proposed changes that we're working on are expressed in this ticket:

http://projects.puppetlabs.com/issues/14137

I'll paste in the description from the ticket as well.  If anyone has any
comments or concerns, they'd be greatly appreciated!  This does have the
potential to break backwards compatibility for tools that were relying on
this API (most likely via REST), but fixes should be trivial.

Thanks,
Chris

-------------------------------------------------------------------------------------------------------------------------
In order to improve the ability for an external tool to support
parameterized classes and other functionality, we need to make a few
improvements to the REST API for the resource_type service.

The main shortcomings with the current version are as follows:

1. The "search" mode does not support filtering by type; every query
returns instances of all three types (classes, defined types, and nodes).
2. The field names on the output objects are confusing.  They use
terminology / names like "hostclass" which are, for practical purposes,
internal / implementation-specific terminology.  The output should use
names that are more consistent with our documentation / DSL / external
exposure of these constructs (e.g. "class" instead of "hostclass").

Proposed changes:
-----------------

To address concern # 1 above, the proposal is to add support for a query
parameter to allow filtering by type.  So, e.g., you could issue a query
like this:

    curl -k -H "Accept: pson" "
https://localhost:8140/production/resource_type_search/*<b>?type=class</b>"

The new bit is the part in bold: <b>?type=class</b>.  This would also
support the values "defined_type" and "node".  The behavior would be to
simply filter the result set to the type that is specified by this query
parameter.

To address concern #2 above, we will modify the code that transforms the
objects to PSON before serializing them.  This will involve renaming
fields/values that are not named clearly (e.g. "hostclass"=>"class" as
mentioned above), and may also include eliminating some unnecessary fields
from the output.  I will add more comments to this ticket as I determine
what changes seem appropriate.

-- 
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.

Reply via email to