Commit c08b8695 authored by Evan Hunt's avatar Evan Hunt

Change libauth to libdatasrc

git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1799 e5f2f494-b856-4b98-b285-d166d9295462
parent f791a5a0
......@@ -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 *
......
SUBDIRS = exceptions dns cc config auth python
SUBDIRS = exceptions dns cc config datasrc python
if HAVE_BOOST_PYTHON
if HAVE_BOOST_SYSTEM
SUBDIRS += xfr
......
......@@ -6,8 +6,8 @@ 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
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
- change filenames so we don't have everything starting with "data_source_"?
- 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 {
......
SUBDIRS = auth cc config # Util
SUBDIRS = datasrc cc config # Util
python_PYTHON = __init__.py
......
import isc.auth
import isc.datasrc
import isc.cc
import isc.config
from isc.auth.master import *
from isc.auth.sqlite3_ds import *
python_PYTHON = __init__.py master.py sqlite3_ds.py
pythondir = $(pyexecdir)/isc/auth
pythondir = $(pyexecdir)/isc/datasrc
from isc.datasrc.master import *
from isc.datasrc.sqlite3_ds import *
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment