}
}
+/* Add the dash alias */
+\"output-options\" {
+ switch(driver.ctx_) {
+ case ParserContext::LOGGERS:
+ return AgentParser::make_OUTPUT_OPTIONS(driver.loc_);
+ default:
+ return AgentParser::make_STRING("output-options", driver.loc_);
+ }
+}
+
\"output\" {
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
testParser(txt, ParserContext::PARSER_AGENT, false);
}
+// Test that output-options is an alias of output_options.
+TEST(ParserTest, outputDashOptions) {
+ string txt= "{ \"Control-agent\": {"
+ " \"loggers\": [ { "
+ " \"name\": \"kea-ctrl-agent\","
+ " \"output-options\": [ { \"output\": \"stdout\" } ],"
+ " \"severity\": \"INFO\" } ]"
+ "} }";
+ testParser(txt, ParserContext::PARSER_AGENT, false);
+}
+
/// @brief Loads specified example config file
///
/// This test loads specified example file twice: first, using the legacy
}
}
+/* Add the dash alias */
+\"output-options\" {
+ switch(driver.ctx_) {
+ case isc::d2::D2ParserContext::LOGGERS:
+ return isc::d2::D2Parser::make_OUTPUT_OPTIONS(driver.loc_);
+ default:
+ return isc::d2::D2Parser::make_STRING("output-options", driver.loc_);
+ }
+}
+
\"output\" {
switch(driver.ctx_) {
case isc::d2::D2ParserContext::OUTPUT_OPTIONS:
testParser(txt, D2ParserContext::PARSER_DHCPDDNS, false);
}
+// Test that output-options is an alias of output_options.
+TEST(ParserTest, outputDashOptions) {
+ string txt=
+ "{ \"DhcpDdns\" : \n"
+ "{ \n"
+ "\"loggers\": [ {\n"
+ " \"name\": \"kea-dhcp-ddns\",\n"
+ " \"output-options\": [ { \"output\": \"stdout\" } ],\n"
+ " \"severity\": \"INFO\" } ]\n"
+ "} \n"
+ "} \n";
+ testParser(txt, D2ParserContext::PARSER_DHCPDDNS, false);
+}
+
/// @brief Loads specified example config file
///
/// This test loads specified example file twice: first, using the legacy
}
}
+/* Add the dash alias */
+\"output-options\" {
+ switch(driver.ctx_) {
+ case isc::dhcp::Parser4Context::LOGGERS:
+ return isc::dhcp::Dhcp4Parser::make_OUTPUT_OPTIONS(driver.loc_);
+ default:
+ return isc::dhcp::Dhcp4Parser::make_STRING("output-options", driver.loc_);
+ }
+}
+
\"output\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::OUTPUT_OPTIONS:
testParser(txt, Parser4Context::PARSER_DHCP4, false);
}
+// Test that output-options is an alias of output_options.
+TEST(ParserTest, outputDashOptions) {
+ string txt= "{ \"Dhcp4\": { \"interfaces-config\": {"
+ " \"interfaces\": [ \"*\" ]"
+ "},\n"
+ "\"rebind-timer\": 2000,\n"
+ "\"renew-timer\": 1000, \n"
+ "\"valid-lifetime\": 4000,\n"
+ "\"loggers\": [ { "
+ " \"name\": \"kea-dhcp4\","
+ " \"output-options\": [ { \"output\": \"stdout\" } ],"
+ " \"severity\": \"INFO\" } ]\n"
+ "} }";
+ testParser(txt, Parser4Context::PARSER_DHCP4, false);
+}
+
/// @brief Loads specified example config file
///
/// This test loads specified example file twice: first, using the legacy
}
}
+/* Add the dash alias */
+\"output-options\" {
+ switch(driver.ctx_) {
+ case isc::dhcp::Parser6Context::LOGGERS:
+ return isc::dhcp::Dhcp6Parser::make_OUTPUT_OPTIONS(driver.loc_);
+ default:
+ return isc::dhcp::Dhcp6Parser::make_STRING("output-options", driver.loc_);
+ }
+}
+
\"output\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::OUTPUT_OPTIONS:
testParser(txt, Parser6Context::PARSER_DHCP6, false);
}
+// Test that output-options is an alias of output_options.
+TEST(ParserTest, outputDashOptions) {
+ string txt= "{ \"Dhcp6\": { \"interfaces-config\": {"
+ " \"interfaces\": [ \"*\" ]"
+ "},\n"
+ "\"preferred-lifetime\": 3000,\n"
+ "\"rebind-timer\": 2000,\n"
+ "\"renew-timer\": 1000, \n"
+ "\"valid-lifetime\": 4000,\n"
+ "\"loggers\": [ { "
+ " \"name\": \"kea-dhcp6\","
+ " \"output-options\": [ { \"output\": \"stdout\" } ],"
+ " \"severity\": \"INFO\" } ]\n"
+ "} }";
+ testParser(txt, Parser6Context::PARSER_DHCP6, false);
+}
+
/// @brief Loads specified example config file
///
/// This test loads specified example file twice: first, using the legacy
}
}
+/* Add the dash alias */
+\"output-options\" {
+ switch(driver.ctx_) {
+ case ParserContext::LOGGERS:
+ return NetconfParser::make_OUTPUT_OPTIONS(driver.loc_);
+ default:
+ return NetconfParser::make_STRING("output-options", driver.loc_);
+ }
+}
+
\"output\" {
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
testParser(txt, ParserContext::PARSER_NETCONF, false);
}
+// Test that output-options is an alias of output_options.
+TEST(ParserTest, outputDashOptions) {
+ string txt= "{ \"Netconf\": {"
+ " \"loggers\": [ { "
+ " \"name\": \"kea-netconf\","
+ " \"output-options\": [ { \"output\": \"stdout\" } ],"
+ " \"severity\": \"INFO\" } ]"
+ "} }";
+ testParser(txt, ParserContext::PARSER_NETCONF, false);
+}
+
/// @brief Loads specified example config file
///
/// This test loads specified example file twice: first, using the legacy