diff --git a/CHANGELOG.md b/CHANGELOG.md index 888d3beb..066cc3d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,15 +41,20 @@ ## 6.1.0 Expected: 19 Feb 2023 +The Clixon 6.1 release completes Network monitoring (RFC 6022) and introduces a first version of YANG schema mount (RFC 8528). The main focus has been interoperability and basic support for the ongoing [Clixon controller](https://github.com/clicon/clixon-controller) work. + ### New features * YANG schema mount RFC 8528 + * The primary use-case is the clixon-controller but can be used independently + * New plugin callback: `ca_yang_mount` + * To specify which YANG modules should be mounted + * New plugin callback: `ca_yang_patch` + * A method to patch a YANG module + * To enable yang mounts, set new option `CLICON_YANG_SCHEMA_MOUNT` to `true` * Restrictions: * Only schema-ref=inline, not shared-schema * Mount-points must be presence containers, regular containers or lists are not supported. - * New plugin callback: `ca_yang_mount` - * To specify which YANG modules should be mounted - * To enable, set new option `CLICON_YANG_SCHEMA_MOUNT` to `true` * Netconf monitoring RFC 6022 * This is part 2, first part was in 6.0 * Datastores, sessions and statistics diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0460e103..ec088f8d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,6 +2,8 @@ The clixon project welcomes contributions from the community. +Contributions are best done posting issues and pull requests. Discussions are welcome on the Matrix clixon forum https://matrix.to/#/#clixonforum:matrix.org. + ## Licensing A contribution must follow the [CLIXON licensing](https://github.com/clicon/clixon/blob/master/LICENSE.md) @@ -122,7 +124,7 @@ where `ms_` is the prefix and is an abbreviation of `my_struct`. Try to avoid global variables. If you absolutely need a global variable, try to contain it as static within a -single C-file, ie do not declare it extern and use it elsewhere. +single C-file, ie do not declare it extern and do not use it in other files. Also, always prepend a global variable with `_`, underscore. @@ -150,3 +152,24 @@ Therafter "non-functional" analysis, including performance tests can be made. Performance improvements should be based on specific usecase and actual measurement. The benefit of an optimization should be larger than a potential increase of complexity. + +## How to document the code + +``` +/*! This is a small comment on one line + * + * This is a detailed description + * spanning several lines. + * + * Example usage: + * @code + * fn(a, &b); + * @endcode + * + * @param[in] src This is a description of the first parameter + * @param[in,out] dest This is a description of the second parameter + * @retval 0 This is a description of the return value + * @retval -1 This is a description of another return value + * @see See also this function + */ +``` diff --git a/README.md b/README.md index 94ae57f7..6cc84b7e 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ See [documentation](https://clixon-docs.readthedocs.io), [project page](https:// Clixon is open-source and dual licensed. Either Apache License, Version 2.0 or GNU General Public License Version 2; you choose, see [LICENSE.md](LICENSE.md). -Clixon has a master branch continuously tested with CI, but releases are made ca every second month. Latest 6.0.0 release is from November 2022. Next is planned for January 2023. See [CHANGELOG.md](CHANGELOG.md) release history. +Clixon has a master branch continuously tested with CI, but releases are made ca every second month. Latest 6.0.0 release is from November 2022. Next is planned for February 19 2023. See [CHANGELOG.md](CHANGELOG.md) release history. Clixon interaction is best done posting issues, pull requests, or joining the Matrix clixon forum https://matrix.to/#/#clixonforum:matrix.org. diff --git a/doc/DEVELOP.md b/doc/DEVELOP.md index 2514f33f..28aef6fa 100644 --- a/doc/DEVELOP.md +++ b/doc/DEVELOP.md @@ -1,5 +1,7 @@ # README for Clixon developers +(See also CONTRIBUTING.md) + * [Code documentation](#documentation) * [How to work in git (how-to-work-in-git)](#how-to-work-in-git) * [How the meta-configure stuff works](#meta-configure) diff --git a/lib/clixon/clixon_plugin.h b/lib/clixon/clixon_plugin.h index 2a9e4d3b..12685637 100644 --- a/lib/clixon/clixon_plugin.h +++ b/lib/clixon/clixon_plugin.h @@ -294,7 +294,7 @@ typedef int (yang_mount_t)(clicon_handle h, cxobj *xt, int *config, /*! YANG module patch * - * Given a parsed YANG module, give the ability to patch it before import recursion, + * Given a parsed YANG module, provide a method to patch it before import recursion, * grouping/uses checks, augments, etc * Can be useful if YANG in some way needs modification. * Deviations could be used as alternative (probably better) @@ -327,12 +327,12 @@ typedef struct clixon_plugin_api* (plginit2_t)(clicon_handle); /* Clixon plug struct clixon_plugin_api{ /*--- Common fields. ---*/ char ca_name[MAXPATHLEN]; /* Name of plugin (given by plugin) */ - plginit2_t *ca_init; /* Clixon plugin Init (implicit) */ - plgstart_t *ca_start; /* Plugin start */ - plgexit_t *ca_exit; /* Plugin exit */ - plgextension_t *ca_extension; /* Yang extension/unknown handler */ - yang_mount_t *ca_yang_mount; /* RFC 8528 schema mount */ - yang_patch_t *ca_yang_patch; /* Patch yang after parse */ + plginit2_t *ca_init; /* Clixon plugin Init (implicit) */ + plgstart_t *ca_start; /* Plugin start */ + plgexit_t *ca_exit; /* Plugin exit */ + plgextension_t *ca_extension; /* Yang extension/unknown handler */ + yang_mount_t *ca_yang_mount; /* RFC 8528 schema mount */ + yang_patch_t *ca_yang_patch; /* Patch yang after parse */ union { struct { /* cli-specific */ cli_prompthook_t *ci_prompt; /* Prompt hook */ diff --git a/test/test_openconfig_interfaces.sh b/test/test_openconfig_interfaces.sh index 9daaa50e..7fddff8e 100755 --- a/test/test_openconfig_interfaces.sh +++ b/test/test_openconfig_interfaces.sh @@ -71,7 +71,7 @@ cat < $dir/startup_db e ex:eth - false + NONE true @@ -104,7 +104,7 @@ new "$clixon_cli -D $DBG -1f $cfg show version" expectpart "$($clixon_cli -D $DBG -1f $cfg show version)" 0 "${CLIXON_VERSION}" new "$clixon_netconf -qf $cfg" -expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "" "eeex:ethfalsetrue00" +expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "" "" "eeex:ethNONEtrue00" new "cli show configuration" expectpart "$($clixon_cli -1 -f $cfg show conf xml)" 0 "^" --not-- ""