New plugin callback: ca_yang_patch - for modifying existing YANG modules
C-API: Added `spec` parameter to `xml2xpath()`
This commit is contained in:
parent
48a0fb9968
commit
a5220805b1
16 changed files with 318 additions and 193 deletions
|
|
@ -487,7 +487,11 @@ text_modify(clicon_handle h,
|
|||
char *createstr = NULL;
|
||||
yang_stmt *yrestype = NULL;
|
||||
char *restype;
|
||||
|
||||
#ifdef CLIXON_YANG_SCHEMA_MOUNT
|
||||
int ismount = 0;
|
||||
yang_stmt *mount_yspec = NULL;
|
||||
#endif
|
||||
|
||||
if (x1 == NULL){
|
||||
clicon_err(OE_XML, EINVAL, "x1 is missing");
|
||||
goto done;
|
||||
|
|
@ -908,6 +912,15 @@ text_modify(clicon_handle h,
|
|||
yc = xml_spec(x1c);
|
||||
#endif
|
||||
}
|
||||
#ifdef CLIXON_YANG_SCHEMA_MOUNT
|
||||
/* Check if xc is unresolved mountpoint, ie no yang mount binding yet */
|
||||
if ((ismount = xml_yang_mount_get(x1c, &mount_yspec)) < 0)
|
||||
goto done;
|
||||
if (ismount && mount_yspec == NULL){
|
||||
ret = 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if ((ret = text_modify(h, x0c, x0, x0t, x1c, x1t,
|
||||
yc, op,
|
||||
username, xnacm, permit, cbret)) < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue