Refactoring of schema mount-points
Add new top-level `Y_MOUNTS` and add top-level yangs and mountpoints in yspecs
This commit is contained in:
parent
99503ac7fb
commit
dfe5c1bac1
18 changed files with 188 additions and 154 deletions
|
|
@ -355,7 +355,6 @@ get_user_cookie(char *cookiestr,
|
|||
int
|
||||
restconf_terminate(clixon_handle h)
|
||||
{
|
||||
yang_stmt *yspec;
|
||||
cvec *nsctx;
|
||||
cxobj *x;
|
||||
int fs; /* fgcx socket */
|
||||
|
|
@ -366,10 +365,6 @@ restconf_terminate(clixon_handle h)
|
|||
/* Delete all plugins, and RPC callbacks */
|
||||
clixon_plugin_module_exit(h);
|
||||
clicon_rpc_close_session(h);
|
||||
if ((yspec = clicon_dbspec_yang(h)) != NULL)
|
||||
ys_free(yspec);
|
||||
if ((yspec = clicon_config_yang(h)) != NULL)
|
||||
ys_free(yspec);
|
||||
yang_exit(h);
|
||||
if ((nsctx = clicon_nsctx_global_get(h)) != NULL)
|
||||
cvec_free(nsctx);
|
||||
|
|
|
|||
|
|
@ -498,9 +498,8 @@ main(int argc,
|
|||
goto done;
|
||||
|
||||
/* Create top-level yang spec and store as option */
|
||||
if ((yspec = yspec_new()) == NULL)
|
||||
if ((yspec = yspec_new(h, YSPEC_DATA_TOP)) == NULL)
|
||||
goto done;
|
||||
clicon_dbspec_yang_set(h, yspec);
|
||||
|
||||
/* Initialize plugin module by creating a handle holding plugin and callback lists */
|
||||
if (clixon_plugin_module_init(h) < 0)
|
||||
|
|
|
|||
|
|
@ -967,9 +967,8 @@ restconf_clixon_init(clixon_handle h,
|
|||
if (yang_metadata_init(h) < 0)
|
||||
goto done;
|
||||
/* Create top-level yang spec and store as option */
|
||||
if ((yspec = yspec_new()) == NULL)
|
||||
if ((yspec = yspec_new(h, YANG_DATA_TOP)) == NULL)
|
||||
goto done;
|
||||
clicon_dbspec_yang_set(h, yspec);
|
||||
|
||||
/* Load restconf plugins before yangs are loaded (eg extension callbacks) */
|
||||
if ((dir = clicon_restconf_dir(h)) != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue