Feature #16421
closed
Support validate_legacy stdlib validation function
Added by Dominic Cleal over 8 years ago.
Updated about 8 years ago.
Description
stdlib has added a new validate_legacy function that modules will use to help migrate from validate_* to Puppet 4 data types. It allows the author to specify both the old validation function name (e.g. validate_string) and the new data type (Optional[String]
), then validates it against both (exact semantics listed at https://github.com/puppetlabs/puppetlabs-stdlib#validate_legacy).
This will probably require #14500 to fully implement.
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
- Status changed from Assigned to Rejected
- Assignee deleted (
Dominic Cleal)
I don't think this is valid in the context of Kafo, so closing. The function is Puppet 4 only, because it's implemented with the 4.x function API and uses 4.x types, but Kafo can only parse validation function calls in manifests under Puppet 3.x so it's unlikely to ever be invoked. (It would require generating a cache on 3.x but it cannot be run on 3.x.)
It may still be useful to implement the Stdlib::Compat* data types for Puppet 4-only manifests, since they may use these as a migration step between legacy validation functions and data types, but that can be done separately, even in another gem.
Also available in: Atom
PDF