13#include <boost/algorithm/string.hpp>
14#include <boost/foreach.hpp>
15#include <boost/lexical_cast.hpp>
25 : appended_parameters_(), lease_db_access_(
"type=memfile"),
26 host_db_access_(), ip_reservations_unique_(true) {
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 "
A generic exception that is thrown if a function is called in a prohibited way.
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.
void createManagers() const
Creates instance of lease manager and host data sources according to the configuration specified.
std::string getHostDbAccessString() const
Retrieves host database access string.
std::list< std::string > host_db_access_
Holds host database access strings.
std::string appended_parameters_
Parameters to be appended to the database access strings.
CfgDbAccess()
Constructor.
std::list< std::string > getHostDbAccessStringList() const
Retrieves host database access string.
void setIPReservationsUnique(const bool unique)
Modifies the setting imposing whether the IP reservations are unique or can be non unique.
std::string lease_db_access_
Holds lease database access string.
std::string getLeaseDbAccessString() const
Retrieves lease database access string.
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.
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.
static HostMgr & instance()
Returns a sole instance of the HostMgr.
static void create(const std::string &dbaccess)
Create an instance of a lease manager.
static void destroy()
Destroy lease manager.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
Defines the logger used by the top-level component of kea-lfc.