- removed api_path extension from internal netconf
- Strings in xmldb_put not properly encoded, eg eth/0 became eth.00000
This commit is contained in:
parent
683376610c
commit
3453dae0db
36 changed files with 1048 additions and 1307 deletions
|
|
@ -89,7 +89,7 @@ usage(char *argv0)
|
|||
"\t-m <module>\tYang module. Mandatory\n"
|
||||
"and command is either:\n"
|
||||
"\tget <xpath>\n"
|
||||
"\tput (merge|replace|create|delete|remove) <api_path> <xml>\n"
|
||||
"\tput (merge|replace|create|delete|remove) <xml>\n"
|
||||
"\tcopy <todb>\n"
|
||||
"\tlock <pid>\n"
|
||||
"\tunlock\n"
|
||||
|
|
@ -220,7 +220,7 @@ main(int argc, char **argv)
|
|||
fprintf(stdout, "\n");
|
||||
}
|
||||
else if (strcmp(cmd, "put")==0){
|
||||
if (argc != 3 && argc != 4){
|
||||
if (argc != 3){
|
||||
clicon_err(OE_DB, 0, "Unexpected nr of args: %d", argc);
|
||||
usage(argv0);
|
||||
}
|
||||
|
|
@ -228,13 +228,11 @@ main(int argc, char **argv)
|
|||
clicon_err(OE_DB, 0, "Unrecognized operation: %s", argv[1]);
|
||||
usage(argv0);
|
||||
}
|
||||
if (argc == 4){
|
||||
if (clicon_xml_parse_str(argv[3], &xt) < 0)
|
||||
goto done;
|
||||
if (xml_rootchild(xt, 0, &xt) < 0)
|
||||
goto done;
|
||||
}
|
||||
if (xmldb_put(h, db, op, argv[2], xt) < 0)
|
||||
if (clicon_xml_parse_str(argv[2], &xt) < 0)
|
||||
goto done;
|
||||
if (xml_rootchild(xt, 0, &xt) < 0)
|
||||
goto done;
|
||||
if (xmldb_put(h, db, op, xt) < 0)
|
||||
goto done;
|
||||
}
|
||||
else if (strcmp(cmd, "copy")==0){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue