mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-29 04:57:52 +00:00
Change libauth to libdatasrc
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1799 e5f2f494-b856-4b98-b285-d166d9295462
This commit is contained in:
parent
f791a5a057
commit
c08b86957c
@ -391,7 +391,7 @@ AC_CONFIG_FILES([Makefile
|
||||
src/lib/cc/Makefile
|
||||
src/lib/python/Makefile
|
||||
src/lib/python/isc/Makefile
|
||||
src/lib/python/isc/auth/Makefile
|
||||
src/lib/python/isc/datasrc/Makefile
|
||||
src/lib/python/isc/cc/Makefile
|
||||
src/lib/python/isc/cc/tests/Makefile
|
||||
src/lib/python/isc/config/Makefile
|
||||
@ -401,8 +401,8 @@ AC_CONFIG_FILES([Makefile
|
||||
src/lib/dns/Makefile
|
||||
src/lib/dns/tests/Makefile
|
||||
src/lib/exceptions/Makefile
|
||||
src/lib/auth/Makefile
|
||||
src/lib/auth/tests/Makefile
|
||||
src/lib/datasrc/Makefile
|
||||
src/lib/datasrc/tests/Makefile
|
||||
src/lib/xfr/Makefile
|
||||
])
|
||||
AC_OUTPUT([src/bin/cfgmgr/b10-cfgmgr.py
|
||||
|
@ -27,8 +27,8 @@ pkglibexec_PROGRAMS = b10-auth
|
||||
b10_auth_SOURCES = auth_srv.cc auth_srv.h
|
||||
b10_auth_SOURCES += common.h
|
||||
b10_auth_SOURCES += main.cc
|
||||
b10_auth_LDADD = $(top_builddir)/src/lib/auth/.libs/libauth.a
|
||||
b10_auth_LDADD += $(top_builddir)/src/lib/dns/.libs/libdns.a
|
||||
b10_auth_LDADD = $(top_builddir)/src/lib/datasrc/.libs/libdatasrc.a
|
||||
b10_auth_LDADD += $(top_builddir)/src/lib/dns/.libs/libdns.a
|
||||
b10_auth_LDADD += $(top_builddir)/src/lib/config/.libs/libcfgclient.a
|
||||
b10_auth_LDADD += $(top_builddir)/src/lib/cc/libcc.a
|
||||
b10_auth_LDADD += $(top_builddir)/src/lib/exceptions/.libs/libexceptions.a
|
||||
|
@ -33,10 +33,10 @@
|
||||
#include <cc/data.h>
|
||||
#include <exceptions/exceptions.h>
|
||||
|
||||
#include <auth/query.h>
|
||||
#include <auth/data_source.h>
|
||||
#include <auth/static_datasrc.h>
|
||||
#include <auth/sqlite3_datasrc.h>
|
||||
#include <datasrc/query.h>
|
||||
#include <datasrc/data_source.h>
|
||||
#include <datasrc/static_datasrc.h>
|
||||
#include <datasrc/sqlite3_datasrc.h>
|
||||
|
||||
#include <cc/data.h>
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
using namespace std;
|
||||
|
||||
using namespace isc;
|
||||
using namespace isc::auth;
|
||||
using namespace isc::datasrc;
|
||||
using namespace isc::dns;
|
||||
using namespace isc::dns::rdata;
|
||||
using namespace isc::data;
|
||||
|
@ -16,7 +16,7 @@ run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
|
||||
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
|
||||
run_unittests_LDADD = $(GTEST_LDADD)
|
||||
run_unittests_LDADD += $(SQLITE_LIBS)
|
||||
run_unittests_LDADD += $(top_builddir)/src/lib/auth/.libs/libauth.a
|
||||
run_unittests_LDADD += $(top_builddir)/src/lib/datasrc/.libs/libdatasrc.a
|
||||
run_unittests_LDADD += $(top_builddir)/src/lib/dns/.libs/libdns.a
|
||||
run_unittests_LDADD += $(top_builddir)/src/lib/config/.libs/libcfgclient.a
|
||||
run_unittests_LDADD += $(top_builddir)/src/lib/cc/libcc.a
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
import sys; sys.path.append ('@@PYTHONPATH@@')
|
||||
import re, getopt
|
||||
import isc.auth
|
||||
from isc.auth.master import MasterFile
|
||||
import isc.datasrc
|
||||
from isc.datasrc.master import MasterFile
|
||||
|
||||
#########################################################################
|
||||
# usage: print usage note and exit
|
||||
@ -71,10 +71,10 @@ def main():
|
||||
exit(1)
|
||||
|
||||
try:
|
||||
isc.auth.sqlite3_ds.load(dbfile, zone, master.zonedata)
|
||||
isc.datasrc.sqlite3_ds.load(dbfile, zone, master.zonedata)
|
||||
except Exception as e:
|
||||
print("Error loading database: " + str(e))
|
||||
exit(1)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main(datasrc
|
||||
|
@ -165,8 +165,8 @@ class XfrinConnection(asyncore.dispatcher):
|
||||
if ret == XFRIN_OK:
|
||||
self.log_msg(logstr + 'started')
|
||||
self._send_query(rr_type.AXFR())
|
||||
isc.auth.sqlite3_ds.load(self._db_file, self._zone_name,
|
||||
self._handle_xfrin_response)
|
||||
isc.datasrc.sqlite3_ds.load(self._db_file, self._zone_name,
|
||||
self._handle_xfrin_response)
|
||||
|
||||
self.log_msg(logstr + 'succeeded')
|
||||
|
||||
@ -174,7 +174,7 @@ class XfrinConnection(asyncore.dispatcher):
|
||||
self.log_msg(e)
|
||||
self.log_msg(logstr + 'failed')
|
||||
#TODO, recover data source.
|
||||
except isc.auth.sqlite3_ds.Sqlite3DSError as e:
|
||||
except isc.datasrc.sqlite3_ds.Sqlite3DSError as e:
|
||||
self.log_msg(e)
|
||||
self.log_msg(logstr + 'failed')
|
||||
finally:
|
||||
|
@ -22,7 +22,7 @@ import isc.cc
|
||||
import threading
|
||||
import struct
|
||||
import signal
|
||||
from isc.auth import sqlite3_ds
|
||||
from isc.datasrc import sqlite3_ds
|
||||
from socketserver import *
|
||||
import os
|
||||
from isc.config.ccsession import *
|
||||
|
@ -1,4 +1,4 @@
|
||||
SUBDIRS = exceptions dns cc config auth python
|
||||
SUBDIRS = exceptions dns cc config datasrc python
|
||||
if HAVE_BOOST_PYTHON
|
||||
if HAVE_BOOST_SYSTEM
|
||||
SUBDIRS += xfr
|
||||
|
@ -1,13 +0,0 @@
|
||||
SUBDIRS = . tests
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
|
||||
AM_CPPFLAGS += $(SQLITE_CFLAGS)
|
||||
|
||||
CLEANFILES = *.gcno *.gcda
|
||||
|
||||
lib_LTLIBRARIES = libauth.la
|
||||
libauth_la_SOURCES = data_source.h data_source.cc
|
||||
libauth_la_SOURCES += static_datasrc.h static_datasrc.cc
|
||||
libauth_la_SOURCES += sqlite3_datasrc.h sqlite3_datasrc.cc
|
||||
libauth_la_SOURCES += query.h query.cc
|
@ -1,2 +0,0 @@
|
||||
- change filenames so we don't have everything starting with "data_source_"?
|
||||
- store rdata in the database as binary blobs instead of text
|
13
src/lib/datasrc/Makefile.am
Normal file
13
src/lib/datasrc/Makefile.am
Normal file
@ -0,0 +1,13 @@
|
||||
SUBDIRS = . tests
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
|
||||
AM_CPPFLAGS += $(SQLITE_CFLAGS)
|
||||
|
||||
CLEANFILES = *.gcno *.gcda
|
||||
|
||||
lib_LTLIBRARIES = libdatasrc.la
|
||||
libdatasrc_la_SOURCES = data_source.h data_source.cc
|
||||
libdatasrc_la_SOURCES += static_datasrc.h static_datasrc.cc
|
||||
libdatasrc_la_SOURCES += sqlite3_datasrc.h sqlite3_datasrc.cc
|
||||
libdatasrc_la_SOURCES += query.h query.cc
|
1
src/lib/datasrc/TODO
Normal file
1
src/lib/datasrc/TODO
Normal file
@ -0,0 +1 @@
|
||||
- store rdata in the database as binary blobs instead of text
|
@ -49,7 +49,7 @@ using namespace isc::dns;
|
||||
using namespace isc::dns::rdata;
|
||||
|
||||
namespace isc {
|
||||
namespace auth {
|
||||
namespace datasrc {
|
||||
|
||||
typedef boost::shared_ptr<const Nsec3Param> ConstNsec3ParamPtr;
|
||||
|
@ -38,7 +38,7 @@ class RRset;
|
||||
class RRsetList;
|
||||
}
|
||||
|
||||
namespace auth {
|
||||
namespace datasrc {
|
||||
|
||||
class NameMatch;
|
||||
class Query;
|
@ -26,7 +26,7 @@
|
||||
using namespace isc::dns;
|
||||
|
||||
namespace isc {
|
||||
namespace auth {
|
||||
namespace datasrc {
|
||||
|
||||
QueryTask::QueryTask(const isc::dns::Name& n, const isc::dns::RRClass& c,
|
||||
const isc::dns::RRType& t, const isc::dns::Section& sect) :
|
@ -28,7 +28,7 @@
|
||||
|
||||
namespace isc {
|
||||
|
||||
namespace auth {
|
||||
namespace datasrc {
|
||||
|
||||
// An individual task to be carried out by the query logic
|
||||
class QueryTask {
|
@ -32,7 +32,7 @@ using namespace isc::dns;
|
||||
using namespace isc::dns::rdata;
|
||||
|
||||
namespace isc {
|
||||
namespace auth {
|
||||
namespace datasrc {
|
||||
|
||||
struct Sqlite3Parameters {
|
||||
Sqlite3Parameters() : db_(NULL), version_(-1),
|
@ -32,7 +32,7 @@ class RRType;
|
||||
class RRsetList;
|
||||
}
|
||||
|
||||
namespace auth {
|
||||
namespace datasrc {
|
||||
|
||||
class Query;
|
||||
struct Sqlite3Parameters;
|
@ -34,7 +34,7 @@ using namespace isc::dns;
|
||||
using namespace isc::dns::rdata;
|
||||
|
||||
namespace isc {
|
||||
namespace auth {
|
||||
namespace datasrc {
|
||||
|
||||
// This class stores the "static" data for the built-in static data source.
|
||||
// Since it's static, it could be literally static, i.e, defined as static
|
@ -37,7 +37,7 @@ class RRType;
|
||||
class RRsetList;
|
||||
}
|
||||
|
||||
namespace auth {
|
||||
namespace datasrc {
|
||||
|
||||
class Query;
|
||||
class NameMatch;
|
@ -19,7 +19,7 @@ run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
|
||||
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
|
||||
run_unittests_LDADD = $(GTEST_LDADD)
|
||||
run_unittests_LDADD += $(SQLITE_LIBS)
|
||||
run_unittests_LDADD += $(top_builddir)/src/lib/auth/.libs/libauth.a
|
||||
run_unittests_LDADD += $(top_builddir)/src/lib/datasrc/.libs/libdatasrc.a
|
||||
run_unittests_LDADD += $(top_builddir)/src/lib/dns/.libs/libdns.a
|
||||
run_unittests_LDADD += $(top_builddir)/src/lib/cc/libcc.a
|
||||
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/.libs/libexceptions.a
|
@ -34,9 +34,9 @@
|
||||
|
||||
#include <cc/data.h>
|
||||
|
||||
#include <auth/query.h>
|
||||
#include <auth/sqlite3_datasrc.h>
|
||||
#include <auth/static_datasrc.h>
|
||||
#include <datasrc/query.h>
|
||||
#include <datasrc/sqlite3_datasrc.h>
|
||||
#include <datasrc/static_datasrc.h>
|
||||
|
||||
#include <dns/tests/unittest_util.h>
|
||||
#include "test_datasrc.h"
|
||||
@ -45,7 +45,7 @@ using isc::UnitTestUtil;
|
||||
using namespace std;
|
||||
using namespace isc::dns;
|
||||
using namespace isc::dns::rdata;
|
||||
using namespace isc::auth;
|
||||
using namespace isc::datasrc;
|
||||
using namespace isc::data;
|
||||
|
||||
namespace {
|
@ -20,12 +20,12 @@
|
||||
#include <dns/rrtype.h>
|
||||
#include <dns/rrclass.h>
|
||||
|
||||
#include <auth/query.h>
|
||||
#include <datasrc/query.h>
|
||||
|
||||
namespace {
|
||||
|
||||
using namespace isc::dns;
|
||||
using namespace isc::auth;
|
||||
using namespace isc::datasrc;
|
||||
|
||||
|
||||
class QueryTest : public ::testing::Test {
|
@ -32,14 +32,14 @@
|
||||
#include <dns/rrsetlist.h>
|
||||
#include <cc/data.h>
|
||||
|
||||
#include <auth/query.h>
|
||||
#include <auth/data_source.h>
|
||||
#include <auth/sqlite3_datasrc.h>
|
||||
#include <datasrc/query.h>
|
||||
#include <datasrc/data_source.h>
|
||||
#include <datasrc/sqlite3_datasrc.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace isc::dns;
|
||||
using namespace isc::dns::rdata;
|
||||
using namespace isc::auth;
|
||||
using namespace isc::datasrc;
|
||||
using namespace isc::data;
|
||||
|
||||
namespace {
|
@ -31,14 +31,14 @@
|
||||
#include <dns/rrsetlist.h>
|
||||
#include <cc/data.h>
|
||||
|
||||
#include <auth/query.h>
|
||||
#include <auth/data_source.h>
|
||||
#include <auth/static_datasrc.h>
|
||||
#include <datasrc/query.h>
|
||||
#include <datasrc/data_source.h>
|
||||
#include <datasrc/static_datasrc.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace isc::dns;
|
||||
using namespace isc::dns::rdata;
|
||||
using namespace isc::auth;
|
||||
using namespace isc::datasrc;
|
||||
|
||||
namespace {
|
||||
class StaticDataSourceTest : public ::testing::Test {
|
@ -21,7 +21,7 @@
|
||||
#include <dns/tests/unittest_util.h>
|
||||
#include "test_datasrc.h"
|
||||
|
||||
#include <auth/data_source.h>
|
||||
#include <datasrc/data_source.h>
|
||||
|
||||
#include <dns/buffer.h>
|
||||
#include <dns/messagerenderer.h>
|
||||
@ -42,7 +42,7 @@ using namespace isc::dns;
|
||||
using namespace isc::dns::rdata;
|
||||
|
||||
namespace isc {
|
||||
namespace auth {
|
||||
namespace datasrc {
|
||||
|
||||
namespace {
|
||||
const Name example("example.com");
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <auth/data_source.h>
|
||||
#include <datasrc/data_source.h>
|
||||
|
||||
namespace isc {
|
||||
|
||||
@ -30,7 +30,7 @@ class RRType;
|
||||
class RRsetList;
|
||||
}
|
||||
|
||||
namespace auth {
|
||||
namespace datasrc {
|
||||
class Query;
|
||||
|
||||
class TestDataSrc : public DataSrc {
|
@ -1,4 +1,4 @@
|
||||
SUBDIRS = auth cc config # Util
|
||||
SUBDIRS = datasrc cc config # Util
|
||||
|
||||
python_PYTHON = __init__.py
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
import isc.auth
|
||||
import isc.datasrc
|
||||
import isc.cc
|
||||
import isc.config
|
||||
|
@ -1,2 +0,0 @@
|
||||
from isc.auth.master import *
|
||||
from isc.auth.sqlite3_ds import *
|
@ -1,3 +1,3 @@
|
||||
python_PYTHON = __init__.py master.py sqlite3_ds.py
|
||||
|
||||
pythondir = $(pyexecdir)/isc/auth
|
||||
pythondir = $(pyexecdir)/isc/datasrc
|
2
src/lib/python/isc/datasrc/__init__.py
Normal file
2
src/lib/python/isc/datasrc/__init__.py
Normal file
@ -0,0 +1,2 @@
|
||||
from isc.datasrc.master import *
|
||||
from isc.datasrc.sqlite3_ds import *
|
Loading…
x
Reference in New Issue
Block a user