On 2018-09-14 17:13, Julio Guevara wrote:
/The <| |> operator finds ALL resources (regular, virtual and exported)
that match. It realizes those that are not already realized.

The <<| |>> operator finds ONLY exported resources. /
/
/
If that is the case, maybe documentation is miss-leading since it makes a clear distinction between the two types of collectors.

Yes, it is as it does not say that it works on all kinds of resources which allows the reader to think that it is linked to them being virtual. Feel free to add a ticket for documentation in Puppet's Jira.

I will see If I can come up with another solution for my code but with such limited set of logical operators it will be hard. I think It would be easier to just make a query with puppetdb_query and then import exported resources that match my criteria correctly.

That is what I recommend and what most users end up doing when their use case is not super trivial and works with the limitations of the collectors.

Best,
- henrik


Thanks

On Fri, Sep 14, 2018 at 8:07 AM Henrik Lindberg <henrik.lindb...@puppet.com <mailto:henrik.lindb...@puppet.com>> wrote:

    On 2018-09-14 14:47, jcbollinger wrote:
     >
     >
     > On Friday, September 14, 2018 at 3:10:59 AM UTC-5, Johan De Wit
    wrote:
     >
     >     Hi,
     >
     >     check this ticket. https://tickets.puppetlabs.com/browse/PUP-6723
     >     <https://tickets.puppetlabs.com/browse/PUP-6723>
     >
     >
     >     It is hard to explain, but the 'and' a resource collector
    does niot
     >     behave like the 'boolean and' as we expect this.
     >
     >
     >
     > I don't follow, Jo.  The issue described here is not about the
    search
     > expression, but the fact that an /ordinary/ resource collector
    imports
     > /exported/ resources declared by the node.  The presence or
    details of a
     > search expression is not relevant -- under no circumstances
    should this
     > happen.
     >
     > If this behavior is in fact happening, then I'd guess that Puppet is
     > failing to distinguish between (1) resources exported by the
    target node
     > and not imported, and (2) resources exported by any arbitrary
    node and
     > imported for the target node.  Alternatively, perhaps Puppet is more
     > simply just failing to distinguish between exported and virtual
     > resources declared by the target node.
     >

    The <| |> operator finds ALL resources (regular, virtual and exported)
    that match. It realizes those that are not already realized.

    The <<| |>> operator finds ONLY exported resources.

    The query must thus be written to take that into account.
    And THAT is where it becomes important how the != and == operators
    actually work.

    (I am in no way defending the way it works, but it will be very
    difficult to change without difficult to find silent backwards
    incompatibilities).

    - henrik

     >
     > 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 puppet-users+unsubscr...@googlegroups.com
    <mailto:puppet-users%2bunsubscr...@googlegroups.com>
     > <mailto:puppet-users+unsubscr...@googlegroups.com
    <mailto:puppet-users%2bunsubscr...@googlegroups.com>>.
     > To view this discussion on the web visit
     >
    
https://groups.google.com/d/msgid/puppet-users/a4c43871-cd4e-4e40-a23b-5fa44bfc0dfc%40googlegroups.com

     >
    
<https://groups.google.com/d/msgid/puppet-users/a4c43871-cd4e-4e40-a23b-5fa44bfc0dfc%40googlegroups.com?utm_medium=email&utm_source=footer>.
     > For more options, visit https://groups.google.com/d/optout.


--
    Visit my Blog "Puppet on the Edge"
    http://puppet-on-the-edge.blogspot.se/

-- You received this message because you are subscribed to a topic in
    the Google Groups "Puppet Users" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/puppet-users/6lgqC1HmKQk/unsubscribe.
    To unsubscribe from this group and all its topics, send an email to
    puppet-users+unsubscr...@googlegroups.com
    <mailto:puppet-users%2bunsubscr...@googlegroups.com>.
    To view this discussion on the web visit
    
https://groups.google.com/d/msgid/puppet-users/pngbmn%24lqt%241%40blaine.gmane.org.
    For more options, visit https://groups.google.com/d/optout.

--
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+unsubscr...@googlegroups.com <mailto:puppet-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CADzjYHEJ3VnvKiO8nB6kmDTe4JAaupm7VLyN0ePpb0DNhkJxeQ%40mail.gmail.com <https://groups.google.com/d/msgid/puppet-users/CADzjYHEJ3VnvKiO8nB6kmDTe4JAaupm7VLyN0ePpb0DNhkJxeQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.


--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/pngjiu%24sue%241%40blaine.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to