-
-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace deprecated validate_* functions #443
Replace deprecated validate_* functions #443
Conversation
7d50e03
to
2a706db
Compare
#} | ||
validate_re($version, concat(['system', 'pypy'], $valid_versions)) | ||
$allowed_versions = concat(['system', 'pypy'], $valid_versions) | ||
unless $version =~ Enum[$allowed_versions] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be unless $version in $allowed_versions
if it's an array? Not sure what the data type of $valid_versions
is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$valid_versions
, when taken from python::params
, is an array. But even if it would be a string, the concat()
would generate an array for $allowed_versions
. I guess one could also use the in
syntax you suggested. Not sure that the performance difference is.
Is there a better way to verify data type errors then matching it with a Regex? Because for some reasons the output changes between Puppet 4,5 and 6.... |
2a706db
to
583d68f
Compare
Sorry, this may now have some conflicts now that I merged #440 |
583d68f
to
13b725d
Compare
No worries! :) Rebased the branch. |
Thanks for the PR @baurmatt ! |
Pull Request (PR) description
This Pull Request (PR) fixes the following issues