BIND 10 #2853: Python wrapper of data source extensions
BIND 10 Development
do-not-reply at isc.org
Wed Jun 12 11:11:14 UTC 2013
#2853: Python wrapper of data source extensions
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner:
Type: task | vorner
Priority: medium | Status:
Component: data source | reviewing
Keywords: | Milestone:
Sensitive: 0 | Sprint-20130625
Sub-Project: DNS | Resolution:
Estimated Difficulty: 5 | CVSS Scoring:
Total Hours: 0 | Defect Severity: N/A
| Feature Depending on Ticket:
| shared memory data source
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Changes (by muks):
* owner: muks => vorner
Comment:
Hi Michal
Replying to [comment:20 vorner]:
> Hello
>
> Replying to [comment:19 muks]:
> > > 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?
> >
> > This is an argument to the C++ `ZoneWriter` constructor. On purpose,
> > it's not possible to directly construct a `ZoneWriter` using the
> > Python API. But the `ZoneWriter` API documentation indicates how the
> > methods behave for the corresponding constructor arguments.
>
> OK, maybe I wasn't clear what I mean. If I'm a python programmer and
> read the documentation, I read about `catch_load_error`. But I'm
> confused, because I don't see where I set that.
Hmm. I don't know how to properly state it though. I mean, if in the
Python code you have a `ZoneWriter` object somewhere, its behavior
depends on how it was constructed. The Python code does not construct
it, so how do I describe its behaviour correctly then? If I state it one
way or the other, it could be incorrect depending on what returned the
`ZoneWriter` and if such code changes in the future.
----
Hi Jinmei
Replying to [comment:21 jinmei]:
> This seems to be problematic:
>
> {{{#!cpp
> PyObject *tup = Py_BuildValue("(ssI)",
> status[i].getName().c_str(),
>
status[i].getSegmentType().c_str(),
> status[i].getSegmentState());
> }}}
>
> because if the state is unused, getSegmentType() throws.
I have added code to handle this exception, and also updated the C++
`getStatus()` implementation to be more correct (#2943 should be a
duplicate now). However, from the Python code I can't find a way to
trigger that exception to test it.
--
Ticket URL: <http://bind10.isc.org/ticket/2853#comment:22>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list