* Added Yang "extension" statement. This includes parsing unknown

statements and identifying them as extensions or not. However,
  semantics for specific extensions must still be added.
* Renamed ytype_id and ytype_prefix to yarg_id and yarg_prefix, respectively

* Added cli_show_version()
This commit is contained in:
Olof hagsand 2018-02-25 20:01:53 +01:00
parent 2acacbf087
commit 35b142cf4d
14 changed files with 264 additions and 116 deletions

View file

@ -1,10 +1,14 @@
module example {
prefix ex;
import ietf-ip {
prefix ip;
prefix ip;
}
import ietf-routing {
prefix rt;
prefix rt;
}
import ietf-netconf-acm {
prefix nacm; /* See RFC 6536 */
}
description
"Example code that includes ietf-ip and ietf-routing";
"Example code that includes ietf-ip and ietf-routing";
}

View file

@ -81,7 +81,7 @@ mycallback(clicon_handle h, cvec *cvv, cvec *argv)
/* Show eth0 interfaces config using XPATH */
if (clicon_rpc_get_config(h, "running","/interfaces/interface[name=eth0]",
&xret) < 0)
NULL, &xret) < 0)
goto done;
xml_print(stdout, xret);

View file

@ -30,6 +30,7 @@ compare("Compare running and candidate"), compare_dbs((int32)1);
show("Show a particular state of the system"){
xpath("Show configuration") <xpath:string>("XPATH expression"), show_conf_xpath("candidate");
version("Show version"), cli_show_version("candidate", "text", "/");
compare("Compare candidate and running databases"), compare_dbs((int32)0);{
xml("Show comparison in xml"), compare_dbs((int32)0);
text("Show comparison in text"), compare_dbs((int32)1);