PQL: How to filter "ensure => present"

15 views
Skip to first unread message

Dirk Heinrichs

unread,
Sep 11, 2019, 10:01:37 AM9/11/19
to puppet...@googlegroups.com
Hi,

I'm currently struggling with a PQL query, which should return a set of resources depending on their "ensure" parameter. Following the example shown here, I tried the following:

puppet query 'resources {type="Sometype" and tag="Sometag" and exported=true and parameters.ensure="present"}'

which results in the following syntax error:

Error response 400 Bad Request from server: PQL parse error at line 1, column 88:
 
resources {type="St_device" and tag="TestGrid" and exported=true and parameters.ensure="present"}
                                                                                       ^ 
Expected one of: [...]

I also tried present (w/o quoting), but that just sets the marker after the closing }.

Any idea what the correct syntax is here?

Thanks...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

Austin Blatt

unread,
Sep 11, 2019, 12:13:52 PM9/11/19
to puppet...@googlegroups.com, Dirk Heinrichs

Hi Dirk,

You're hitting a bug that we've documented in PDB-3284. You need to add a space before the = after dotted fields like "parameters.ensure" (so it should look like parameters.ensure ="present" at the very least, but I'd suggest a space on both sides of the =). Let me know if you run into any other problems!

- Austin

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/44bbf09bd8128d8cf7837718cd25d4bcfdd10395.camel%40opentext.com.

Dirk Heinrichs

unread,
Sep 12, 2019, 1:44:23 AM9/12/19
to puppet...@googlegroups.com
Am Mittwoch, den 11.09.2019, 09:13 -0700 schrieb Austin Blatt:

You're hitting a bug that we've documented in PDB-3284. You need to add a space before the = after dotted fields like "parameters.ensure" (so it should look like parameters.ensure ="present" at the very least, but I'd suggest a space on both sides of the =). Let me know if you run into any other problems!

Yep, that solved it. Thanks a lot.

Bye...
Reply all
Reply to author
Forward
0 new messages