Skip to content
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

Merged
merged 20 commits into from
Apr 14, 2014
Merged

Conversation

gcmalloc
Copy link
Contributor

  • 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.
@solarkennedy
Copy link
Collaborator

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.

@gcmalloc
Copy link
Contributor Author

I added some validation, and a policy setting for the forwarder.
Also I implemented some test, I can add some more if you require so.
Thanks for the feedback.

fatal("You cannot specify a global forwarder and \
a zone forwarder for zone ${soa}")
}
if !member(['first', 'only'], $forward_policy) {
Copy link
Collaborator

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.

@gcmalloc
Copy link
Contributor Author

ok, I will write moar test

end

context 'when ask to have a only forward policy' do
Copy link
Collaborator

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"

@solarkennedy
Copy link
Collaborator

This is getting really close! A very solid PR.

@gcmalloc
Copy link
Contributor Author

also added a bit of documentation with an example in the README :)

@solarkennedy
Copy link
Collaborator

@danzilio @ajjahn do either of you guys want to chime in regarding this PR? I give it a shipit.

@danzilio
Copy link
Collaborator

Looks good to me!

solarkennedy added a commit that referenced this pull request Apr 14, 2014
Adding a forward option for a zone.
@solarkennedy solarkennedy merged commit 09176e3 into ajjahn:master Apr 14, 2014
@solarkennedy
Copy link
Collaborator

Thanks @gcmalloc for working so hard to make this such a great contribution!

@gcmalloc
Copy link
Contributor Author

Thanks to you for the hard work !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants