-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Allow passing hostnames to $dhcp::host::ip #227
base: master
Are you sure you want to change the base?
Conversation
…a valid value in the `fixed-address` field.
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.
Can we add some tests here?
I think you should use a more explicit title for this PR
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.
So let's wait for some feedback from others regarding the parameter naming.
Apart from that can you please supply a unit test/acc test for this?
@@ -1,7 +1,7 @@ | |||
# == Define: dhcp::host | |||
# | |||
define dhcp::host ( | |||
Optional[Stdlib::IP::Address] $ip = undef, | |||
Optional[Stdlib::Host] $ip = undef, |
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.
The naming of the parameter must also be changed in my opinion. From a user point of view still having to specify ip parameter when I can also sent FQDN towards it is a bit confusing. This does however causes some backwards compatability issue's. My suggestion would be to implement a new parameter called $host which is of type stdlib::host make a check, which checks if either $ip or $host is set. If $ip is set raise a deprication warning that $ip will be removed in the next version.
What do others think of this?
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.
@zyronix agreed, don't forget to update the documentation!
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 agree that as a user this would confuse me and a rename is in order.
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 apologize for taking so long to respond. I agree that the $ip
parameter should be changed to something like $host
. I originally left it as-is since it would probably break a lot of users dhcp::host:
configuration. I can provide some unit tests once I get those setup. Due to time constraints, it might take me until next week.
@@ -14,6 +14,7 @@ | |||
Optional[Integer] $mtu = undef, | |||
String $domain_name = '', | |||
$ignore_unknown = undef, | |||
Optional[Integer] $max_lease_time = undef, |
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.
Adding this parameter isn't related to changing the above datatype, right? In that case, can you please submit it as a new pull request?
Dear @dwest-galois, thanks for the PR! This is Vox Pupuli Tasks, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase? You can find my sourcecode at voxpupuli/vox-pupuli-tasks |
Pull Request (PR) description
This changes the $ip validation so that you can use a valid
fqdn
value in addition toipv4
andipv6
to determine which IP should be allocated to a host. This uses DNS lookups based on thefqdn
in thefixed-address
field. The result is that you can manage all of your IP allocation from DNS instead of having to duplicate the same information in DHCP.I also added an optional parameter that allows you to specify the
max-lease-time
in the each DHCP pools scope, which will override the default value indhcpd.conf
. This allows you to have different lease times for different pools.This Pull Request (PR) fixes the following issues
Fixes #224