Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
ac368207
Commit
ac368207
authored
Dec 13, 2012
by
Jelte Jansen
Browse files
[2542] Update doc for create_zone wrapper
And a minor cleanup in the code
parent
5d7e273a
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/lib/datasrc/client.h
View file @
ac368207
...
...
@@ -368,7 +368,7 @@ public:
/// \return The number of zones known to this datasource
virtual
unsigned
int
getZoneCount
()
const
;
/// \brief Create a zone in the data
bas
e
/// \brief Create a zone in the data
sourc
e
///
/// Creates a new (empty) zone in the data source backend, which
/// can subsequently be filled with data (through getUpdater()).
...
...
src/lib/python/isc/datasrc/client_inc.cc
View file @
ac368207
...
...
@@ -89,18 +89,32 @@ None\n\
"
;
const
char
*
const
DataSourceClient_createZone_doc
=
"\
create_zone(name) -> bool
ean
\n
\
create_zone(name) -> bool
\n
\
\n
\
Create
s
a
new (empty)
zone in the data source
backend
.
\n
\
Create a zone in the data source.
\n
\
\n
\
Datasources can throw isc.NotImplemented
\n
\
Creates a new (empty) zone in the data source backend, which can
\n
\
subsequently be filled with data (through get_updater()).
\n
\
\n
\
Any other internal error will be raised as an isc.datasrc.Error exception
\n
\
Note: This is a tentative API, and this method is likely to change or
\n
\
be removed in the near future. For that reason, it currently provides
\n
\
a default implementation that throws NotImplemented.
\n
\
\n
\
Apart from the two exceptions mentioned below, in theory this call can
\n
\
throw anything, depending on the implementation of the datasource
\n
\
backend.
\n
\
\n
\
Exceptions:
\n
\
NotImplemented If the datasource backend does not support direct
\n
\
zone creation.
\n
\
DataSourceError If something goes wrong in the data source while
\n
\
creating the zone.
\n
\
\n
\
Parameters:
\n
\
name
A
(fully qualified)
domain
name f
or
the zone to
be
create
d.
\n
\
name
The
(fully qualified) name
o
f the zone to create
\n
\
\n
\
Return Value(s): True if the zone has been created, False if it already existed
\n
\
Return Value(s): True if the zone was added, False if it already
\n
\
existed
\n
\
"
;
const
char
*
const
DataSourceClient_getIterator_doc
=
"\
...
...
src/lib/python/isc/datasrc/client_python.cc
View file @
ac368207
...
...
@@ -97,8 +97,7 @@ DataSourceClient_createZone(PyObject* po_self, PyObject* args) {
PyObject
*
name
;
if
(
PyArg_ParseTuple
(
args
,
"O!"
,
&
name_type
,
&
name
))
{
try
{
const
bool
result
=
self
->
client
->
createZone
(
PyName_ToName
(
name
));
if
(
result
)
{
if
(
self
->
client
->
createZone
(
PyName_ToName
(
name
)))
{
Py_RETURN_TRUE
;
}
else
{
Py_RETURN_FALSE
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment