Commit 8baed816 authored by Francis Dupont's avatar Francis Dupont

[5061] Added contact_points (and accept too contact-points) and keyspace

parent 621218be
......@@ -370,6 +370,36 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"keyspace\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp4Parser::make_KEYSPACE(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("keyspace", driver.loc_);
}
}
\"contact_points\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp4Parser::make_CONTACT_POINTS(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("contact_points", driver.loc_);
}
}
\"contact-points\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::LEASE_DATABASE:
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp4Parser::make_CONTACT_POINTS(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("contact-points", driver.loc_);
}
}
\"valid-lifetime\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
......
......@@ -77,6 +77,8 @@ using namespace std;
LFC_INTERVAL "lfc-interval"
READONLY "readonly"
CONNECT_TIMEOUT "connect-timeout"
CONTACT_POINTS "contact_points"
KEYSPACE "keyspace"
VALID_LIFETIME "valid-lifetime"
RENEW_TIMER "renew-timer"
......@@ -520,6 +522,8 @@ database_map_param: database_type
| lfc_interval
| readonly
| connect_timeout
| contact_points
| keyspace
| unknown_map_entry
;
......@@ -593,6 +597,23 @@ connect_timeout: CONNECT_TIMEOUT COLON INTEGER {
ctx.stack_.back()->set("connect-timeout", n);
};
contact_points: CONTACT_POINTS {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr cp(new StringElement($4, ctx.loc2pos(@4)));
ctx.stack_.back()->set("contact_points", cp);
ctx.leave();
};
keyspace: KEYSPACE {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr ks(new StringElement($4, ctx.loc2pos(@4)));
ctx.stack_.back()->set("keyspace", ks);
ctx.leave();
};
host_reservation_identifiers: HOST_RESERVATION_IDENTIFIERS {
ElementPtr l(new ListElement(ctx.loc2pos(@1)));
ctx.stack_.back()->set("host-reservation-identifiers", l);
......
......@@ -571,6 +571,36 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
}
}
\"keyspace\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
case isc::dhcp::Parser6Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp6Parser::make_KEYSPACE(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("keyspace", driver.loc_);
}
}
\"contact_points\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
case isc::dhcp::Parser6Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp6Parser::make_CONTACT_POINTS(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("contact_points", driver.loc_);
}
}
\"contact-points\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::LEASE_DATABASE:
case isc::dhcp::Parser6Context::HOSTS_DATABASE:
return isc::dhcp::Dhcp6Parser::make_CONTACT_POINTS(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("contact-points", driver.loc_);
}
}
\"preferred-lifetime\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
......
......@@ -68,6 +68,8 @@ using namespace std;
LFC_INTERVAL "lfc-interval"
READONLY "readonly"
CONNECT_TIMEOUT "connect-timeout"
CONTACT_POINTS "contact_points"
KEYSPACE "keyspace"
PREFERRED_LIFETIME "preferred-lifetime"
VALID_LIFETIME "valid-lifetime"
......@@ -505,6 +507,8 @@ database_map_param: database_type
| lfc_interval
| readonly
| connect_timeout
| contact_points
| keyspace
| unknown_map_entry
;
......@@ -578,6 +582,23 @@ connect_timeout: CONNECT_TIMEOUT COLON INTEGER {
ctx.stack_.back()->set("connect-timeout", n);
};
contact_points: CONTACT_POINTS {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr cp(new StringElement($4, ctx.loc2pos(@4)));
ctx.stack_.back()->set("contact_points", cp);
ctx.leave();
};
keyspace: KEYSPACE {
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr ks(new StringElement($4, ctx.loc2pos(@4)));
ctx.stack_.back()->set("keyspace", ks);
ctx.leave();
};
mac_sources: MAC_SOURCES {
ElementPtr l(new ListElement(ctx.loc2pos(@1)));
ctx.stack_.back()->set("mac-sources", l);
......
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