Changes as per review.

This commit is contained in:
Kristofer Hallin 2021-10-21 22:01:04 +02:00
parent 4ac1f0bad0
commit b29387ce1d
No known key found for this signature in database
GPG key ID: 5A2B21943DE5C500
2 changed files with 6 additions and 3 deletions

View file

@ -833,13 +833,16 @@ yang2cli_container(clicon_handle h,
char *s; char *s;
int hide = 0; int hide = 0;
int hide_oc = 0; int hide_oc = 0;
int exist = 0;
char *opext = NULL; char *opext = NULL;
yang_stmt *ymod = NULL; yang_stmt *ymod = NULL;
char **name;
if (ys_real_module(ys, &ymod) < 0) if (ys_real_module(ys, &ymod) < 0)
goto done; goto done;
if (yang_extension_value(ymod, "openconfig-extensions", "http://openconfig.net/yang/openconfig-ext", &opext) == 0) { if (yang_extension_value(ymod, "openconfig-version", "http://openconfig.net/yang/openconfig-ext", &exist, NULL) < 0)
goto done;
if (exist) {
if (strcmp(yang_argument_get(ys), "config") == 0){ if (strcmp(yang_argument_get(ys), "config") == 0){
hide_oc = 1; hide_oc = 1;
} }

View file

@ -81,7 +81,7 @@ module $APPNAME {
} }
} }
container interfaces { container interfaces {
oc-ext:operational; oc-ext:openconfig-version;
list interface { list interface {
key name; key name;
leaf name { leaf name {