This commit is contained in:
Olof hagsand 2019-04-24 15:35:57 +02:00
commit 16de5f47ba
65 changed files with 2534 additions and 653 deletions

View file

@ -160,7 +160,8 @@ yang_modules_revision(clicon_handle h)
}
/*! Actually build the yang modules state XML tree
*/
* @see RFC7895
*/
static int
yms_build(clicon_handle h,
yang_stmt *yspec,
@ -198,8 +199,11 @@ yms_build(clicon_handle h,
cprintf(cb,"<name>%s</name>", ymod->ys_argument);
if ((ys = yang_find(ymod, Y_REVISION, NULL)) != NULL)
cprintf(cb,"<revision>%s</revision>", ys->ys_argument);
else
else{
/* RFC7895 1 If no (such) revision statement exists, the module's or
submodule's revision is the zero-length string. */
cprintf(cb,"<revision></revision>");
}
if ((ys = yang_find(ymod, Y_NAMESPACE, NULL)) != NULL)
cprintf(cb,"<namespace>%s</namespace>", ys->ys_argument);
else