* Add default network namespace constant: RESTCONF_NETNS_DEFAULT with default value "default".

This commit is contained in:
Olof hagsand 2021-04-22 13:45:02 +02:00
parent 2ce8d9b488
commit ecd5f7de70
6 changed files with 14 additions and 5 deletions

View file

@ -32,6 +32,10 @@
## 5.2.0 ## 5.2.0
Expected: June 2021 Expected: June 2021
### Minor features
* Add default network namespace constant: `RESTCONF_NETNS_DEFAULT` with default value "default".
## 5.1.0 ## 5.1.0
15 April 2021 15 April 2021

View file

@ -671,7 +671,7 @@ restconf_socket_init(const char *netns0,
clicon_debug(1, "%s %s %s %s %hu", __FUNCTION__, netns0, addrtype, addrstr, port); clicon_debug(1, "%s %s %s %s %hu", __FUNCTION__, netns0, addrtype, addrstr, port);
/* netns default -> NULL */ /* netns default -> NULL */
if (netns0 != NULL && strcmp(netns0, "default")==0) if (netns0 != NULL && strcmp(netns0, RESTCONF_NETNS_DEFAULT)==0)
netns = NULL; netns = NULL;
else else
netns = netns0; netns = netns0;

View file

@ -89,3 +89,7 @@
* Consider making this an option or configure option * Consider making this an option or configure option
*/ */
#define DATASTORE_TOP_SYMBOL "config" #define DATASTORE_TOP_SYMBOL "config"
/* Name of default netns for clixon-restconf.yang socket/namespace field
*/
#define RESTCONF_NETNS_DEFAULT "default"

View file

@ -26,5 +26,5 @@ find . -name "*.gcda" | xargs sudo chmod 777
#GITHUB_SHA= #GITHUB_SHA=
# Push upstream # Push upstream
# The -f dont seem to work # The -f dont seem to work
bash <(curl -s https://codecov.io/bash) -f '!clixon_util*' -f '!example' -t ${TOKEN} bash <(curl -s https://codecov.io/bash) -t ${TOKEN}

View file

@ -69,7 +69,7 @@ DATASTORE_TOP="config"
# clixon yang revisions occuring in tests # clixon yang revisions occuring in tests
CLIXON_LIB_REV="2021-03-08" CLIXON_LIB_REV="2021-03-08"
CLIXON_CONFIG_REV="2021-03-08" CLIXON_CONFIG_REV="2021-03-08"
CLIXON_RESTCONF_REV="2021-03-08" CLIXON_RESTCONF_REV="2021-03-15"
CLIXON_EXAMPLE_REV="2020-12-01" CLIXON_EXAMPLE_REV="2020-12-01"
# Length of TSL RSA key # Length of TSL RSA key

View file

@ -189,7 +189,8 @@ module clixon-restconf {
type string; type string;
description description
"Network namespace. "Network namespace.
On platforms where namespaces are not suppported, always 'default'"; On platforms where namespaces are not suppported, 'default'
Default value can be changed by RESTCONF_NETNS_DEFAULT";
} }
leaf address { leaf address {
type inet:ip-address; type inet:ip-address;