* Added new YANG clixon-clispec.yang

* This yang replaces many autocli option
* New `clixon-config@2021-12-05.yang` revision
  * Imported (as a sub-spec):  clixon-clispec.yang
This commit is contained in:
Olof hagsand 2021-12-19 22:52:42 +01:00
parent 4fbad467df
commit 32930f4f6b
8 changed files with 1193 additions and 39 deletions

View file

@ -42,14 +42,12 @@ datarootdir = @datarootdir@
YANG_INSTALLDIR = @YANG_INSTALLDIR@
YANGSPECS = clixon-config@2021-07-11.yang # 5.3
YANGSPECS = clixon-config@2021-11-11.yang # 5.4
YANGSPECS = clixon-config@2021-12-05.yang # 5.5
YANGSPECS += clixon-lib@2021-11-11.yang # 5.4
YANGSPECS += clixon-rfc5277@2008-07-01.yang
YANGSPECS += clixon-xml-changelog@2019-03-21.yang
YANGSPECS += clixon-restconf@2021-05-20.yang # 5.2
YANGSPECS += clixon-clispec@2021-12-05.yang
APPNAME = clixon # subdir ehere these files are installed
YANGSPECS += clixon-clispec@2021-12-05.yang # 5.5
all:

View file

@ -47,10 +47,11 @@ module clixon-clispec{
grouping clixon-clispec{
list rule {
key id;
ordered-by user;
description
"Represents a modification rule of a clixon clispec.";
ordered-by user; /* eg modules: omit * */
key id;
leaf id {
description
"Arbitrary string index for the rule";
@ -61,43 +62,54 @@ module clixon-clispec{
"Rule description";
type string;
}
leaf-list node-id {
description
"path in the form of <id>/<id> or just a single <id> identifying a YANG
schema-node identifier as defined in RFC 7950 Sec 6.5
Example: 'config', '/interfaces/interface'";
type string;
}
leaf-list module {
description
"Constraints the rule to the module names identified by a glob.
Wildchars '*' and '?' can be used.
Revision and yang suffix are ommitted
Note, this special rule is necessary since node-id cannot be used for
modules.
Example: 'openconfig-*'";
type string;
}
leaf-list yang-keyword {
description
"If present identifes a YANG keyword which the rule applies to
Example: 'container'";
type string;
}
leaf operation {
type enumeration {
enum exclude {
description
"Exclude a subtree from rendering of autocli.
Example: exclude: openconfig-* module";
}
enum include {
description
"Include a subtree to rendering of autocli.
Example: include: openconfig-wifi module";
}
enum omit {
description
"Remove a single keyword from a command.
Example: replace 'interfaces interface' with 'interface' ??";
}
enum hide {
description
"A complete command (not just single keyword) is hidden from CLI query,
help and completion, ie a user must type it manually.
Example: 'start shell'";
}
enum omit {
description
"Remove a single keyword from a command.
Example: replace 'interfaces interface' with 'interface'";
}
}
}
leaf node-id {
description
"path in the form of <id>/<id> or just a single <id> identifying a YANG
schema-node identifier as defined in RFC 7950 Sec 6.5
Example: 'config', '/interfaces/interface'";
mandatory true;
type string;
}
leaf yang-statement {
description
"If present identifes a YANG statement which the rule applies to
Example: 'container'";
type string;
}
leaf module {
description
"If present constraints the rule to the module names identified by a glob.
Wildchars '*' and '?' can be used.
Revision and yang suffix are ommitted
Example: 'openconfig-*'";
type string;
}
}
}
}

View file

@ -481,7 +481,7 @@ module clixon-config {
"Regexp of matching backend plugins in CLICON_BACKEND_DIR";
default "(.so)$";
}
leaf CLICON_NETCONF_DIR{
leaf CLICON_NETCONF_DIR {
type string;
description "Location of netconf (frontend) .so plugins";
}
@ -673,7 +673,7 @@ module clixon-config {
<CLICON_CLI_AUTOCLI_EXCLUDE>clixon-restconf</CLICON_CLI_AUTOCLI_EXCLUDE>
means generate autocli for all models except clixon-restconf.yang
The value can be a list of space separated module names";
default "clixon-restconf ietf-yang-library";
default "clixon-restconf";
}
leaf CLICON_CLI_VARONLY {
type int32;
@ -707,7 +707,8 @@ module clixon-config {
type int8;
default 0;
description
"Set CLI tab mode. This is a bitfield of three bits:
"Set CLI tab mode. This is actually a bitfield of three
combinations:
bit 1: 0: <tab> shows short info of available commands
1: <tab> has same output as <?>, ie line per command
bit 2: 0: On <tab>, select a command over a <var> if both exist

File diff suppressed because it is too large Load diff