Commit 80356d27 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[5484] Grammar updated to handle new Cassandra parameters

parent 4eb1198b
......@@ -430,6 +430,46 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"reconnect-wait-time\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp4Parser::make_RECONNECT_WAIT_TIME(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("reconnect-wait-time", driver.loc_);
}
}
\"request-timeout\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp4Parser::make_REQUEST_TIMEOUT(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("request-timeout", driver.loc_);
}
}
\"tcp-keepalive\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp4Parser::make_TCP_KEEPALIVE(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("tcp-keepalive", driver.loc_);
}
}
\"tcp-nodelay\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp4Parser::make_TCP_NODELAY(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("tcp-nodelay", driver.loc_);
}
}
\"contact-points\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
......
......@@ -85,6 +85,9 @@ using namespace std;
KEYSPACE "keyspace"
MAX_RECONNECT_TRIES "max-reconnect-tries"
RECONNECT_WAIT_TIME "reconnect-wait-time"
REQUEST_TIMEOUT "request-timeout"
TCP_KEEPALIVE "tcp-keepalive"
TCP_NODELAY "tcp-nodelay"
VALID_LIFETIME "valid-lifetime"
RENEW_TIMER "renew-timer"
......@@ -587,6 +590,9 @@ database_map_param: database_type
| contact_points
| max_reconnect_tries
| reconnect_wait_time
| request_timeout
| tcp_keepalive
| tcp_nodelay
| keyspace
| unknown_map_entry
;
......@@ -661,6 +667,26 @@ connect_timeout: CONNECT_TIMEOUT COLON INTEGER {
ctx.stack_.back()->set("connect-timeout", n);
};
reconnect_wait_time: RECONNECT_WAIT_TIME COLON INTEGER {
ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("reconnect-wait-time", n);
}
request_timeout: REQUEST_TIMEOUT COLON INTEGER {
ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("request-timeout", n);
}
tcp_keepalive: TCP_KEEPALIVE COLON INTEGER {
ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("tcp-keepalive", n);
}
tcp_nodelay: TCP_NODELAY COLON BOOLEAN {
ElementPtr n(new BoolElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("tcp-nodelay", n);
}
contact_points: CONTACT_POINTS {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
......
......@@ -595,6 +595,46 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"reconnect-wait-time\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
case isc::dhcp::Parser6Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp6Parser::make_RECONNECT_WAIT_TIME(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("reconnect-wait-time", driver.loc_);
}
}
\"request-timeout\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
case isc::dhcp::Parser6Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp6Parser::make_REQUEST_TIMEOUT(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("request-timeout", driver.loc_);
}
}
\"tcp-keepalive\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
case isc::dhcp::Parser6Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp6Parser::make_TCP_KEEPALIVE(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("tcp-keepalive", driver.loc_);
}
}
\"tcp-nodelay\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
case isc::dhcp::Parser6Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp6Parser::make_TCP_NODELAY(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("tcp-nodelay", driver.loc_);
}
}
\"contact-points\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
......
......@@ -73,6 +73,10 @@ using namespace std;
MAX_RECONNECT_TRIES "max-reconnect-tries"
RECONNECT_WAIT_TIME "reconnect-wait-time"
KEYSPACE "keyspace"
RECONNECT_WAIT_TIME "reconnect-wait-time"
REQUEST_TIMEOUT "request-timeout"
TCP_KEEPALIVE "tcp-keepalive"
TCP_NODELAY "tcp-nodelay"
PREFERRED_LIFETIME "preferred-lifetime"
VALID_LIFETIME "valid-lifetime"
......@@ -557,6 +561,9 @@ database_map_param: database_type
| contact_points
| max_reconnect_tries
| reconnect_wait_time
| request_timeout
| tcp_keepalive
| tcp_nodelay
| keyspace
| unknown_map_entry
;
......@@ -631,6 +638,26 @@ connect_timeout: CONNECT_TIMEOUT COLON INTEGER {
ctx.stack_.back()->set("connect-timeout", n);
};
reconnect_wait_time: RECONNECT_WAIT_TIME COLON INTEGER {
ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("reconnect-wait-time", n);
}
request_timeout: REQUEST_TIMEOUT COLON INTEGER {
ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("request-timeout", n);
}
tcp_keepalive: TCP_KEEPALIVE COLON INTEGER {
ElementPtr n(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("tcp-keepalive", n);
}
tcp_nodelay: TCP_NODELAY COLON BOOLEAN {
ElementPtr n(new BoolElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("tcp-nodelay", n);
}
contact_points: CONTACT_POINTS {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
......
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