* Top-level default leafs assigned.
* Enforcing RFC 7950 Sec 7.6.1 means unassigned top-level leafs (or leafs under non-presence containers) are assigned default values. * NACM default behaviour is read-only (empty configs are dead-lockedd) * This applies if NACM is loaded and `CLICON_NACM_MODE` is `internal` * Fixed: [default values don't show up in datastores #111](https://github.com/clicon/clixon/issues/111)
This commit is contained in:
parent
65733ffe69
commit
794d51a365
30 changed files with 593 additions and 167 deletions
|
|
@ -54,7 +54,8 @@
|
|||
typedef struct {
|
||||
uint32_t de_id; /* session id */
|
||||
cxobj *de_xml; /* cache */
|
||||
int de_modified;
|
||||
int de_modified; /* Dirty since loaded/copied/committed/etc XXX:nocache? */
|
||||
int de_empty; /* Empty on read from file, xmldb_readfile and xmldb_put sets it */
|
||||
} db_elmnt;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ cxobj *xmldb_cache_get(clicon_handle h, const char *db);
|
|||
|
||||
int xmldb_modified_get(clicon_handle h, const char *db);
|
||||
int xmldb_modified_set(clicon_handle h, const char *db, int value);
|
||||
|
||||
int xmldb_empty_get(clicon_handle h, const char *db);
|
||||
int xmldb_dump(clicon_handle h, FILE *f, cxobj *xt);
|
||||
|
||||
#endif /* _CLIXON_DATASTORE_H */
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@ int xml_tree_prune_flagged(cxobj *xt, int flag, int test);
|
|||
int xml_namespace_change(cxobj *x, char *ns, char *prefix);
|
||||
int xml_default(cxobj *x);
|
||||
int xml_default_recurse(cxobj *xn);
|
||||
int xml_default_yspec(yang_stmt *yspec, cxobj *xn);
|
||||
int xml_nopresence_default(cxobj *xt);
|
||||
int xml_nopresence_default_mark(cxobj *x, void *arg);
|
||||
int xml_sanity(cxobj *x, void *arg);
|
||||
int xml_non_config_data(cxobj *xt, void *arg);
|
||||
|
||||
|
|
|
|||
|
|
@ -49,12 +49,13 @@
|
|||
|
||||
/* Struct containing module state differences between two modules or two
|
||||
* revisions of same module.
|
||||
* This is in state of flux so it needs to be contained and easily changed.
|
||||
* The most significant usecase is one module-state is a loaded datastore and the other
|
||||
* is the one loaded by the server by its YANG files.
|
||||
*/
|
||||
typedef struct {
|
||||
int md_status; /* 0 if no module-state in a datastore, 1 if there is */
|
||||
char *md_set_id; /* server-specific identifier */
|
||||
cxobj *md_diff; /* yang module state containing revisions and XML_FLAG_ADD|DEL|CHANGE */
|
||||
cxobj *md_diff; /* yang module state containing revisions and XML_FLAG_ADD|DEL|CHANGE */
|
||||
} modstate_diff_t;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue