13 #include <boost/algorithm/string.hpp>
14 #include <boost/foreach.hpp>
15 #include <boost/lexical_cast.hpp>
24 CfgDbAccess::CfgDbAccess()
25 : appended_parameters_(), lease_db_access_(
"type=memfile"),
26 host_db_access_(), ip_reservations_unique_(true) {
44 std::list<std::string>
46 std::list<std::string> ret;
48 if (!dbaccess.empty()) {
71 for (std::string& hds : host_db_access_list) {
86 "non unique IP reservations (ip-reservations-unique=false) "
87 "because some host backends in use do not support this "
static HostMgr & instance()
Returns a sole instance of the HostMgr.
std::list< std::string > host_db_access_
Holds host database access strings.
static void destroy()
Destroy lease manager.
void setIPReservationsUnique(const bool unique)
Modifies the setting imposing whether the IP reservations are unique or can be non unique...
std::string getLeaseDbAccessString() const
Retrieves lease database access string.
std::list< std::string > getHostDbAccessStringList() const
Retrieves host database access string.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
static bool registeredFactory(const std::string &db_type)
Check if a host data source factory was registered.
static void create()
Creates new instance of the HostMgr.
std::string lease_db_access_
Holds lease database access string.
std::string getHostDbAccessString() const
Retrieves host database access string.
bool ip_reservations_unique_
Holds the setting whether IP reservations should be unique or can be non-unique.
std::string getAccessString(const std::string &access_string) const
Returns lease or host database access string.
Defines the logger used by the top-level component of kea-dhcp-ddns.
void createManagers() const
Creates instance of lease manager and host data sources according to the configuration specified...
static void create(const std::string &dbaccess)
Create an instance of a lease manager.
A generic exception that is thrown if a function is called in a prohibited way.
static void addBackend(const std::string &access)
Add an alternate host backend (aka host data source).
static bool checkCacheBackend(bool logging=false)
Check for the cache host backend.
std::string appended_parameters_
Parameters to be appended to the database access strings.