Implementation of OpenConfig path compression.
This commit is contained in:
parent
2f56357adb
commit
4ac1f0bad0
6 changed files with 20 additions and 7 deletions
|
|
@ -89,6 +89,7 @@ static const map_str2int cli_genmodel_map[] = {
|
|||
{"VARS", GT_VARS},
|
||||
{"ALL", GT_ALL},
|
||||
{"HIDE", GT_HIDE},
|
||||
{"OC_COMPRESS", GT_OC_COMPRESS},
|
||||
{NULL, -1}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ xml2cli_recurse(FILE *f,
|
|||
/* If presence container, then print as leaf (but continue to children) */
|
||||
if (prepend)
|
||||
(*fn)(f, "%s", prepend);
|
||||
if (gt == GT_ALL || gt == GT_VARS || gt == GT_HIDE)
|
||||
if (gt == GT_ALL || gt == GT_VARS || gt == GT_HIDE || gt == GT_OC_COMPRESS)
|
||||
(*fn)(f, "%s ", xml_name(x));
|
||||
if ((body = xml_body(x)) != NULL){
|
||||
if (index(body, ' '))
|
||||
|
|
|
|||
|
|
@ -3255,7 +3255,7 @@ yang_container_cli_hide(yang_stmt *ys,
|
|||
|
||||
keyw = yang_keyword_get(ys);
|
||||
/* HIDE mode */
|
||||
if (gt != GT_HIDE)
|
||||
if (gt != GT_HIDE && gt != GT_OC_COMPRESS)
|
||||
return 0;
|
||||
/* A container */
|
||||
if (yang_keyword_get(ys) != Y_CONTAINER)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue