-
Notifications
You must be signed in to change notification settings - Fork 112
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
Adding a forward option for a zone. #46
Conversation
gcmalloc
commented
Apr 11, 2014
- Added a forward option to a zone
- Added the stdlib into the requirement for the module
This module was already used trough the array_validate in zone.pp. It is now explicitely declared in the Modulefile.
I like this, but you need to write some tests to ensure the right behavior in the different circumstances, and that valid bind syntax comes out when you provide the ip array. I would also like to see some validation, at least validate the array. |
I added some validation, and a policy setting for the forwarder. |
fatal("You cannot specify a global forwarder and \ | ||
a zone forwarder for zone ${soa}") | ||
} | ||
if !member(['first', 'only'], $forward_policy) { |
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 one way to do it, I would have used validate_re, but this works.
ok, I will write moar test |
end | ||
|
||
context 'when ask to have a only forward policy' do |
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 context line is incorrect and possibly confusing. How about "In the default case with no arguments"
This is getting really close! A very solid PR. |
also added a bit of documentation with an example in the README :) |
Looks good to me! |
Adding a forward option for a zone.
Thanks @gcmalloc for working so hard to make this such a great contribution! |
Thanks to you for the hard work ! |