-
Notifications
You must be signed in to change notification settings - Fork 130
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
Use puppet4 functions-api #402
Conversation
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.
This is great! It was on my list to pick up and I greatly appreciate this.
|
||
Puppet::Functions.create_function(:'foreman_proxy::get_network_in_addr') do | ||
dispatch :get_network_in_addr do | ||
required_param 'String', :addr |
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.
I'd prefer full names (address
and netmask
) for readability. Also wondering if we should use the ip address type from stdlib and remove the begin/rescue code around the IPAddr.new
calls.
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.
Looks good to me.
untested, but looks good 👍 |
merged, danke @juliantodt! |
The legacy puppet3 functions-api should be avoided.
This migrates the existing function and its test to the new api and uses it in the module.