Changes as per review.
This commit is contained in:
parent
4ac1f0bad0
commit
b29387ce1d
2 changed files with 6 additions and 3 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue