* Added clicon_handle as parameter to all validate functions
* Added libxml2 XSD regexp mode as alternative to posix translation * Added `CLICON_YANG_REGEXP` option with possible values libxml2 and posix
This commit is contained in:
parent
69f2eb30f1
commit
a804e05375
27 changed files with 501 additions and 289 deletions
|
|
@ -113,7 +113,6 @@ module clixon-config {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
typedef cli_genmodel_type{
|
||||
description
|
||||
"How to generate CLI from YANG model,
|
||||
|
|
@ -148,6 +147,30 @@ module clixon-config {
|
|||
}
|
||||
}
|
||||
}
|
||||
typedef regexp_mode{
|
||||
description
|
||||
"The regular expression engine Clixon uses in its validation of
|
||||
Yang patterns, and in the CLI.
|
||||
Yang RFC 7950 stipulates XSD XML Schema regexps
|
||||
according to W3 CXML Schema Part 2: Datatypes Second Edition,
|
||||
see http://www.w3.org/TR/2004/REC-xmlschema-2-20041028#regexs";
|
||||
type enumeration{
|
||||
enum posix {
|
||||
description
|
||||
"Translate XSD XML Schema regexp:s to Posix regexp. This is
|
||||
not a complete translation, but can be considered good-enough
|
||||
for Yang use-cases as defined by openconfig and yang-models
|
||||
for example.";
|
||||
}
|
||||
enum libxml2 {
|
||||
description
|
||||
"Use libxml2 XSD XML Schema regexp engine. This is a complete
|
||||
XSD regexp engine..
|
||||
Requires libxml2 to be available at configure time
|
||||
(HAVE_LIBXML2 should be set)";
|
||||
}
|
||||
}
|
||||
}
|
||||
container clixon-config {
|
||||
leaf-list CLICON_FEATURE {
|
||||
description
|
||||
|
|
@ -203,6 +226,15 @@ module clixon-config {
|
|||
<module>[@<revision>].
|
||||
Used together with CLICON_YANG_MODULE_MAIN";
|
||||
}
|
||||
leaf CLICON_YANG_REGEXP {
|
||||
type regexp_mode;
|
||||
default posix;
|
||||
description
|
||||
"The regular expression engine Clixon uses in its validation of
|
||||
Yang patterns, and in the CLI.
|
||||
There is a 'good-enough' posix translation mode and a complete
|
||||
libxml2 mode";
|
||||
}
|
||||
leaf CLICON_BACKEND_DIR {
|
||||
type string;
|
||||
description
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue