Test adaption to new openconfig version

Last minute changes to readme:s before 6.1.0
This commit is contained in:
Olof hagsand 2023-02-18 12:10:56 +01:00
parent 585e725aec
commit 994632daac
6 changed files with 44 additions and 14 deletions

View file

@ -41,15 +41,20 @@
## 6.1.0 ## 6.1.0
Expected: 19 Feb 2023 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 ### New features
* YANG schema mount RFC 8528 * 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: * Restrictions:
* Only schema-ref=inline, not shared-schema * Only schema-ref=inline, not shared-schema
* Mount-points must be presence containers, regular containers or lists are not supported. * 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 * Netconf monitoring RFC 6022
* This is part 2, first part was in 6.0 * This is part 2, first part was in 6.0
* Datastores, sessions and statistics * Datastores, sessions and statistics

View file

@ -2,6 +2,8 @@
The clixon project welcomes contributions from the community. 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 ## Licensing
A contribution must follow the [CLIXON licensing](https://github.com/clicon/clixon/blob/master/LICENSE.md) 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. Try to avoid global variables.
If you absolutely need a global variable, try to contain it as static within a 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. 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 be made. Performance improvements should be based on specific usecase
and actual measurement. The benefit of an optimization should and actual measurement. The benefit of an optimization should
be larger than a potential increase of complexity. 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
*/
```

View file

@ -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 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). 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 Clixon interaction is best done posting issues, pull requests, or joining the
Matrix clixon forum https://matrix.to/#/#clixonforum:matrix.org. Matrix clixon forum https://matrix.to/#/#clixonforum:matrix.org.

View file

@ -1,5 +1,7 @@
# README for Clixon developers # README for Clixon developers
(See also CONTRIBUTING.md)
* [Code documentation](#documentation) * [Code documentation](#documentation)
* [How to work in git (how-to-work-in-git)](#how-to-work-in-git) * [How to work in git (how-to-work-in-git)](#how-to-work-in-git)
* [How the meta-configure stuff works](#meta-configure) * [How the meta-configure stuff works](#meta-configure)

View file

@ -294,7 +294,7 @@ typedef int (yang_mount_t)(clicon_handle h, cxobj *xt, int *config,
/*! YANG module patch /*! 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 * grouping/uses checks, augments, etc
* Can be useful if YANG in some way needs modification. * Can be useful if YANG in some way needs modification.
* Deviations could be used as alternative (probably better) * 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{ struct clixon_plugin_api{
/*--- Common fields. ---*/ /*--- Common fields. ---*/
char ca_name[MAXPATHLEN]; /* Name of plugin (given by plugin) */ char ca_name[MAXPATHLEN]; /* Name of plugin (given by plugin) */
plginit2_t *ca_init; /* Clixon plugin Init (implicit) */ plginit2_t *ca_init; /* Clixon plugin Init (implicit) */
plgstart_t *ca_start; /* Plugin start */ plgstart_t *ca_start; /* Plugin start */
plgexit_t *ca_exit; /* Plugin exit */ plgexit_t *ca_exit; /* Plugin exit */
plgextension_t *ca_extension; /* Yang extension/unknown handler */ plgextension_t *ca_extension; /* Yang extension/unknown handler */
yang_mount_t *ca_yang_mount; /* RFC 8528 schema mount */ yang_mount_t *ca_yang_mount; /* RFC 8528 schema mount */
yang_patch_t *ca_yang_patch; /* Patch yang after parse */ yang_patch_t *ca_yang_patch; /* Patch yang after parse */
union { union {
struct { /* cli-specific */ struct { /* cli-specific */
cli_prompthook_t *ci_prompt; /* Prompt hook */ cli_prompthook_t *ci_prompt; /* Prompt hook */

View file

@ -71,7 +71,7 @@ cat <<EOF > $dir/startup_db
<config> <config>
<name>e</name> <name>e</name>
<type xmlns:ex="urn:example:clixon">ex:eth</type> <type xmlns:ex="urn:example:clixon">ex:eth</type>
<loopback-mode>false</loopback-mode> <loopback-mode>NONE</loopback-mode>
<enabled>true</enabled> <enabled>true</enabled>
</config> </config>
<hold-time> <hold-time>
@ -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}" expectpart "$($clixon_cli -D $DBG -1f $cfg show version)" 0 "${CLIXON_VERSION}"
new "$clixon_netconf -qf $cfg" new "$clixon_netconf -qf $cfg"
expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><get-config><source><candidate/></source></get-config></rpc>" "" "<rpc-reply $DEFAULTNS><data><interfaces xmlns=\"http://openconfig.net/yang/interfaces\"><interface><name>e</name><config><name>e</name><type xmlns:ex=\"urn:example:clixon\">ex:eth</type><loopback-mode>false</loopback-mode><enabled>true</enabled></config><hold-time><config><up>0</up><down>0</down></config></hold-time></interface></interfaces></data></rpc-reply>" expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" "<rpc $DEFAULTNS><get-config><source><candidate/></source></get-config></rpc>" "" "<rpc-reply $DEFAULTNS><data><interfaces xmlns=\"http://openconfig.net/yang/interfaces\"><interface><name>e</name><config><name>e</name><type xmlns:ex=\"urn:example:clixon\">ex:eth</type><loopback-mode>NONE</loopback-mode><enabled>true</enabled></config><hold-time><config><up>0</up><down>0</down></config></hold-time></interface></interfaces></data></rpc-reply>"
new "cli show configuration" new "cli show configuration"
expectpart "$($clixon_cli -1 -f $cfg show conf xml)" 0 "^<interfaces xmlns=\"http://openconfig.net/yang/interfaces\">" --not-- "<oc-eth:ethernet xmlns:oc-eth=\"http://openconfig.net/yang/interfaces/ethernet\">" expectpart "$($clixon_cli -1 -f $cfg show conf xml)" 0 "^<interfaces xmlns=\"http://openconfig.net/yang/interfaces\">" --not-- "<oc-eth:ethernet xmlns:oc-eth=\"http://openconfig.net/yang/interfaces/ethernet\">"