Text syntax parser/loader
Added support for list x y; Uses a mechanism to parse as unknown XML body and post-parsing replace with list keys Fixed example and test to work with new TEXT syntax
This commit is contained in:
parent
0c79298e76
commit
b6bfcb69f7
14 changed files with 227 additions and 377 deletions
|
|
@ -165,8 +165,16 @@
|
|||
#define PROTO_RESTART_RECONNECT
|
||||
|
||||
/*! Text output keys as identifiers instead of ordinary leafs
|
||||
* Ie: list a { val 42; } If defined
|
||||
* instead of list { keyname a; val 42; } If undefined
|
||||
* Problem is, Parser is YANG unaware therefore doe not know "keyname"
|
||||
* That is, given list "list" with key value "a", if set, the output of show config or save
|
||||
* as text command is:
|
||||
* list a {
|
||||
* val 42;
|
||||
* }
|
||||
* If not set, the output is:
|
||||
* list {
|
||||
* keyname a;
|
||||
* val 42;
|
||||
* }
|
||||
* The TEXT parser (ie load) accepts both formats.
|
||||
*/
|
||||
#undef TEXT_LIST_KEYS
|
||||
#define TEXT_LIST_KEYS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue