BIND 10 #2592: Implement additional getLease4() methods in memfile backend
BIND 10 Development
do-not-reply at isc.org
Wed Aug 14 12:03:23 UTC 2013
#2592: Implement additional getLease4() methods in memfile backend
-------------------------------------+-------------------------------------
Reporter: tomek | Owner:
Type: enhancement | dclink
Priority: medium | Status:
Component: dhcpdb | reviewing
Keywords: | Milestone:
Sensitive: 0 | Sprint-DHCP-20130821
Sub-Project: DHCP | Resolution:
Estimated Difficulty: 0 | CVSS Scoring:
Total Hours: 0 | Defect Severity: N/A
| Feature Depending on Ticket:
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Changes (by tomek):
* owner: tomek => dclink
Comment:
Thanks for your patch! I have reviewed it. It's almost good, but I have
some comments:
1. client-id in DHCPv4 is optional. There may be leases without client-id
and you tried to dereference it without checking if it's NULL or not. I
fixed that.
1. there were some odd line wraps. I think I fixed them all
1. there were white-space issues (trailing spaces, mostly). Fixed.
1. there are no unit-tests
The last problem is bigger than I initially though. It seems that we
didn't develop appropriate unit-tests for memfile for historical reasons
(it started as a dummy backend for testing before we had MySQL support,
but since it was so fast we decided to keep it).
I have refactored MySQL and memfile tests a bit. There is now a common
class called GenericLeaseMgrTest. It contains several utility functions
(like create dummy leases). That class is used in MySQL tests only, but
now it should be a almost simple copy-paste between MySQL and memfile
tests.
The code is available on branch trac2592.
Can you write some unit-tests for your getLease4() code? BTW that new
layout will be very useful for developing tests for your Postgres work as
well.
Besides unit-tests, there is one more outstanding thing here. I have
proposed ChangeLog entry. Check if it is ok for you. Also, how would you
like to be credited for the patch? By first and last name? By nickname? By
your affiliation? I was thinking about adding "Thanks to XXXX for
contributing a patch." to the ChangeLog entry.
I'm afraid you don't have write access to our git repo. Please submit a
patch against trac2952. Once you're done with the ticket, please reassign
it back to me.
--
Ticket URL: <http://bind10.isc.org/ticket/2592#comment:5>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list