mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 14:05:33 +00:00
[2559] Add database access parser to DHCPv4 server
This commit is contained in:
@@ -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()) {
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user