Skip to content

Instantly share code, notes, and snippets.

@llowder
Created February 27, 2019 03:58
Show Gist options
  • Save llowder/14de6a1b0536917d20972fbe28de9ab2 to your computer and use it in GitHub Desktop.
Save llowder/14de6a1b0536917d20972fbe28de9ab2 to your computer and use it in GitHub Desktop.
# facts endpoint, query API V4, AST
'query=
["and",
["=", "name", "fact_one"],
["in", "certname",
["extract", "certname",
["and",
["select_facts",
["and",
["=", "name", "fact_two"],
["=", "value", "value_two"]
]
],
["select_facts",
["and",
["=", "name", "fact_three"]
]
]
]
]
]
]
'
# => No implementation of method: :-plan-> sql of protocol: #'puppetlabs.puppetdb.query-eng.engine/SQLGen found for class nil
# facts endpoint, query API V4, AST
'query=
["and",
["=", "name", "fact_one"],
["in", "certname",
["extract", "certname",
["and",
["select_facts",
["and",
["and",
["=", "name", "fact_two"],
["=", "value", "value_two"]
],
["=", "name", "fact_three"]
]
]
]
]
]
]
'
# => []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment