Skip to content

Clixon 7.0.0

Compare
Choose a tag to compare
@olofhagsand olofhagsand released this 08 Mar 08:51
· 244 commits to master since this release

7.0.0

8 March 2024

Clixon 7.0.0 is a major release with changes to the debug/log/error API, other APIs,
standardized internal framing protocol and many other changes.
It also supports the 1.0 clixon controller release.

Features

  • Changed framing between backend and frontend to RFC6242 "chunked-encoding"
    • Previous a propriatary framing method was used
  • Added micro-second resolution to logs via stderr/stdout
  • New command-line debug mechanism
  • Made coverity analysis and fixed most of them
    • Some were ignored being for generated code (eg lex) or not applicable
  • Feature: Add support for -V option to give version
    • All clixon applications added command-line option -V for printing version
    • New ca_version callback for customized version output
  • Optimization:
    • Removed reply sanity if CLICON_VALIDATE_STATE_XML not set
    • Improved performance of GET and PUT operations
    • Optimized datastore access by ensuring REPORT_ALL in memory and EXPLICIT in file
    • Added mountpoint cache as yang flag YANG_FLAG_MTPOINT_POTENTIAL
    • Optimized yang_find, especially namespace lookup
    • Filtered state data if not match xpath
  • Added reference count for shared yang-specs (schema mounts)
    • Allowed for sharing yspec+modules between several mountpoints
  • Added "%k" as extra flag character to api-path-fmt

API changes on existing protocol/config features

Users may have to change how they access the system

  • Changed framing between backend and frontend to RFC6242 "chunked-encoding"
    • Should only affect advanced usage between clixon frontend and backend
    • This should allow standard netconf utilities to be used as frontend (may be some caveats)
  • Revert the creators attribute feature introduced in 6.2. It is now obsoleted.
    It is replaced with a configured creators and user/application semantics
  • New clixon-lib@2024-01-01.yang revision
    • Replaced container creators to grouping/uses
  • New clixon-config@2024-01-01.yang revision
    • Changed semantics:
      • CLICON_VALIDATE_STATE_XML - disable return sanity checks if false
    • Marked as obsolete:
      • CLICON_DATASTORE_CACHE Replaced with enhanced datastore read API
      • CLICON_NETCONF_CREATOR_ATTR reverting 6.5 functionality

C/CLI-API changes on existing features

Developers may need to change their code

  • Rename function xml_yang_minmax_recurse() -> xml_yang_validate_minmax()
  • Modified msg functions for clearer NETCONF 1.0 vs 1.1 API:
    • clicon_rpc1 --> clixon_rpc10
    • clicon_msg_send1 --> clixon_msg_send10
    • clicon_msg_rcv and clicon_msg_decode --> clixon_msg_rcv11
      • Rewrite by calling clixon_msg_rcv11 and explicit xml parsing
    • clicon_msg_rcv1 --> clixon_msg_rcv10
  • Added yspec parameter to api_path_fmt2api_path():
    • api_path_fmt2api_path(af, c, a, c) --> api_path_fmt2api_path(af, c, yspec, a, c)
  • Added flags parameter to default functions:
    • xml_default_recurse(...) -> xml_default_recurse(..., 0)
    • xml_defaults_nopresence(...) -> xml_default_nopresence(..., 0)
      • Also renamed (defaults -> default)
  • Changed function name: choice_case_get() -> yang_choice_case_get()
  • New clixon-lib@2024-01-01.yang revision
    • Removed container creators, reverted from 6.5
  • Changed ca_errmsg callback to a more generic variant
  • Refactoring basic clixon modules and some API changes
    • Changes marked in code with COMPAT_6_5
      • Most common functions have backward compatible macros through the 6.6 release
    • Handle API
      • Renamed clicon_handle -> clixon_handle
      • clicon_handle_init() -> `clixon_handle_init()
      • clicon_handle_exit() -> `clixon_handle_exit()
    • Log/Debug API
      • Changed function names. You need to rename as follows:
        • clicon_log_init() -> clixon_log_init(h,) NOTE added "clixon_handle h"
        • clicon_log() -> clixon_log(h,) NOTE added "clixon_handle h"
        • clixon_debug_init(d, f) -> clixon_debug_init(h, ) NOTE h added, f removed
        • clicon_log_xml() -> clixon_debug_xml(h,) NOTE added "clixon_handle h"
        • clixon_debug_xml() -> clixon_debug_xml(h,) NOTE added "clixon_handle h"
    • Error API:
      • Added clixon_err_init(h) function
      • Renaming, make the following changes:
        • clicon_err() -> clixon_err()
        • clicon_err_reset() -> clixon_err_reset()
        • clicon_strerror(int) -> clixon_err_str()
        • clicon_netconf_error(h, x, fmt) -> clixon_err_netconf(h, OE_XML, 0, x, fmt)`
        • netconf_err2cb(...) --> netconf_err2cb(h, ...)
        • Likewise for some other minor functions: clicon_err_* -> clixon_err_*
      • Replaced global variables with access functions. Replace variables with functions as follows:
        • clicon_errno -> clixon_err_category()
        • clicon_suberrno -> clixon_err_subnr()
        • clicon_err_reason -> clixon_err_reason()
    • Changed process API:
      • clixon_proc_socket(...) --> clixon_proc_socket(h, ..., sockerr)

Corrected Bugs