2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00

[2559] Add database access parser to DHCPv4 server

This commit is contained in:
Stephen Morris
2013-01-11 08:38:05 +00:00
parent f4e272c729
commit 808decc6c1
2 changed files with 40 additions and 0 deletions

View File

@@ -18,6 +18,7 @@
#include <dhcp/libdhcp++.h>
#include <dhcp/option_definition.h>
#include <dhcpsrv/cfgmgr.h>
#include <dhcpsrv/dbaccess_parser.h>
#include <dhcpsrv/dhcp_config_parser.h>
#include <util/encode/hex.h>
#include <util/strutil.h>
@@ -1320,6 +1321,7 @@ DhcpConfigParser* createGlobalDhcp4ConfigParser(const std::string& config_id) {
factories["subnet4"] = Subnets4ListConfigParser::factory;
factories["option-data"] = OptionDataListParser::factory;
factories["version"] = StringParser::factory;
factories["lease-database"] = DbAccessParser::factory;
FactoryMap::iterator f = factories.find(config_id);
if (f == factories.end()) {

View File

@@ -70,6 +70,44 @@
}
},
{ "item_name": "lease-database",
"item_type": "map",
"item_optional": false,
"item_default": {"type": "memfile"},
"map_item_spec": [
{
"item_name": "type",
"item_type": "string",
"item_optional": false,
"item_default": ""
},
{
"item_name": "name",
"item_type": "string",
"item_optional": true,
"item_default": ""
},
{
"item_name": "user",
"item_type": "string",
"item_optional": true,
"item_default": ""
},
{
"item_name": "host",
"item_type": "string",
"item_optional": true,
"item_default": ""
},
{
"item_name": "password",
"item_type": "string",
"item_optional": true,
"item_default": ""
}
]
},
{ "item_name": "subnet4",
"item_type": "list",
"item_optional": false,