* Ensure auto-cli can be run with CLICON_CLI_VARONLY=1

* Strip constants in cli_dbxml
This commit is contained in:
Olof hagsand 2021-12-07 20:09:25 +01:00
parent 8c5a5a0fb3
commit 3c8c33c385
2 changed files with 8 additions and 1 deletions

View file

@ -43,6 +43,8 @@ Planned: January, 2022
### Corrected Bugs ### Corrected Bugs
* Ensure auto-cli can be run with `CLICON_CLI_VARONLY=1`
* Strip constants in cli_dbxml
* rpc_callback_call(): Check if nrp parameter is NULL to avoid SEGV * rpc_callback_call(): Check if nrp parameter is NULL to avoid SEGV
## 5.4.0 ## 5.4.0

View file

@ -217,7 +217,7 @@ dbxml_body(cxobj *xbot,
* @param[in] argv Vector. First element xml key format string, eg "/aaa/%s" * @param[in] argv Vector. First element xml key format string, eg "/aaa/%s"
* @param[in] op Operation to perform on database * @param[in] op Operation to perform on database
* @param[in] nsctx Namespace context for last value added * @param[in] nsctx Namespace context for last value added
* Cvv will contain first the complete cli string, and then a set of optional * cvv first contains the complete cli string, and then a set of optional
* instantiated variables. * instantiated variables.
* If the last node is a leaf, the last cvv element is added as a value. This value * If the last node is a leaf, the last cvv element is added as a value. This value
* Example: * Example:
@ -263,9 +263,14 @@ cli_dbxml(clicon_handle h,
} }
arg = cvec_i(argv, 0); arg = cvec_i(argv, 0);
api_path_fmt = cv_string_get(arg); api_path_fmt = cv_string_get(arg);
/* Remove all keywords */
if (cvec_exclude_keys(cvv) < 0)
goto done;
/* Transform template format string + cvv to actual api-path /* Transform template format string + cvv to actual api-path
* cvv_i indicates if all cvv entries were used * cvv_i indicates if all cvv entries were used
*/ */
if (api_path_fmt2api_path(api_path_fmt, cvv, &api_path, &cvv_i) < 0) if (api_path_fmt2api_path(api_path_fmt, cvv, &api_path, &cvv_i) < 0)
goto done; goto done;
/* Create config top-of-tree */ /* Create config top-of-tree */