Commit c4414e78 authored by Francis Dupont's avatar Francis Dupont

[575-cb-cmds-unknown-fields-in-arguments-should-raise-an-error] Added metadata...

[575-cb-cmds-unknown-fields-in-arguments-should-raise-an-error] Added metadata and fixed server tests
parent 6fce342c
......@@ -724,7 +724,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, configSet) {
" {\"subnet\": \"192.2.1.0/24\", \n"
" \"pools\": [{ \"pool\": \"192.2.1.1-192.2.1.50\" }]}\n";
string bad_subnet =
" {\"BOGUS\": \"192.2.2.0/24\", \n"
" {\"comment\": \"192.2.2.0/24\", \n"
" \"pools\": [{ \"pool\": \"192.2.2.1-192.2.2.50\" }]}\n";
string subnet_footer =
" ] \n";
......@@ -923,7 +923,7 @@ TEST_F(CtrlChannelDhcpv4SrvTest, configTest) {
" {\"subnet\": \"192.2.1.0/24\", \n"
" \"pools\": [{ \"pool\": \"192.2.1.1-192.2.1.50\" }]}\n";
string bad_subnet =
" {\"BOGUS\": \"192.2.2.0/24\", \n"
" {\"comment\": \"192.2.2.0/24\", \n"
" \"pools\": [{ \"pool\": \"192.2.2.1-192.2.2.50\" }]}\n";
string subnet_footer =
" ] \n";
......
......@@ -500,7 +500,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, configSet) {
" {\"subnet\": \"3003::/64\", \n"
" \"pools\": [{ \"pool\": \"3003::100-3003::200\" }]}\n";
string bad_subnet =
" {\"BOGUS\": \"3005::/64\", \n"
" {\"comment\": \"3005::/64\", \n"
" \"pools\": [{ \"pool\": \"3005::100-3005::200\" }]}\n";
string subnet_footer =
" ] \n";
......@@ -645,7 +645,7 @@ TEST_F(CtrlChannelDhcpv6SrvTest, configTest) {
" {\"subnet\": \"3003::/64\", \n"
" \"pools\": [{ \"pool\": \"3003::100-3003::200\" }]}\n";
string bad_subnet =
" {\"BOGUS\": \"3005::/64\", \n"
" {\"comment\": \"3005::/64\", \n"
" \"pools\": [{ \"pool\": \"3005::100-3005::200\" }]}\n";
string subnet_footer =
" ] \n";
......
......@@ -122,7 +122,8 @@ OptionDefParser::OPTION_DEF_PARAMETERS = {
{ "encapsulate", Element::string },
{ "array", Element::boolean, },
{ "user-context", Element::map },
{ "comment", Element::string }
{ "comment", Element::string },
{ "metadata", Element::map }
};
OptionDefParser::OptionDefParser(const uint16_t address_family)
......@@ -387,7 +388,8 @@ PoolParser::POOL_PARAMETERS = {
{ "client-class", Element::string },
{ "require-client-classes", Element::list },
{ "user-context", Element::map },
{ "comment", Element::string }
{ "comment", Element::string },
{ "metadata", Element::map }
};
void
......@@ -716,7 +718,8 @@ Subnet4ConfigParser::SUBNET4_PARAMETERS = {
{ "comment", Element::string },
{ "calculate-tee-times", Element::boolean },
{ "t1-percent", Element::real },
{ "t2-percent", Element::real }
{ "t2-percent", Element::real },
{ "metadata", Element::map }
};
Subnet4ConfigParser::Subnet4ConfigParser()
......@@ -1061,7 +1064,8 @@ PdPoolParser::PD_POOL_PARAMETERS = {
{ "excluded-prefix", Element::string },
{ "excluded-prefix-len", Element::integer },
{ "user-context", Element::map },
{ "comment", Element::string }
{ "comment", Element::string },
{ "metadata", Element::map }
};
PdPoolParser::PdPoolParser() : options_(new CfgOption()) {
......@@ -1188,7 +1192,8 @@ Subnet6ConfigParser::SUBNET6_PARAMETERS = {
{ "comment", Element::string },
{ "calculate-tee-times", Element::boolean },
{ "t1-percent", Element::real },
{ "t2-percent", Element::real }
{ "t2-percent", Element::real },
{ "metadata", Element::map }
};
Subnet6ConfigParser::Subnet6ConfigParser()
......
......@@ -36,7 +36,8 @@ OptionDataParser::OPTION_PARAMETERS = {
{ "csv-format", Element::boolean },
{ "always-send", Element::boolean },
{ "user-context", Element::map },
{ "comment", Element::string }
{ "comment", Element::string },
{ "metadata", Element::map }
};
OptionDataParser::OptionDataParser(const uint16_t address_family,
......
......@@ -46,7 +46,8 @@ SharedNetwork4Parser::SHARED_NETWORK4_PARAMETERS = {
{ "comment", Element::string },
{ "calculate-tee-times", Element::boolean },
{ "t1-percent", Element::real },
{ "t2-percent", Element::real }
{ "t2-percent", Element::real },
{ "metadata", Element::map }
};
SharedNetwork4Ptr
......@@ -234,7 +235,8 @@ SharedNetwork6Parser::SHARED_NETWORK6_PARAMETERS = {
{ "comment", Element::string },
{ "calculate-tee-times", Element::boolean },
{ "t1-percent", Element::real },
{ "t2-percent", Element::real }
{ "t2-percent", Element::real },
{ "metadata", Element::map }
};
SharedNetwork6Ptr
......
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