BIND 10 #2853: Python wrapper of data source extensions

BIND 10 Development do-not-reply at isc.org
Mon Jun 10 11:55:35 UTC 2013


#2853: Python wrapper of data source extensions
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:  muks
                Type:  task          |                       Status:
            Priority:  medium        |  reviewing
           Component:  data source   |                    Milestone:
            Keywords:                |  Sprint-20130611
           Sensitive:  0             |                   Resolution:
         Sub-Project:  DNS           |                 CVSS Scoring:
Estimated Difficulty:  5             |              Defect Severity:  N/A
         Total Hours:  0             |  Feature Depending on Ticket:
                                     |  shared memory data source
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
Changes (by vorner):

 * owner:  vorner => muks


Comment:

 Hello

 First, where is the `catch_load_error` thing? I can find it in
 documentation, but not in the code. Is it planned in future ticket?

 About the current code:

 This bit seems odd. Does it mean that when I get an empty list in C++, I
 get `None` in python, so I can't really write simple iteration with `for`
 and need to check for `None` first?
 {{{#!c++
     try {
         const std::vector<DataSourceStatus> status =
 self->cppobj->getStatus();
         if (status.empty()) {
             Py_RETURN_NONE;
         }
 }}}

 Is it really interesting to the user of the API that a function is a
 wrapper, that it is mentioned as the first thing in the documentation
 (with `get_cached_zone_writer` and `get_status`)? I believe that's more
 like an internal thing nobody from outside cares.

 Would this check be possible as some kind of decorator? Because it seems
 awkward to claim the test as passed when we skip it in fact:
 {{{#!python
         """
         Test find on a mapped segment.
         """
         if os.environ['HAVE_SHARED_MEMORY'] != 'yes':
             return
 }}}

 Should this be `True` instead of `false`?
 {{{#!python
   DataSourceError load related error (not thrown if constructed with\n\
              catch_load_error being false).\n\
 \n\
 }}}

 Should there be tests for the zone writer's methods throwing?

 I didn't review the new utility script (`doxygen2pydoc`) thoroughly, I
 don't think it is needed. But I noticed an oddity anyway. There's an `r`
 just before the top-level doxy comment. Is that on purpose, and if so,
 what does that mean?

 {{{#!python
 r"""
 }}}

-- 
Ticket URL: <http://bind10.isc.org/ticket/2853#comment:17>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list