mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 14:35:29 +00:00
[#665,!460] Implemented support in netconf agent
doc/examples/netconf/simple-dhcp4.json doc/examples/netconf/simple-dhcp6.json src/bin/netconf/netconf_lexer.ll src/bin/netconf/netconf_parser.yy src/bin/netconf/location.hh src/bin/netconf/netconf_lexer.cc src/bin/netconf/netconf_parser.cc src/bin/netconf/netconf_parser.h src/bin/netconf/position.hh src/bin/netconf/stack.hh
This commit is contained in:
committed by
Tomek Mrugalski
parent
3bbac71905
commit
293a173751
@@ -102,7 +102,9 @@
|
|||||||
// kept.
|
// kept.
|
||||||
"flush": true,
|
"flush": true,
|
||||||
"maxsize": 204800,
|
"maxsize": 204800,
|
||||||
"maxver": 4
|
"maxver": 4,
|
||||||
|
// We use pattern to specify custom log message layout
|
||||||
|
"pattern": "%d{%y.%m.%d %H:%M:%S.%q} %-5p [%c/%i] %m\n"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// You can change the severity to DEBUG, INFO, WARN, ERROR or
|
// You can change the severity to DEBUG, INFO, WARN, ERROR or
|
||||||
|
@@ -103,7 +103,10 @@
|
|||||||
// kept.
|
// kept.
|
||||||
"flush": true,
|
"flush": true,
|
||||||
"maxsize": 204800,
|
"maxsize": 204800,
|
||||||
"maxver": 4
|
"maxver": 4,
|
||||||
|
// We use pattern to specify custom log message layout
|
||||||
|
"pattern": "%d{%y.%m.%d %H:%M:%S.%q} %-5p [%c/%i] %m\n"
|
||||||
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// You can change the severity to DEBUG, INFO, WARN, ERROR or
|
// You can change the severity to DEBUG, INFO, WARN, ERROR or
|
||||||
|
@@ -1,9 +1,8 @@
|
|||||||
// Generated 201906181715
|
// A Bison parser, made by GNU Bison 3.2.1.
|
||||||
// A Bison parser, made by GNU Bison 3.4.1.
|
|
||||||
|
|
||||||
// Locations for Bison parsers in C++
|
// Locations for Bison parsers in C++
|
||||||
|
|
||||||
// Copyright (C) 2002-2015, 2018-2019 Free Software Foundation, Inc.
|
// Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
@@ -55,10 +54,9 @@
|
|||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#line 14 "netconf_parser.yy"
|
#line 14 "netconf_parser.yy" // location.cc:339
|
||||||
namespace isc { namespace netconf {
|
namespace isc { namespace netconf {
|
||||||
#line 60 "location.hh"
|
#line 60 "location.hh" // location.cc:339
|
||||||
|
|
||||||
/// A point in a source file.
|
/// A point in a source file.
|
||||||
class position
|
class position
|
||||||
{
|
{
|
||||||
@@ -318,8 +316,7 @@ namespace isc { namespace netconf {
|
|||||||
return ostr;
|
return ostr;
|
||||||
}
|
}
|
||||||
|
|
||||||
#line 14 "netconf_parser.yy"
|
#line 14 "netconf_parser.yy" // location.cc:339
|
||||||
} } // isc::netconf
|
} } // isc::netconf
|
||||||
#line 323 "location.hh"
|
#line 322 "location.hh" // location.cc:339
|
||||||
|
|
||||||
#endif // !YY_NETCONF_LOCATION_HH_INCLUDED
|
#endif // !YY_NETCONF_LOCATION_HH_INCLUDED
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -453,6 +453,15 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\"pattern\" {
|
||||||
|
switch(driver.ctx_) {
|
||||||
|
case ParserContext::OUTPUT_OPTIONS:
|
||||||
|
return NetconfParser::make_PATTERN(driver.loc_);
|
||||||
|
default:
|
||||||
|
return NetconfParser::make_STRING("pattern", driver.loc_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
\"debuglevel\" {
|
\"debuglevel\" {
|
||||||
switch(driver.ctx_) {
|
switch(driver.ctx_) {
|
||||||
case ParserContext::LOGGERS:
|
case ParserContext::LOGGERS:
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -85,6 +85,7 @@ using namespace std;
|
|||||||
FLUSH "flush"
|
FLUSH "flush"
|
||||||
MAXSIZE "maxsize"
|
MAXSIZE "maxsize"
|
||||||
MAXVER "maxver"
|
MAXVER "maxver"
|
||||||
|
PATTERN "pattern"
|
||||||
|
|
||||||
// Not real tokens, just a way to signal what the parser is expected to
|
// Not real tokens, just a way to signal what the parser is expected to
|
||||||
// parse. This define the starting point. It either can be full grammar
|
// parse. This define the starting point. It either can be full grammar
|
||||||
@@ -673,6 +674,7 @@ output_params: output
|
|||||||
| flush
|
| flush
|
||||||
| maxsize
|
| maxsize
|
||||||
| maxver
|
| maxver
|
||||||
|
| pattern
|
||||||
;
|
;
|
||||||
|
|
||||||
output: OUTPUT {
|
output: OUTPUT {
|
||||||
@@ -698,6 +700,14 @@ maxver: MAXVER COLON INTEGER {
|
|||||||
ctx.stack_.back()->set("maxver", maxver);
|
ctx.stack_.back()->set("maxver", maxver);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pattern: PATTERN {
|
||||||
|
ctx.enter(ctx.NO_KEYWORDS);
|
||||||
|
} COLON STRING {
|
||||||
|
ElementPtr sev(new StringElement($4, ctx.loc2pos(@4)));
|
||||||
|
ctx.stack_.back()->set("pattern", sev);
|
||||||
|
ctx.leave();
|
||||||
|
};
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
// Generated 201906181715
|
// A Bison parser, made by GNU Bison 3.2.1.
|
||||||
// A Bison parser, made by GNU Bison 3.4.1.
|
|
||||||
|
|
||||||
// Starting with Bison 3.2, this file is useless: the structure it
|
// Starting with Bison 3.2, this file is useless: the structure it
|
||||||
// used to define is now defined in "location.hh".
|
// used to define is now defined in "location.hh".
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
// Generated 201906181715
|
// A Bison parser, made by GNU Bison 3.2.1.
|
||||||
// A Bison parser, made by GNU Bison 3.4.1.
|
|
||||||
|
|
||||||
// Starting with Bison 3.2, this file is useless: the structure it
|
// Starting with Bison 3.2, this file is useless: the structure it
|
||||||
// used to define is now defined with the parser itself.
|
// used to define is now defined with the parser itself.
|
||||||
|
Reference in New Issue
Block a user