BIND 10 #2051: python wrapper for datasrc::ClientList

BIND 10 Development do-not-reply at isc.org
Thu Jul 19 09:37:59 UTC 2012


#2051: python wrapper for datasrc::ClientList
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  vorner
  jinmei                             |                Status:  reviewing
                       Type:  task   |             Milestone:
                   Priority:         |  Sprint-20120731
  medium                             |            Resolution:
                  Component:  data   |             Sensitive:  0
  source                             |           Sub-Project:  DNS
                   Keywords:         |  Estimated Difficulty:  3
            Defect Severity:  N/A    |           Total Hours:  0
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Changes (by jelte):

 * owner:  jelte => vorner


Comment:

 Right, that reconfigure thingy makes it tricky, otherwise i'd suggest we
 handle the keepalive with increfs and decrefs (like for
 datasrc.get_iterator).

 I have one suggestion for the code, please add something like
 {{{
     } catch (const isc::data::JSONError& jse) {
         const string ex_what = std::string("JSON parse error in data
 source"
                                " configuration: ") + jse.what();
         PyErr_SetString(getDataSourceException("Error"), ex_what.c_str());
         return (NULL);
 }}}

 in ConfigurableClientList_configure; to provide a bit of context when
 passing it a bad string (currently it would then print for example
 {{{
 isc.datasrc.Error: error: unexpected character a in <string>:1:2
 }}}
 I think the exception type is ok, but it would be nice to know it's a JSON
 parse problem (and not something inside some data source somewhere)

 Also, there is a bit of dead code at the end of
 configurableclientlist_python.cc

 Other than that, I think the code is fine

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


More information about the bind10-tickets mailing list