Merge branch 'develop'
This commit is contained in:
commit
4902f7cf1d
28 changed files with 1877 additions and 1002 deletions
|
|
@ -90,7 +90,7 @@
|
|||
#include <clixon/clixon_json.h>
|
||||
#include <clixon/clixon_netconf_lib.h>
|
||||
#include <clixon/clixon_nacm.h>
|
||||
#include <clixon/clixon_yang_changelog.h>
|
||||
#include <clixon/clixon_xml_changelog.h>
|
||||
|
||||
/*
|
||||
* Global variables generated by Makefile
|
||||
|
|
|
|||
|
|
@ -210,8 +210,12 @@ int clicon_socket_set(clicon_handle h, int s);
|
|||
cxobj *clicon_module_state_get(clicon_handle h);
|
||||
int clicon_module_state_set(clicon_handle h, cxobj *xms);
|
||||
|
||||
/*! Set and get module revision changelog */
|
||||
cxobj *clicon_yang_changelog_get(clicon_handle h);
|
||||
int clicon_yang_changelog_set(clicon_handle h, cxobj *xchlog);
|
||||
/*! Set and get yang/xml module revision changelog */
|
||||
cxobj *clicon_xml_changelog_get(clicon_handle h);
|
||||
int clicon_xml_changelog_set(clicon_handle h, cxobj *xchlog);
|
||||
|
||||
/*! Set and get user command-line options (after --) */
|
||||
int clicon_argv_get(clicon_handle h, int *argc, char ***argv);
|
||||
int clicon_argv_set(clicon_handle h, char *argv0, int argc, char **argv);
|
||||
|
||||
#endif /* _CLIXON_OPTIONS_H_ */
|
||||
|
|
|
|||
|
|
@ -70,8 +70,7 @@ typedef int (*clicon_rpc_cb)(
|
|||
/*! Registered Upgrade callback function
|
||||
* @param[in] h Clicon handle
|
||||
* @param[in] xn XML tree to be updated
|
||||
* @param[in] modname Name of module
|
||||
* @param[in] modns Namespace of module (for info)
|
||||
* @param[in] namespace Namespace of module
|
||||
* @param[in] from From revision on the form YYYYMMDD
|
||||
* @param[in] to To revision on the form YYYYMMDD (0 not in system)
|
||||
* @param[in] arg User argument given at rpc_callback_register()
|
||||
|
|
@ -83,8 +82,7 @@ typedef int (*clicon_rpc_cb)(
|
|||
typedef int (*clicon_upgrade_cb)(
|
||||
clicon_handle h,
|
||||
cxobj *xn,
|
||||
char *modname,
|
||||
char *modns,
|
||||
char *namespace,
|
||||
uint32_t from,
|
||||
uint32_t to,
|
||||
void *arg,
|
||||
|
|
@ -203,6 +201,11 @@ struct clixon_plugin_api{
|
|||
#define ca_trans_end u.cau_backend.cb_trans_end
|
||||
#define ca_trans_abort u.cau_backend.cb_trans_abort
|
||||
|
||||
/*
|
||||
* Macros
|
||||
*/
|
||||
#define upgrade_callback_register(h, cb, namespace, from, to, arg) upgrade_callback_reg_fn((h), (cb), #cb, (namespace), (from), (to), (arg))
|
||||
|
||||
typedef struct clixon_plugin_api clixon_plugin_api;
|
||||
|
||||
/* Internal plugin structure with dlopen() handle and plugin_api
|
||||
|
|
@ -246,8 +249,8 @@ int rpc_callback_delete_all(clicon_handle h);
|
|||
int rpc_callback_call(clicon_handle h, cxobj *xe, cbuf *cbret, void *arg);
|
||||
|
||||
/* upgrade callback API */
|
||||
int upgrade_callback_register(clicon_handle h, clicon_upgrade_cb cb, void *arg, char *name, char *namespace, uint32_t from, uint32_t to);
|
||||
int upgrade_callback_reg_fn(clicon_handle h, clicon_upgrade_cb cb, const char *strfn, char *namespace, uint32_t from, uint32_t to, void *arg);
|
||||
int upgrade_callback_delete_all(clicon_handle h);
|
||||
int upgrade_callback_call(clicon_handle h, cxobj *xt, char *modname, char *modns, uint32_t from, uint32_t to, cbuf *cbret);
|
||||
int upgrade_callback_call(clicon_handle h, cxobj *xt, char *namespace, uint32_t from, uint32_t to, cbuf *cbret);
|
||||
|
||||
#endif /* _CLIXON_PLUGIN_H_ */
|
||||
|
|
|
|||
|
|
@ -127,7 +127,9 @@ int xml_cv_set(cxobj *x, cg_var *cv);
|
|||
cxobj *xml_find(cxobj *xn_parent, char *name);
|
||||
|
||||
int xml_addsub(cxobj *xp, cxobj *xc);
|
||||
cxobj *xml_insert(cxobj *xt, char *tag);
|
||||
cxobj *xml_wrap_all(cxobj *xp, char *tag);
|
||||
cxobj *xml_wrap(cxobj *xc, char *tag);
|
||||
#define xml_insert(x,t) xml_wrap_all((x),(t))
|
||||
int xml_purge(cxobj *xc);
|
||||
int xml_child_rm(cxobj *xp, int i);
|
||||
int xml_rm(cxobj *xc);
|
||||
|
|
|
|||
|
|
@ -34,13 +34,14 @@
|
|||
* YANG module revision change management.
|
||||
* See draft-wang-netmod-module-revision-management-01
|
||||
*/
|
||||
#ifndef _CLIXON_YANG_CHANGELOG_H
|
||||
#define _CLIXON_YANG_CHANGELOG_H
|
||||
#ifndef _CLIXON_XML_CHANGELOG_H
|
||||
#define _CLIXON_XML_CHANGELOG_H
|
||||
|
||||
/*
|
||||
* Prototypes
|
||||
*/
|
||||
int yang_changelog_upgrade(clicon_handle h, cxobj *xn, char *modname, char *modns, uint32_t from, uint32_t to, void *arg, cbuf *cbret);
|
||||
int clixon_yang_changelog_init(clicon_handle h);
|
||||
int xml_changelog_upgrade(clicon_handle h, cxobj *xn, char *namespace, uint32_t from, uint32_t to, void *arg, cbuf *cbret);
|
||||
int clixon_xml_changelog_init(clicon_handle h);
|
||||
int xml_namespace_vec(clicon_handle h, cxobj *xt, char *namespace, cxobj ***vec, size_t *veclen);
|
||||
|
||||
#endif /* _CLIXON_YANG_CHANGELOG_H */
|
||||
#endif /* _CLIXON_XML_CHANGELOG_H */
|
||||
|
|
@ -51,8 +51,8 @@
|
|||
* This is in state of flux so it needss to be conatained and easily changed.
|
||||
*/
|
||||
typedef struct {
|
||||
cxobj *md_del; /* yang mdoule state deletes */
|
||||
cxobj *md_mod; /* yang mdoule state modifications */
|
||||
cxobj *md_del; /* yang module state deletes */
|
||||
cxobj *md_mod; /* yang module state modifications */
|
||||
} modstate_diff_t;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue