code comments

This commit is contained in:
Olof hagsand 2020-09-12 13:04:59 +02:00
parent bc96a86b0f
commit 6c22935463
3 changed files with 11 additions and 14 deletions

View file

@ -26,18 +26,20 @@
## 4.7.0
Expected: 15 September 2020
This release is primarily a bugfix and usability improvement release, no major new features.
### API changes on existing protocol/config features
Users may have to change how they access the system
* Netconf as default namespace has been disabled by default.
* Only requests on the form: `<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><edit-config>...` will be accepted
* All replies will be on the form: `<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">...`
* Requests such as: `<rpc><edit-config>...` will not be accepted.
* Only requests on the form: `<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><edit-config>...` are accepted
* All replies are on the form: `<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">...`
* Requests such as: `<rpc><edit-config>...` are not accepted.
* You can revert this behaviour (to clixon pre-4.6 behaviour) by enabling `CLICON_NAMESPACE_NETCONF_DEFAULT`
* This API change is a consequence of: [copy-config's RPC cxobj parameter does not contain namespace #131](https://github.com/clicon/clixon/issues/131)
* NACM datanode paths fixed to canonical namespace
* The fix of [Cannot create or modify NACM data node access rule with path using JSON encoding #129](https://github.com/clicon/clixon/issues/129) leads that data-node paths, eg `<rule>...<path>ex:table/ex:parameter</path></rule>` instance-identifiers are restricted to canonical namespace identifiers for both XML and JSON encoding. That is, if a symbol (such as `table` above) is a symbol in a module with prefix `ex`, another prefix cannot be used, even though defined with a `xmlns:` rule.
* The fix of [Cannot create or modify NACM data node access rule with path using JSON encoding #129](https://github.com/clicon/clixon/issues/129) leads to that data-node paths, eg `<rule>...<path>ex:table/ex:parameter</path></rule>` instance-identifiers are restricted to canonical namespace identifiers for both XML and JSON encoding. That is, if a symbol (such as `table` above) is a symbol in a module with prefix `ex`, another prefix cannot be used, even though defined with a `xmlns:` rule.
* New clixon-config@2020-08-17.yang revision
* Added options for Restconf evhtp setting default bind socket address and ports:
@ -45,6 +47,7 @@ Users may have to change how they access the system
* Added option for using NETCONF default namespace: `CLICON_NAMESPACE_NETCONF_DEFAULT`
* Added options for better handling of long and multi-line CLI help strings:
* `CLICON_CLI_HELPSTRING_TRUNCATE`, `CLICON_CLI_HELPSTRING_LINES`
* Changed semantics of `CLICON_NACM_DISABLED_ON_EMPTY` to "disable NACM if there is no _NACM_ configuration", instead of "disable NACM if there is no _configuration_".
### C/CLI-API changes on existing features

View file

@ -574,9 +574,7 @@ xmldb_get_nocache(clicon_handle h,
if (xml_default_recurse(xt) < 0)
goto done;
}
/* If empty database, then disable NACM if loaded
* This has some drawbacks. One is that a config may become empty at a later stage
* and then this does not hold.
/* If empty NACM config, then disable NACM if loaded
*/
if (clicon_option_bool(h, "CLICON_NACM_DISABLED_ON_EMPTY")){
if (disable_nacm_on_empty(xt, yspec) < 0)
@ -723,9 +721,7 @@ xmldb_get_cache(clicon_handle h,
if (xml_default_recurse(x1t) < 0)
goto done;
}
/* If empty database, then disable NACM if loaded
* This has some drawbacks. One is that a config may become empty at a later stage
* and then this does not hold.
/* If empty NACM config, then disable NACM if loaded
*/
if (clicon_option_bool(h, "CLICON_NACM_DISABLED_ON_EMPTY")){
if (disable_nacm_on_empty(x1t, yspec) < 0)
@ -822,9 +818,7 @@ xmldb_get_zerocopy(clicon_handle h,
if (xml_default_recurse(x0t) < 0)
goto done;
}
/* If empty database, then disable NACM if loaded
* This has some drawbacks. One is that a config may become empty at a later stage
* and then this does not hold.
/* If empty NACM config, then disable NACM if loaded
*/
if (clicon_option_bool(h, "CLICON_NACM_DISABLED_ON_EMPTY")){
if (disable_nacm_on_empty(x0t, yspec) < 0)

View file

@ -652,7 +652,7 @@ filename2revision(const char *filename,
clicon_err(OE_UNIX, errno, "strdup");
goto done;
}
clicon_debug(1, "%s %s", __FUNCTION__, base);
clicon_debug(2, "%s %s", __FUNCTION__, base);
if ((p = rindex(base, '.')) != NULL) /* strip postfix .yang */
*p = '\0';
if ((p = index(base, '@')) != NULL){ /* extract revision date */