-
Notifications
You must be signed in to change notification settings - Fork 44
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
relax parsing rules to accept openbsd's dhcpd.leases format #29
base: master
Are you sure you want to change the base?
Conversation
ignore 'UTC' suffix on time fields record with missing binding_state defaults to 'active' interpret 'abandoned;' field as 'binding_state abandoned;" added test case for openbsd dhcpd.leases added Makefile for `make test`
2 similar comments
Thanks for the PR!, the code looks good but the unit test is broken because you've added a method to the test case with the same name as another method, so most tests don't run currently. |
self.binding_state = 'active' | ||
|
||
# support 'abandoned' property for openbsd dhcpd.leases compatibility | ||
if 'abandonded' in properties: |
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.
s/abandonded/abandoned/ ?
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.
Yes, thank you.
Hello, |
I made these changes because I needed this to run on my OpenBSD 6.4 system, which uses a dhcpd that is derived from isc-dhcpd. The dhcpd.leases file has minor differences which required changes to the parser. The existing tests all still pass.
These changes allow the module to read the OpenBSD lease file:
ignore 'UTC' suffix on time fields
record with missing binding_state defaults to 'active'
interpret 'abandoned;' field as 'binding_state abandoned;"
added test case for openbsd dhcpd.leases
added Makefile for
make test