With-defaults CLI support
Extended cli_auto_show() with with-defaults argument, also changing its signature Example: Added with-defaults argument to clispec C-API: Added with-defaults argument to clicon_rpc_get_config Replaced with-defaults prefix/namespace with constants
This commit is contained in:
parent
42d5b6fba2
commit
743076b171
23 changed files with 256 additions and 56 deletions
|
|
@ -83,16 +83,35 @@ show("Show a particular state of the system"){
|
|||
cli, cli_pagination("use xpath var", "es", "http://example.com/ns/example-social", "cli", "10");
|
||||
text, cli_pagination("use xpath var", "es", "http://example.com/ns/example-social", "text", "10");
|
||||
json, cli_pagination("use xpath var", "es", "http://example.com/ns/example-social", "json", "10");
|
||||
}
|
||||
}
|
||||
configuration("Show configuration"), cli_auto_show("datamodel", "candidate", "text", true, false);{
|
||||
xml("Show configuration as XML"), cli_auto_show("datamodel", "candidate", "xml", true, false);
|
||||
cli("Show configuration as CLI commands"), cli_auto_show("datamodel", "candidate", "cli", true, false, "set ");
|
||||
xml("Show configuration as XML"), cli_auto_show("datamodel", "candidate", "xml", true, false);{
|
||||
default("With-default mode"){
|
||||
report-all, cli_auto_show("datamodel", "candidate", "xml", true, false, "report-all");
|
||||
trim, cli_auto_show("datamodel", "candidate", "xml", true, false, "trim");
|
||||
explicit, cli_auto_show("datamodel", "candidate", "xml", true, false, "explicit");
|
||||
report-all-tagged, cli_auto_show("datamodel", "candidate", "xml", true, false, "report-all-tagged");
|
||||
report-all-tagged-default, cli_auto_show("datamodel", "candidate", "xml", true, false, "report-all-tagged-default");
|
||||
report-all-tagged-strip, cli_auto_show("datamodel", "candidate", "xml", true, false, "report-all-tagged-strip");
|
||||
}
|
||||
}
|
||||
cli("Show configuration as CLI commands"), cli_auto_show("datamodel", "candidate", "cli", true, false, "explicit", "set ");
|
||||
netconf("Show configuration as netconf edit-config operation"), cli_auto_show("datamodel", "candidate", "netconf", true, false);
|
||||
text("Show configuration as text"), cli_auto_show("datamodel", "candidate", "text", true, false);
|
||||
json("Show configuration as JSON"), cli_auto_show("datamodel", "candidate", "json", true, false);
|
||||
|
||||
}
|
||||
state("Show configuration and state"), cli_auto_show("datamodel", "running", "text", true, true); {
|
||||
xml("Show configuration and state as XML"), cli_auto_show("datamodel", "running", "xml", true, true);
|
||||
xml("Show configuration and state as XML"), cli_auto_show("datamodel", "running", "xml", true, true);{
|
||||
default("With-default mode"){
|
||||
report-all, cli_auto_show("datamodel", "running", "xml", true, true, "report-all");
|
||||
trim, cli_auto_show("datamodel", "running", "xml", true, true, "trim");
|
||||
explicit, cli_auto_show("datamodel", "running", "xml", true, true, "explicit");
|
||||
report-all-tagged, cli_auto_show("datamodel", "running", "xml", true, true, "report-all-tagged");
|
||||
report-all-tagged-default, cli_auto_show("datamodel", "running", "xml", true, true, "report-all-tagged-default");
|
||||
report-all-tagged-strip, cli_auto_show("datamodel", "running", "xml", true, true, "report-all-tagged-strip");
|
||||
}
|
||||
}
|
||||
}
|
||||
yang("Show yang specs"), show_yang(); {
|
||||
clixon-example("Show clixon-example yang spec"), show_yang("clixon-example");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue