The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

Feature #19431

Array/list operator

Added by Erik Dalén about 3 years ago. Updated over 2 years ago.

Status:AcceptedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Keywords:array list api Affected PuppetDB version:
Branch:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket is now tracked at: https://tickets.puppetlabs.com/browse/PDB-163


Description

When you have a array to match for it would be nice if you could use it directly with the in operator instead of having to do lots of ‘or’ statements.

For example, if I want to fetch the facts foo1, foo2, foo3, foo4 & foo5 in the current API this needs:

["or", ["=", "name", "foo1"], ["=", "name", "foo2"], ["=", "name", "foo3"], ["=", "name", "foo4"], ["=", "name", "foo5"]]

With a array/list operator this could instead be:

["in", "name", ["array", ["foo1", "foo2", "foo3", "foo4", "foo5"]]]

Related issues

Related to PuppetDB - Feature #20403: Support structured facts Accepted

History

#1 Updated by Ken Barber about 3 years ago

  • Status changed from Unreviewed to Accepted

#2 Updated by Charlie Sharpsteen over 2 years ago

Redmine Issue #19431 has been migrated to JIRA:

https://tickets.puppetlabs.com/browse/PDB-163

Also available in: Atom PDF