BIND 10 #466: duplicate code in xfrout
BIND 10 Development
do-not-reply at isc.org
Sat Jan 8 02:41:32 UTC 2011
#466: duplicate code in xfrout
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner: jinmei
Type: defect | Status: reviewing
Priority: minor | Milestone: y2 12 month
Component: xfrout | milestone
Keywords: | Resolution:
Estimated Number of Hours: 0.0 | Sensitive: 0
Billable?: 1 | Add Hours to Ticket: 0
Internal?: 0 | Total Hours: 0
-------------------------------------+-------------------------------------
Comment (by jinmei):
Replying to [comment:2 zzchen_pku]:
> Updated in origin/trac466, since this ticket is created by you, please
take a look at it, thanks.
>
First off, I made a minor style fix to the branch.
'''xfrout.py.in'''
- I think _zone_is_empty() is not intuitive in the context of how it is
used and what it actually does. What it actually does is to test if a
specified zone has an SOA RR. That is, it could return True even if a
zone isn't "empty" (in that it has some RRs). I'd rename it to
zone_has_soa(), and use it with "not".
- I'd like to see more description for _zone_is_empty() and
_zone_exist(). Specifically, I'd like to see an explanation how we use
these two sets of functions.
'''sqlite3_ds.py'''
- zone_exist doesn't have a test. This probably also means it wasn't
developed in test driven, and if really not, it's not good (TDD is
especially important when we introduce a new thing, because it would
affect how we design it). If my guess is correct, I'd suggest delete
zone_exist once, and restart it from the scratch in TDD (of course it's a
waste in some sense, but we need some redundant practice to change our
mindset)
- I'd like zone_exist (or whatever new result) to have more complete
pydoc style documentation. It would include description of param/return,
and provide more detailed explanation (e.g. what "zone exists" means),
explain in which case an exception can be raised and which exception.
--
Ticket URL: <http://bind10.isc.org/ticket/466#comment:3>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list