mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 05:55:28 +00:00
[#3536] moved lease and host backends
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <cc/command_interpreter.h>
|
||||
#include <config/command_mgr.h>
|
||||
#include <config/http_command_mgr.h>
|
||||
#include <database/database_connection.h>
|
||||
#include <database/dbaccess_parser.h>
|
||||
#include <database/backend_selector.h>
|
||||
#include <database/server_selector.h>
|
||||
@@ -46,6 +47,16 @@
|
||||
#include <util/encode/encode.h>
|
||||
#include <util/multi_threading_mgr.h>
|
||||
|
||||
#ifdef HAVE_MYSQL
|
||||
#include <mysql_lease_backend/mysql_lease_mgr.h>
|
||||
#include <mysql_host_backend/mysql_host_data_source.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PGSQL
|
||||
#include <pgsql_lease_backend/pgsql_lease_mgr.h>
|
||||
#include <pgsql_host_backend/pgsql_host_data_source.h>
|
||||
#endif
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
@@ -59,6 +70,7 @@
|
||||
using namespace isc::asiolink;
|
||||
using namespace isc::config;
|
||||
using namespace isc::data;
|
||||
using namespace isc::db;
|
||||
using namespace isc::dhcp;
|
||||
using namespace isc::hooks;
|
||||
using namespace isc::process;
|
||||
@@ -66,8 +78,25 @@ using namespace isc::util;
|
||||
using namespace isc;
|
||||
using namespace std;
|
||||
|
||||
//
|
||||
// Register database backends
|
||||
//
|
||||
namespace {
|
||||
|
||||
// Code will be moved to appropriate hook library.
|
||||
#ifdef HAVE_MYSQL
|
||||
// Database backend will be registered at object initialization
|
||||
MySqlLeaseMgrInit mysql_init_lease;
|
||||
MySqlHostDataSourceInit mysql_init_host;
|
||||
#endif
|
||||
|
||||
// Code will be moved to appropriate hook library.
|
||||
#ifdef HAVE_PGSQL
|
||||
// Database backend will be registered at object initialization
|
||||
PgSqlLeaseMgrInit pgsql_init_lease;
|
||||
PgSqlHostDataSourceInit pgsql_init_host;
|
||||
#endif
|
||||
|
||||
/// @brief Parser that takes care of global DHCPv4 parameters and utility
|
||||
/// functions that work on global level.
|
||||
///
|
||||
|
Reference in New Issue
Block a user