Added base as CLI default mode and cli
This commit is contained in:
parent
4b17af0278
commit
efe44d60e8
4 changed files with 7 additions and 4 deletions
|
|
@ -27,6 +27,7 @@
|
||||||
```
|
```
|
||||||
|
|
||||||
### Minor changes
|
### Minor changes
|
||||||
|
* Added "base" as CLI default mode and "cli> " as default prompt.
|
||||||
* Removed obsolete `CLICON_CLI_MODEL_TREENAME_PATCH`
|
* Removed obsolete `CLICON_CLI_MODEL_TREENAME_PATCH`
|
||||||
* Added specific clixon_suberrno code: XMLPARSE_ERRNO to identify XML parse errors.
|
* Added specific clixon_suberrno code: XMLPARSE_ERRNO to identify XML parse errors.
|
||||||
* Removed all dependency on strverscmp
|
* Removed all dependency on strverscmp
|
||||||
|
|
|
||||||
|
|
@ -281,10 +281,13 @@ cli_load_syntax(clicon_handle h,
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
/* Make sure we have a syntax mode specified */
|
/* Make sure we have a syntax mode specified */
|
||||||
|
if (mode == NULL || strlen(mode) < 1) { /* may be null if not given in file */
|
||||||
|
mode = clicon_cli_mode(h);
|
||||||
if (mode == NULL || strlen(mode) < 1) { /* may be null if not given in file */
|
if (mode == NULL || strlen(mode) < 1) { /* may be null if not given in file */
|
||||||
clicon_err(OE_PLUGIN, 0, "No syntax mode specified in %s", filepath);
|
clicon_err(OE_PLUGIN, 0, "No syntax mode specified in %s", filepath);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ((vec = clicon_strsep(mode, ":", &nvec)) == NULL)
|
if ((vec = clicon_strsep(mode, ":", &nvec)) == NULL)
|
||||||
goto done;
|
goto done;
|
||||||
for (i = 0; i < nvec; i++) {
|
for (i = 0; i < nvec; i++) {
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
*/
|
*/
|
||||||
/* Max prompt length */
|
/* Max prompt length */
|
||||||
#define CLI_PROMPT_LEN 64
|
#define CLI_PROMPT_LEN 64
|
||||||
#define CLI_DEFAULT_PROMPT ">"
|
#define CLI_DEFAULT_PROMPT "cli> "
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Function Declarations
|
* Function Declarations
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ copy("Copy and create a new object") {
|
||||||
}
|
}
|
||||||
discard("Discard edits (rollback 0)"), discard_changes();
|
discard("Discard edits (rollback 0)"), discard_changes();
|
||||||
compare("Compare running and candidate"), compare_dbs((int32)1);
|
compare("Compare running and candidate"), compare_dbs((int32)1);
|
||||||
compare("Compare running and candidate"), compare_dbs((int32)1);
|
|
||||||
|
|
||||||
show("Show a particular state of the system"){
|
show("Show a particular state of the system"){
|
||||||
xpath("Show configuration") <xpath:string>("XPATH expression"), show_conf_xpath("candidate");
|
xpath("Show configuration") <xpath:string>("XPATH expression"), show_conf_xpath("candidate");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue