xmldb
This commit is contained in:
parent
ca18b7f49e
commit
0a812696c2
47 changed files with 1818 additions and 1783 deletions
|
|
@ -31,6 +31,6 @@ int clicon_file_dirent(const char *dir, struct dirent **ent,
|
|||
|
||||
char *clicon_tmpfile(const char *label);
|
||||
|
||||
int file_cp(char *src, char *target);
|
||||
int clicon_file_copy(char *src, char *target);
|
||||
|
||||
#endif /* _CLIXON_FILE_H_ */
|
||||
|
|
|
|||
|
|
@ -76,8 +76,6 @@ char *clicon_configfile(clicon_handle h);
|
|||
char *clicon_yang_dir(clicon_handle h);
|
||||
char *clicon_yang_module_main(clicon_handle h);
|
||||
char *clicon_yang_module_revision(clicon_handle h);
|
||||
char *clicon_running_db(clicon_handle h);
|
||||
char *clicon_candidate_db(clicon_handle h);
|
||||
char *clicon_backend_dir(clicon_handle h);
|
||||
char *clicon_cli_dir(clicon_handle h);
|
||||
char *clicon_clispec_dir(clicon_handle h);
|
||||
|
|
@ -97,6 +95,11 @@ int clicon_cli_varonly(clicon_handle h);
|
|||
int clicon_cli_varonly_set(clicon_handle h, int val);
|
||||
int clicon_cli_genmodel_completion(clicon_handle h);
|
||||
|
||||
char *clicon_xmldb_dir(clicon_handle h);
|
||||
int clicon_xmldb_rpc(clicon_handle h);
|
||||
char *clicon_xmldb_addr(clicon_handle h);
|
||||
uint16_t clicon_xmldb_port(clicon_handle h);
|
||||
|
||||
char *clicon_quiet_mode(clicon_handle h);
|
||||
enum genmodel_type clicon_cli_genmodel_type(clicon_handle h);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,16 +39,16 @@ enum clicon_msg_type{
|
|||
current state, set running_db. Body is:
|
||||
1. uint32: (1)snapshot while doing commit, (0) dont
|
||||
2. uint32: (1)save to startup-config, (0) dont
|
||||
3. string: name of 'from' database (eg candidate)
|
||||
4. string: name of 'to' database (eg current)
|
||||
3. string: name of 'from' database (eg "candidate")
|
||||
4. string: name of 'to' database (eg "running")
|
||||
*/
|
||||
CLICON_MSG_VALIDATE, /* Validate settings in a database. Body is:
|
||||
1. string: name of database
|
||||
CLICON_MSG_VALIDATE, /* Validate settings in a database. Body is:
|
||||
1. string: name of database (eg "candidate")
|
||||
*/
|
||||
CLICON_MSG_CHANGE, /* Change a (single) database entry:
|
||||
1. uint32: operation: OP_MERGE/OP_REPLACE/OP_REMOVE
|
||||
2. uint32: length of value string
|
||||
3. string: name of database to change (eg current)
|
||||
3. string: name of database to change (eg "running")
|
||||
4. string: key
|
||||
5. string: value
|
||||
*/
|
||||
|
|
@ -71,26 +71,6 @@ enum clicon_msg_type{
|
|||
3. string: filename to load from
|
||||
|
||||
*/
|
||||
CLICON_MSG_COPY, /* Copy from file to file in backend. Body is:
|
||||
1. string: filename to copy from
|
||||
2. string: filename to copy to
|
||||
*/
|
||||
CLICON_MSG_RM , /* Delete file. Body is:
|
||||
1. string: filename to delete
|
||||
*/
|
||||
|
||||
CLICON_MSG_INITDB , /* (Re-)Initialize a database. Body is:
|
||||
1. string: filename of db to initialize
|
||||
*/
|
||||
CLICON_MSG_LOCK , /* Lock a database. Body is
|
||||
1. name of db
|
||||
The reply will be OK, or ERROR. If error is
|
||||
lock-denied, the session-id of the locking
|
||||
entity is returned (cf netconf)
|
||||
*/
|
||||
CLICON_MSG_UNLOCK , /* Unlock a database. Body is:
|
||||
1. name of db *
|
||||
*/
|
||||
CLICON_MSG_KILL, /* Kill (other) session:
|
||||
1. session-id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -39,11 +39,6 @@ int clicon_rpc_dbitems(clicon_handle h, char *db, char *rx,
|
|||
cvec ***cvv, size_t *cvvlen);
|
||||
int clicon_rpc_save(clicon_handle h, char *dbname, int snapshot, char *filename);
|
||||
int clicon_rpc_load(clicon_handle h, int replace, char *db, char *filename);
|
||||
int clicon_rpc_copy(clicon_handle h, char *filename1, char *filename2);
|
||||
int clicon_rpc_rm(clicon_handle h, char *filename);
|
||||
int clicon_rpc_initdb(clicon_handle h, char *filename);
|
||||
int clicon_rpc_lock(clicon_handle h, char *dbname);
|
||||
int clicon_rpc_unlock(clicon_handle h, char *dbname);
|
||||
int clicon_rpc_kill(clicon_handle h, int session_id);
|
||||
int clicon_rpc_debug(clicon_handle h, int level);
|
||||
int clicon_rpc_call(clicon_handle h, uint16_t op, char *plugin, char *func,
|
||||
|
|
|
|||
|
|
@ -100,40 +100,6 @@ int
|
|||
clicon_msg_load_decode(struct clicon_msg *msg,
|
||||
int *replace, char **db, char **filename,
|
||||
const char *label);
|
||||
struct clicon_msg *
|
||||
clicon_msg_initdb_encode(char *filename_src, const char *label);
|
||||
|
||||
int
|
||||
clicon_msg_initdb_decode(struct clicon_msg *msg, char **filename_src,
|
||||
const char *label);
|
||||
|
||||
struct clicon_msg *
|
||||
clicon_msg_rm_encode(char *filename_src, const char *label);
|
||||
|
||||
int
|
||||
clicon_msg_rm_decode(struct clicon_msg *msg, char **filename_src,
|
||||
const char *label);
|
||||
|
||||
struct clicon_msg *
|
||||
clicon_msg_copy_encode(char *filename_src, char *filename_dst,
|
||||
const char *label);
|
||||
|
||||
int
|
||||
clicon_msg_copy_decode(struct clicon_msg *msg,
|
||||
char **filename_src, char **filename_dst,
|
||||
const char *label);
|
||||
|
||||
struct clicon_msg *
|
||||
clicon_msg_lock_encode(char *db, const char *label);
|
||||
|
||||
int
|
||||
clicon_msg_lock_decode(struct clicon_msg *msg, char **db, const char *label);
|
||||
|
||||
struct clicon_msg *
|
||||
clicon_msg_unlock_encode(char *db, const char *label);
|
||||
|
||||
int
|
||||
clicon_msg_unlock_decode(struct clicon_msg *msg, char **db, const char *label);
|
||||
|
||||
struct clicon_msg *
|
||||
clicon_msg_kill_encode(uint32_t session_id, const char *label);
|
||||
|
|
|
|||
|
|
@ -29,16 +29,19 @@
|
|||
int yang2xmlkeyfmt(yang_stmt *ys, char **xkfmt);
|
||||
int xmlkeyfmt2key(char *xkfmt, cvec *cvv, char **xk);
|
||||
int xmlkeyfmt2xpath(char *xkfmt, cvec *cvv, char **xk);
|
||||
int xmlkey2xml(char *xkey, yang_spec *yspec, char **xml);
|
||||
int xmldb_get(char *dbname, char *xpath,
|
||||
yang_spec *yspec, cxobj **xtop);
|
||||
int xmldb_get_vec(char *dbname, char *xpath, yang_spec *yspec,
|
||||
cxobj **xtop, cxobj ***xvec, size_t *xlen);
|
||||
int xmldb_put( char *dbname, cxobj *xt,
|
||||
yang_spec *yspec, enum operation_type op);
|
||||
int xmldb_put_xkey(char *dbname, char *xkey, char *val, yang_spec *yspec,
|
||||
int xmldb_get(clicon_handle h, char *db, char *xpath, int vector,
|
||||
cxobj **xtop, cxobj ***xvec, size_t *xlen);
|
||||
int xmldb_put(clicon_handle h, char *db, cxobj *xt, enum operation_type op);
|
||||
int xmldb_put_xkey(clicon_handle h, char *db,
|
||||
char *xkey, char *val,
|
||||
enum operation_type op);
|
||||
int xmldb_dump(FILE *f, char *dbname, char *rxkey);
|
||||
int xmldb_init(char *file);
|
||||
int xmldb_dump(FILE *f, char *dbfilename, char *rxkey);
|
||||
int xmldb_copy(clicon_handle h, char *from, char *to);
|
||||
int xmldb_lock(clicon_handle h, char *db, int pid);
|
||||
int xmldb_unlock(clicon_handle h, char *db, int pid);
|
||||
int xmldb_islocked(clicon_handle h, char *db);
|
||||
int xmldb_exists(clicon_handle h, char *db);
|
||||
int xmldb_delete(clicon_handle h, char *db);
|
||||
int xmldb_init(clicon_handle h, char *db);
|
||||
|
||||
#endif /* _CLIXON_XML_DB_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue