restconf RPC
This commit is contained in:
parent
d0660bf611
commit
fd91bb2933
17 changed files with 371 additions and 109 deletions
|
|
@ -38,16 +38,6 @@
|
|||
#ifndef _CLIXON_XML_MAP_H_
|
||||
#define _CLIXON_XML_MAP_H_
|
||||
|
||||
/*
|
||||
* lvmap_xml op codes
|
||||
*/
|
||||
enum {
|
||||
LVXML, /* a.b{x=1} -> <a><b>1 */
|
||||
LVXML_VAL, /* a.b{x=1} -> <a><b><x>1 */
|
||||
LVXML_VECVAL, /* key: a.b.0{x=1} -> <a><b><x>1</x></b></a> och */
|
||||
LVXML_VECVAL2, /* key: a.b.0{x=1} -> <a><x>1</x></a> och */
|
||||
};
|
||||
|
||||
/*
|
||||
* Prototypes
|
||||
*/
|
||||
|
|
@ -73,7 +63,8 @@ int xml_non_config_data(cxobj *xt, void *arg);
|
|||
int xml_spec_populate(cxobj *x, void *arg);
|
||||
int api_path2xpath_cvv(yang_spec *yspec, cvec *cvv, int offset, cbuf *xpath);
|
||||
int api_path2xpath(yang_spec *yspec, char *api_path, cbuf *xpath);
|
||||
int api_path2xml(char *api_path, yang_spec *yspec, cxobj *xtop, cxobj **xpathp, yang_node **ypathp);
|
||||
int api_path2xml(char *api_path, yang_spec *yspec, cxobj *xtop,
|
||||
int schemanode, cxobj **xpathp, yang_node **ypathp);
|
||||
int xml_merge(cxobj *x0, cxobj *x1, yang_spec *yspec);
|
||||
int yang_enum_int_value(cxobj *node, int32_t *val);
|
||||
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@ enum rfc_6020{
|
|||
typedef struct yang_stmt yang_stmt; /* forward */
|
||||
|
||||
/*! Yang type cache. Yang type statements can cache all typedef info here
|
||||
* @note unions not cached
|
||||
*/
|
||||
struct yang_type_cache{
|
||||
int yc_options;
|
||||
|
|
@ -158,7 +159,7 @@ struct yang_stmt{
|
|||
leaf, leaf-list, mandatory, fraction-digits */
|
||||
cvec *ys_cvec; /* List of stmt-specific variables
|
||||
Y_RANGE: range_min, range_max */
|
||||
yang_type_cache *ys_typecache; /* If ys_keyword==Y_TYPE, cache all typedef data */
|
||||
yang_type_cache *ys_typecache; /* If ys_keyword==Y_TYPE, cache all typedef data except unions */
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -205,7 +206,8 @@ yang_spec *ys_spec(yang_stmt *ys);
|
|||
yang_stmt *yang_find_module_by_prefix(yang_stmt *ys, char *prefix);
|
||||
yang_stmt *yang_find(yang_node *yn, int keyword, char *argument);
|
||||
yang_stmt *yang_find_datanode(yang_node *yn, char *argument);
|
||||
yang_stmt *yang_find_topnode(yang_spec *ysp, char *name);
|
||||
yang_stmt *yang_find_schemanode(yang_node *yn, char *argument);
|
||||
yang_stmt *yang_find_topnode(yang_spec *ysp, char *name, int schemanode);
|
||||
|
||||
int yang_print(FILE *f, yang_node *yn);
|
||||
int yang_print_cbuf(cbuf *cb, yang_node *yn, int marginal);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue