On Friday, November 29, 2013 2:58:19 AM UTC-6, David Portabella wrote:
>
> is there a way to validate a hiera database against a schema?
>


Not that I know of, no.  Did you have a particular schema language in mind?

 

> the validation could be done as a whole (but that might not make sense, as 
> the effective hierarchy depends on the context), 
> or better, when calling hiera('myvar') from puppet (for instance).
>
>

Then it sounds like you are asking more about validating individual data 
items.  Puppet still doesn't have general-purpose schema validation for 
such things, but you can write context-specific validation in DSL or as one 
or more custom functions.

 

> or maybe, this could be a new function (in puppet-stdlibs) 
> *validate_against_schema($myvar, 
> $schema).*
>
> does this feature make sense?
>


Not without a particular schema language attached to it.  And maybe not 
with one.  It is not immediately evident to me that describing the expected 
form of the data in some schema language and then using that to validate 
would be in any way better than writing appropriate validation code in 
either Puppet DSL (for use in a Puppet manifest) or Ruby (for a custom 
function).  You have to write custom code any way you do it, so what is the 
advantage of adding another language to the mix?

 

> is it planned?
>
>

I suspect not.


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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/d1007049-a101-4863-ad04-cf51a99b2a50%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to