1 submodule tailf-cli-extensions {
2 belongs-to tailf-common {
6 include tailf-meta-extensions {
7 revision-date 2013-11-07;
13 "This module defines all Tail-f YANG extensions statements
14 related to CLI customization.
16 See also the 'display-' statements and the 'alt-name' statement
17 in tailf-common.yang.";
21 "Released as part of ConfD-5.4 / NCS-3.4.
23 Added cli-show-obu-comments.
24 Added cli-batch-confirm-default.";
28 "Released as part of ConfD-5.3 / NCS-3.3.
30 Added cli-strict-leafref.
31 Added cli-trigger-on-*.
32 Allow cli-boolean-no in typedef.";
36 "Released as part of ConfD-5.0.
38 Added cli-disabled-info.
39 Added cli-suppress-shortenabled.
41 Added cli-case-sensitive and cli-case-insensitive.";
45 "Released as part of ConfD-4.1.
47 Added cli-delete-when-empty.
48 Added cli-diff-dependency.
49 Added cli-ignore-modified.";
53 "Released as part of ConfD-4.0.1.
55 Allow tailf:cli-operational-mode and tailf:cli-configure-mode in
60 "Released as part of ConfD-4.0.
62 Do not allow tailf:cli-drop-node-name and tailf:cli-sequence-commands
64 Added tailf:cli-configure-mode.
65 Added tailf:cli-operational-mode.";
69 "Released as part of ConfD-3.9.2.
71 Added tailf:cli-no-value-on-delete.
72 Added tailf:cli-no-name-on-delete.
73 Added tailf:cli-replace-all.
74 Allow tailf:cli-remove-before-change in leaf.";
78 "Released as part of ConfD-3.9.
80 Allow tailf:cli-range-list-syntax in lists with one integer based
85 "Released as part of ConfD-3.8.
87 Added tailf:cli-min-column-with.";
91 "Released as part of ConfD-3.7.
93 Added tailf:cli-disallow-value.
94 Added tailf:cli-multi-word.
95 Added tailf:cli-before-key.
96 Allow tailf:cli-flatten-container in list.";
100 "Released as part of ConfD-3.6.2.
102 Added cli-suppress-silent-no.
103 Added cli-range-delimiters.
104 Removed duplicate tailf:use-in statement from cli-show-config.";
106 revision 2011-06-30 {
108 "Released as part of ConfD-3.6.1.
111 Added cli-range-list-syntax.";
113 revision 2011-05-26 {
115 "Released as part of ConfD-3.6.
117 Added cli-allow-join-with-key.
118 Added cli-display-joined.";
120 revision 2011-02-24 {
122 "Released as part of ConfD-3.5.
124 Added cli-boolean-no.
125 Added cli-exit-command.
126 Added cli-custom-range-enumerator.
127 Added cli-reset-siblings.
128 Added cli-reset-all-siblings.
129 Added cli-reset-container.
130 Added cli-hide-in-submode.
131 Added cli-prefix-key.
132 Added cli-show-with-default.
134 Added 'commasep' and 'show:<dictionary>' filter in
137 Removed deprecated tailf:cli-default-order.";
139 revision 2010-12-02 {
141 "Released as part of ConfD-3.4.1.
143 Added cli-flatten-container.";
145 revision 2010-11-04 {
147 "Released as part of ConfD-3.4.
149 Added cli-key-format.
150 Added cli-list-syntax.
151 Added cli-flat-list-syntax.
153 The following statements were added in ConfD-3.3.3:
155 Added cli-suppress-list-no.
156 Added cli-suppress-no.
158 Added cli-incomplete-no.";
160 revision 2010-09-16 {
162 "Released as part of ConfD-3.3.2.
164 Added cli-autowizard.
165 Added cli-multi-word-key.
166 Added cli-no-match-completion.";
168 revision 2010-08-19 {
170 "Released as part of ConfD-3.3.1.
172 Added cli-show-template-footer.
173 Added cli-run-template-footer.
174 Added cli-table-footer.
175 Changed cli-table-legend to be a template.";
177 revision 2010-06-17 {
179 "Released as part of ConfD-3.3.
181 Added cli-display-empty-config.
183 Added cli-expose-key-name.
185 Added cli-value-display-template.
187 Added cli-run-template.
188 Added cli-run-template-legend.
189 Added cli-run-template-enter.
191 Added cli-suppress-key-sort.
193 Added cli-suppress-validation-warning-prompt.
195 Added 'hex' and 'hexlist' as display parameters in the
196 type cli-template-string.
198 Deprecated tailf:cli-default-order.";
200 revision 2010-03-18 {
202 "Released as part of ConfD-3.2.";
205 extension cli-show-no {
208 tailf:use-in "leaf-list";
209 tailf:use-in "refine";
210 tailf:use-in "tailf:symlink";
211 tailf:use-in "container";
213 "Specifies that an optional leaf node or presence container
214 should be displayed as 'no <name>' when it does not exist.
215 For example, if a leaf 'shutdown' has this property and
216 does not exist, 'no shutdown' is displayed.
218 Used in I- and C-style CLIs.";
221 extension cli-disallow-value {
228 tailf:use-in "leaf-list";
229 tailf:use-in "refine";
230 tailf:use-in "tailf:symlink";
232 "Specifies that a pattern for invalid values.
234 Used in I- and C-style CLIs.";
237 extension cli-boolean-no {
238 tailf:use-in "typedef";
240 tailf:use-in "refine";
241 tailf:use-in "tailf:symlink";
242 tailf:substatement "tailf:cli-reversed";
244 "Specifies that a leaf of type boolean should be displayed as
245 '<leafname>' if set to true, and 'no <leafname>' if set to
248 Cannot be used in conjunction with tailf:cli-hide-in-submode
249 or tailf:cli-compact-syntax.
251 Used in I- and C-style CLIs.";
254 extension cli-reversed {
255 tailf:use-in "tailf:cli-boolean-no";
257 "Specified that true should be displayed as 'no <name>' and
260 Used in I- and C-style CLIs.";
263 extension cli-autowizard {
265 tailf:use-in "tailf:symlink";
266 tailf:use-in "refine";
268 "Specifies that the autowizard should include this leaf even
269 if the leaf is optional.
271 One use case is when implementing pre-configuration of devices.
272 A config false node can be defined for showing if the
273 configuration is active or not (preconfigured).
275 Used in J-, I- and C-style CLIs.";
278 extension cli-show-config {
280 tailf:use-in "leaf-list";
282 tailf:use-in "container";
283 tailf:use-in "refine";
284 tailf:use-in "tailf:symlink";
286 "Specifies that the node will be included when doing a 'show
287 running-configuration', even if it is a non-config node.
289 Used in I- and C-style CLIs.";
292 extension cli-display-empty-config {
294 tailf:use-in "tailf:symlink";
295 tailf:use-in "refine";
297 "Specifies that the node will be included when doing a 'show
298 stats', even if it is a non-config node, provided
299 that the list contains at least one non-config node.
301 Used in J-style CLI.";
304 extension cli-mode-name {
310 tailf:use-in "container";
312 tailf:use-in "tailf:symlink";
313 tailf:use-in "refine";
315 "Specifies a custom mode name, instead of the default which is the
316 name of the list or container node.
318 Can be used in config nodes only. If used in a container, the
319 container must also have a tailf:cli-add-mode statement, and if
320 used in a list, the list must not also have a
321 tailf:cli-suppress-mode statement.
323 Variables for the list keys in the current mode are available.
324 For examples, 'config-foo-xx$(name)' (privided the key leaf
327 Used in I- and C-style CLIs.";
330 extension cli-show-order-taglist {
336 tailf:use-in "container";
338 tailf:use-in "tailf:symlink";
339 tailf:use-in "refine";
341 "Specifies a custom display order for nodes with the
342 tailf:cli-show-order-tag attribute. Nodes will be displayed
343 in the order indicated in the list. Nodes without a tag will
344 be displayed after all nodes with a tag have been displayed.
346 The scope of a taglist is until a new taglist is encountered.
348 Used in I- and C-style CLIs.";
351 extension cli-show-order-tag {
357 tailf:use-in "container";
360 tailf:use-in "leaf-list";
361 tailf:use-in "tailf:symlink";
362 tailf:use-in "refine";
364 "Specifies a custom display order for nodes with the
365 tailf:cli-show-order-tag attribute. Nodes will be displayed
366 in the order indicated by a cli-show-order-taglist attribute in
369 The scope of a tag reaches until a new taglist is encountered.
371 Used in I- and C-style CLIs.";
374 extension cli-mode-name-actionpoint {
380 tailf:use-in "container";
382 tailf:use-in "refine";
384 "Specifies that a custom function will be invoked to find out the mode
385 name, instead of using the default with is the name of the list
388 The argument is the name of an actionpoint, which must be
389 implemented by custom code. In the actionpoint, the command()
390 callback function will be invoked, and it must return a string
391 with the mode name. See confd_lib_dp(3) for details.
393 Can be used in config nodes only. If used in a container, the
394 container must also have a tailf:cli-add-mode statement, and if
395 used in a list, the list must not also have a
396 tailf:cli-suppress-mode statement.
398 Used in I- and C-style CLIs.";
401 extension cli-add-mode {
402 tailf:use-in "container";
403 tailf:use-in "tailf:symlink";
404 tailf:use-in "refine";
406 "Creates a mode of the container.
408 Can be used in config nodes only.
410 Used in I- and C-style CLIs.";
413 extension cli-flatten-container {
414 tailf:use-in "container";
416 tailf:use-in "tailf:symlink";
417 tailf:use-in "refine";
419 "Allows the CLI to exit the container and continue to input
420 from the parent container when all leaves in the current
421 container has been set.
423 Can be used in config nodes only.
425 Used in I- and C-style CLIs.";
428 extension cli-suppress-mode {
430 tailf:use-in "tailf:symlink";
431 tailf:use-in "refine";
433 "Instructs the CLI engine to not make a mode of the list node.
435 Can be used in config nodes only.
437 Used in I- and C-style CLIs.";
440 extension cli-delete-when-empty {
442 tailf:use-in "container";
444 "Instructs the CLI engine to delete the list when the last list
445 instance is deleted'. Requires that cli-suppress-mode is set.
447 The behavior is recursive. If all optional leafs in a list
448 instance are deleted the list instance itself is deleted. If
449 that list instance happens to be the last list instance in a
450 list it is also deleted. And so on. Used in I- and C-style
454 extension cli-remove-before-change {
455 tailf:use-in "leaf-list";
458 tailf:use-in "tailf:symlink";
459 tailf:use-in "refine";
461 "Instructs the CLI engine to generate a no-commnd before
462 modifying an existing instance. It only applies when
463 generating diffs, eg 'show configuration' in C-style.";
466 extension cli-no-value-on-delete {
468 tailf:use-in "leaf-list";
469 tailf:use-in "tailf:symlink";
470 tailf:use-in "refine";
472 "When displaying the deleted version of this leaf do not
473 include the old value.
478 extension cli-no-name-on-delete {
480 tailf:use-in "container";
482 tailf:use-in "leaf-list";
483 tailf:use-in "tailf:symlink";
484 tailf:use-in "refine";
486 "When displaying the deleted version of this element do not
492 extension cli-embed-no-on-delete {
494 tailf:use-in "container";
496 tailf:use-in "leaf-list";
497 tailf:use-in "tailf:symlink";
498 tailf:use-in "refine";
500 "Embed no in front of the element name insead of at the
501 beginning of the line.
506 extension cli-recursive-delete {
507 tailf:use-in "container";
509 tailf:use-in "tailf:symlink";
510 tailf:use-in "refine";
512 "When generating configuration diffs delete all contents
513 of a container or list before deleting the node.
518 extension cli-diff-dependency {
524 tailf:use-in "container";
527 tailf:use-in "leaf-list";
528 tailf:use-in "tailf:symlink";
529 tailf:use-in "refine";
530 tailf:substatement "tailf:xpath-root";
531 tailf:substatement "tailf:cli-trigger-on-set";
532 tailf:substatement "tailf:cli-trigger-on-delete";
533 tailf:substatement "tailf:cli-trigger-on-all";
536 "Tells the 'show configuration' command, and the diff generator
537 that this node depends on another node. When removing the node
538 with this declaration, it should be removed before the node
539 it depends on is removed, ie the declaration controlls the ordering
540 of the commands in the 'show configuration' output.
545 extension cli-trigger-on-set {
546 tailf:use-in "tailf:cli-diff-dependency";
548 "Specify that the dependency should trigger on set/modify of
549 the target path, but deletion of the target will trigger the
550 current node to be placed in front of the target.
552 The annotation can be used to get the diff behavior where
553 one leaf is first deleted before the other leaf is set.
554 For example, having the data model below:
558 tailf:cli-diff-dependency \"../B\" {
559 tailf:cli-trigger-on-set;
564 tailf:cli-diff-dependency \"../A\" {
565 tailf:cli-trigger-on-set;
571 produces the following diffs when setting one leaf
572 and deleting the other
582 this can also be done with list instances, for example
588 tailf:cli-diff-dependency \"/c[id=current()/../id]\" {
589 tailf:cli-trigger-on-set;
598 tailf:cli-diff-dependency \"/a[id=current()/../id]\" {
599 tailf:cli-trigger-on-set;
617 In the above case if we have the same id in list \"a\" and \"c\"
618 and we delete the instance in one list, and add it in the other,
619 then the deletion will always preceed the create.
623 extension cli-trigger-on-delete {
624 tailf:use-in "tailf:cli-diff-dependency";
626 "This annotation can be used togeter with tailf:cli-trigger-on-set
627 to also get the behavior that when deleting the target display
628 changes to this node first. For exmaple:
634 tailf:cli-no-value-on-delete;
643 when \"../opmode = 'transparent'\";
645 tailf:cli-no-value-on-delete;
646 tailf:cli-diff-dependency '../opmode' {
647 tailf:cli-trigger-on-set;
648 tailf:cli-trigger-on-delete;
655 What we are trying to achieve here is that if manageip is
656 deleted, it should be displayed before opmode, but if we
657 configure both opmode and manageip, we should display opmode
658 first, ie get the diffs:
679 The cli-trigger-on-set annotation will cause the 'no manageip'
680 command to be displayed before setting opmode. The
681 tailf:cli-trigger-on-delete will cause 'no manageip' to be
682 placed before 'no opmode' when both are deleted.
684 In the first diff where both are created, opmode will come first
685 due to the diff-dependency setting, regardless of the
686 cli-trigger-on-delete and cli-trigger-on-set.
690 extension cli-trigger-on-all {
691 tailf:use-in "tailf:cli-diff-dependency";
693 "Specify that the dependency should always trigger. It is the
694 same as placing one element before another in the data model.
695 For example, given the data model:
699 tailf:cli-diff-dependency '../B' {
700 tailf:cli-trigger-on-all;
721 extension cli-ignore-modified {
722 tailf:use-in "container";
725 tailf:use-in "leaf-list";
726 tailf:use-in "tailf:symlink";
727 tailf:use-in "refine";
729 "Tells the cdb_cli_diff_iterate system call to not generate
730 a CLI string when this container is modified. The string will
731 instead be generated for the modified sub-element.
733 Applies to C-style and I-style";
736 extension cli-show-long-obu-diffs {
738 tailf:use-in "tailf:symlink";
739 tailf:use-in "refine";
741 "Instructs the CLI engine to not generate 'insert' comments
742 when displaying configuration changes of ordered-by user
743 lists, but instead explicitly remove old instances with 'no'
744 and then add the instances following a newly inserted instance.
745 Should not be used together with tailf:cli-show-obu-comments";
748 extension cli-show-obu-comments {
750 tailf:use-in "tailf:symlink";
751 tailf:use-in "refine";
753 "Enforces the CLI engine to generate 'insert' comments
754 when displaying configuration changes of ordered-by user
755 lists. Should not be used together with tailf:cli-show-long-obu-diffs";
758 extension cli-allow-join-with-key {
760 tailf:use-in "tailf:symlink";
761 tailf:use-in "refine";
762 tailf:substatement "tailf:cli-display-joined";
764 "Indicates that the list name may be written together
765 with the first key, without requiring a whitespace
766 in between, ie allowing both
767 interface ethernet1/1
769 interface ethernet 1/1
771 Used in I- and C-style CLIs.";
774 extension cli-allow-join-with-value {
776 tailf:use-in "tailf:symlink";
777 tailf:use-in "refine";
778 tailf:substatement "tailf:cli-display-joined";
780 "Indicates that the leaf name may be written together
781 with the value, without requiring a whitespace
782 in between, ie allowing both
783 interface ethernet1/1
785 interface ethernet 1/1
787 Used in I- and C-style CLIs.";
790 extension cli-display-joined {
791 tailf:use-in "tailf:cli-allow-join-with-key";
792 tailf:use-in "tailf:cli-allow-join-with-value";
794 "Specifies that the joined version should be used when displaying
795 the configuration in C- and I- mode.";
798 extension cli-exit-command {
806 tailf:use-in "container";
807 tailf:use-in "refine";
808 tailf:use-in "tailf:symlink";
809 tailf:substatement "tailf:info";
811 "Tells the CLI to add an explicit exit-from-submode command.
812 The tailf:info substatement can be used for adding a custom
813 info text for the command.
815 Used in I- and C-style CLIs.";
818 extension cli-explicit-exit {
820 tailf:use-in "container";
821 tailf:use-in "refine";
822 tailf:use-in "tailf:symlink";
824 "Tells the CLI to add an explicit exit command when displaying
825 the configuration. It will not be added if cli-exit-command
826 is defined as well. The annotation is inherited by all
829 Used in I- and C-style CLIs.";
832 extension cli-key-format {
840 tailf:use-in "tailf:symlink";
841 tailf:use-in "refine";
843 "The format string is used when parsing a key value and when
844 generating a key value for an existing configuration. The key
845 items are numbered from 1-N and the format string should
846 indicate how they are related by using $(X) (where X is the
847 key number). For example:
849 tailf:cli-key-format '$(1)-$(2)' means that the first key
850 item is concatenated with the second key item by a '-'.
852 Used in J-, I- and C-style CLIs.";
855 extension cli-suppress-key-sort {
857 tailf:use-in "tailf:symlink";
858 tailf:use-in "refine";
860 "Instructs the CLI engine to not sort the keys in alphabetical order
861 when presenting them to the user during TAB completion.
863 Used in J-, I- and C-style CLIs.";
866 extension cli-suppress-table {
868 tailf:use-in "tailf:symlink";
869 tailf:use-in "refine";
871 "Instructs the CLI engine to not print the list as a table in
874 Can be used in non-config nodes only.
876 Used in I- and C-style CLIs.";
879 extension cli-suppress-validation-warning-prompt {
882 tailf:use-in "container";
883 tailf:use-in "leaf-list";
884 tailf:use-in "tailf:symlink";
885 tailf:use-in "refine";
887 "Instructs the CLI engine to not prompt the user whether to proceed
888 or not if a warning is generated for this node.
890 Used in I- and C-style CLIs.";
893 extension cli-suppress-key-abbreviation {
895 tailf:use-in "tailf:symlink";
896 tailf:use-in "refine";
898 "Key values cannot be abbreviated. The user must always give
899 complete values for keys.
901 In the J-style CLI this is relevant when using the commands
904 In the I- and C-style CLIs this is relevant when using the
905 commands 'no', 'show configuration' and for commands to enter
908 See also /confdConfig/cli/allowAbbrevKeys in confd.conf(5).";
911 extension cli-allow-key-abbreviation {
913 tailf:use-in "tailf:symlink";
914 tailf:use-in "refine";
916 "Key values can be abbreviated.
918 In the J-style CLI this is relevant when using the commands
921 In the I- and C-style CLIs this is relevant when using the
922 commands 'no', 'show configuration' and for commands to enter
925 See also /confdConfig/cli/allowAbbrevKeys in confd.conf(5).";
928 extension cli-table-legend {
936 tailf:use-in "tailf:symlink";
937 tailf:use-in "refine";
939 "Specifies a template string to be printed before all list entries are
942 Used in J-, I- and C-style CLIs.";
945 extension cli-table-footer {
953 tailf:use-in "tailf:symlink";
954 tailf:use-in "refine";
956 "Specifies a template string to be printed after all list entries are
959 Used in J-, I- and C-style CLIs.";
962 extension cli-completion-actionpoint {
965 type tailf:identifier;
968 tailf:use-in "leaf-list";
970 tailf:use-in "tailf:symlink";
971 tailf:use-in "refine";
972 tailf:substatement "tailf:cli-completion-id";
974 "Specifies that completion for the leaf values is done through a
977 The argument is the name of an actionpoint, which must be
978 implemented by custom code. In the actionpoint, the completion()
979 callback function will be invoked. See confd_lib_dp(3) for details.
981 Used in J-, I- and C-style CLIs.";
984 extension cli-completion-id {
987 type tailf:identifier;
990 tailf:use-in "tailf:cli-completion-actionpoint";
991 tailf:use-in "tailf:cli-custom-range-actionpoint";
993 "Specifies a string which is passed to the callback when invoked.
994 This makes it possible to use the same callback at several
995 locations and still keep track of which point it is invoked
999 extension cli-allow-caching {
1000 tailf:use-in "tailf:cli-custom-range-actionpoint";
1001 tailf:use-in "tailf:cli-custom-range-enumerator";
1003 "Allow caching of the evaluation results between different parent paths.";
1006 extension cli-multi-line-prompt {
1007 tailf:use-in "leaf";
1008 tailf:use-in "tailf:symlink";
1009 tailf:use-in "refine";
1011 "Tells the CLI to automatically enter multi-line mode when prompting
1012 the user for a value to this leaf.
1014 Used in J-, I- and C-style CLIs.";
1017 extension cli-multi-word-key {
1018 tailf:use-in "leaf";
1019 tailf:use-in "tailf:symlink";
1020 tailf:use-in "refine";
1021 tailf:substatement "tailf:cli-max-words";
1023 "Specifies that the key should allow multiple tokens for the
1024 value. Proper type restrictions needs to be used to limit
1025 the range of the leaf value.
1027 Can be used in key leafs only.
1029 Used in J-, I- and C-style CLIs.";
1032 extension cli-max-words {
1038 tailf:use-in "tailf:cli-multi-word-key";
1039 tailf:use-in "tailf:cli-multi-word";
1040 tailf:use-in "tailf:cli-multi-value";
1042 "Specifies the maximum number of allowed words for the key or value.";
1045 extension cli-allow-range {
1046 tailf:use-in "leaf";
1047 tailf:use-in "tailf:symlink";
1048 tailf:use-in "refine";
1050 "Means that the non-integer key should allow range expressions.
1052 Can be used in key leafs only.
1054 Used in J-, I- and C-style CLIs.";
1057 extension cli-range-delimiters {
1063 tailf:use-in "list";
1064 tailf:use-in "tailf:symlink";
1065 tailf:use-in "refine";
1067 "Allows for custom delimiters to be defined for range expressions.
1068 By default only / is considered a delimiter, ie when processing
1069 a key like 1/2/3 then each of 1, 2 and 3 will be matched separately
1070 agains range expressions, ie given the expression 1-3/5-6/7,8
1071 1 will be matched with 1-3, 2 with 5-6, and 3 with 7,8. If, for
1072 example, the delimiters value is set to '/.' then both '/' and
1073 '.' will be considered delimiters and an key such as 1/2/3.4 will
1074 consist of the enteties 1,2,3,4, all matched separately.
1076 Used in J-, I- and C-style CLIs.";
1079 extension cli-suppress-range {
1080 tailf:use-in "leaf";
1081 tailf:use-in "tailf:symlink";
1082 tailf:use-in "refine";
1084 "Means that the integer key should not allow range expressions.
1086 Can be used in key leafs only.
1088 Used in J-, I- and C-style CLIs.";
1091 extension cli-custom-range {
1092 tailf:use-in "leaf";
1093 tailf:use-in "tailf:symlink";
1094 tailf:use-in "refine";
1095 tailf:substatement "tailf:cli-range-type" {
1096 tailf:occurence "1";
1099 "Specifies that the key should support ranges. A type matching the
1100 range expression must be supplied.
1102 Can be used in key leafs only.
1104 Used in J-, I- and C-style CLIs.";
1107 extension cli-custom-range-actionpoint {
1110 type tailf:identifier;
1113 tailf:use-in "list";
1114 tailf:use-in "tailf:symlink";
1115 tailf:use-in "refine";
1116 tailf:substatement "tailf:cli-completion-id";
1117 tailf:substatement "tailf:cli-allow-caching";
1119 "Specifies that the list supports range expressions and that a custom
1120 function will be invoked to determine if an instance belong in
1121 the range or not. At least one key element needs a
1122 cli-custom-range statement.
1124 The argument is the name of an actionpoint, which must be
1125 implemented by custom code. In the actionpoint, the
1126 completion() callback function will be invoked. See
1127 confd_lib_dp(3) for details.
1129 When a range expression value which matches the type is given in
1130 the CLI, the CLI engine will invoke the callback with each
1131 existing list entry instance. If the callback returns CONFD_OK,
1132 it matches the range expression, and if it returns CONFD_ERR, it
1135 Used in J-, I- and C-style CLIs.";
1138 extension cli-custom-range-enumerator {
1141 type tailf:identifier;
1144 tailf:use-in "list";
1145 tailf:use-in "tailf:symlink";
1146 tailf:use-in "refine";
1147 tailf:substatement "tailf:cli-completion-id";
1148 tailf:substatement "tailf:cli-allow-caching";
1150 "Specifies a callback to invoke to get an array of
1151 instances matching a regular expression. This is used
1152 when instances should be allowed to be created using
1153 a range expression in set.
1155 The callback is not used for delete or show operations.
1157 The callback is allowed to return a superset of all matching
1158 instances since the instances will be filtered using the
1159 range expression afterwards.
1161 Used in J-, I- and C-style CLIs.";
1164 extension cli-range-type {
1170 tailf:use-in "tailf:cli-custom-range";
1172 "This statement contains the name of a derived type, possibly
1173 with a prefix. If no prefix is given, the type must be defined in
1174 the local module. For example:
1176 cli-range-type p:my-range-type;
1178 All range expressions must match this type, and a valid key
1179 value must not match this type.";
1182 extension cli-allow-wildcard {
1183 tailf:use-in "list";
1184 tailf:use-in "tailf:symlink";
1185 tailf:use-in "refine";
1187 "Means that the list allows wildcard expressions in the 'show' pattern.
1189 See also /confdConfig/cli/allowWildcard in confd.conf(5).
1191 Used in J-, I- and C-style CLIs.";
1194 extension cli-suppress-wildcard {
1195 tailf:use-in "list";
1196 tailf:use-in "tailf:symlink";
1197 tailf:use-in "refine";
1199 "Means that the list does not allow wildcard expressions in the 'show'
1202 See also /confdConfig/cli/allowWildcard in confd.conf(5).
1204 Used in J-, I- and C-style CLIs.";
1207 extension cli-configure-mode {
1208 tailf:use-in "tailf:action";
1211 "An action or rpc with this attribute will be available in
1212 configure mode, but not in operational mode.
1214 The default is that the action or rpc is available in both
1215 configure and operational mode.
1217 Used in J-, I- and C-style CLIs.";
1220 extension cli-operational-mode {
1221 tailf:use-in "tailf:action";
1224 "An action or rpc with this attribute will be available in
1225 operational mode, but not in configure mode.
1227 The default is that the action or rpc is available in both
1228 configure and operational mode.
1230 Used in J-, I- and C-style CLIs.";
1233 extension cli-mount-point {
1239 tailf:use-in "tailf:action";
1242 "By default actions are mounted under the 'request'
1243 command in the J-style CLI and at the top-level in
1244 the I- and C-style CLIs. This annotation allowes
1245 the action to be mounted under other top level commands";
1248 extension cli-batch-confirm-default {
1254 tailf:use-in "tailf:confirm-text";
1256 "Specifies if the default is to proceed or abort the action during batch
1257 processing in the CLI (e.g. non-interactive mode) when a confirm-text is
1258 set. If this value is not specified, the default value may instead be
1259 provdied by tailf:confirm-default or by the ConfD global default if
1260 specified in a clispec(5).";
1263 extension cli-delayed-auto-commit {
1264 tailf:use-in "container";
1265 tailf:use-in "list";
1266 tailf:use-in "tailf:symlink";
1267 tailf:use-in "refine";
1269 "Enables transactions while in a specific submode (or submode of that
1270 mode). The modifications performed in that mode will not take effect
1271 until the user exits that submode.
1273 Can be used in config nodes only. If used in a container, the
1274 container must also have a tailf:cli-add-mode statement, and if
1275 used in a list, the list must not also have a
1276 tailf:cli-suppress-mode statement.
1278 Used in I- and C-style CLIs.";
1281 extension cli-preformatted {
1282 tailf:use-in "leaf";
1283 tailf:use-in "tailf:symlink";
1284 tailf:use-in "refine";
1286 "Suppresses quoting of non-config elements when displaying them.
1287 Newlines will be preserved in strings etc.
1289 Used in J-, I- and C-style CLIs.";
1292 extension cli-disabled-info {
1298 tailf:use-in "leaf";
1299 tailf:use-in "tailf:symlink";
1300 tailf:use-in "refine";
1302 "Specifies an info string that will be used as a descriptive text for the
1303 value 'disable' (false) of boolean-typed leafs when the confd.conf(5)
1304 setting /confdConfig/cli/useShortEnabled is set to 'true'.
1306 Used in J-, I- and C-style CLIs.";
1309 extension cli-suppress-shortenabled {
1310 tailf:use-in "leaf";
1311 tailf:use-in "tailf:symlink";
1312 tailf:use-in "refine";
1314 "Suppresses the confd.conf(5) setting /confdConfig/cli/useShortEnabled.
1316 Used in J-, I- and C-style CLIs.";
1319 extension cli-trim-default {
1320 tailf:use-in "leaf";
1321 tailf:use-in "tailf:symlink";
1322 tailf:use-in "refine";
1324 "Do not display value if it is same as default.
1326 Used in I- and C-style CLIs.";
1329 extension cli-expose-key-name {
1330 tailf:use-in "leaf";
1331 tailf:use-in "tailf:symlink";
1332 tailf:use-in "refine";
1334 "Force the user to enter the name of the key and display the
1335 key name when displaying the running-configuration.
1337 Used in J-, I- and C-style CLIs.";
1340 extension cli-enforce-table {
1341 tailf:use-in "list";
1342 tailf:use-in "tailf:symlink";
1343 tailf:use-in "refine";
1345 "Forces the generation of a table for a list element node regardless of
1346 whether the table will be too wide or not. This applies to the
1347 tables generated by the auto-rendred show commands for non-config data.
1349 Used in I- and C-style CLIs.";
1352 extension cli-drop-node-name {
1353 tailf:use-in "leaf";
1354 tailf:use-in "container";
1355 tailf:use-in "list";
1356 tailf:use-in "leaf-list";
1357 tailf:use-in "tailf:symlink";
1358 tailf:use-in "refine";
1360 "Specifies that the name of a node is not present in the CLI.
1362 If tailf:cli-drop-node-name is given on a child to a list node,
1363 we recommend that you also use tailf:cli-suppress-mode on that
1364 list node, otherwise the CLI will be very confusing.
1366 For example, consider this data model, from the tailf-aaa module:
1376 tailf:cli-drop-node-name;
1380 If you type 'alias foo' in the CLI, you would end up in the
1381 'alias' submode. But since the expansion is dropped, you would
1382 end up specifying the expansion value without typing any command.
1384 If, on the other hand, the 'alias' list had a
1385 tailf:cli-suppress-mode statement, you would set an expansion
1386 'bar' by typing 'alias foo bar'.
1388 tailf:cli-drop-node-name cannot be used inside tailf:action.
1390 Used in I- and C-style CLIs.";
1393 extension cli-no-keyword {
1394 tailf:use-in "leaf";
1395 tailf:use-in "container";
1396 tailf:use-in "list";
1397 tailf:use-in "leaf-list";
1398 tailf:use-in "tailf:symlink";
1399 tailf:use-in "refine";
1401 "Specifies that the name of a node is not present in the CLI.
1404 Note that is must be used with some care, just
1405 like tailf:cli-drop-node-name. The resulting data model must still
1406 be possible to parse deterministically.
1407 For example, consider the data model
1409 container interfaces {
1411 tailf:cli-no-keyword;
1413 leaf id { type string; }
1414 leaf mtu { type uint16; }
1417 tailf:cli-no-keyword;
1419 leaf id { type string; }
1420 leaf mtu { type uint16; }
1424 In this case it is impossible to determine if the config
1432 Means that there should be an traffic interface instance named
1433 'eth0' or a management interface instance maned 'eth0'. If, on
1434 the other hand, a restriction on the type was used, for example
1436 container interfaces {
1438 tailf:cli-no-keyword;
1440 leaf id { type string; pattern 'eth.*'; }
1441 leaf mtu { type uint16; }
1444 tailf:cli-no-keyword;
1446 leaf id { type string; pattern 'lo.*';}
1447 leaf mtu { type uint16; }
1451 then the problem would disappear.
1453 Used in the J-style CLIs.";
1456 extension cli-compact-syntax {
1457 tailf:use-in "list";
1458 tailf:use-in "container";
1459 tailf:use-in "tailf:symlink";
1460 tailf:use-in "refine";
1462 "Instructs the CLI engine to use the compact representation for this
1463 node in the 'show running-configuration' command. The compact
1464 representation means that all leaf elements are shown on a
1467 Cannot be used in conjunction with tailf:cli-boolean-no.
1469 Used in I- and C-style CLIs.";
1472 extension cli-compact-stats {
1473 tailf:use-in "list";
1474 tailf:use-in "container";
1475 tailf:use-in "tailf:symlink";
1476 tailf:use-in "refine";
1477 tailf:substatement "tailf:cli-wrap";
1478 tailf:substatement "tailf:cli-width";
1479 tailf:substatement "tailf:cli-delimiter";
1480 tailf:substatement "tailf:cli-prettify";
1481 tailf:substatement "tailf:cli-spacer";
1483 "Instructs the CLI engine to use the compact representation for this
1484 node. The compact representation means that all leaf elements
1485 are shown on a single line.
1487 Used in J-, I- and C-style CLIs.";
1490 extension cli-wrap {
1491 tailf:use-in "tailf:cli-compact-stats";
1493 "If present, the line will be wrapped at screen width.";
1496 extension cli-width {
1502 tailf:use-in "tailf:cli-compact-stats";
1504 "Specifies a fixed terminal width to use before wrapping line. It is
1505 only used when tailf:cli-wrap is present. If a width is not
1506 specified the line is wrapped when the terminal width is
1510 extension cli-delimiter {
1516 tailf:use-in "tailf:cli-compact-stats";
1518 "Specifies a string to print between the leaf name and its value
1519 when displaying leaf values.";
1522 extension cli-prettify {
1523 tailf:use-in "tailf:cli-compact-stats";
1525 "If present, dashes (-) and underscores (_) in leaf names are replaced
1529 extension cli-spacer {
1535 tailf:use-in "tailf:cli-compact-stats";
1537 "Specifies a string to print between the nodes.";
1540 extension cli-column-stats {
1541 tailf:use-in "container";
1542 tailf:use-in "refine";
1543 tailf:use-in "tailf:symlink";
1545 "Display leafs in the container as columns, i.e., do not repeat
1546 the name of the container on each line, but instead indent each
1547 leaf under the container.
1549 Used in I- and C-style CLIs.";
1552 extension cli-column-width {
1558 tailf:use-in "leaf";
1559 tailf:use-in "leaf-list";
1560 tailf:use-in "tailf:symlink";
1561 tailf:use-in "refine";
1563 "Set a fixed width for the column in the auto-rendered tables.
1565 Used in J-, I- and C-style CLIs.";
1568 extension cli-min-column-width {
1574 tailf:use-in "leaf";
1575 tailf:use-in "leaf-list";
1576 tailf:use-in "tailf:symlink";
1577 tailf:use-in "refine";
1579 "Set a minimum width for the column in the auto-rendered tables.
1581 Used in J-, I- and C-style CLIs.";
1584 extension cli-column-align {
1594 tailf:use-in "leaf";
1595 tailf:use-in "leaf-list";
1596 tailf:use-in "tailf:symlink";
1597 tailf:use-in "refine";
1599 "Specifies the alignment of the data in the column in the
1600 auto-rendered tables.
1602 Used in J-, I- and C-style CLIs.";
1605 extension cli-list-syntax {
1606 tailf:use-in "leaf-list";
1607 tailf:use-in "tailf:symlink";
1608 tailf:use-in "refine";
1609 tailf:substatement "tailf:cli-multi-word";
1611 "Specifies that each entry in a leaf-list should be displayed as
1614 Used in J-, I- and C-style CLIs.";
1617 extension cli-multi-word {
1618 tailf:use-in "tailf:cli-list-syntax";
1619 tailf:substatement "tailf:cli-max-words";
1621 "Specifies that a multi-word value may be entered without quotes.";
1624 extension cli-flat-list-syntax {
1625 tailf:use-in "leaf-list";
1626 tailf:substatement "tailf:cli-replace-all";
1627 tailf:use-in "refine";
1629 "Specifies that elements in a leaf-list should be entered without
1630 surrounding brackets. Also, multiple elements can be added to a list
1631 or deleted from a list.
1633 Used in J-, I- and C-style CLIs.";
1636 extension cli-replace-all {
1637 tailf:use-in "leaf-list";
1638 tailf:use-in "tailf:cli-flat-list-syntax";
1639 tailf:use-in "refine";
1641 "Specifies that the new leaf-list value(s) should replace the old,
1642 as opposed to be added to the old leaf-list.";
1645 extension cli-range-list-syntax {
1646 tailf:use-in "leaf-list";
1647 tailf:use-in "list";
1648 tailf:use-in "refine";
1650 "Specifies that elements in a leaf-list or a list should be entered
1651 without surrounding brackets and presented as ranges. The
1652 element in the list should be separated by a comma. For
1655 vlan 1,3,10-20,30,32,300-310
1657 When this statement is used for lists, the list must have a
1658 single key. The elements are be presented as ranges as above.
1660 The type of the list key, or the leaf-list, must be integer based.
1662 Used in J-, I- and C-style CLIs.";
1665 extension cli-incomplete-command {
1666 tailf:use-in "leaf";
1667 tailf:use-in "leaf-list";
1668 tailf:use-in "list";
1669 tailf:use-in "container";
1670 tailf:use-in "refine";
1672 "Specifies that an auto-rendered command should be considered
1673 incomplete. Can be used to prevent <cr> from appearing in
1674 the completion list for optional internal nodes, for example, or
1675 to ensure that the user enters all leaf values in a container
1676 (if used in combination with cli-sequence-commands).
1678 Used in I- and C-style CLIs.";
1681 extension cli-full-command {
1682 tailf:use-in "leaf";
1683 tailf:use-in "leaf-list";
1684 tailf:use-in "list";
1685 tailf:use-in "tailf:symlink";
1686 tailf:use-in "container";
1687 tailf:use-in "refine";
1689 "Specifies that an auto-rendered command should be considered complete,
1690 ie, no additional leaves or containers can be entered on the same
1693 Used in I- and C-style CLIs.";
1696 extension cli-sequence-commands {
1697 tailf:use-in "list";
1698 tailf:use-in "container";
1699 tailf:use-in "tailf:symlink";
1700 tailf:use-in "refine";
1701 tailf:substatement "tailf:cli-reset-siblings";
1702 tailf:substatement "tailf:cli-reset-all-siblings";
1704 "Specifies that an auto-rendered command should only accept arguments
1705 in the same order as they are specified in the YANG model.
1706 This, in combination with tailf:cli-drop-node-name, can be used
1707 to create CLI commands for setting multiple leafs in a container
1708 without having to specify the leaf names.
1710 In almost all cases this annotation should be accompanied by the
1711 tailf:cli-compact-syntax annotation. Otherwise the output from
1712 'show running-config' will not be correct, and the sequence
1713 'save xx' 'load override xx' will not work.
1715 Used in I- and C-style CLIs.";
1718 extension cli-reset-siblings {
1719 tailf:use-in "tailf:cli-sequence-commands";
1721 "Specifies that all sibling leaves in the sequence should be reset
1722 whenever the first leaf in the sequence is set.";
1725 extension cli-reset-all-siblings {
1726 tailf:use-in "tailf:cli-sequence-commands";
1728 "Specifies that all sibling leaves in the container should be reset
1729 whenever the first leaf in the sequence is set.";
1732 extension cli-reset-container {
1733 tailf:use-in "leaf";
1734 tailf:use-in "list";
1735 tailf:use-in "container";
1736 tailf:use-in "tailf:symlink";
1737 tailf:use-in "refine";
1739 "Specifies that all sibling leaves in the container should be
1740 reset when this element is set.
1742 When used on a container its content is cleared when set.";
1745 extension cli-display-separated {
1746 tailf:use-in "container";
1747 tailf:use-in "tailf:symlink";
1748 tailf:use-in "refine";
1750 "Tells CLI engine to display this container as a separate
1751 line item even when it has children. Only applies to
1752 presence containers.
1754 Applicable for optional containers in the C- and I- style CLIs.";
1757 extension cli-delete-container-on-delete {
1758 tailf:use-in "leaf";
1759 tailf:use-in "tailf:symlink";
1760 tailf:use-in "refine";
1762 "Specifies that the parent container should be deleted when
1763 . this leaf is deleted.";
1766 extension cli-break-sequence-commands {
1767 tailf:use-in "leaf";
1768 tailf:use-in "tailf:symlink";
1769 tailf:use-in "leaf-list";
1770 tailf:use-in "list";
1771 tailf:use-in "container";
1772 tailf:use-in "refine";
1774 "Specifies that previous cli-sequence-command declaration should
1775 stop at this point. Only applicable when a cli-sequence-command
1776 declaration has been used in the parent container.
1778 Used in I- and C-style CLIs.";
1781 extension cli-strict-leafref {
1782 tailf:use-in "leaf";
1783 tailf:use-in "leaf-list";
1784 tailf:use-in "tailf:symlink";
1785 tailf:use-in "refine";
1787 "Specifies that the leaf should only be allowed to be assigned
1788 references to existing instances when the command is executed.
1789 Without this annotation the requirement is that the instance
1790 exists on commit time.
1792 Used in I- and C-style CLIs.";
1795 extension cli-optional-in-sequence {
1796 tailf:use-in "leaf";
1797 tailf:use-in "tailf:symlink";
1798 tailf:use-in "leaf-list";
1799 tailf:use-in "list";
1800 tailf:use-in "container";
1801 tailf:use-in "refine";
1803 "Specifies that this element is optional in the sequence. If it
1804 is set it must be set in the right sequence but may be skipped.
1806 Used in I- and C-style CLIs.";
1809 extension cli-incomplete-show-path {
1810 tailf:use-in "leaf";
1811 tailf:use-in "tailf:symlink";
1812 tailf:use-in "leaf-list";
1813 tailf:use-in "list";
1814 tailf:use-in "container";
1815 tailf:use-in "refine";
1816 tailf:substatement "tailf:cli-min-keys";
1818 "Specifies that a path to the show command is considered incomplete,
1819 i.e., it needs more elements added to the path. It can also be used
1820 to specify a minimum number of keys to be given for lists.
1822 Used in J-, I- and C-style CLIs.";
1825 extension cli-min-keys {
1831 tailf:use-in "tailf:cli-incomplete-show-path";
1833 "Specifies the minimum number of required keys for the show command.";
1836 extension cli-hide-in-submode {
1837 tailf:use-in "leaf";
1838 tailf:use-in "container";
1839 tailf:use-in "tailf:symlink";
1840 tailf:use-in "refine";
1842 "Hide leaf when submode has been entered. Mostly useful when
1843 leaf has to be entered in order to enter a submode. Also works
1844 for flattened containers.
1846 Cannot be used in conjunction with tailf:cli-boolean-no.
1848 Used in I- and C-style CLIs.";
1851 extension cli-expose-ns-prefix {
1852 tailf:use-in "container";
1853 tailf:use-in "list";
1854 tailf:use-in "tailf:symlink";
1855 tailf:use-in "refine";
1857 "When used force the CLI to display namespace prefix of all children.";
1860 extension cli-prefix-key {
1861 tailf:use-in "leaf";
1862 tailf:use-in "tailf:symlink";
1863 tailf:use-in "refine";
1864 tailf:use-in "leaf-list";
1865 tailf:substatement "tailf:cli-before-key";
1867 "This leaf has to be given as a prefix before entering the actual
1868 list keys. Very backwards but a construct that exists in some
1871 The construct can be used also for leaf-lists but only when
1872 then tailf:cli-range-list-syntax is also used.
1874 Used in I- and C-style CLIs.";
1877 extension cli-before-key {
1883 tailf:use-in "tailf:cli-prefix-key";
1885 "Specifies before which key the prefix element should be inserted.
1886 The first key has number 1.";
1889 extension cli-show-with-default {
1890 tailf:use-in "leaf";
1891 tailf:use-in "refine";
1892 tailf:use-in "tailf:symlink";
1894 "This leaf will be displayed even when it has its default value.
1895 Note that this will somewhat result in a slightly different behaviour
1896 when you save a config and then load it again. With this setting
1897 in place a leaf that has not been configured will be configured
1900 Used in I- and C-style CLIs.";
1903 extension cli-oper-info {
1910 tailf:use-in "leaf";
1911 tailf:use-in "leaf-list";
1912 tailf:use-in "list";
1913 tailf:use-in "container";
1915 tailf:use-in "identity";
1916 tailf:use-in "tailf:action";
1917 tailf:use-in "tailf:symlink";
1918 tailf:use-in "refine";
1920 "This statement works exactly as tailf:info, with the exception
1921 that it is used when displaying the element info in the context
1924 Both tailf:info and tailf:cli-oper-info can be present at the same
1928 extension cli-case-sensitive {
1929 tailf:use-in "container";
1930 tailf:use-in "list";
1931 tailf:use-in "leaf";
1933 "Specifies that this node is case-sensitive.
1934 If applied to a container or a list, any nodes below will
1935 also be case-sensitive.
1937 Note that this will override any case-sensitivity settings
1938 configured in confd.conf";
1941 extension cli-case-insensitive {
1942 tailf:use-in "container";
1943 tailf:use-in "list";
1944 tailf:use-in "leaf";
1946 "Specifies that node is case-insensitive.
1947 If applied to a container or a list, any nodes below will
1948 also be case-insensitive.
1950 Note that this will override any case-insensitivity settings
1951 configured in confd.conf";
1954 extension cli-custom-error {
1961 tailf:use-in "leaf";
1962 tailf:use-in "tailf:symlink";
1963 tailf:use-in "refine";
1965 "This statement specifies a custom error message to be displayed
1966 when the user enters an invalid value.";
1969 extension cli-full-show-path {
1970 tailf:use-in "leaf";
1971 tailf:use-in "leaf-list";
1972 tailf:use-in "list";
1973 tailf:use-in "container";
1974 tailf:use-in "tailf:symlink";
1975 tailf:use-in "refine";
1976 tailf:substatement "tailf:cli-max-keys";
1978 "Specifies that a path to the show command is considered complete, i.e.,
1979 no more elements can be added to the path. It can also be used to
1980 specify a maximum number of keys to be given for lists.
1982 Used in J-, I- and C-style CLIs.";
1985 extension cli-max-keys {
1991 tailf:use-in "tailf:cli-full-show-path";
1993 "Specifies the maximum number of allowed keys for the show command.";
1996 extension cli-suppress-show-path {
1997 tailf:use-in "leaf";
1998 tailf:use-in "leaf-list";
1999 tailf:use-in "list";
2000 tailf:use-in "tailf:symlink";
2001 tailf:use-in "container";
2002 tailf:use-in "refine";
2004 "Specifies that the show command cannot be invoked with the path,
2005 ie the path is suppressed when auto-rendering show commands for
2006 config='false' data.
2008 Used in J-, I- and C-style CLIs.";
2011 extension cli-suppress-show-match {
2012 tailf:use-in "leaf";
2013 tailf:use-in "leaf-list";
2014 tailf:use-in "list";
2015 tailf:use-in "tailf:symlink";
2016 tailf:use-in "container";
2017 tailf:use-in "refine";
2019 "Specifies that a specific completion match (i.e., a filter match that
2020 appear at list nodes as an alternative to specifying a single
2021 instance) to the show command should not be available.
2023 Used in J-, I- and C-style CLIs.";
2026 extension cli-suppress-list-no {
2027 tailf:use-in "leaf-list";
2028 tailf:use-in "list";
2029 tailf:use-in "tailf:symlink";
2030 tailf:use-in "refine";
2032 "Specifies that the CLI should not accept deletion of the entire list
2033 or leaf-list. Only specific instances should be deletable not the
2034 entire list in one command. ie, 'no foo <instance>' should be allowed
2037 Used in I- and C-style CLIs.";
2040 extension cli-suppress-no {
2041 tailf:use-in "leaf";
2042 tailf:use-in "leaf-list";
2043 tailf:use-in "list";
2044 tailf:use-in "tailf:symlink";
2045 tailf:use-in "container";
2046 tailf:use-in "refine";
2048 "Specifies that the CLI should not auto-render 'no' commands for
2049 this element. An element with this annotation will not appear in the
2050 completion list to the 'no' command.
2052 Used in I- and C-style CLIs.";
2055 extension cli-suppress-silent-no {
2061 tailf:use-in "leaf";
2062 tailf:use-in "leaf-list";
2063 tailf:use-in "list";
2064 tailf:use-in "tailf:symlink";
2065 tailf:use-in "container";
2066 tailf:use-in "refine";
2068 "Specifies that the confd.cnof directive cSilentNo should be
2069 suppressed for a leaf and that a custom error message should
2070 be displayed when the user attempts to delete a non-existing
2073 Used in I- and C-style CLIs.";
2076 extension cli-full-no {
2077 tailf:use-in "leaf";
2078 tailf:use-in "leaf-list";
2079 tailf:use-in "list";
2080 tailf:use-in "tailf:symlink";
2081 tailf:use-in "container";
2082 tailf:use-in "refine";
2084 "Specifies that an auto-rendered 'no'-command should be considered complete,
2085 ie, no additional leaves or containers can be entered on the same
2088 Used in I- and C-style CLIs.";
2091 extension cli-incomplete-no {
2092 tailf:use-in "leaf";
2093 tailf:use-in "leaf-list";
2094 tailf:use-in "list";
2095 tailf:use-in "container";
2096 tailf:use-in "tailf:symlink";
2097 tailf:use-in "refine";
2099 "Specifies that an auto-rendered 'no'-command should not be considered
2100 complete, ie, additional leaves or containers must be entered on the same
2103 Used in I- and C-style CLIs.";
2106 extension cli-no-match-completion {
2107 tailf:use-in "list";
2108 tailf:use-in "tailf:symlink";
2109 tailf:use-in "refine";
2111 "Specifies that the CLI engine should not provide match completion
2112 for the key leafs in the list.
2114 Used in J-, I- and C-style CLIs.";
2117 extension cli-suppress-show-conf-path {
2118 tailf:use-in "leaf";
2119 tailf:use-in "leaf-list";
2120 tailf:use-in "list";
2121 tailf:use-in "container";
2122 tailf:use-in "tailf:symlink";
2123 tailf:use-in "refine";
2125 "Specifies that the show running-config command cannot be invoked with
2126 the path, ie the path is suppressed when auto-rendering show running-
2127 config commands for config='true' data.
2129 Used in J-, I- and C-style CLIs.";
2132 extension cli-no-key-completion {
2133 tailf:use-in "list";
2134 tailf:use-in "tailf:symlink";
2135 tailf:use-in "refine";
2137 "Specifies that the CLI engine should not perform completion for key
2138 leafs in the list. This is to avoid querying the data provider
2139 for all existing keys.
2141 Used in J-, I- and C-style CLIs.";
2144 extension cli-instance-info-leafs {
2150 tailf:use-in "list";
2151 tailf:use-in "tailf:symlink";
2152 tailf:use-in "refine";
2154 "This statement is used to specifiy how list entries are displayed
2155 when doing completion in the CLI. By default, a list entry is
2156 displayed by listing its key values, and the value of a leaf
2157 called 'description', if such a leaf exists in the list entry.
2159 The 'cli-instance-info-leafs' statement takes as its argument a
2160 space separated string of leaf names. When a list entry is
2161 displayed, the values of these leafs are concatenated with a
2162 space character as separator and shown to the user.
2164 For example, when asked to specify an interface the CLI will
2165 display a list of possible interface instances, say 1 2 3 4. If
2166 the cli-instance-info-leafs property is set to 'description' then
2169 Possible completions:
2175 Used in J-, I- and C-style CLIs.";
2178 extension cli-multi-value {
2179 tailf:use-in "leaf";
2180 tailf:use-in "tailf:symlink";
2181 tailf:use-in "refine";
2182 tailf:substatement "tailf:cli-max-words";
2184 "Specifies that all remaining tokens on the command line
2185 should be considered a value for this leaf. This prevents
2186 the need for quoting values containing spaces, but also
2187 prevents multiple leaves from being set on the same command
2188 line once a multi-value leaf has been given on a line.
2190 If the tailf:cli-max-words substatements is used then
2191 additional leaves may be entered.
2193 Used in I- and C-style CLIs.";
2196 extension cli-value-display-template {
2200 type tailf:cli-template-string;
2203 tailf:use-in "leaf";
2204 tailf:use-in "tailf:symlink";
2205 tailf:use-in "refine";
2207 "Specifies a template string to be used when formating the
2208 value of a leaf for display. Note that other leaves cannot
2209 be referenced from a display template of one leaf. The only
2210 value accessible is the leaf's own value, accessed through
2213 See the defintion of cli-template-string for more info.
2215 Used in J-, I- and C-style CLIs.";
2218 extension cli-show-template {
2222 type tailf:cli-template-string;
2225 tailf:use-in "leaf";
2226 tailf:use-in "leaf-list";
2227 tailf:use-in "list";
2228 tailf:use-in "tailf:symlink";
2229 tailf:use-in "container";
2230 tailf:use-in "refine";
2231 tailf:substatement "tailf:cli-auto-legend";
2233 "Specifies a template string to be used by the 'show' command in
2234 operational mode. It is primarily intended for displaying
2235 non-config data but config data may be included in the template
2238 See the defintion of cli-template-string for more info.
2240 Some restrictions includes not applying templates on a leaf that
2241 is the key in a list. It is recommended to use the template
2242 directly on the list to format the whole list instead.
2244 Used in J-, I- and C-style CLIs.";
2247 extension cli-auto-legend {
2248 tailf:use-in "tailf:cli-show-template";
2250 "Specifies that the legend should be automatically rendered if not already displayed. Useful when using templates for rendering tables.";
2253 extension cli-show-template-legend {
2257 type tailf:cli-template-string;
2260 tailf:use-in "list";
2261 tailf:use-in "refine";
2263 "Specifies a template string to be printed before all list entries are
2266 See the defintion of cli-template-string for more info.
2268 Used in J-, I- and C-style CLIs.";
2271 extension cli-show-template-enter {
2275 type tailf:cli-template-string;
2278 tailf:use-in "list";
2279 tailf:use-in "tailf:symlink";
2280 tailf:use-in "refine";
2282 "Specifies a template string to be printed before each list entry is
2285 See the defintion of cli-template-string for more info.
2287 Used in J-, I- and C-style CLIs.";
2290 extension cli-show-template-footer {
2294 type tailf:cli-template-string;
2297 tailf:use-in "list";
2298 tailf:use-in "tailf:symlink";
2299 tailf:use-in "refine";
2301 "Specifies a template string to be printed after all list entries are
2304 See the defintion of cli-template-string for more info.
2306 Used in J-, I- and C-style CLIs.";
2309 extension cli-run-template {
2313 type tailf:cli-template-string;
2316 tailf:use-in "leaf";
2317 tailf:use-in "leaf-list";
2318 tailf:use-in "tailf:symlink";
2319 tailf:use-in "refine";
2321 "Specifies a template string to be used by the 'show running-config'
2322 command in operational mode. It is primarily intended for displaying
2323 config data but non-config data may be included in the template
2326 See the defintion of cli-template-string for more info.
2328 Used in I- and C-style CLIs.";
2331 extension cli-run-template-legend {
2335 type tailf:cli-template-string;
2338 tailf:use-in "list";
2339 tailf:use-in "tailf:symlink";
2340 tailf:use-in "refine";
2342 "Specifies a template string to be printed before all list entries are
2345 See the defintion of cli-template-string for more info.
2347 Used in I- and C-style CLIs.";
2350 extension cli-run-template-enter {
2354 type tailf:cli-template-string;
2357 tailf:use-in "list";
2358 tailf:use-in "container";
2359 tailf:use-in "tailf:symlink";
2360 tailf:use-in "refine";
2362 "Specifies a template string to be printed before each list entry is
2365 When used on a container it only has effect when the container
2366 also has a tailf:cli-add-mode, and when tailf:cli-show-no isn't
2367 used on the container.
2369 See the defintion of cli-template-string for more info.
2371 The variable .reenter is set to 'true' when the 'show configuration'
2372 command is executed and the list or container isn't created. This
2373 allow, for example, to display
2377 when an instance is created
2381 when something inside the instance is modified.
2383 Used in I- and C-style CLIs.";
2386 extension cli-run-template-footer {
2390 type tailf:cli-template-string;
2393 tailf:use-in "list";
2394 tailf:use-in "tailf:symlink";
2395 tailf:use-in "refine";
2397 "Specifies a template string to be printed after all list entries are
2400 See the defintion of cli-template-string for more info.
2402 Used in I- and C-style CLIs.";
2405 typedef cli-template-string {
2408 "A template is a text string which is expanded by the CLI engine,
2409 and then displayed to the user.
2411 The template may contain a mix of text and expandable entries.
2412 Expandable entries all start with $( and end with a matching ).
2413 Parentheses and dollar signs need to be quoted in plain text.
2415 The template is expanded as follows:
2417 A parameter is either a relative or absolute path to a leaf
2418 element (eg /foo/bar, foo/bar), or one of the builtin variables:
2419 .selected, .entered, .legend_shown, .user, .groups, .ip,
2420 .display_groups, .path, .ipath or .licounter. In addition the
2421 variables .spath and .ispath are available when a command
2422 is executed from a show path.
2426 The .selected variable contains the list of selected paths
2427 to be shown. The show template can inspect this element to
2428 determine if a given element should be displayed or
2431 $(.selected~=hwaddr?HW Address)
2435 The .entered variable is true if the \"entered\" text has
2436 been displayed (either the auto generated text or a
2437 showTemplateEnter). This is useful when having a non-table
2438 template where each instance should have a text.
2440 $(.entered?:host $(name))
2444 The .legend_shown variable is true if the \"legend\" text has
2445 been displayed (either the auto generated table header or
2446 a showTemplateLegend). This is useful to inspect when
2447 displaying a table row. If the user enteres the path to a
2448 specific instance the builtin table header will not be
2449 displayed and the showTemplateLegend will not be invoked
2450 and it may be useful to render the legend specifically
2453 $(.legend_shown!=true?Address Interface)
2457 The .user variable contains the name of the current
2458 user. This can be used for differentiating the content
2459 displayed for a specific user, or in paths. For exapmle:
2461 $(user{$(.user)}/settings)
2465 The .groups variable contains the a list of groups that the
2470 The .display_groups variable contains a list of selected
2471 display groups. This can be used to display different
2472 content depending on the selected display group. For
2475 $(.display_groups~=details?details...)
2479 The .ip variable contains the ip address that the user
2484 The .path variable contains the path to the entry,
2485 formated in CLI style.
2489 The .ipath variable contains the path to the entry,
2490 formated in template style.
2494 The .spath variable contains the show path,
2495 formated in CLI style.
2499 The .ispath variable contains the show path,
2500 formated in template style.
2504 The .licounter variable contains a counter that is
2505 incremented for each instance in a list. This means that
2506 it will be 0 in the legend, contain the total number of
2507 list instances in the footer and something in between in
2508 the basic show template.
2512 The value of 'parameter' is substituted.
2516 The expansion of 'word1' is substituted if 'cond'
2517 evaluates to true, otherwise the expansion of 'word2' is
2520 'cond' may be one of
2524 Evaluates to true if the node exists.
2526 parameter == <value>
2528 Evaluates to true if the value of the parameter equals
2531 parameter != <value>
2533 Evalutes to true if the value of the parameter does not
2536 parameter ~= <value>
2538 Provided that the value of the parameter is a list
2539 (i.e., the node that the parameter refers to is a
2540 leaf-list), this expression evaluates to true if <value>
2541 is a member of the list.
2545 The value of 'parameter' processed by 'filter' is
2546 substituted. Filters may be either one of the
2547 built-ins or a customized filter defined in a
2548 callback. See /confdConfig/cli/templateFilter.
2550 A built-in 'filter' may be one of:
2554 Capitalizes the first character of the value.
2558 Converts the value into lowercase.
2562 Converts the value into uppercase.
2566 Formats the value in a human-readable format (e.g.,
2567 '13 KB', '4.10 MB', '102 bytes' etc), where K
2568 means 1024, M means 1024*1024 etc.
2570 When used without argument the default number of
2571 decimals displayed is 2. When used with a numeric
2572 integer argument, filesizeformat will display the
2573 given number of decimal places.
2577 Similar to filesizeformat except no bytes suffix
2578 is added (e.g., '13.00 k', '4.10 M' '102' etc),
2579 where k means 1000, M means 1000*1000 etc.
2581 When used without argument the default number of
2582 decimals displayed is 2. When used with a numeric
2583 integer argument, humanreadable will display the
2584 given number of decimal places.
2588 Separate the numerical values into groups of three
2589 digits using a comma (e.g., 1234567 -> 1,234,567)
2593 Display integer as hex number. An argument can be
2594 used to indicate how many digits should be used in
2595 the output. If the hex number is too long it will
2596 be truncated at the front, if it is too short it will
2597 be padded with zeros at the front. If the width is
2598 a negative number then at most that number of digits
2599 will be used, but short numbers will not be padded
2600 with zeroes. Another argument can be given to indicate
2601 if the hex numbers should be written with lower
2606 value Template Output
2607 12345 {{ value|hex }} 3039
2608 12345 {{ value|hex:2 }} 39
2609 12345 {{ value|hex:8 }} 00003039
2610 12345 {{ value|hex:-8 }} 3039
2611 14911 {{ value|hex:-8:upper }} 3A3F
2612 14911 {{ value|hex:-8:lower }} 3a3f
2616 Display integer as hex number with : between pairs. An
2617 argument can be used to indicate how many digits should
2618 be used in the output. If the hex number is too long it
2619 will be truncated at the front, if it is too short it will
2620 be padded with zeros at the front. If the width is
2621 a negative number then at most that number of digits
2622 will be used, but short numbers will not be padded
2623 with zeroes. Another argument can be given to indicate
2624 if the hex numbers should be written with lower
2629 value Template Output
2630 12345 {{ value|hexlist }} 30:39
2631 12345 {{ value|hexlist:2 }} 39
2632 12345 {{ value|hexlist:8 }} 00:00:30:39
2633 12345 {{ value|hexlist:-8 }} 30:39
2634 14911 {{ value|hexlist:-8:upper }} 3A:3F
2635 14911 {{ value|hexlist:-8:lower }} 3a:3f
2639 Used for type 'float' in tailf-xsd-types. We recommend
2640 that the YANG built-in type 'decimal64' is used instead of
2643 When used without an argument, rounds a floating-point
2644 number to one decimal place -- but only if there is a
2645 decimal part to be displayed.
2649 value Template Output
2650 34.23234 {{ value|floatformat }} 34.2
2651 34.00000 {{ value|floatformat }} 34
2652 34.26000 {{ value|floatformat }} 34.3
2654 If used with a numeric integer argument, floatformat
2655 rounds a number to that many decimal places. For example:
2657 value Template Output
2658 34.23234 {{ value|floatformat:3 }} 34.232
2659 34.00000 {{ value|floatformat:3 }} 34.000
2660 34.26000 {{ value|floatformat:3 }} 34.260
2662 If the argument passed to floatformat is negative, it will
2663 round a number to that many decimal places -- but only if
2664 there's a decimal part to be displayed. For example:
2666 value Template Output
2667 34.23234 {{ value|floatformat:-3 }} 34.232
2668 34.00000 {{ value|floatformat:-3 }} 34
2669 34.26000 {{ value|floatformat:-3 }} 34.260
2671 Using floatformat with no argument is equivalent to using
2672 floatformat with an argument of -1.
2676 Left-align the value given a width.
2680 Right-align the value given a width.
2684 Truncate value to a given width.
2688 Convert the value into lowercase.
2692 Convert the value into uppercase.
2696 Substitutes the result of invoking the default display
2697 function for the parameter. The dictionary can be used
2698 for introducing own variables that can be accessed in
2699 the same manner as builtin variables. The user defined
2700 variables overrides builtin variables. The dictionary
2701 is specified as a string on the following form:
2703 (key=value)(:key=value)*
2705 For example, with the following expression:
2707 $(foo|show:myvar1=true:myvar2=Interface)
2709 the user defined variables can be accessed like this:
2711 $(.myvar1!=true?Address) $(.myvar2)
2713 A special case is the dict variable 'indent'. It
2714 controls the indentation level of the displayed path.
2715 The current indent level can be incremented and
2716 decremented using =+ and =-.
2720 $(foobar|show:indent=+2)
2721 $(foobar|show:indent=-1)
2722 $(foobar|show:indent=10)
2724 Another special case is he dict variable 'noalign'.
2725 It may be used to suppress the default aligning that
2726 may occur when displaying an element.
2730 $(foobar|show:noalign)
2734 Translates the value using the dictionary. Can for
2735 example be used for displaying on/off instead of
2736 true/false. The dictionary is specified as a string on
2739 (key=value)(:key=value)*
2741 For example, with the following expression:
2743 $(foo|dict:true=on:false=off)
2745 if the leaf 'foo' has value 'true', it is displayed as 'on', and
2746 if its value is 'false' it is displayed as 'off'.
2748 Nested invocations are allowed, ie it is possible to have expressions
2749 like $((state|dict:yes=Yes:no=No)|rjust:14), or $(/foo{$(../bar)})
2763 leaf encapsulation { ... }
2764 leaf loopback { ... }
2765 tailf:cli-show-template
2766 '$(name) is administratively $(status),'
2767 + ' line protocol is $(line/status)\\n'
2768 + 'MTU $(mtu) bytes, BW $(bw|humanreadable)bit, \\n'
2769 + 'Encap $(encapsulation|upper), $(loopback?:loopback not set)\\n';