Just did: https://tickets.puppetlabs.com/browse/PDB-341


On Tuesday, January 21, 2014 6:37:19 PM UTC+1, Ken Barber wrote:
>
> Yeah, that looks like a bug Akos. Can you file it? 
>
> On Tue, Jan 21, 2014 at 2:49 PM, jcbollinger 
> <[email protected]<javascript:>> 
> wrote: 
> > 
> > 
> > On Monday, January 20, 2014 9:17:39 AM UTC-6, ak0ska wrote: 
> >> 
> >> Hello, 
> >> 
> >> We wanted to created a query, which would check the hostgroup fact of 
> >> machines that apply a certain type of resource declared in a certain 
> >> manifest file. We wanted to use the 'select-resources' subquery as 
> follows: 
> >> 
> >> curl -G -H "Accept: application/json" localhost:8080/v3/facts 
> >> --data-urlencode 'query=["and",["=","name","hostgroup"], 
> >> ["in","certname",["extract","certname", ["select-resources", 
> ["and",["=", 
> >> "type", "Class"],["=","file","/path/to/mymanifest.pp"]]]]]]' 
> >> 
> >> This returns an error: "file is not a queryable object for resources". 
> >> According to the documentation, 'select-resources' takes any arguments 
> >> valid for /v3/resources endpoint. 
> >> 
> >> If we try the arguments of 'select-resources' directly to the resources 
> >> endpoint, we get valid results: 
> >> 
> >> curl -G -H "Accept: application/json" localhost:8080/v3/resources 
> >> --data-urlencode 'query=["and",["=", "type", 
> >> "Class"],["=","file","/path/to/mymanifest.pp"]]' 
> >> 
> >> lists all 'Class' type resources (and properties)  declared in 
> >> mymanifest.pp. 
> >> 
> >> If we try and query the "title" property, instead of the "file" 
> property 
> >> it works fine. Did we miss something? 
> > 
> > 
> > 
> > I read the docs the same way you do, and on that basis I see nothing 
> wrong 
> > with your query.  I would file a ticket. 
> > 
> > 
> > John 
> > 
> > -- 
> > 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 [email protected] <javascript:>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/puppet-users/3d02804b-7306-4671-a823-c40263448130%40googlegroups.com.
>  
>
> > 
> > For more options, visit https://groups.google.com/groups/opt_out. 
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/73834025-abab-4e22-a90b-93409e572139%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to