Commit 3e46965b authored by lafont's avatar lafont

Add a basic checking of the "query" parameter

To be compatible with Puppet 4.0.0 where recursive types
are not possible, the type checked here is not accurate.
Ideally, the type should be:

  Variant[String[1], StringTree]

where StringTree is defined (recursively) by:

  StringTree = Array[Variant[String, StringTree]]
parent 09d5383c
require 'puppet/util/puppetdb'
Puppet::Functions.create_function(:puppetdb_query) do
dispatch :puppetdb_query do
required_param 'Variant[String[1], Array[Data, 1]]', :query
def puppetdb_query(query)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment