Commit 8e7ec8f2 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰

[5014] Extended parser to support persist and enterprise-id

parent 0b9ce9b5
......@@ -141,6 +141,7 @@ JSONString \"{JSONStringCharacter}*\"
\"user\" { return isc::dhcp::Dhcp6Parser::make_USER(loc); }
\"password\" { return isc::dhcp::Dhcp6Parser::make_PASSWORD(loc); }
\"host\" { return isc::dhcp::Dhcp6Parser::make_HOST(loc); }
\"persist\" { return isc::dhcp::Dhcp6Parser::make_PERSIST(loc); }
\"preferred-lifetime\" { return isc::dhcp::Dhcp6Parser::make_PREFERRED_LIFETIME(loc); }
\"valid-lifetime\" { return isc::dhcp::Dhcp6Parser::make_VALID_LIFETIME(loc); }
......@@ -194,6 +195,7 @@ JSONString \"{JSONStringCharacter}*\"
\"identifier\" { return isc::dhcp::Dhcp6Parser::make_IDENTIFIER(loc); }
\"htype\" { return isc::dhcp::Dhcp6Parser::make_HTYPE(loc); }
\"time\" { return isc::dhcp::Dhcp6Parser::make_TIME(loc); }
\"enterprise-id\" { return isc::dhcp::Dhcp6Parser::make_ENTERPRISE_ID(loc); }
\"expired-leases-processing\" { return isc::dhcp::Dhcp6Parser::make_EXPIRED_LEASES_PROCESSING(loc); }
......
......@@ -58,6 +58,7 @@ using namespace std;
USER "user"
PASSWORD "password"
HOST "host"
PERSIST "persist"
PREFERRED_LIFETIME "preferred-lifetime"
VALID_LIFETIME "valid-lifetime"
......@@ -106,6 +107,7 @@ using namespace std;
IDENTIFIER "identifier"
HTYPE "htype"
TIME "time"
ENTERPRISE_ID "enterprise-id"
DHCP4O6_PORT "dhcp4o6-port"
......@@ -329,7 +331,8 @@ lease_database_map_param: type
| user
| password
| host
| name;
| name
| persist;
type: TYPE COLON STRING {
ElementPtr prf(new StringElement($3));
......@@ -356,6 +359,11 @@ name: NAME COLON STRING {
ctx.stack_.back()->set("name", n);
};
persist: PERSIST COLON BOOLEAN {
ElementPtr n(new BoolElement($3));
ctx.stack_.back()->set("persist", n);
};
mac_sources: MAC_SOURCES {
ElementPtr l(new ListElement());
ctx.stack_.back()->set("mac-sources", l);
......@@ -782,7 +790,8 @@ server_id_params: server_id_param
server_id_param: type
| identifier
| time
| htype;
| htype
| enterprise_id;
htype: HTYPE COLON INTEGER {
ElementPtr htype(new IntElement($3));
......@@ -798,6 +807,12 @@ time: TIME COLON INTEGER {
ElementPtr time(new IntElement($3));
ctx.stack_.back()->set("time", time);
};
enterprise_id: ENTERPRISE_ID COLON INTEGER {
ElementPtr time(new IntElement($3));
ctx.stack_.back()->set("enterprise-id", time);
};
// --- end of server-id --------------------------------------
dhcp4o6_port: DHCP4O6_PORT COLON INTEGER {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment