Clixon 5.7.0
17 May 2022
The Clixon 5.7 release introduces (long overdue) NETCONF chunked framing as defined
in RFC 6242. It also introduces a limited http data service and lots of bugfixes.
New features
- Implementation of "chunked framing" according to RFC6242 for Netconf 1.1.
- First hello is 1.0 EOM framing, then successing rpc is chunked framing
- See
- Extended the Restconf implementation with a limited http-data static service
- Added two new config options to clixon-config.yang:
CLICON_HTTP_DATA_PATH
CLICON_HTTP_DATA_ROOT
- Added feature http-data to restconf-config.yang and the following option that needs to be true
enable-http-data
- Added
HTTP_DATA_INTERNAL_REDIRECT
compile-time option for internal redirects toindex.html
- For more info, see user manual documentation
- Added two new config options to clixon-config.yang:
API changes on existing protocol/config features
Users may have to change how they access the system
-
CLI
clixon_cli
reconnects to backend if backend restarts with a warning- Note that edits to the candidate database or locks will be lost
- To force the CLI to exit if backend restarts, undef
PROTO_RESTART_RECONNECT
- This is an effect of the fix of Broken pipe error seen in client (cli) when backend restarts and CLICON_SOCK is recreated, the CLI behavior on backend restart is changed.
- Expansion of YANG leafref type default behavior has changed
- In the autocli and handcrafted CLI:s using
expand_dbvar()
the CLI expansion followed the leafrefs to the sources, ie the origin of the leafrefs - Instead leafref expansion now expands according to existing leafrefs by default
- Example:
- Assume leafref with leafref pointing to source if values:
<if>a</if><if>b</if><if>c</if> <ifref>b</ifref>
- Existing behavior: expand to:
a, b, c
- New default behavior: expand to:
b
- Assume leafref with leafref pointing to source if values:
- To keep existing behavior, set
<CLICON_CLI_EXPAND_LEAFREF>true<CLICON_CLI_EXPAND_LEAFREF>
- In the autocli and handcrafted CLI:s using
-
Restconf
- Added 404 return without body if neither restconf, data or streams prefix match
-
Netconf:
- Usage of chunked framing
- To keep existing end-of-message encoding, set
CLICON_NETCONF_BASE_CAPABILITY
to0
- Added
clixon_netconf
command-line option-0
and changed-H
to-1
-0
means dont send hello, but fix netconf base version to 0 and use EOM framing-1
means dont send hello, but fix netconf base version to 1 and use chunked framing
- To keep existing end-of-message encoding, set
- Error message
data-not-unique
changed to return schema nodes instead of XML for RFC7950 compliance
- Usage of chunked framing
-
YANG
- Instead of removing YANG which is disabled by
if-feature
, replace it with an yanganydata
node.- See Adding feature to top level container doesn't work
- This means XML specified by such YANG is ignored, and it is not an error to access it
- Note the similarity with
CLICON_YANG_UNKNOWN_ANYDATA
- New
clixon-config@2022-03-21.yang
revision- Added option:
CLICON_RESTCONF_API_ROOT
CLICON_NETCONF_BASE_CAPABILITY
CLICON_HTTP_DATA_PATH
CLICON_HTTP_DATA_ROOT
CLICON_CLI_EXPAND_LEAFREF
- Added option:
- New
clixon-restconf@2022-03-21.yang
revision- Added option:
enable-http-data
- Added feature:
http-data
- Added option:
- Instead of removing YANG which is disabled by
C/CLI-API changes on existing features
Developers may need to change their code
- Added
nsc
parameter toxml2xpath()
and ensured the xpath uses prefixes.- Old code: add
NULL
as second parameter
- Old code: add
- Added
eof
parameter toclicon_rpc()
andclicon_rpc1()
and error handling modified
Minor features
- Command-line option: Extended
-l
of all clixon commands with-l n
which directs logging to/dev/null
- New: CLI load command for CLI syntax files (not only XML and JSON)
- New: Do not load clixon-restconf YANG file by default
- See prevent clixon-restconf@2021-05-20.yang module from loading
- Instead of always loading it, load it to datastore YANGs only if
CLICON_BACKEND_RESTCONF_PROCESS
istrue
- YANG unique: added single descendant node ids as special case
- This means that two variants are supported:
- unique "a b c", ie multiple direct children
- unique "a/b/c", ie single descendants
- RFC 7950 Sec 7.8.3 is somewhat unclear
- The combination is not supported
- This means that two variants are supported:
Corrected Bugs
- XPath parser: fixed some lexical issues
- Some complexities in Section 3.7 Lexical Structure of XPath 1.0 spec as follows
- There used to be some cornercases where function-names could not be used as nodes
- For example,
node()
is a nodetest, so/node/
caused an error. - In the grammar these include: axisnames, nodetests, functionnames
- The NCNames vs functionnames is now implemented according to the lexical structure section
- Fixed: Keywords containing '-' hyphen are missing from the auto-completion list
- Fixed by disabling
cligen_preference_mode
. This may have other side effects.
- Fixed by disabling
- Fixed: Returning a string while Querying leaf-list for single entry
- Fixed: A long TLS+HTTP/2 request such as by a browser causing block of other requests.
- Fixed: Error message seen twice in some cases
- Fixed: if choice is declared with multiple elements or leaf-list with in a case scope , addition or updation is not happening as expected
- This includes several choice/case adjustments to follow RFC 7950 Sec 7.9 better
- Fixed: HTTP/1 parse error for '/' path
- Fixed: YANG if-feature in config file of disables feature did not work, was always on
- This does not apply to the datastore, only the config file itself.
- Fixed: YANG key list check bad performance
- List key check did unique "xpath" lookup instead of direct child traverse
- Fixed: YANG unique single schema-nodeid required "canonical" namespace
- E.g.,
a/b
did not work even if there was default namespace in XML
- E.g.,
- Disabled xpath optimization for hierarchical list
- When
XPATH_LIST_OPTIMIZE
is set, patterns likey[k='3']
is optimized - But hierarchical lists should not be, ie when
a/y[k='3']
anda
is a list
- When
- Fixed: Removed warning at startup:
No YANG spec for module-set
- Fixed: HTTP/1 multiple write requests in single session appended data between writes, eg PUT+PUT.
- Fixed: Broken pipe error seen in client (cli) when backend restarts and CLICON_SOCK is recreated
- Fixed: Xpath API do not support filter data by wildcard
- Fixed: SEGV in cli show yang