Remove testplans for groupbasedpolicy
[integration/test.git] / csit / variables / gbp / ios-xe-schemas / tailf-common@2015-05-22.yang
1 module tailf-common {
2   namespace "http://tail-f.com/yang/common";
3   prefix tailf;
4
5   include tailf-meta-extensions {
6     revision-date 2013-11-07;
7   }
8   include tailf-cli-extensions {
9     revision-date 2015-03-19;
10   }
11
12   organization
13     "Tail-f Systems";
14   description
15     "This module defines all Tail-f YANG extensions statements
16      and common YANG types.";
17
18   revision 2015-05-22 {
19     description
20       "Released as part of ConfD-5.4.2 / NCS-3.4.2.
21
22        Allow tailf:export and tailf:unique-selector in
23          tailf:annotate-module.";
24   }
25   revision 2015-03-19 {
26     description
27       "Released as part of ConfD-5.4 / NCS-3.4.
28
29        Added if-feature as substatement to tailf:annotate.
30
31        Added tailf:no-dependency.
32
33        Updated the description for tailf:dependency.
34
35        Allow tailf:id-value as substatement to 'module',
36        tailf:annotate-module, 'choice', and 'case'.";
37   }
38   revision 2014-11-13 {
39     description
40       "Released as part of ConfD-5.3 / NCS-3.3.
41
42        Added tailf:export.";
43   }
44   revision 2014-06-30 {
45     description
46       "Released as part of ConfD-5.2 / NCS-3.2.
47
48        Added tailf:sha-256-digest-string and tailf:sha-512-digest-string.";
49   }
50   revision 2014-03-27 {
51     description
52       "Released as part of ConfD-5.1 / NCS-3.1.
53
54        Added tailf:actionpoint as substatement to refine.
55        Removed must as substatement to tailf:symlink.";
56   }
57   revision 2014-02-20 {
58     description
59       "Released as part of ConfD-5.0.2 / NCS-3.0.2.
60
61        Added tailf:snmp-ned-recreate-when-modified.";
62   }
63   revision 2013-12-23 {
64     description
65       "Released as part of ConfD-5.0.1 / NCS-3.0.1.
66
67        Allow 'unique' in tailf:annotate and tailf:annotate-statement.
68
69        Added tailf:snmp-ned-delete-before-create.";
70   }
71   revision 2013-11-07 {
72     description
73       "Released as part of ConfD-5.0 / NCS-3.0.
74
75        Allow tailf:code-name as substatement to 'bit'.
76
77        Disallow tailf:id-value as substatement to 'enum'. Use the
78        standard YANG 'value' statement instead.
79
80        Deprecated tailf:hex-list.  Use yang:hex-string instead.
81          There are no plans to remove tailf:hex-list.
82
83        Added the types tailf:ipv4-address-and-prefix-length,
84        tailf:ipv6-address-and-prefix-length, and
85        tailf:ip-address-and-prefix-length,";
86   }
87   revision 2013-09-05 {
88     description
89       "Released as part of ConfD-4.3.
90
91        Added tailf:auto-compact as substatement to tailf:indexed-view.";
92   }
93   revision 2013-06-14 {
94     description
95       "Released as part of ConfD-4.3.
96
97        Deprecated tailf:symlink.  Use tailf:link instead.
98
99        Allow tailf:alt-name as substatement to tailf:action and rpc.
100
101        Allow status as substatement to tailf:action.
102
103        Allow description in tailf:annotate and tailf:annotate-statement.";
104   }
105   revision 2013-05-16 {
106     description
107       "Released as part of ConfD-4.2.2.
108
109        Added tailf:link";
110   }
111   revision 2013-03-07 {
112     description
113       "Released as part of ConfD-4.2.
114
115        Allow 'pattern' in tailf:annotate-statement.";
116   }
117   revision 2012-11-08 {
118     description
119       "Released as part of ConfD-4.1.
120
121        Added tailf:unique-selector and tailf:unique-leaf.
122
123        Allow tailf:info in bit.
124
125        Allow tailf:code-name as substatement to all statements that
126        define data nodes in the schema tree and the 'rpc',
127        'notification', 'identity', and 'tailf:action' statements.
128
129        Allow status in tailf:symlink";
130   }
131   revision 2012-08-23 {
132     description
133       "Released as part of ConfD-4.0.1.
134
135        Allow tailf:cli-operational-mode and tailf:cli-configure-mode in
136          rpc.";
137   }
138   revision 2012-06-14 {
139     description
140       "Released as part of ConfD-4.0.
141
142        Added tailf:display-hint.";
143   }
144   revision 2012-05-24 {
145     description
146       "Released as part of ConfD-3.9.2.";
147   }
148   revision 2012-03-08 {
149     description
150       "Released as part of ConfD-3.9.
151
152        Added tailf:timeout.
153        Added tailf:non-strict-leafref.";
154   }
155   revision 2011-12-08 {
156     description
157       "Released as part of ConfD-3.8.
158
159        Allow validation statements in tailf:annotate and
160        tailf:annotate-statement.
161
162        Allow tailf:validate in must, in order to override the evaluation
163        of the must expression with a callback function.
164
165        Disallow tailf:info in range, length and pattern.
166
167        Added tailf:snmp-ned-* statements to control the SNMP NED
168        behavior in NCS.";
169   }
170   revision 2011-10-20 {
171     description
172       "Released as part of ConfD-3.7.1.
173
174        Added tailf:priority.";
175   }
176   revision 2011-09-22 {
177     description
178       "Released as part of ConfD-3.7.
179
180        Allow tailf:typepoint as substatement to leaf and leaf-list.
181        Allow tailf:id as substatement to tailf:annotate-module.
182        Allow tailf:sort-priority as substatement to tailf:symlink.
183        Added tailf:interruptibale.
184        Added tailf:error-info.
185        Added tailf:snmp-delete-value and tailf:snmp-send-delete-value.
186        Added tailf:step.
187        Added tailf:annotate-statement.
188
189        Clarified how tailf:display-when is evaluated for lists.";
190   }
191   revision 2011-08-25 {
192     description
193       "Released as part of ConfD-3.6.2.
194
195        Included latest tailf-cli-extension submodule.";
196   }
197   revision 2011-06-30 {
198     description
199       "Released as part of ConfD-3.6.1.
200
201        Clarified what statements are allowed in tailf:annotate and
202        tailf:annotate-module.  Specifically, that 'symlink' and 'action'
203        are not allowed.";
204   }
205   revision 2011-05-26 {
206     description
207       "Released as part of ConfD-3.6.
208
209        Allow multiple tailf:snmp-name on leafs that represent MIB scalars.";
210   }
211   revision 2011-03-31 {
212     description
213       "Released as part of ConfD-3.5.1.
214
215        Allow tailf:alt-name as substatement to tailf:symlink.";
216   }
217   revision 2011-02-24 {
218     description
219       "Released as part of ConfD-3.5.
220
221        Allow tailf:info as substatement to type.
222        Added tailf:writable.
223        Removed the deprecated tailf:cli-default-order statement.
224        Removed the deprecated tailf:instance-info-leafs statement.";
225   }
226   revision 2010-11-04 {
227     description
228       "Released as part of ConfD-3.4.
229
230        Added tailf:snmp-exclude-object.
231        Allow tailf:hidden as substatement to tailf:symlink.
232        Allow multiple tailf:hidden statements to be specified on a node.
233        Allow special value '*' ar argument to tailf:annotate.";
234   }
235   revision 2010-09-16 {
236     description
237       "Released as part of ConfD-3.3.2.
238
239        Included latest tailf-cli-extension submodule.";
240   }
241   revision 2010-08-19 {
242     description
243       "Released as part of ConfD-3.3.1.
244
245        Allow multiple tailf:snmp-name statements, and expanded the
246        semantic meaning of this statement.";
247   }
248   revision 2010-07-21 {
249     description
250       "Released as part of ConfD-3.3.0.3.
251
252        Added tailf:sort-priority.";
253   }
254   revision 2010-06-17 {
255     description
256       "Released as part of ConfD-3.3.
257
258        Added tailf:value-length.
259
260        Added tailf:info-html.
261
262        Added tailf:display-default-order, and deprecated
263        tailf:cli-default-order.
264
265        Added tailf:dependency as a substatement to when.
266
267        Removed the deprecated statements tailf:constant-leaf and
268        tailf:constant-value.";
269   }
270   revision 2010-04-22 {
271     description
272       "Released as part of ConfD-3.2.1.
273
274        Added tailf:invocation-mode,
275
276        Fixed bug in tailf:octet-list pattern.";
277   }
278   revision 2010-03-18 {
279     description
280       "Released as part of ConfD-3.2.
281
282        Split this module into the main module and two submodules,
283        tailf-meta-extensions, and tailf-cli-extensions.
284
285        Added many tailf:cli- statements in the submodule
286        tailf-cli-extensions.
287
288        Added tailf:info.
289
290        Allow tailf:display-when in tailf:action.
291
292        Added tailf:snmp-lax-type-check.
293
294        Deprecated tailf:instance-info-leafs.  Use
295        tailf:cli-instance-info-leafs instead.
296
297        Removed the argument in tailf:cli-show-no to better match
298        all the other tailf:cli- statements.";
299   }
300   revision 2010-01-28 {
301     description
302       "Released as part of ConfD-3.1.1.
303
304        Allow tailf:snmp-oid and tailf:snmp-name in tailf:symlink.
305
306        Added tailf:key-default.
307
308        Allow tailf:suppress-echo in leaf and leaf-list.";
309   }
310   revision 2009-12-17 {
311     description
312       "Released as part of ConfD-3.1.
313
314        Added tailf:dependency as a substatement to must.
315
316        Added must and tailf:display-when as children to tailf:symlink.
317
318        Added tailf:interrupt to tailf:exec.
319
320        Allow many tailf statement as substatements to 'refine'.
321
322        Allow tailf:symlink statement in 'augment' and 'case'.
323
324        Added tailf:internal to tailf:actionpoint.
325
326        Deprecated tailf:constant-leaf and tailf:constant-value.";
327   }
328   revision 2009-11-06 {
329     description
330       "Released as part of ConfD-3.0.1.
331
332        Added tailf:annotate-module statement.
333
334        Added tailf:code-name statement.
335
336        Clarified the tailf:path-filters statement, and added
337        tailf:no-subtree-match.";
338   }
339   revision 2009-10-01 {
340     description
341       "Released as part of ConfD-3.0.
342
343        Clarified that tailf:annotate is applied on the expanded tree.
344        Bugfixes in some typedef patterns.";
345   }
346   revision 2009-03-17 {
347     description
348       "Released as part of ConfD-2.8.
349
350        Changed module name from tailf-extensions to reflect the content
351        better.";
352   }
353
354   typedef size {
355     type string {
356       pattern "S(\\d+G)?(\\d+M)?(\\d+K)?(\\d+B)?";
357     }
358     description
359       "A value that represents a number of bytes.  An example could be
360        S1G8M7K956B; meaning 1GB + 8MB + 7KB + 956B = 1082138556 bytes.
361        The value must start with an S.  Any byte magnifier can be left
362        out, e.g. S1K1B equals 1025 bytes.  The order is significant
363        though, i.e. S1B56G is not a valid byte size.
364
365        In ConfD, a 'size' value is represented as an uint64.";
366   }
367
368   typedef octet-list {
369     type string {
370       pattern "(\\d*(.\\d*)*)?";
371     }
372     description
373       "A list of dot-separated octets e.g. '192.168.255.1.0'.
374
375        The statement tailf:value-length can be used to restrict the number
376        of octets.  Note that using the 'length' restriction limits the
377        number of characters in the lexical representation.";
378   }
379
380   typedef md5-digest-string {
381     type string;
382     description
383       "The md5-digest-string type automatically computes a MD5 digest for
384        a value adhering to this type.
385
386        This is best explained using an example.  Suppose we have a
387        leaf:
388
389           leaf key {
390               type tailf:md5-digest-string;
391           }
392
393        A valid configuration is:
394
395           <key>$0$In god we trust.</key>
396
397        The '$0$' prefix signals that this is plain text.  When a plain
398        text value is received by the server, an MD5 digest is
399        calculated, and the string '$1$<salt>$' is prepended to the
400        result, where <salt> is a random eight character salt used to
401        generate the digest.  This value is stored in the configuration
402        data store.
403
404        When a value of this type is read, the computed MD5 value is
405        always returned.  In the example above, the following value
406        could be returned:
407
408           <key>$1$fB$ndk2z/PIS0S1SvzWLqTJb.</key>
409
410        If a value starting with '$1$' is received, the server
411        knows that the value already represents an MD5 digest, and
412        stores it as is in the data store.
413
414        A value adhering to this type must have a '$0$' or a
415        '$1$<salt>$' prefix.
416
417        If a default value is specified, it must have a '$1$<salt>$' prefix.
418
419        The digest algorithm used is the same as the md5 crypt function
420        used for encrypting passwords for various UNIX systems, see e.g.
421        http://www.freebsd.org/cgi/cvsweb.cgi/~checkout/~/src/lib/libcrypt/crypt.c
422       ";
423     reference
424       "IEEE Std 1003.1-2008 - crypt() function
425        RFC 1321 - The MD5 Message-Digest Algorithm";
426   }
427
428   typedef sha-256-digest-string {
429     type string {
430       pattern "$0$.*|$5$(rounds=\\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{43}";
431     }
432     description
433       "The sha-256-digest-string type automatically computes a SHA-256
434        digest for a value adhering to this type.
435
436        A value of this type matches one of the forms:
437
438         $0$<clear text password>
439         $5$<salt>$<password hash>
440         $5$rounds=<number>$<salt>$<password hash>
441
442        The '$0$' prefix signals that this is plain text. When a plain
443        text value is received by the server, a SHA-256 digest is
444        calculated, and the string '$5$<salt>$' is prepended to the
445        result, where <salt> is a random 16 character salt used to
446        generate the digest.  This value is stored in the configuration
447        data store. The algorithm can be tuned via the
448        /confdConfig/cryptHash/rounds parameter, which if set to a number
449        other than the default will cause '$5$rounds=<number>$<salt>$' to
450        be prepended instead of only '$5$<salt>$'.
451
452        If a value starting with '$5$' is received, the server
453        knows that the value already represents a SHA-256 digest, and
454        stores it as is in the data store.
455
456        If a default value is specified, it must have a '$5$' prefix.
457
458        The digest algorithm used is the same as the SHA-256 crypt function
459        used for encrypting passwords for various UNIX systems, see e.g.
460        http://www.akkadia.org/drepper/SHA-crypt.txt";
461     reference
462       "IEEE Std 1003.1-2008 - crypt() function
463        FIPS.180-3.2008: Secure Hash Standard";
464   }
465
466   typedef sha-512-digest-string {
467     type string {
468       pattern "$0$.*|$6$(rounds=\\d+$)?[a-zA-Z0-9./]{1,16}$[a-zA-Z0-9./]{86}";
469     }
470     description
471       "The sha-512-digest-string type automatically computes a SHA-512
472        digest for a value adhering to this type.
473
474        A value of this type matches one of the forms:
475
476         $0$<clear text password>
477         $6$<salt>$<password hash>
478         $6$rounds=<number>$<salt>$<password hash>
479
480        The '$0$' prefix signals that this is plain text.  When a plain
481        text value is received by the server, a SHA-512 digest is
482        calculated, and the string '$6$<salt>$' is prepended to the
483        result, where <salt> is a random 16 character salt used to
484        generate the digest.  This value is stored in the configuration
485        data store. The algorithm can be tuned via the
486        /confdConfig/cryptHash/rounds parameter, which if set to a number
487        other than the default will cause '$6$rounds=<number>$<salt>$' to
488        be prepended instead of only '$6$<salt>$'.
489
490        If a value starting with '$6$' is received, the server
491        knows that the value already represents a SHA-512 digest, and
492        stores it as is in the data store.
493
494        If a default value is specified, it must have a '$6$' prefix.
495
496        The digest algorithm used is the same as the SHA-512 crypt function
497        used for encrypting passwords for various UNIX systems, see e.g.
498        http://www.akkadia.org/drepper/SHA-crypt.txt";
499     reference
500       "IEEE Std 1003.1-2008 - crypt() function
501        FIPS.180-3.2008: Secure Hash Standard";
502   }
503
504   typedef des3-cbc-encrypted-string {
505     type string;
506     description
507       "The des3-cbc-encrypted-string type automatically encrypts a value
508        adhering to this type using DES in CBC mode followed by a base64
509        conversion.  If the value isn't encrypted already, that is.
510
511        This is best explained using an example.  Suppose we have a leaf:
512
513           leaf enc {
514               type tailf:des3-cbc-encrypted-string;
515           }
516
517        A valid configuration is:
518
519           <enc>$0$In god we trust.</enc>
520
521        The '$0$' prefix signals that this is plain text.  When a plain
522        text value is received by the server, the value is DES3/Base64
523        encrypted, and the string '$3$' is prepended.  The resulting
524        string is stored in the configuration data store.
525
526        When a value of this type is read, the encrypted value is always
527        returned.  In the example above, the following value could be
528        returned:
529
530           <enc>$3$lyPjszaQq4EVqK7OPOxybQ==</enc>
531
532        If a value starting with '$3$' is received, the server knows
533        that the value is already encrypted, and stores it as is in the
534        data store.
535
536        A value adhering to this type must have a '$0$' or a '$3$' prefix.
537
538        ConfD uses a configurable set of encryption keys to encrypt the
539        string.  For details, see 'encryptedStrings' in the
540        confd.conf(5) manual page.";
541   }
542
543   typedef aes-cfb-128-encrypted-string {
544     type string;
545     description
546       "The aes-cfb-128-encrypted-string works exactly like
547        des3-cbc-encrypted-string but AES/128bits in CFB mode is used to
548        encrypt the string.  The prefix for encrypted values is '$4$'.";
549   }
550
551   typedef ipv4-address-and-prefix-length {
552     type string {
553       pattern "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))";
554     }
555     description
556       "The ipv4-address-and-prefix-length type represents a combination
557        of an IPv4 address and a prefix length. The prefix length is given
558        by the number following the slash character and must be less than
559        or equal to 32.";
560   }
561
562   typedef ipv6-address-and-prefix-length {
563     type string {
564       pattern "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))";
565       pattern "(([^:]+:){6}(([^:]+:[^:]+)|(.*\\..*)))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)(/.+)";
566     }
567     description
568       "The ipv6-address-and-prefix-length type represents a combination
569        of an IPv6 address and a prefix length. The prefix length is given
570        by the number following the slash character and must be less than
571        or equal to 128.";
572   }
573
574   typedef ip-address-and-prefix-length {
575     type union {
576       type tailf:ipv4-address-and-prefix-length;
577       type tailf:ipv6-address-and-prefix-length;
578     }
579     description
580       "The ip-address-and-prefix-length type represents a combination of
581        an IP address and a prefix length and is IP version neutral. The
582        format of the textual representations implies the IP version.";
583   }
584
585   extension export {
586     argument agent {
587       tailf:arg-type {
588         type union {
589           type enumeration {
590             enum "none";
591             enum "netconf";
592             enum "rest";
593             enum "cli";
594             enum "snmp";
595             enum "webui";
596           }
597           type string;
598         }
599       }
600     }
601     tailf:use-in "module";
602     tailf:occurence "*";
603     description
604       "Makes this data model visible in the northbound interface 'agent'.
605
606        This statement makes it possible to have a data model visible
607        through some northbound interface but not others.  For example,
608        if a MIB is used to generate a YANG module, the resulting YANG
609        module can be exposed through SNMP only.
610
611        Use the special agent 'none' to make the data model completely
612        hidden to all notherbound interfaces.
613
614        The agent can also be a free-form string.  In this case, the data
615        model will be visible to maapi applications using this string as its
616        'context'.";
617   }
618
619   extension annotate {
620     argument target {
621       tailf:arg-type {
622         type string;
623       }
624     }
625     tailf:use-in "module";
626     tailf:use-in "submodule";
627     tailf:occurence "*";
628     tailf:substatement "tailf:annotate" {
629       tailf:occurence "*";
630     }
631     tailf:substatement "if-feature" {
632       tailf:occurence "*";
633     }
634     description
635       "Annotates an existing statement with a 'tailf' statement or a
636        validation statement.  This is useful in order to add tailf
637        statements to a module without touching the module source.
638        Annotation statements can be put in a separate annotation
639        module, and then passed to 'confdc' (or 'pyang') when the
640        original module is compiled.
641
642        Any 'tailf' statement, except 'symlink' and 'action' can be
643        annotated.  The statements 'symlink' and 'action' modifies the
644        data model, and are thus not allowed.
645
646        The validation statements 'must', 'min-elements',
647        'max-elements', 'mandatory', 'unique', and 'when' can also be
648        annotated.
649
650        A 'description' can also be annotated.
651
652        'tailf:annotate' can occur on the top-level in a module, or in
653        another 'tailf:annotate' statement.
654
655        The argument is a 'schema-nodeid', i.e. the same as for
656        'augment', or a '*'.  It identifies a target node in the schema
657        tree to annotate with new statements.  The special value '*' can
658        be used within another 'tailf:annotate' statetement, to select all
659        children for annotation.
660
661        The target node is searched for after 'uses' and 'augment'
662        expansion.  All substatements to 'tailf:annotate' are treated as
663        if they were written inline in the target node, with the
664        exception of any 'tailf:annotate' substatements.  These are
665        treated recursively.  For example, the following snippet adds
666        one callpoint to /x and one to /x/y:
667
668         tailf:annotate /x {
669           tailf:callpoint xcp;
670           tailf:annotate y {
671             tailf:callpoint ycp;
672           }
673         }
674       ";
675   }
676
677   extension annotate-module {
678     argument module-name {
679       tailf:arg-type {
680         type tailf:identifier;
681       }
682     }
683     tailf:use-in "module";
684     tailf:occurence "*";
685     tailf:substatement "tailf:snmp-oid";
686     tailf:substatement "tailf:snmp-mib-module-name";
687     tailf:substatement "tailf:id";
688     tailf:substatement "tailf:id-value";
689     tailf:substatement "tailf:export";
690     tailf:substatement "tailf:unique-selector";
691     tailf:substatement "tailf:annotate-statement" {
692       tailf:occurence "*";
693     }
694     description
695       "Annotates an existing module or submodule statement with a 'tailf'
696        statement.  This is useful in order to add tailf statements to a
697        module without touching the module source.  Annotation
698        statements can be put in a separate annotation module, and then
699        passed to 'confdc' (or 'pyang') when the original module is
700        compiled.
701
702        'tailf:annotate-module' can occur on the top-level in a module,
703        and is used to add 'tailf' statements to the module statement
704        itself.
705
706        The argument is a name of the module or submodule to annotate.";
707   }
708
709   extension annotate-statement {
710     argument statement-path {
711       tailf:arg-type {
712         type string;
713       }
714     }
715     tailf:use-in "tailf:annotate-module";
716     tailf:use-in "tailf:annotate-statement";
717     tailf:occurence "*";
718     tailf:substatement "tailf:annotate-statement" {
719       tailf:occurence "*";
720     }
721     description
722       "Annotates an existing statement with a 'tailf' statement, a
723        validation statement, or a type restrcition statement.  This is
724        useful in order to add tailf statements to a module without
725        touching the module source.  Annotation statements can be put in
726        a separate annotation module, and then passed to 'confdc' (or
727        'pyang') when the original module is compiled.
728
729        Any 'tailf' statement, except 'symlink' and 'action' can be
730        annotated.  The statements 'symlink' and 'action' modifies the
731        data model, and are thus not allowed.
732
733        The validation statements 'must', 'min-elements',
734        'max-elements', 'mandatory', 'unique', and 'when' can also be
735        annotated.
736
737        The type restriction statement 'pattern' can also be annotated.
738
739        A 'description' can also be annotated.
740
741        The argument is an XPath-like expression that selects a
742        statement to annotate.  The syntax is:
743
744          <statement-name> ( '[' <arg-name> '=' <arg-value> ']' )
745
746        where <statement-name> is the name of the statement to annotate,
747        and if there are more than one such statement in the parent,
748        <arg-value> is the quoted value of the statement's argument.
749
750        All substatements to 'tailf:annotate-statement' are treated as
751        if they were written inline in the target node, with the
752        exception of any 'tailf:annotate-statement' substatements.
753        These are treated recursively.
754
755        For example, given the grouping:
756
757         grouping foo {
758           leaf bar {
759             type string;
760           }
761           leaf baz {
762             type string;
763           }
764         }
765
766        the following snippet adds a callpoint to the leaf 'baz':
767
768         tailf:annotate-statement grouping[name='foo'] {
769           tailf:annotate-statement leaf[name='baz'] {
770             tailf:callpoint xcp;
771           }
772         }
773       ";
774   }
775
776   extension value-length {
777     argument value {
778       tailf:arg-type {
779         type string;
780       }
781     }
782     tailf:use-in "type";
783     tailf:substatement "error-message";
784     tailf:substatement "error-app-tag";
785     description
786       "Used only for the types:
787          yang:object-identifier
788          yang:object-identifier-128
789          yang:phys-address
790          yang:hex-string
791          tailf:hex-list
792          tailf:octet-list
793          xs:hexBinary
794
795        This type restriction is used to limit the length of the
796        value-space value of the type.  Note that since all these types are
797        derived from 'string', the standard 'length' statement restricts the
798        lexical representation of the value.
799
800        The argument is a length expression string, with the same syntax as
801        for the standard YANG 'length' statement.";
802   }
803
804   extension path-filters {
805     argument value {
806       tailf:arg-type {
807         type string;
808       }
809     }
810     tailf:use-in "type";
811     tailf:substatement "tailf:no-subtree-match";
812     description
813       "Used for type 'instance-identifier' only.
814
815        The argument is a space separated list of absolute or relative XPath
816        expressions.
817
818        This statement declares that the instance-identifier value must match
819        one of the specified paths, according to the following rules:
820
821         1.  each XPath expression is evaluated, and returns a node set.
822
823         2.  if there is no 'tailf:no-subtree-match' statement, the
824             instance-identifier matches if it refers to a node in this
825             node set, or if it refers to any descendant node of this
826             node set.
827
828         3.  if there is a 'tailf:no-subtree-match' statement, the
829             instance-identifier matches if it refers to a node in this
830             node set.
831
832        For example:
833
834          The value /a/b[key='k1']/c matches the XPath expression
835          /a/b[key='k1']/c.
836
837          The value /a/b[key='k1']/c matches the XPath expression /a/b/c.
838
839          The value /a/b[key='k1']/c matches the XPath expression /a/b, if
840          there is no 'tailf:no-subtree-match' statement.
841
842          The value /a/b[key='k1'] matches the XPath expression /a/b, if
843          there is a 'tailf:no-subtree-match' statement.
844       ";
845   }
846
847   extension step {
848     argument value {
849       tailf:arg-type {
850         type string;
851       }
852     }
853     tailf:use-in "range";
854     description
855       "Used to further restrict the range of integer and decimal types.  The
856        argument is a positive integer or decimal value greater than
857        zero.  The allowed values for the type is further restricted to
858        only those values that matches the expression:
859
860          'low' + n * 'step'
861
862        where 'low' is the lowest allowed value in the range, n is a
863        non-negative integer.
864
865        For example, the following type:
866
867          type int32 {
868            range '-2 .. 9' {
869              tailf:step 3;
870            }
871          }
872
873        has the value space { -2, 1, 4, 7 }";
874   }
875
876   extension callpoint {
877     argument id {
878       tailf:arg-type {
879         type tailf:identifier;
880       }
881     }
882     tailf:use-in "leaf";
883     tailf:use-in "leaf-list";
884     tailf:use-in "list";
885     tailf:use-in "container";
886     tailf:use-in "refine";
887     tailf:use-in "grouping";
888     tailf:occurence "*";
889     tailf:substatement "description";
890     tailf:substatement "tailf:config";
891     tailf:substatement "tailf:transform";
892     tailf:substatement "tailf:set-hook";
893     tailf:substatement "tailf:transaction-hook";
894     tailf:substatement "tailf:cache";
895     tailf:substatement "tailf:opaque";
896     tailf:substatement "tailf:internal";
897     description
898       "Identifies a callback in a data provider.  A data provider implements
899        access to external data, either configuration data in a database or
900        operational data.  By default ConfD uses the embedded database
901        (CDB) to store all data. However, some or all of
902        the configuration data may be stored in an external source.  In
903        order for ConfD to be able to manipulate external data, a data
904        provider registers itself using the callpoint id as described in
905        confd_lib_dp(3).
906
907        A callpoint is inherited to all child nodes unless another
908        'callpoint' or an 'cdb-oper' is defined.";
909   }
910
911   extension config {
912     argument value {
913       tailf:arg-type {
914         type boolean;
915       }
916     }
917     tailf:use-in "tailf:callpoint";
918     description
919       "If this statement is present, the callpoint is applied to nodes with a
920        matching value of their 'config' property.";
921   }
922
923   extension transform {
924     argument value {
925       tailf:arg-type {
926         type boolean;
927       }
928     }
929     tailf:use-in "tailf:callpoint";
930     description
931       "If set to 'true', the callpoint is a transformation callpoint.  How
932        transformation callpoints are used is described in the
933        'Transformations, Hooks, Hidden Data and Symlinks' chapter
934        in the User's Guide.";
935   }
936
937   extension set-hook {
938     argument value {
939       tailf:arg-type {
940         type enumeration {
941           enum "subtree";
942           enum "object";
943           enum "node";
944         }
945       }
946     }
947     tailf:use-in "tailf:callpoint";
948     description
949       "Set hooks are a means to associate user code to the
950        transaction.  Whenever an element gets written, created, or
951        deleted, user code gets invoked and can optionally write more
952        data into the same transaction.
953
954        The difference between set- and transaction hooks are that set
955        hooks are invoked immediately when an element is modified, but
956        transaction hooks are invoked at commit time.
957
958        The value 'subtree' means that all nodes in the configuration
959        below where the hook is defined are affected.
960
961        The value 'object' means that the hook only applies to the list
962        where it is defined, i.e.  it applies to all child nodes that
963        are not themselves lists.
964
965        The value 'node' means that the hook only applies to
966        the node where it is defined and none of its children.
967
968        For more details on hooks,
969        see the 'Transformations, Hooks, Hidden Data and Symlinks'
970        chapter in the User's Guide.";
971   }
972
973   extension transaction-hook {
974     argument value {
975       tailf:arg-type {
976         type enumeration {
977           enum "subtree";
978           enum "object";
979           enum "node";
980         }
981       }
982     }
983     tailf:use-in "tailf:callpoint";
984     tailf:substatement "tailf:invocation-mode";
985     description
986       "Transaction hooks are a means to associate user code to the
987        transaction.  Whenever an element gets written, created, or
988        deleted, user code gets invoked and can optionally write more
989        data into the same transaction.
990
991        The difference between set- and transaction hooks are that set
992        hooks are invoked immediately when an element is modified, but
993        transaction hooks are invoked at commit time.
994
995        The value 'subtree' means that all nodes in the configuration
996        below where the hook is defined are affected.
997
998        The value 'object' means that the hook only applies to the list
999        where it is defined, i.e.  it applies to all child nodes that
1000        are not themselves lists.
1001
1002        The value 'node' means that the hook only applies to
1003        the node where it is defined and none of its children.
1004
1005        For more details on hooks,
1006        see the 'Transformations, Hooks, Hidden Data and Symlinks'
1007        chapter in the User's Guide.";
1008   }
1009
1010   extension invocation-mode {
1011     argument value {
1012       tailf:arg-type {
1013         type enumeration {
1014           enum "per-operation";
1015           enum "per-transaction";
1016         }
1017         default "per-operation";
1018       }
1019     }
1020     tailf:use-in "tailf:transaction-hook";
1021     description
1022       "By default, the node-specific write callbacks (create(), set_elem(),
1023        etc) for a transaction hook are invoked for the invidual data nodes
1024        that are modified in the transaction. If 'tailf:invocation-mode' is
1025        set to 'per-transaction', there will instead be a single invocation
1026        of a generic write callback (write_all()).";
1027   }
1028
1029   extension cache {
1030     argument value {
1031       tailf:arg-type {
1032         type boolean;
1033       }
1034     }
1035     tailf:use-in "tailf:callpoint";
1036     tailf:substatement "tailf:timeout";
1037     description
1038       "If set to 'true', the operational data served by the callpoint will
1039        be cached by ConfD.  If set to 'true' in a node that represents
1040        configuration data, the statement 'tailf:config' must be present
1041        and set to 'false'.  This feature is further described in the section
1042        'Caching operational data' in the 'Operational data' chapter in
1043        the User's Guide.";
1044   }
1045
1046   extension timeout {
1047     argument value {
1048       tailf:arg-type {
1049         type uint64;
1050       }
1051     }
1052     tailf:use-in "tailf:cache";
1053     description
1054       "Specifies how long the operational data will be cached, in seconds.
1055        This value will override the global value specified via
1056        /confdConfig/opcache/timeout in the confd.conf(5) file.";
1057   }
1058
1059   extension opaque {
1060     argument value {
1061       tailf:arg-type {
1062         type string {
1063           length "1..255";
1064         }
1065       }
1066     }
1067     tailf:use-in "tailf:callpoint";
1068     tailf:use-in "tailf:validate";
1069     tailf:use-in "tailf:actionpoint";
1070     description
1071       "Defines an opaque string which is passed to the callback function
1072        in the context.";
1073   }
1074
1075   extension id {
1076     argument name {
1077       tailf:arg-type {
1078         type string;
1079       }
1080     }
1081     tailf:use-in "module";
1082     description
1083       "This statement is used when old confspec models are translated to
1084        YANG.  It needs to be present if systems deployed with data
1085        based on confspecs are updated to YANG based data models.
1086
1087        In confspec, the 'id' of a data model was a string that never
1088        would change, even if the namespace URI would change.  It is not
1089        needed in YANG, since the namespace URi cannot change as a module
1090        is updated.
1091
1092        This statement is typically present in YANG modules generated by
1093        cs2yang.  If no live upgrade needs to be done from a confspec
1094        based system to a YANG based system, this statement can be
1095        removed from such a generated module.";
1096   }
1097
1098   extension cdb-oper {
1099     tailf:use-in "leaf";
1100     tailf:use-in "leaf-list";
1101     tailf:use-in "list";
1102     tailf:use-in "container";
1103     tailf:use-in "refine";
1104     tailf:substatement "description";
1105     tailf:substatement "tailf:persistent";
1106     description
1107       "Indicates that operational data nodes below this node are stored in
1108        CDB.";
1109   }
1110
1111   extension persistent {
1112     argument value {
1113       tailf:arg-type {
1114         type boolean;
1115       }
1116     }
1117     tailf:use-in "tailf:cdb-oper";
1118     description
1119       "If it is set to 'true', the operational data is stored on disk.  If
1120        set to 'false', the operational data is not persistent across
1121        ConfD restarts.  The default is 'false'.";
1122   }
1123
1124   extension id-value {
1125     argument value {
1126       tailf:arg-type {
1127         type uint32 {
1128           range "1..4294967294";
1129         }
1130       }
1131     }
1132     tailf:use-in "module";
1133     tailf:use-in "leaf";
1134     tailf:use-in "leaf-list";
1135     tailf:use-in "list";
1136     tailf:use-in "container";
1137     tailf:use-in "rpc";
1138     tailf:use-in "identity";
1139     tailf:use-in "notification";
1140     tailf:use-in "choice";
1141     tailf:use-in "case";
1142     tailf:use-in "tailf:action";
1143     description
1144       "This statement lets you specify a hard wired numerical id value to
1145        associate with the parent node.  This id value is normally auto
1146        generated by confdc and is used when working with the ConfD API
1147        to refer to a tag name, to avoid expensive string comparison.
1148        Under certain rare circumstances this auto generated hash value
1149        may collide with a hash value generated for a node in another
1150        data model.  Whenever such a collision occurs the ConfD daemon
1151        fails to start and instructs the developer to use the 'id-value'
1152        statement to resolve the collision.
1153
1154
1155        A thorough discussion on id-value can be found in the section Hash
1156        Values and the id-value Statement in the YANG chapter in the User
1157        Guide.";
1158   }
1159
1160   extension default-ref {
1161     argument path {
1162       tailf:arg-type {
1163         type string;
1164       }
1165     }
1166     tailf:use-in "leaf";
1167     tailf:use-in "refine";
1168     description
1169       "This statement defines a dynamic default value.  It is a reference to
1170        some other leaf in the datamodel.  If no value has been set for
1171        this leaf, it defaults to the value of the leaf that the
1172        'default-ref' argument points to.
1173
1174        The textual format of a 'default-ref' is an XPath location path with
1175        no predicates.
1176
1177        The type of the leaf with a 'default-ref' will be set to the
1178        type of the referred leaf.  This means that the type statement in
1179        the leaf with the 'default-ref' is ignored, but it SHOULD match the
1180        type of the referred leaf.
1181
1182        Here is an example, where a group without a 'hold-time' will get as
1183        default the value of another leaf up in the hierarchy:
1184
1185         leaf hold-time {
1186             mandatory true;
1187             type int32;
1188         }
1189         list group {
1190             key 'name';
1191             leaf name {
1192                 type string;
1193             }
1194             leaf hold-time {
1195                 type int32;
1196                 tailf:default-ref '../../hold-time';
1197             }
1198         }
1199       ";
1200   }
1201
1202   extension sort-order {
1203     argument how {
1204       tailf:arg-type {
1205         type enumeration {
1206           enum "normal" {
1207             description
1208               "Entries are sorted on the key values.";
1209           }
1210           enum "snmp" {
1211             description
1212               "All string key values are considered to
1213                start with a length byte for the purpose of sorting.";
1214           }
1215           enum "snmp-implied" {
1216             description
1217               "As 'snmp', but uses a length byte for all except the last key.";
1218           }
1219           enum "unsorted" {
1220             description
1221               "Entries do not have any special order.  Note that it is
1222                not possible to use the function 'find_next' on an
1223                unsorted list.  If an unsorted list is filtered (e.g.,
1224                in the CLI, the entire list must be traversed.
1225
1226                If this value is given for a list stored in CDB, it
1227                has no effect.";
1228           }
1229         }
1230         default "normal";
1231       }
1232     }
1233     tailf:use-in "list";
1234     tailf:use-in "leaf-list";
1235     tailf:use-in "tailf:secondary-index";
1236     description
1237       "This statement can be used for 'ordered-by system' lists and
1238        leaf-lists only.  It indicates in which way the list entries
1239        are sorted.";
1240   }
1241
1242   extension link {
1243     argument target {
1244       tailf:arg-type {
1245         type string;
1246       }
1247     }
1248     tailf:use-in "leaf";
1249     tailf:use-in "leaf-list";
1250     tailf:substatement "tailf:inherit-set-hook";
1251     description
1252       "This statement specifies that the data node should be
1253        implemented as a link to another data node, called the target
1254        data node.  This means that whenever the node is modified, the
1255        system modifies the target data node instead, and whenever the
1256        data node is read, the system returns the value of target data
1257        node.
1258
1259        Note that if the data node is a leaf, the target node MUST also
1260        be a leaf, and if the data node is a leaf-list, the target node
1261        MUST also be a leaf-list.
1262
1263        Note that the type of the data node MUST be the same as the
1264        target data node.  Currently the compiler cannot check this.
1265
1266        The argument is an XPath absolute location path.  If
1267        the target lies within lists, all keys must be specified.
1268        A key either has a value, or is a reference to a key in the path of the
1269        source node, using the function current() as starting
1270        point for an XPath location path.  For example:
1271
1272          /a/b[k1='paul'][k2=current()/../k]/c";
1273   }
1274
1275   extension lower-case {
1276     tailf:use-in "leaf";
1277     tailf:use-in "leaf-list";
1278     description
1279       "Use for config false leafs and leaf-lists only.
1280
1281        This extension serves as a hint to the system that the
1282        leaf's type has the implict pattern '[^A-Z]*', i.e., all
1283        strings returned by the data provider are lower case (in
1284        the 7-bit ASCII range).
1285
1286        The CLI uses this hint when it is run in case-insensitive mode
1287        to optimize the lookup calls towards the data provider.";
1288   }
1289
1290   extension inherit-set-hook {
1291     argument value {
1292       tailf:arg-type {
1293         type boolean;
1294         default "false";
1295       }
1296     }
1297     tailf:use-in "tailf:symlink";
1298     tailf:use-in "tailf:link";
1299     description
1300       "This statement specifies that a 'tailf:set-hook' statement should
1301        survive through symlinks. If set to true a set hook gets called as
1302        soon as the value is set via a symlink but also during commit. The
1303        normal behaviour is to only call the set hook during commit time.";
1304   }
1305
1306   extension secondary-index {
1307     argument name {
1308       tailf:arg-type {
1309         type string;
1310       }
1311     }
1312     tailf:use-in "list";
1313     tailf:occurence "*";
1314     tailf:substatement "tailf:index-leafs" {
1315       tailf:occurence "1";
1316     }
1317     tailf:substatement "tailf:sort-order";
1318     tailf:substatement "tailf:display-default-order";
1319     description
1320       "This statement creates a secondary index with a given name in the
1321        parent list.  The secondary index can be used to control the
1322        displayed sort order of the instances of the list.
1323
1324        Read more about sort order in 'The ConfD Command-Line Interface
1325        (CLI)' chapters in the User Guide, confd_lib_dp(3), and
1326        confd_lib_maapi(3).
1327
1328        NOTE: Currently secondary-index is not supported for config false
1329        data stored in CDB.";
1330   }
1331
1332   extension index-leafs {
1333     argument value {
1334       tailf:arg-type {
1335         type string;
1336       }
1337     }
1338     tailf:use-in "tailf:secondary-index";
1339     tailf:occurence "1";
1340     description
1341       "This statement contains a space separated list of leaf names.  Each
1342        such leaf must be a direct child to the list.  The secondary
1343        index is kept sorted according to the values of these leafs.";
1344   }
1345
1346   extension typepoint {
1347     argument id {
1348       tailf:arg-type {
1349         type tailf:identifier;
1350       }
1351     }
1352     tailf:use-in "typedef";
1353     tailf:use-in "leaf";
1354     tailf:use-in "leaf-list";
1355     tailf:occurence "*";
1356     description
1357       "If a typedef, leaf, or leaf-list has a 'typepoint' statement, a
1358        user-defined type is specified, as opposed to a derivation or
1359        specification of an existing type.  The implementation of a
1360        user-defined type must be provided in the form of a shared object
1361        with C callback functions that is loaded into the ConfD daemon at
1362        startup time. Read more about user-defined types in the
1363        confd_types(3) manual page.
1364
1365        The argument defines the ID associated with a typepoint.  This
1366        ID is provided by the shared object, and used by the ConfD
1367        daemon to locate the implementation of a specific user-defined
1368        type.";
1369   }
1370
1371   extension unique-selector {
1372     argument context-path {
1373       tailf:arg-type {
1374         type string;
1375       }
1376     }
1377     tailf:use-in "module";
1378     tailf:use-in "submodule";
1379     tailf:use-in "grouping";
1380     tailf:use-in "augment";
1381     tailf:use-in "container";
1382     tailf:use-in "list";
1383     tailf:occurence "*";
1384     tailf:substatement "tailf:unique-leaf" {
1385       tailf:occurence "+";
1386     }
1387     description
1388       "The standard YANG statement 'unique' can be used to check for
1389        uniqueness within a single list only.  Specifically, it cannot
1390        be used to check for uniqueness of leafs within a sublist.
1391
1392        For example:
1393
1394          container a {
1395            list b {
1396              ...
1397              unique 'server/ip server/port';
1398              list server {
1399                ...
1400                leaf ip { ... };
1401                leaf port { ... };
1402              }
1403            }
1404          }
1405
1406        The unique expression above is not legal.  The intention is
1407        that there must not be any two 'server' entries in any 'b' with
1408        the same combination of ip and port.  This would be illegal:
1409
1410          <a>
1411            <b>
1412              <name>b1</name>
1413              <server>
1414                <ip>10.0.0.1</ip>
1415                <port>80</port>
1416              </server>
1417            </b>
1418            <b>
1419              <name>b2</name>
1420              <server>
1421                <ip>10.0.0.1</ip>
1422                <port>80</port>
1423              </server>
1424            </b>
1425          </a>
1426
1427        With 'tailf:unique-selector' and 'tailf:unique-leaf', this kind
1428        of constraint can be defined.
1429
1430        The argument to 'tailf:unique-selector' is an XPath descendant
1431        location path (matches the rule 'descendant-schema-nodeid' in
1432        RFC 6020).  The first node in the path MUST be a list node, and
1433        it MUST be defined in the same module as the
1434        tailf:unique-selector.  For example, the following is illegal:
1435
1436          module y {
1437            ...
1438            import x {
1439              prefix x;
1440            }
1441            tailf:unique-selector '/x:server' { // illegal
1442              ...
1443            }
1444          }
1445
1446        For each instance of the node where the selector is defined, it
1447        is evaluated, and for each node selected by the selector, a
1448        tuple is constructed by evaluating the 'tailf:unique-leaf'
1449        expression.  All such tuples must be unique.  If a
1450        'tailf:unique-leaf' expression refers to a non-existing leaf,
1451        the corresponding tuple is ignored.
1452
1453        In the example above, the unique expression can be replaced by:
1454
1455          container a {
1456            tailf:unique-selector 'b/server' {
1457              tailf:unique-leaf 'ip';
1458              tailf:unique-leaf 'port';
1459            }
1460            list b {
1461              ...
1462            }
1463          }
1464
1465        For each container 'a', the XPath expression 'b/server' is
1466        evaluated.  For each such server, a 2-tuple is constructed with
1467        the 'ip' and 'port' leafs.  Each such 2-tuple is guaranteed to
1468        be unique.";
1469   }
1470
1471   extension unique-leaf {
1472     argument leaf-expr {
1473       tailf:arg-type {
1474         type string;
1475       }
1476     }
1477     tailf:use-in "tailf:unique-selector";
1478     tailf:occurence "+";
1479     description
1480       "See 'tailf:unique-selector' for a description of how this statement
1481        is used.
1482
1483        The argument is an XPath descendant location path (matches the
1484        rule 'descendant-schema-nodeid' in RFC 6020), and it MUST refer to
1485        a leaf.";
1486   }
1487
1488   extension validate {
1489     argument id {
1490       tailf:arg-type {
1491         type tailf:identifier;
1492       }
1493     }
1494     tailf:use-in "leaf";
1495     tailf:use-in "leaf-list";
1496     tailf:use-in "list";
1497     tailf:use-in "container";
1498     tailf:use-in "grouping";
1499     tailf:use-in "refine";
1500     tailf:use-in "must";
1501     tailf:occurence "*";
1502     tailf:substatement "description";
1503     tailf:substatement "tailf:call-once";
1504     tailf:substatement "tailf:dependency" {
1505       tailf:occurence "*";
1506     }
1507     tailf:substatement "tailf:opaque";
1508     tailf:substatement "tailf:internal";
1509     tailf:substatement "tailf:priority";
1510     description
1511       "Identifies a validation callback which is invoked when a configuration
1512        value is to be validated.  The callback validates a value and
1513        typically checks it towards other values in the data store.
1514        Validation callbacks are used when the YANG built-in validation
1515        constructs ('must', 'unique') are not expressive enough.
1516
1517        Callbacks use the API described in confd_lib_maapi(3) to
1518        access whatever other configuration values needed to perform the
1519        validation.
1520
1521        Validation callbacks are typically assigned to individual nodes
1522        in the data model, but it may be feasible to use a single
1523        validation callback on a root node.  In that case the callback
1524        is responsible for validation of all values and their
1525        relationships throughout the data store.
1526
1527        The 'validate' statment should in almost all cases have a
1528        'tailf:dependency' substatement.  If such a statement is not
1529        given, the validate function is evaluated at every commit,
1530        leading to overall performance degradation.
1531
1532        If the 'validate' statement is defined in a 'must' statement,
1533        validation callback is called instead of evaluating the must
1534        expression.  This is useful if the evaluation of the must statement
1535        uses too much resources, and the condition expressed with the must
1536        statement is easier to check with a validation callback function.";
1537   }
1538
1539   extension call-once {
1540     argument value {
1541       tailf:arg-type {
1542         type boolean;
1543       }
1544     }
1545     tailf:use-in "tailf:validate";
1546     description
1547       "This optional statement can be used only if the parent statement is
1548        a list.  If 'call-once' is 'true'. the validation callback is
1549        only called once even though there exists many list entries in
1550        the data store.  This is useful if we have a huge amount of
1551        instances or if values assigned to each instance have to be
1552        validated in comparison with its siblings.";
1553   }
1554
1555   extension dependency {
1556     argument path {
1557       tailf:arg-type {
1558         type string;
1559       }
1560     }
1561     tailf:use-in "must";
1562     tailf:use-in "when";
1563     tailf:use-in "tailf:validate";
1564     tailf:substatement "tailf:xpath-root";
1565     tailf:occurence "*";
1566     description
1567       "This statement is used to specify that the must or when expression
1568        or validation function depends on a set of subtrees in the data
1569        store.  Whenever a node in one of those subtrees are modified,
1570        the must or when expression is evaluated, or validation code executed.
1571
1572        The textual format of a 'dependency' is an XPath location path with
1573        no predicates.
1574
1575        If the node that declares the dependency is a leaf, there is an
1576        implicit dependency to the leaf itself.
1577
1578        For example, with the leafs below, the validation code for'vp'
1579        will be called whenever 'a' or 'b' is modified.
1580
1581         leaf a {
1582             type int32;
1583             tailf:validate vp {
1584                 tailf:dependency '../b';
1585             }
1586         }
1587         leaf b {
1588             type int32;
1589         }
1590
1591        For 'when' and 'must' expressions, the compiler can derive the
1592        dependencies automatically from the XPath expression in most
1593        cases.  The exception is if any wildcards are used in the expression.
1594
1595        For 'when' expressions to work, a 'tailf:dependency' statement
1596        must be given, unless the compiler can figure out the dependency
1597        by itself.
1598
1599        Note that having 'must' expressions or a 'tailf:validate'
1600        statement without dependencies impacts the overall performance
1601        of the system, since all such 'must' expressions or validation
1602        functions are evaluated at every commit.";
1603   }
1604
1605   extension no-dependency {
1606     tailf:use-in "must";
1607     tailf:use-in "tailf:validate";
1608     tailf:occurence "?";
1609     description
1610       "This optional statements can be used to explicitly say that a 'must'
1611        expression or a validation function is evaluated at every
1612        commit.  Use this with care, since the overall performance of
1613        the system is impacted if this statement is used.";
1614   }
1615
1616   extension priority {
1617     tailf:use-in "tailf:validate";
1618     argument value {
1619       tailf:arg-type {
1620         type uint32;
1621       }
1622     }
1623     description
1624       "This extension takes an integer parameter specifying the order
1625        validation code will be evaluated, in order of increasing
1626        priority.
1627
1628        The default priority is 0.";
1629   }
1630
1631   extension no-subtree-match {
1632     tailf:use-in "tailf:path-filters";
1633     description
1634       "See tailf:path-filters.";
1635   }
1636
1637   extension info {
1638     argument text {
1639       yin-element true;
1640       tailf:arg-type {
1641         type string;
1642       }
1643     }
1644     tailf:use-in "typedef";
1645     tailf:use-in "leaf";
1646     tailf:use-in "leaf-list";
1647     tailf:use-in "list";
1648     tailf:use-in "container";
1649     tailf:use-in "rpc";
1650     tailf:use-in "identity";
1651     tailf:use-in "type";
1652     tailf:use-in "enum";
1653     tailf:use-in "bit";
1654     tailf:use-in "length";
1655     tailf:use-in "pattern";
1656     tailf:use-in "range";
1657     tailf:use-in "refine";
1658     tailf:use-in "tailf:action";
1659     tailf:use-in "tailf:symlink";
1660     tailf:use-in "tailf:cli-exit-command";
1661     description
1662       "Contains a textual description of the definition, suitable for
1663        being presented to the CLI and WebUI users.
1664
1665        The first sentence of this textual description is used in the
1666        CLI as a summary, and displayed to the user when a short
1667        explanation is presented.
1668
1669        The 'description' statement is related, but targeted to the module
1670        reader, rather than the CLI or WebUI user.
1671
1672        The info string may contain a ';;' keyword. It is used in type
1673        descriptions for leafs when the builtin type info needs to be
1674        customized.  A 'normal' info string describing a type is assumed
1675        to contain a short textual description.  When ';;' is present it
1676        works as a delimiter where the text before the keyword is
1677        assumed to contain a short description and the text after the
1678        keyword a long(er) description.  In the context of completion in
1679        the CLI the text will be nicely presented in two columns where
1680        both descriptions are aligned when displayed.";
1681   }
1682
1683   extension info-html {
1684     argument text {
1685       yin-element true;
1686       tailf:arg-type {
1687         type string;
1688       }
1689     }
1690     tailf:use-in "leaf";
1691     tailf:use-in "leaf-list";
1692     tailf:use-in "list";
1693     tailf:use-in "container";
1694     tailf:use-in "rpc";
1695     tailf:use-in "identity";
1696     tailf:use-in "tailf:action";
1697     tailf:use-in "tailf:symlink";
1698     tailf:use-in "refine";
1699     description
1700       "This statement works exactly as 'tailf:info', with the exception
1701        that it can contain HTML markup.  The WebUI will display the
1702        string with the HTML markup, but the CLI will remove all HTML markup
1703        before displaying the string to the user.  In most cases,
1704        using this statement avoids using special descriptions in webspecs
1705        and clispecs.
1706
1707        If this statement is present, 'tailf:info' cannot be given at the same
1708        time.";
1709   }
1710
1711   extension sort-priority {
1712     argument value {
1713       tailf:arg-type {
1714         type int32;
1715       }
1716     }
1717     tailf:use-in "leaf";
1718     tailf:use-in "leaf-list";
1719     tailf:use-in "list";
1720     tailf:use-in "container";
1721     tailf:use-in "refine";
1722     description
1723       "This extension takes an integer parameter specifying the order and
1724        can be placed on leafs, containers, lists and leaf-lists.
1725        When showing, or getting configuration, leaf values will be returned
1726        in order of increasing sort-priority.
1727
1728        The default sort-priority is 0.";
1729   }
1730
1731   extension writable {
1732     argument value {
1733       tailf:arg-type {
1734         type boolean;
1735       }
1736     }
1737     tailf:use-in "leaf";
1738     description
1739       "This extension makes operational data (i.e., config false data)
1740        writable.  Only valid for leafs.";
1741   }
1742
1743   extension suppress-echo {
1744     argument value {
1745       tailf:arg-type {
1746         type boolean;
1747       }
1748     }
1749     tailf:use-in "typedef";
1750     tailf:use-in "leaf";
1751     tailf:use-in "leaf-list";
1752     description
1753       "If this statetement is set to 'true', leafs of this type will not have
1754        their values echoed when input in the webui or when the CLI prompts
1755        for the value. The value will also not be included in the audit
1756        log in clear text but will appear as ***.";
1757   }
1758
1759   extension hidden {
1760     argument tag {
1761       tailf:arg-type {
1762         type string {
1763           pattern "[^\\*].*|..+";
1764         }
1765       }
1766     }
1767     tailf:use-in "leaf";
1768     tailf:use-in "leaf-list";
1769     tailf:use-in "list";
1770     tailf:use-in "container";
1771     tailf:use-in "tailf:action";
1772     tailf:use-in "refine";
1773     tailf:use-in "tailf:symlink";
1774     tailf:use-in "rpc";
1775     tailf:occurence "*";
1776     description
1777       "This statement can be used to hide a node from some, or all,
1778        northbound interfaces.  All nodes with the same value are
1779        considered a hide group and are treated the same with regards to
1780        being visible or not in a northbound interface.
1781
1782        A node with an hidden property is not shown in the northbound
1783        user interfaces (CLI and Web UI) unless an 'unhide' operation has
1784        been performed in the user interface.
1785
1786        The hidden value 'full' indicates that the node should be hidden
1787        from all northbound interfaces, including programmatical interfaces
1788        such as NETCONF.
1789
1790        The value '*' is not valid.
1791
1792        A hide group can be unhidden only if this has been explicitly
1793        allowed in the confd.conf(5) daemon configuration.
1794
1795        Multiple hide groups can be specified by giving this statement
1796        multiple times.  The node is shown if any of the specified hide groups
1797        has been given in the 'unhide' operation.
1798
1799        Note that if a mandatory node is hidden, a hook callback
1800        function (or similar) might be needed in order to set the
1801        element.";
1802   }
1803
1804   extension display-when {
1805     argument condition {
1806       tailf:arg-type {
1807         type string;
1808       }
1809     }
1810     tailf:use-in "leaf";
1811     tailf:use-in "leaf-list";
1812     tailf:use-in "list";
1813     tailf:use-in "container";
1814     tailf:use-in "refine";
1815     tailf:substatement "tailf:xpath-root";
1816     description
1817       "The argument contains an XPath expression which specifies when
1818        the node should be displayed in the CLI and WebUI.  For example,
1819        when the CLI performs completion, and one of the candidates is
1820        a node with a 'display-when' expression, the expression is
1821        evaluated by the CLI.  If the XPath expression evaluates to
1822        true, the node is shown as a possible completion candidate,
1823        otherwise not.
1824
1825        For a list, the display-when expression is evaluated once for the
1826        entire list.  In this case, the XPath context node is the list's parent
1827        node.
1828
1829        This feature is further described in the 'Transformations, Hooks,
1830        Hidden Data and Symlinks' chapter in the User Guide.";
1831   }
1832
1833   extension display-groups {
1834     argument value {
1835       tailf:arg-type {
1836         type string;
1837       }
1838     }
1839     tailf:use-in "leaf";
1840     tailf:use-in "leaf-list";
1841     tailf:use-in "list";
1842     tailf:use-in "container";
1843     tailf:use-in "refine";
1844     description
1845       "This property is used in the CLI when 'enableDisplayGroups' has been
1846        set to true in the confd.conf(5) file.  Display groups are used
1847        to control which elements should be displayed by the show command.
1848
1849        The argument is a space-separated string of tags.
1850
1851        In the J-style CLI the 'show status', 'show table' and 'show
1852        all' commands use display groups.  In the C- and I-style
1853        CLIs the 'show <pattern>' command uses display groups.
1854
1855        If no display groups are specified when running the commands, the
1856        node will be displayed if it does not have the 'display-groups'
1857        property, or if the property value includes the special value 'none'.
1858
1859        If display groups are specified when running the command, then
1860        the node will be displayed only if its 'display-group'
1861        property contains one of the specified display groups.";
1862   }
1863
1864   extension display-default-order {
1865     tailf:use-in "tailf:secondary-index";
1866     description
1867       "Specifies that the list should be displayed sorted according
1868        to this secondary index in the show command.
1869
1870        If the list has more than one secondary index,
1871        'display-default-order' must be present in one index only.
1872
1873        Used in J-, I- and C-style CLIs and WebUI.";
1874   }
1875
1876   extension alt-name {
1877     argument name {
1878       tailf:arg-type {
1879         type string;
1880       }
1881     }
1882     tailf:use-in "rpc";
1883     tailf:use-in "leaf";
1884     tailf:use-in "leaf-list";
1885     tailf:use-in "list";
1886     tailf:use-in "container";
1887     tailf:use-in "refine";
1888     description
1889       "This property is used to specify an alternative name for the
1890        node in the CLI.  It is used instead of the node name in the CLI,
1891        both for input and output.";
1892   }
1893
1894   extension display-status-name {
1895     argument name {
1896       tailf:arg-type {
1897         type string;
1898       }
1899     }
1900     tailf:use-in "leaf";
1901     tailf:use-in "leaf-list";
1902     tailf:use-in "list";
1903     tailf:use-in "container";
1904     tailf:use-in "refine";
1905     description
1906       "This property is used to specify an alternative name for the
1907        element in the CLI.  It is used when displaying status
1908        information in the C- and I-style CLIs.";
1909   }
1910
1911   extension display-column-name {
1912     argument name {
1913       tailf:arg-type {
1914         type string;
1915       }
1916     }
1917     tailf:use-in "leaf";
1918     tailf:use-in "leaf-list";
1919     tailf:use-in "refine";
1920     description
1921       "This property is used to specify an alternative column name for the
1922        leaf in the CLI.  It is used when displaying the leaf in a
1923        table in the CLI.";
1924   }
1925
1926   extension display-hint {
1927     argument hint {
1928       tailf:arg-type {
1929         type string;
1930       }
1931     }
1932     tailf:use-in "leaf";
1933     tailf:use-in "typedef";
1934     description
1935       "This statement can be used to add a display-hint to a leaf or
1936        typedef of type binary.  The display-hint is used in the CLI
1937        and WebUI instead of displaying the binary as a base64-encoded
1938        string.  It is also used for input.
1939
1940        The value of a 'display-hint' is defined in RFC 2579.
1941
1942        For example, with the display-hint value '1x:', the value is
1943        printed and inputted as a colon-separated hex list.";
1944   }
1945
1946   extension snmp-oid {
1947     argument oid {
1948       tailf:arg-type {
1949         type tailf:tailf-oid;
1950       }
1951     }
1952     tailf:use-in "leaf";
1953     tailf:use-in "leaf-list";
1954     tailf:use-in "list";
1955     tailf:use-in "container";
1956     tailf:use-in "tailf:symlink";
1957     tailf:use-in "module";
1958     tailf:use-in "refine";
1959     description
1960       "Used when the YANG module is mapped to an SNMP module.
1961
1962        If this statement is present as a direct child to 'module',
1963        it indicates the top level OID for the module.
1964
1965        When the parent node is mapped to an SNMP object, this statement
1966        specifies the OID of the SNMP object.  It may be either a full
1967        OID or just a suffix (a period, followed by an integer).  In the
1968        latter case, a full OID must be given for some ancestor element.
1969
1970        NOTE: when this statement is set in a list, it refers to the OID of
1971        the correspondig table, not the table entry.";
1972   }
1973
1974   extension snmp-name {
1975     argument name {
1976       tailf:arg-type {
1977         type tailf:snmp-identifier;
1978       }
1979     }
1980     tailf:use-in "leaf";
1981     tailf:use-in "leaf-list";
1982     tailf:use-in "list";
1983     tailf:use-in "container";
1984     tailf:use-in "tailf:symlink";
1985     tailf:use-in "enum";
1986     tailf:use-in "refine";
1987     tailf:occurence "*";
1988     description
1989       "Used when the YANG module is mapped to an SNMP module.
1990
1991        When the parent node is mapped to an SNMP object, this statement
1992        specifies the name of the SNMP object.
1993
1994        If the parent node is mapped to multiple SNMP objects, this
1995        statement can be given multiple times.  The first statement
1996        specifies the primary table.
1997
1998        In a list, the argument is interpreted as:
1999
2000              [MIB-MODULE-NAME:]TABLE-NAME
2001
2002        For a leaf representing a table column, it is interpreted as:
2003
2004              [[MIB-MODULE-NAME:]TABLE-NAME:]NAME
2005
2006        For a leaf representing a scalar variable, it is interpreted as:
2007
2008              [MIB-MODULE-NAME:]NAME
2009
2010        If a YANG list is mapped to multiple SNMP tables, each such SNMP
2011        table must be specified with a 'tailf:snmp-name' statement.  If
2012        the table is defined in another MIB than the MIB specified in
2013        'tailf:snmp-mib-module-name', the MIB name must be specified in this
2014        argument.
2015
2016        A leaf in a list that is mapped to multiple SNMP tables must specify
2017        the name of the table it is mapped to if it is different from the
2018        primary table.
2019
2020        In the following example, a single YANG list 'interface' is mapped
2021        to the MIB tables ifTable, ifXTable, and ipv4InterfaceTable:
2022
2023         list interface {
2024           key index;
2025           tailf:snmp-name 'ifTable'; // primary table
2026           tailf:snmp-name 'ifXTable';
2027           tailf:snmp-name 'IP-MIB:ipv4InterfaceTable';
2028
2029           leaf index {
2030             type int32;
2031           }
2032           leaf description {
2033             type string;
2034             tailf:snmp-name 'ifDescr';  // mapped to primary table
2035           }
2036           leaf name {
2037             type string;
2038             tailf:snmp-name 'ifXTable:ifName';
2039           }
2040           leaf ipv4-enable {
2041             type boolean;
2042             tailf:snmp-name
2043               'IP-MIB:ipv4InterfaceTable:ipv4InterfaceEnableStatus';
2044           }
2045           ...
2046         }
2047
2048        When emitting a mib from yang, enum labels are used as-is if they
2049        follow the SMI rules for labels (no '.' or '_' characters and beginning
2050        with a lowercase letter). Any label that doesn't satisfy the SMI rules
2051        will be converted as follows:
2052
2053         An initial uppercase character will be downcased.
2054
2055         If the initial character is not a letter it will be prepended with
2056         an 'a'.
2057
2058         Any '.' or '_' characters elsewhere in the label will be substituted
2059         with '-' characters.
2060
2061         In the resulting label, any multiple '-' character sequence will be
2062         replaced with a single '-' character.
2063
2064        If this automatic conversion is not suitable, snmp-name can be used
2065        to specify the label to use when emitting a MIB.";
2066   }
2067
2068   extension snmp-mib-module-name {
2069     argument name {
2070       tailf:arg-type {
2071         type tailf:identifier;
2072       }
2073     }
2074     tailf:use-in "leaf";
2075     tailf:use-in "leaf-list";
2076     tailf:use-in "list";
2077     tailf:use-in "container";
2078     tailf:use-in "module";
2079     tailf:use-in "refine";
2080     description
2081       "Used when the YANG module is mapped to an SNMP module.
2082
2083        Specifies the name of the SNMP MIB module where the SNMP objects
2084        are defined.
2085
2086        This property is inherited by all child nodes.";
2087   }
2088
2089   extension snmp-row-status-column {
2090     argument value {
2091       tailf:arg-type {
2092         type uint32 {
2093           range "1..max";
2094         }
2095       }
2096     }
2097     tailf:use-in "list";
2098     tailf:use-in "refine";
2099     description
2100       "Used when an SNMP module is generated from the YANG module.
2101
2102        When the parent list node is mapped to an SNMP table, this
2103        statement specifies the column number of the generated RowStatus
2104        column.  If it is not specified, the generated RowStatus column
2105        will be the last in the table.";
2106   }
2107
2108   extension snmp-lax-type-check {
2109     argument value {
2110       tailf:arg-type {
2111         type boolean;
2112       }
2113     }
2114     tailf:use-in "leaf";
2115     description
2116       "Normally, the ConfD MIB compiler checks that the data type of an SNMP
2117        object matches the data type of the corresponding YANG leaf.  If
2118        both objects are writeble, the data types need to precisely
2119        match, but if the SNMP object is read-only, or if
2120        snmp-lax-type-check is set to 'true', the compiler accepts the
2121        object if the SNMP type's value space is a superset of the YANG
2122        type's value space.
2123
2124        If snmp-lax-type-check is true and the MIB object is writable, the SNMP
2125        agent will reject values outside the YANG data type range in runtime.";
2126   }
2127
2128   extension snmp-exclude-object {
2129     tailf:use-in "leaf";
2130     tailf:use-in "leaf-list";
2131     tailf:use-in "list";
2132     tailf:use-in "container";
2133     tailf:use-in "tailf:symlink";
2134     tailf:use-in "refine";
2135     description
2136       "Used when an SNMP MIB is generated from a YANG module, using
2137        the --generate-oids option to confdc.
2138
2139        If this statement is present, confdc will exclude this object
2140        from the resulting MIB.";
2141   }
2142
2143   extension snmp-delete-value {
2144     argument value {
2145       tailf:arg-type {
2146         type string;
2147       }
2148     }
2149     tailf:use-in "leaf";
2150     tailf:substatement "tailf:snmp-send-delete-value";
2151     description
2152       "This statement is used to define a value to be used in SNMP
2153        to delete an optional leaf.  The argument to this statement is the
2154        special value.  This special value must not be part of the value
2155        space for the YANG leaf.
2156
2157        If the optional leaf does not exists, reading it over SNMP returns
2158        'noSuchInstance', unless the statement 'tailf:snmp-send-delete-value'
2159        is used, in which case the same value as used to delete the node
2160        is returned.
2161
2162        For example, the YANG leaf:
2163
2164             leaf opt-int {
2165               type int32 {
2166                 range '1..255';
2167               }
2168               tailf:snmp-delete-value 0 {
2169                 tailf:snmp-send-delete-value;
2170               }
2171             }
2172
2173        can be mapped to a SMI object with syntax:
2174
2175             SYNTAX       Integer32 (0..255)
2176
2177        Setting such an object to '0' over SNMP will delete the node
2178        from the datastore.  If the node does not exsist, reading it over
2179        SNMP will return '0'.";
2180   }
2181
2182   extension snmp-send-delete-value {
2183     tailf:use-in "tailf:snmp-delete-value";
2184     description
2185       "See tailf:snmp-delete-value.";
2186   }
2187
2188   extension snmp-ned-set-before-row-modification {
2189     argument value {
2190       tailf:arg-type {
2191         type string;
2192       }
2193     }
2194     tailf:use-in "leaf";
2195     description
2196       "If this statement is present on a leaf, it tells the SNMP NED
2197        that if a column in the row is modified, and it is marked with
2198        'tailf:snmp-ned-modification-dependent', then the column marked
2199        with 'tailf:snmp-ned-set-before-modification' needs to be set to
2200        <value> before the other column is modified.  After all such
2201        columns have been modified, the column marked with
2202        'tailf:snmp-ned-set-before-modification' is reset to its initial
2203        value.";
2204   }
2205
2206   extension snmp-ned-modification-dependent {
2207     tailf:use-in "leaf";
2208     description
2209       "This statement is used on all columns in a table that
2210        require the usage of the column marked with
2211        tailf:snmp-ned-set-before-row-modification.
2212
2213        This statement can be used on any column in a table where one
2214        leaf is marked with tailf:snmp-ned-set-before-row-modification,
2215        or a table that AUGMENTS such a table, or a table with a
2216        foreign index in such a table.";
2217   }
2218
2219   extension snmp-ned-accessible-column {
2220     argument leaf-name {
2221       tailf:arg-type {
2222         type union {
2223           type tailf:identifier;
2224           type int32;
2225         }
2226       }
2227     }
2228     tailf:use-in "list";
2229     description
2230       "The name or subid number of an accessible column that is
2231        instantiated in all table entries in a table.  The column does
2232        not have to be writable.  The SNMP NED will use this column
2233        when it uses GET-NEXT to loop through the list entries, and
2234        when doing existence tests.
2235
2236        If this column is not given, the SNMP NED uses the following
2237        algorithm:
2238
2239          1.  If there is a RowStatus column, it will be used.
2240          2.  If an INDEX leaf is accessible, it will be used.
2241          3.  Otherwise, use the first accessible column returned
2242              by the SNMP agent.";
2243   }
2244
2245   extension snmp-ned-delete-before-create {
2246     tailf:use-in "list";
2247     description
2248       "This statement is used in a list to make the SNMP NED always send
2249        deletes before creates.  Normally, creates are sent before deletes.";
2250   }
2251
2252   extension snmp-ned-recreate-when-modified {
2253     tailf:use-in "list";
2254     description
2255       "This statement is used in a list to make the SNMP NED delete
2256        and recreate the row when a column in the row is modified.";
2257   }
2258
2259   extension java-class-name {
2260     argument name {
2261       tailf:arg-type {
2262         type string;
2263       }
2264     }
2265     tailf:use-in "leaf";
2266     tailf:use-in "leaf-list";
2267     tailf:use-in "list";
2268     tailf:use-in "container";
2269     tailf:use-in "refine";
2270     description
2271       "Used to give another name than the default name to generated Java
2272        classes.  This statemement is typically used to avoid name conflicts
2273        in the Java classes.";
2274   }
2275
2276   extension code-name {
2277     argument name {
2278       tailf:arg-type {
2279         type string;
2280       }
2281     }
2282     tailf:use-in "enum";
2283     tailf:use-in "bit";
2284     tailf:use-in "leaf";
2285     tailf:use-in "leaf-list";
2286     tailf:use-in "list";
2287     tailf:use-in "container";
2288     tailf:use-in "rpc";
2289     tailf:use-in "identity";
2290     tailf:use-in "notification";
2291     tailf:use-in "tailf:action";
2292     description
2293       "Used to give another name to the enum or node name in generated
2294        header files. This statement is typically used to avoid name
2295        conflicts if there is a data node with the same name as the
2296        enumeration, if there are multiple enumerations in different
2297        types with the same name but different values, or if there are
2298        multiple node names that are mapped to the same name in the
2299        header file.";
2300   }
2301
2302   extension action {
2303     argument name {
2304       tailf:arg-type {
2305         type tailf:identifier;
2306       }
2307     }
2308     tailf:use-in "augment";
2309     tailf:use-in "list";
2310     tailf:use-in "container";
2311     tailf:use-in "grouping";
2312     tailf:occurence "*";
2313     tailf:substatement "description";
2314     tailf:substatement "input";
2315     tailf:substatement "output";
2316     tailf:substatement "status";
2317     tailf:substatement "tailf:actionpoint";
2318     tailf:substatement "tailf:alt-name";
2319     tailf:substatement "tailf:cli-mount-point";
2320     tailf:substatement "tailf:cli-configure-mode";
2321     tailf:substatement "tailf:cli-operational-mode";
2322     tailf:substatement "tailf:cli-oper-info";
2323     tailf:substatement "tailf:code-name";
2324     tailf:substatement "tailf:confirm-text";
2325     tailf:substatement "tailf:display-when";
2326     tailf:substatement "tailf:exec";
2327     tailf:substatement "tailf:hidden";
2328     tailf:substatement "tailf:info";
2329     tailf:substatement "tailf:info-html";
2330     description
2331       "Defines an action (method) in the data model.
2332
2333        When the action is invoked, the instance on which the action is
2334        invoked is explicitly identified by an hierarchy of
2335        configuration or state data.
2336
2337        The action statement can have either a 'tailf:actionpoint' or a
2338        'tailf:exec' substatement.  If the action is implemented as a
2339        callback in an application daemon, 'tailf:actionpoint' is used,
2340        whereas 'tailf:exec' is used for an action implemented as a
2341        standalone executable (program or script).  Additionally, 'action'
2342        can have the same substatements as the standard YANG 'rpc'
2343        statement, e.g., 'description', 'input', and 'output'.
2344
2345        For example:
2346
2347            container sys {
2348              list interface {
2349                key name;
2350                leaf name {
2351                  type string;
2352                }
2353                tailf:action reset {
2354                  tailf:actionpoint my-ap;
2355                  input {
2356                    leaf after-seconds {
2357                      mandatory false;
2358                      type int32;
2359                    }
2360                  }
2361                }
2362              }
2363            }
2364
2365        We can also add a 'tailf:confirm-text', which defines a string to
2366        be used in the user interfaces to prompt the user for
2367        confirmation before the action is executed.  The optional
2368        'tailf:confirm-default' and 'tailf:cli-batch-confirm-default' can be set
2369        to control if the default is to proceed or to abort. The latter will only
2370        be used during batch processing in the CLI (e.g. non-interactive mode).
2371
2372            tailf:action reset {
2373              tailf:actionpoint my-ap;
2374              input {
2375                leaf after-seconds {
2376                  mandatory false;
2377                  type int32;
2378                }
2379              }
2380              tailf:confirm-text 'Really want to do this?' {
2381                tailf:confirm-default true;
2382              }
2383            }
2384
2385        The 'tailf:actionpoint' statement can have a 'tailf:opaque'
2386        substatement, to define an opaque string that is passed to the
2387        callback function.
2388
2389            tailf:action reset {
2390              tailf:actionpoint my-ap {
2391                tailf:opaque 'reset-interface';
2392              }
2393              input {
2394                leaf after-seconds {
2395                  mandatory false;
2396                  type int32;
2397                }
2398              }
2399            }
2400
2401        When we use the 'tailf:exec' substatement, the argument to exec
2402        specifies the program or script that should be executed.  For
2403        example:
2404
2405            tailf:action reboot {
2406              tailf:exec '/opt/sys/reboot.sh' {
2407                tailf:args '-c $(context) -p $(path)';
2408              }
2409              input {
2410                leaf when {
2411                  type enumeration {
2412                    enum now;
2413                    enum 10secs;
2414                    enum 1min;
2415                  }
2416                }
2417              }
2418            }";
2419   }
2420
2421   extension actionpoint {
2422     argument name {
2423       tailf:arg-type {
2424         type tailf:identifier;
2425       }
2426     }
2427     tailf:use-in "rpc";
2428     tailf:use-in "tailf:action";
2429     tailf:use-in "refine";
2430     tailf:substatement "tailf:opaque";
2431     tailf:substatement "tailf:internal";
2432     description
2433       "Identifies the callback in a data provider that implements the
2434        action.  See confd_lib_dp(3) for details on the API.";
2435   }
2436
2437   extension confirm-text {
2438     argument text {
2439       yin-element true;
2440       tailf:arg-type {
2441         type string;
2442       }
2443     }
2444     tailf:use-in "rpc";
2445     tailf:use-in "tailf:action";
2446     tailf:substatement "tailf:confirm-default";
2447     tailf:substatement "tailf:cli-batch-confirm-default";
2448     description
2449       "A string which is used in the user interfaces to prompt the user for
2450        confirmation before the action is executed. The optional
2451        'confirm-default' and 'cli-batch-confirm-default' can be set to control
2452        if the default is to proceed or to abort. The latter will only
2453        be used during batch processing in the CLI (e.g. non-interactive mode).";
2454   }
2455
2456   extension confirm-default {
2457     argument name {
2458       tailf:arg-type {
2459         type boolean;
2460       }
2461     }
2462     tailf:use-in "tailf:confirm-text";
2463     description
2464       "Specifies if the default is to proceed or abort the action when a
2465        confirm-text is set.  If this value is not specified, a ConfD
2466        global default value can be set in clispec(5).";
2467   }
2468
2469   extension indexed-view {
2470     tailf:use-in "list";
2471     tailf:substatement "tailf:auto-compact";
2472     description
2473       "This element can only be used if the list has a single key of
2474        an integer type.
2475
2476        It is used to signal that lists instances uses an indexed view,
2477        i.e., making it possible to insert a new list entry at a certain
2478        position.  If a list entry is inserted at a certain position, list
2479        entries following this position are automatically renumbered by the
2480        system, if needed, to make room for the new entry.
2481
2482        This statement is mainly provided for backwards compatibility with
2483        confspecs.  New data models should consider using YANG's ordered-by
2484        user statement instead.";
2485   }
2486
2487   extension auto-compact {
2488     tailf:use-in "tailf:indexed-view";
2489     description
2490       "If an indexed-view list is marked with this statement, it means that
2491        the server will automatically renumber entires after a delete
2492        operation so that the list entries are strictly monotonically
2493        increasing, starting from 1, with no holes.  New list entries
2494        can either be insterted anywhere in the list, or created at the
2495        end; but it is an error to try to create a list entry with a
2496        key that would result in a hole in the sequence.
2497
2498        For example, if the list has entries 1,2,3 it is an error to
2499        create entry 5, but correct to create 4.";
2500   }
2501
2502   extension key-default {
2503     argument value {
2504       tailf:arg-type {
2505         type string;
2506       }
2507     }
2508     tailf:use-in "leaf";
2509     description
2510       "Must be used for key leafs only.
2511
2512        Specifies a value that the CLI and WebUI will use when a list entry is
2513        created, and this key leaf is not given a value.
2514
2515        If one key leaf has a key-default value, all key leafs that
2516        follow this key leaf must also have key-default values.";
2517   }
2518
2519   extension error-info {
2520     tailf:use-in "module";
2521     tailf:use-in "submodule";
2522     tailf:occurence "?";
2523     tailf:substatement "description";
2524     tailf:substatement "leaf" {
2525       tailf:occurence "*";
2526     }
2527     tailf:substatement "leaf-list" {
2528       tailf:occurence "*";
2529     }
2530     tailf:substatement "list" {
2531       tailf:occurence "*";
2532     }
2533     tailf:substatement "container" {
2534       tailf:occurence "*";
2535     }
2536     tailf:substatement "choice" {
2537       tailf:occurence "*";
2538     }
2539     tailf:substatement "uses" {
2540       tailf:occurence "*";
2541     }
2542     description
2543       "Declares a set of data nodes to be used in the NETCONF <error-info>
2544        element.
2545
2546        A data provider can use one of the
2547        confd_*_seterr_extended_info() functions (see confd_lib_dp(3))
2548        to set these data nodes on errors.
2549
2550        This statement may be used multiple times.
2551
2552        For example:
2553
2554           tailf:error-info {
2555              leaf severity {
2556                type enumeration {
2557                  enum info;
2558                  enum error;
2559                  enum critical;
2560                }
2561              }
2562              container detail {
2563                leaf class {
2564                  type uint8;
2565                }
2566                leaf code {
2567                  type uint8;
2568                }
2569              }
2570            }";
2571   }
2572
2573   extension non-strict-leafref {
2574     tailf:use-in "leaf";
2575     tailf:use-in "leaf-list";
2576     tailf:substatement "path" {
2577       tailf:occurence "1";
2578     }
2579     description
2580       "This statement can be used in leafs and leaf-lists similar
2581        to 'leafref', but allows reference to non-existing leafs,
2582        and allows reference from config to non-config.
2583
2584        This statement takes no argument, but expects the core YANG
2585        statement 'path' as a substatement.  The function 'deref' cannot
2586        be used in the path, since it works on nodes of type leafref
2587        only.
2588
2589        The type of the leaf or leaf-list must be exactly the same
2590        as the type of the target.
2591
2592        This statement can be viewed as a substitute for a standard
2593        'require-instance false' on leafrefs, which isn't allowed.
2594
2595        The CLI uses this statement to provide completion with
2596        existing values, and the WebUI uses it to provide a
2597        drop-down box with existing values.";
2598   }
2599
2600   extension exec {
2601     argument cmd {
2602       tailf:arg-type {
2603         type string;
2604       }
2605     }
2606     tailf:use-in "rpc";
2607     tailf:use-in "tailf:action";
2608     tailf:substatement "tailf:args";
2609     tailf:substatement "tailf:uid";
2610     tailf:substatement "tailf:gid";
2611     tailf:substatement "tailf:wd";
2612     tailf:substatement "tailf:global-no-duplicate";
2613     tailf:substatement "tailf:raw-xml";
2614     tailf:substatement "tailf:interruptible";
2615     tailf:substatement "tailf:interrupt";
2616     description
2617       "Specifies that the rpc or action is implemented as an OS executable.
2618        The argument 'cmd' is the path to the executable file.  If the
2619        command is in the $PATH of ConfD, the 'cmd' can be just the name
2620        of the executable.";
2621   }
2622
2623   extension args {
2624     argument value {
2625       tailf:arg-type {
2626         type string;
2627       }
2628     }
2629     tailf:use-in "tailf:exec";
2630     description
2631       "Specifies arguments to send to the executable when it is invoked by
2632        ConfD.  The argument 'value' is a space separated list of
2633        argument strings.  It may contain variables on the form
2634        $(variablename).  These variables will be expanded before the
2635        command is executed.  The following variables are always available:
2636
2637         $(user)   The name of the user which runs the operation.
2638
2639         $(groups) A comma separated string of the names of the groups
2640                   the user belongs to.
2641
2642         $(ip)     The source ip address of the user session.
2643
2644         $(uid)    The user id of the user.
2645
2646         $(gid)    The group id of the user.
2647
2648        When the parent 'exec' statement is a substatement of 'action', the
2649        following additional variablenames are available:
2650
2651         $(keypath)   The path that identifies the parent container of 'action'
2652                      in string keypath form, e.g.,
2653                      '/sys:host{earth}/interface{eth0}'.
2654
2655         $(path)      The path that identifies the parent container of 'action'
2656                      in CLI path form, e.g., 'host earth interface eth0'.
2657
2658         $(context)   cli | webui | netconf | any string provided by MAAPI
2659
2660        For  example:
2661          args '-user $(user) $(uid)';
2662        might expand to:
2663          -user bob 500
2664       ";
2665   }
2666
2667   extension raw-xml {
2668     tailf:use-in "tailf:exec";
2669     tailf:substatement "tailf:batch";
2670     description
2671       "Specifies that ConfD should not convert the RPC XML parameters to
2672        command line arguments.  Instead, ConfD just passes the raw XML on
2673        stdin to the program.
2674
2675        This statement is not allowed in 'tailf:action'.";
2676   }
2677
2678   extension interruptible {
2679     argument value {
2680       tailf:arg-type {
2681         type boolean;
2682         default "true";
2683       }
2684     }
2685     tailf:use-in "tailf:exec";
2686     description
2687       "Specifies whether the client can abort the
2688        execution of the executable.";
2689   }
2690
2691   extension interrupt {
2692     argument signal {
2693       tailf:arg-type {
2694         type enumeration {
2695           enum "sigkill";
2696           enum "sigint";
2697           enum "sigterm";
2698         }
2699         default "sigkill";
2700       }
2701     }
2702     tailf:use-in "tailf:exec";
2703     description
2704       "This statement specifies which signal is sent to executable by ConfD
2705        in case the client terminates or aborts the execution.
2706
2707        If not specified, 'sigkill' is sent.";
2708   }
2709
2710   extension uid {
2711     argument value {
2712       tailf:arg-type {
2713         type union {
2714           type enumeration {
2715             enum "confd" {
2716               description
2717                 "The command is run as the same user id as the ConfD daemon.";
2718             }
2719             enum "user" {
2720               description
2721                 "The command is run as the same user id as the user logged
2722                  in to ConfD.  This user id MUST exist as an actual user id
2723                  in the underlying operating system.";
2724             }
2725             enum "root" {
2726               description
2727                 "The command is run as root.";
2728             }
2729           }
2730           type uint32;
2731         }
2732       }
2733     }
2734     tailf:use-in "tailf:exec";
2735     description
2736       "Specifies which user id to use when executing the command.
2737
2738        If 'uid' is an integer value, the command is run as the user with
2739        this user id.
2740
2741        If 'uid' is set to either 'user', 'root' or an integer user id, the
2742        ConfD daemon must have been started as root (or setuid), or the
2743        ConfD executable program 'cmdwrapper' must have setuid root
2744        permissions.";
2745   }
2746
2747   extension gid {
2748     argument value {
2749       tailf:arg-type {
2750         type union {
2751           type enumeration {
2752             enum "confd" {
2753               description
2754                 "The command is run as the same group id as the ConfD daemon.";
2755             }
2756             enum "user" {
2757               description
2758                 "The command is run as the same group id as the user logged
2759                  in to ConfD.  This group id MUST exist as an actual group id
2760                  in the underlying operating system.";
2761             }
2762             enum "root" {
2763               description
2764                 "The command is run as root.";
2765             }
2766           }
2767           type uint32;
2768         }
2769       }
2770     }
2771     tailf:use-in "tailf:exec";
2772     description
2773       "Specifies which group id to use when executing the command.
2774
2775        If 'gid' is an integer value, the command is run as the group with
2776        this group id.
2777
2778        If 'gid' is set to either 'user', 'root' or an integer group id, the
2779        ConfD daemon must have been started as root (or setuid), or the
2780        ConfD executable program 'cmdwrapper' must have setuid root
2781        permissions.";
2782   }
2783
2784   extension wd {
2785     argument value {
2786       tailf:arg-type {
2787         type string;
2788       }
2789     }
2790     tailf:use-in "tailf:exec";
2791     description
2792       "Specifies which working directory to use when executing the
2793        command. If not given the command is executed from the homedir
2794        of the user logged in to ConfD.";
2795   }
2796
2797   extension global-no-duplicate {
2798     argument value {
2799       tailf:arg-type {
2800         type string;
2801       }
2802     }
2803     tailf:use-in "tailf:exec";
2804     description
2805       "Specifies that only one instance with the same name can be run at any
2806        one time in the system. The command can be started either from
2807        the CLI, the WebUI or through NETCONF. If a client tries to
2808        execute this command while another operation with the same
2809        'global-no-duplicate' name is running, a 'resource-denied' error is
2810        generated.";
2811   }
2812
2813   extension batch {
2814     tailf:use-in "tailf:raw-xml";
2815     description
2816       "Specifies that the command returns immediately, but still runs in the
2817        background.";
2818   }
2819
2820   typedef hex-list {
2821     type string {
2822       pattern "(([0-9a-fA-F]){2}(:([0-9a-fA-F]){2})*)?";
2823     }
2824     status deprecated;
2825     description
2826       "DEPRECATED: Use yang:hex-string instead.  There are no plans to remove
2827        tailf:hex-list.
2828
2829        A list of colon-separated hexa-decimal octets e.g. '4F:4C:41:71'.
2830
2831        The statement tailf:value-length can be used to restrict the number
2832        of octets.  Note that using the 'length' restriction limits the
2833        number of characters in the lexical representation.";
2834   }
2835
2836   extension symlink {
2837     argument name {
2838       tailf:arg-type {
2839         type tailf:identifier;
2840       }
2841     }
2842     status deprecated;
2843     tailf:use-in "list";
2844     tailf:use-in "container";
2845     tailf:use-in "module";
2846     tailf:use-in "submodule";
2847     tailf:use-in "augment";
2848     tailf:use-in "case";
2849     tailf:occurence "*";
2850     tailf:substatement "status";
2851     tailf:substatement "tailf:alt-name";
2852     tailf:substatement "tailf:cli-add-mode";
2853     tailf:substatement "tailf:cli-allow-join-with-key";
2854     tailf:substatement "tailf:cli-allow-join-with-value";
2855     tailf:substatement "tailf:cli-allow-key-abbreviation";
2856     tailf:substatement "tailf:cli-allow-range";
2857     tailf:substatement "tailf:cli-allow-wildcard";
2858     tailf:substatement "tailf:cli-autowizard";
2859     tailf:substatement "tailf:cli-boolean-no";
2860     tailf:substatement "tailf:cli-break-sequence-commands";
2861     tailf:substatement "tailf:cli-column-align";
2862     tailf:substatement "tailf:cli-column-stats";
2863     tailf:substatement "tailf:cli-column-width";
2864     tailf:substatement "tailf:cli-compact-stats";
2865     tailf:substatement "tailf:cli-compact-syntax";
2866     tailf:substatement "tailf:cli-completion-actionpoint";
2867     tailf:substatement "tailf:cli-custom-error";
2868     tailf:substatement "tailf:cli-custom-range";
2869     tailf:substatement "tailf:cli-custom-range-actionpoint";
2870     tailf:substatement "tailf:cli-custom-range-enumerator";
2871     tailf:substatement "tailf:cli-delayed-auto-commit";
2872     tailf:substatement "tailf:cli-delete-container-on-delete";
2873     tailf:substatement "tailf:cli-delete-when-empty";
2874     tailf:substatement "tailf:cli-diff-dependency" {
2875       tailf:occurence "*";
2876     }
2877     tailf:substatement "tailf:cli-disabled-info";
2878     tailf:substatement "tailf:cli-disallow-value";
2879     tailf:substatement "tailf:cli-display-empty-config";
2880     tailf:substatement "tailf:cli-display-separated";
2881     tailf:substatement "tailf:cli-drop-node-name";
2882     tailf:substatement "tailf:cli-no-keyword";
2883     tailf:substatement "tailf:cli-enforce-table";
2884     tailf:substatement "tailf:cli-embed-no-on-delete";
2885     tailf:substatement "tailf:cli-exit-command";
2886     tailf:substatement "tailf:cli-explicit-exit";
2887     tailf:substatement "tailf:cli-expose-key-name";
2888     tailf:substatement "tailf:cli-expose-ns-prefix";
2889     tailf:substatement "tailf:cli-flat-list-syntax";
2890     tailf:substatement "tailf:cli-flatten-container";
2891     tailf:substatement "tailf:cli-full-command";
2892     tailf:substatement "tailf:cli-full-no";
2893     tailf:substatement "tailf:cli-full-show-path";
2894     tailf:substatement "tailf:cli-hide-in-submode";
2895     tailf:substatement "tailf:cli-ignore-modified";
2896     tailf:substatement "tailf:cli-incomplete-command";
2897     tailf:substatement "tailf:cli-incomplete-no";
2898     tailf:substatement "tailf:cli-incomplete-show-path";
2899     tailf:substatement "tailf:cli-instance-info-leafs";
2900     tailf:substatement "tailf:cli-key-format";
2901     tailf:substatement "tailf:cli-list-syntax";
2902     tailf:substatement "tailf:cli-min-column-width";
2903     tailf:substatement "tailf:cli-mode-name";
2904     tailf:substatement "tailf:cli-mode-name-actionpoint";
2905     tailf:substatement "tailf:cli-multi-value";
2906     tailf:substatement "tailf:cli-multi-word-key";
2907     tailf:substatement "tailf:cli-multi-line-prompt";
2908     tailf:substatement "tailf:cli-no-key-completion";
2909     tailf:substatement "tailf:cli-no-match-completion";
2910     tailf:substatement "tailf:cli-no-name-on-delete";
2911     tailf:substatement "tailf:cli-no-value-on-delete";
2912     tailf:substatement "tailf:cli-oper-info";
2913     tailf:substatement "tailf:cli-optional-in-sequence";
2914     tailf:substatement "tailf:cli-prefix-key";
2915     tailf:substatement "tailf:cli-preformatted";
2916     tailf:substatement "tailf:cli-range-delimiters";
2917     tailf:substatement "tailf:cli-range-list-syntax";
2918     tailf:substatement "tailf:cli-recursive-delete";
2919     tailf:substatement "tailf:cli-remove-before-change";
2920     tailf:substatement "tailf:cli-reset-container";
2921     tailf:substatement "tailf:cli-run-template";
2922     tailf:substatement "tailf:cli-run-template-enter";
2923     tailf:substatement "tailf:cli-run-template-footer";
2924     tailf:substatement "tailf:cli-run-template-legend";
2925     tailf:substatement "tailf:cli-sequence-commands";
2926     tailf:substatement "tailf:cli-show-config";
2927     tailf:substatement "tailf:cli-show-no";
2928     tailf:substatement "tailf:cli-show-order-tag";
2929     tailf:substatement "tailf:cli-show-order-taglist";
2930     tailf:substatement "tailf:cli-show-template";
2931     tailf:substatement "tailf:cli-show-template-enter";
2932     tailf:substatement "tailf:cli-show-template-footer";
2933     tailf:substatement "tailf:cli-show-template-legend";
2934     tailf:substatement "tailf:cli-show-with-default";
2935     tailf:substatement "tailf:cli-strict-leafref";
2936     tailf:substatement "tailf:cli-suppress-key-abbreviation";
2937     tailf:substatement "tailf:cli-suppress-key-sort";
2938     tailf:substatement "tailf:cli-suppress-list-no";
2939     tailf:substatement "tailf:cli-suppress-mode";
2940     tailf:substatement "tailf:cli-suppress-no";
2941     tailf:substatement "tailf:cli-suppress-range";
2942     tailf:substatement "tailf:cli-suppress-shortenabled";
2943     tailf:substatement "tailf:cli-suppress-show-conf-path";
2944     tailf:substatement "tailf:cli-suppress-show-match";
2945     tailf:substatement "tailf:cli-suppress-show-path";
2946     tailf:substatement "tailf:cli-suppress-silent-no";
2947     tailf:substatement "tailf:cli-suppress-validation-warning-prompt";
2948     tailf:substatement "tailf:cli-suppress-wildcard";
2949     tailf:substatement "tailf:cli-table-footer";
2950     tailf:substatement "tailf:cli-table-legend";
2951     tailf:substatement "tailf:cli-trim-default";
2952     tailf:substatement "tailf:cli-value-display-template";
2953     tailf:substatement "tailf:display-when";
2954     tailf:substatement "tailf:hidden" {
2955       tailf:occurence "*";
2956     }
2957     tailf:substatement "tailf:inherit-set-hook";
2958     tailf:substatement "tailf:info";
2959     tailf:substatement "tailf:info-html";
2960     tailf:substatement "tailf:path" {
2961       tailf:occurence "1";
2962     }
2963     tailf:substatement "tailf:snmp-exclude-object";
2964     tailf:substatement "tailf:snmp-name" {
2965       tailf:occurence "*";
2966     }
2967     tailf:substatement "tailf:snmp-oid";
2968     tailf:substatement "tailf:sort-priority";
2969     description
2970       "DEPRECATED: Use tailf:link instead.  There are no plans to remove
2971        tailf:symlink.
2972
2973        This statement defines a 'symbolic link' from a node to some other node.
2974        The argument is the name of the new node, and the mandatory substatement
2975        'tailf:path' points to the node which is linked to.";
2976   }
2977
2978   extension path {
2979     argument path {
2980       tailf:arg-type {
2981         type string;
2982       }
2983     }
2984     status deprecated;
2985     tailf:occurence "1";
2986     tailf:use-in "tailf:symlink";
2987     description
2988       "This statement specifies which node a symlink points to.
2989
2990        The textual format of a symlink is an XPath absolute location path. If
2991        the target lies within lists, all keys must be specified.
2992        A key either has a value, or is a reference to a key in the path of the
2993        source node, using the function current() as starting
2994        point for an XPath location path.  For example:
2995
2996        /a/b[k1='paul'][k2=current()/../k]/c
2997       ";
2998   }
2999
3000   extension internal {
3001     tailf:use-in "tailf:callpoint";
3002     tailf:use-in "tailf:validate";
3003     tailf:use-in "tailf:actionpoint";
3004     description
3005       "For internal ConfD / NCS use only.";
3006   }
3007
3008   extension junos-val-as-xml-tag {
3009     tailf:use-in "leaf";
3010     description
3011       "Internal extension to handle non-YANG JUNOS data models.
3012        Use only for key enumeration leafs.";
3013   }
3014
3015   extension junos-val-with-prev-xml-tag {
3016     tailf:use-in "leaf";
3017     description
3018       "Internal extension to handle non-YANG JUNOS data models.
3019        Use only for keys where previous key is marked with
3020        'tailf:junos-val-as-xml-tag'.";
3021   }
3022
3023   extension xpath-root {
3024     argument value {
3025       tailf:arg-type {
3026         type uint8;
3027       }
3028     }
3029     tailf:use-in "must";
3030     tailf:use-in "when";
3031     tailf:use-in "path";
3032     tailf:use-in "tailf:display-when";
3033     tailf:use-in "tailf:cli-diff-dependency";
3034     description
3035       "Internal extension to 'chroot' XPath expressions";
3036   }
3037
3038   extension ncs-device-type {
3039     argument type {
3040       tailf:arg-type {
3041         type string;
3042       }
3043     }
3044     tailf:use-in "container";
3045     tailf:use-in "list";
3046     tailf:use-in "leaf";
3047     tailf:use-in "leaf-list";
3048     tailf:use-in "refine";
3049     description
3050       "Internal extension to tell NCS what type of device the data model
3051        is used for.";
3052   }
3053
3054   extension structure {
3055     argument name {
3056       tailf:arg-type {
3057         type tailf:identifier;
3058       }
3059     }
3060     tailf:use-in "module";
3061     tailf:use-in "submodule";
3062     tailf:occurence "*";
3063     tailf:substatement "description";
3064     tailf:substatement "leaf" {
3065       tailf:occurence "*";
3066     }
3067     tailf:substatement "leaf-list" {
3068       tailf:occurence "*";
3069     }
3070     tailf:substatement "list" {
3071       tailf:occurence "*";
3072     }
3073     tailf:substatement "container" {
3074       tailf:occurence "*";
3075     }
3076     tailf:substatement "choice" {
3077       tailf:occurence "*";
3078     }
3079     tailf:substatement "uses" {
3080       tailf:occurence "*";
3081     }
3082     description
3083       "Internal extension to define a data structure without any semantics
3084        attached.";
3085   }
3086 }