5c51b7c16364a8266f189db1fb60282f19823094
[groupbasedpolicy.git] / renderers / ios-xe / src / main / yang / netconf / ned.yang
1 module ned {
2
3     prefix ios;
4     namespace
5         "urn:ios";
6
7     import tailf-common {
8         prefix tailf;
9     }
10
11     import ietf-inet-types {
12         prefix inet;
13         revision-date 2013-07-15;
14     }
15
16     import ietf-yang-types {
17         prefix yang;
18       }
19
20     description
21         "This file was adapted to be parsed by yangtools for groupbasedpolicy project purpose";
22
23     revision
24         2016-03-8;
25
26 /// ========================================================================
27 /// typedefs
28 /// ========================================================================
29
30     typedef class-name-type {
31         type union {
32             type string {
33                 // Note: leafref can't be used here due to part of union.
34                 //path "/ios:native/class-map/name";
35                 tailf:info "WORD;;class-map name";
36             }
37             type enumeration {
38                 enum class-default {
39                     tailf:info "System default class matching otherwise "+
40                     "unclassified packet";
41                 }
42             }
43         }
44     }
45
46     typedef cos_value-type {
47         type union {
48             type uint8 {
49                 tailf:info "<0-7>;;new cos value";
50                 range "0..7";
51             }
52             type enumeration {
53                 enum cos {
54                     tailf:info "Set packet cos from cos";
55                 }
56                 enum dscp {
57                     tailf:info "Set packet cos from dscp";
58                 }
59                 enum exp {
60                     tailf:info "Set packet cos from exp";
61                 }
62                 enum precedence {
63                     tailf:info "Set packet cos from precedence";
64                 }
65             }
66         }
67     }
68
69     typedef dscp-type {
70         type union {
71             type uint8 {
72                 tailf:info "<0-63>;;Differentiated services codepoint value";
73                 range "0..63";
74             }
75             type enumeration {
76                 enum af11 {
77                     tailf:info "Match packets with AF11 dscp (001010)";
78                     value 10;
79                 }
80                 enum af12 {
81                     tailf:info "Match packets with AF12 dscp (001100)";
82                     value 12;
83                 }
84                 enum af13 {
85                     tailf:info "Match packets with AF13 dscp (001110)";
86                     value 14;
87                 }
88                 enum af21 {
89                     tailf:info "Match packets with AF21 dscp (010010)";
90                     value 18;
91                 }
92                 enum af22 {
93                     tailf:info "Match packets with AF22 dscp (010100)";
94                     value 20;
95                 }
96                 enum af23 {
97                     tailf:info "Match packets with AF23 dscp (010110)";
98                     value 22;
99                 }
100                 enum af31 {
101                     tailf:info "Match packets with AF31 dscp (011010)";
102                     value 26;
103                 }
104                 enum af32 {
105                     tailf:info "Match packets with AF32 dscp (011100)";
106                     value 28;
107                 }
108                 enum af33 {
109                     tailf:info "Match packets with AF33 dscp (011110)";
110                     value 30;
111                 }
112                 enum af41 {
113                     tailf:info "Match packets with AF41 dscp (100010)";
114                     value 34;
115                 }
116                 enum af42 {
117                     tailf:info "Match packets with AF42 dscp (100100)";
118                     value 36;
119                 }
120                 enum af43 {
121                     tailf:info "Match packets with AF43 dscp (100110)";
122                     value 38;
123                 }
124                 enum cs1 {
125                     tailf:info "Match packets with CS1(precedence 1) dscp" +
126                     " (001000)";
127                     value 8;
128                 }
129                 enum cs2 {
130                     tailf:info "Match packets with CS2(precedence 2) dscp" +
131                     " (010000)";
132                     value 16;
133                 }
134                 enum cs3 {
135                     tailf:info "Match packets with CS3(precedence 3) dscp" +
136                     " (011000)";
137                     value 24;
138                 }
139                 enum cs4 {
140                     tailf:info "Match packets with CS4(precedence 4) dscp" +
141                     " (100000)";
142                     value 32;
143                 }
144                 enum cs5 {
145                     tailf:info "Match packets with CS5(precedence 5) dscp" +
146                     " (101000)";
147                     value 40;
148                 }
149                 enum cs6 {
150                     tailf:info "Match packets with CS6(precedence 6) dscp" +
151                     " (110000)";
152                     value 48;
153                 }
154                 enum cs7 {
155                     tailf:info "Match packets with CS7(precedence 7) dscp" +
156                     " (111000)";
157                     value 56;
158                 }
159                 enum "default" {
160                     tailf:code-name "dscp_default";
161                     tailf:info "Match packets with default dscp (000000)";
162                     value 0;
163                 }
164                 enum dscp {
165                     tailf:info "Set packet dscp from dscp";
166                 }
167                 enum ef {
168                     tailf:info "Match packets with EF dscp (101110)";
169                     value 46;
170                 }
171                 enum precedence {
172                     tailf:info "Set packet dscp from precedence";
173                 }
174             }
175         }
176     }
177
178     typedef exp_value-type {
179         type union {
180             type uint8 {
181                 tailf:info "<0-7>;;new exp";
182                 range "0..7";
183             }
184             type enumeration {
185                 enum cos {
186                     tailf:info "Set packet exp from cos";
187                 }
188                 enum dscp {
189                     tailf:info "Set packet exp from dscp";
190                 }
191                 enum exp {
192                     tailf:info "Set packet exp from exp";
193                 }
194                 enum precedence {
195                     tailf:info "Set packet exp from precedence";
196                 }
197             }
198         }
199     }
200
201     typedef percentage-type {
202         type uint8 {
203             tailf:info "<1-100>;;Percentage";
204             range "1..100";
205         }
206     }
207
208     typedef police-bps-type {
209         type uint64 {
210             tailf:info "<8000-64000000000>;;Bits per second";
211             range "8000..64000000000";
212         }
213     }
214
215     typedef police-burst-type {
216         type uint32 {
217             tailf:info "<1000-512000000>;;Burst bytes";
218             range "1000..512000000";
219         }
220     }
221
222     typedef police-packets-bytes-type {
223         type enumeration {
224             enum packets {
225                 tailf:info "Treat 'burst' value as packets";
226             }
227             enum bytes {
228                 tailf:info "Treat 'burst' value as bytes";
229             }
230         }
231     }
232
233     typedef police-pps-bps-type {
234         type enumeration {
235             enum pps {
236                 tailf:info "pps  Treat 'rate' value in "+
237                 "packets-per-second";
238             }
239             enum bps {
240                 tailf:info "pps  Treat 'rate' value in "+
241                 "bytes-per-second";
242             }
243         }
244     }
245
246     typedef policy-action-type {
247         type enumeration {
248             enum bandwidth  {
249                 tailf:code-name policy_bandwidth;
250                 tailf:info "Bandwidth";
251             }
252             enum compression  {
253                 tailf:info "Activate Compression";
254             }
255             enum dbl {
256                 tailf:info "Dynamic buffer limiting";
257             }
258             enum drop  {
259                 tailf:info "Drop all packets";
260             }
261             enum estimate {
262                 tailf:info "Estimate resources required for this class";
263             }
264             enum fair-queue  {
265                 tailf:info "Enable Flow-based Fair Queuing in this Class";
266             }
267             enum forward {
268                 tailf:info "Forward service-path action";
269             }
270             enum netflow-sampler {
271                 tailf:info "NetFlow action";
272             }
273             enum police  {
274                 tailf:info "Police";
275             }
276             enum priority {
277                 tailf:code-name policy_priority;
278                 tailf:info "Strict Scheduling Priority for this Class";
279             }
280             enum queue-limit  {
281                 tailf:info "Queue Max Threshold for Tail Drop";
282             }
283             enum random-detect {
284                 tailf:info "Enable Random Early Detection as drop policy";
285             }
286             enum service-policy {
287                 tailf:info "Configure Flow Next";
288             }
289             enum set {
290                 tailf:info "Set QoS values";
291             }
292             enum shape {
293                 tailf:code-name policy_shape;
294                 tailf:info "Traffic Shaping";
295             }
296             enum trust {
297                 tailf:info "Set trust value for the class";
298             }
299             enum queue-buffers {
300                tailf:info "queue buffer";
301             }
302         }
303     }
304
305     typedef prec_value-type {
306         type union {
307             type uint8 {
308                 tailf:info "<0-7>;;new precedence";
309                 range "0..7";
310             }
311             type enumeration {
312                 enum cos {
313                     tailf:info "Set packet precedence from cos";
314                 }
315                 enum dscp {
316                     tailf:info "Set packet precedence from dscp";
317                 }
318                 enum exp {
319                     tailf:info "Set packet precedence from exp";
320                 }
321                 enum precedence {
322                     tailf:info "Set packet precedence from precedence";
323                 }
324             }
325         }
326     }
327
328     typedef precedence-type {
329         type union {
330             type uint8 {
331                 tailf:info "<0-7>;;Precedence value";
332                 range "0..7";
333             }
334             type enumeration {
335                 enum critical {
336                     tailf:info "Set packets with critical precedence (5)";
337                 }
338                 enum flash {
339                     tailf:info "Set packets with flash precedence (3)";
340                 }
341                 enum flash-override {
342                     tailf:info "Set packets with flash override precedence (4)";
343                 }
344                 enum immediate {
345                     tailf:info "Set packets with immediate precedence (2)";
346                 }
347                 enum internet {
348                     tailf:code-name "prec_internet";
349                     tailf:info "Set packets with internetwork control"+
350                     " precedence (6)";
351                 }
352                 enum network {
353                     tailf:info "Set packets with network control precedence"+
354                     " (7)";
355                 }
356                 enum priority {
357                     tailf:code-name "prec_priority";
358                     tailf:info "Set packets with priority precedence (1)";
359                 }
360                 enum routine {
361                     tailf:info "Set packets with routine precedence (0)";
362                 }
363             }
364         }
365     }
366
367     typedef precedence-type2 {
368         type union {
369             type uint8 {
370                 tailf:info "<0-7>;;IP precedence";
371                 range "0..7";
372             }
373             type enumeration {
374                 enum rsvp {
375                     tailf:code-name "prec_rsvp";
376                     tailf:info "rsvp traffic";
377                 }
378             }
379         }
380     }
381
382     typedef qos_value-type {
383         type union {
384             type uint8 {
385                 tailf:info "<0-99>;;new qos-group";
386                 range "0..99";
387             }
388             type enumeration {
389                 enum cos {
390                     tailf:info "Set packet qos from cos";
391                 }
392                 enum dscp {
393                     tailf:info "Set packet qos from dscp";
394                 }
395                 enum exp {
396                     tailf:info "Set packet qos from exp";
397                 }
398                 enum precedence {
399                     tailf:info "Set packet qos from precedence";
400                 }
401             }
402         }
403     }
404
405 /// ========================================================================
406 /// groupings
407 /// ========================================================================
408
409     grouping class-map-appnav-not-match-grouping {
410         // class-map * / peer
411         leaf peer {
412         when "../../../type = 'appnav'";
413         tailf:info "APPNAV Peer Filter";
414         description "APPNAV Peer Filter";
415         type string {
416             tailf:info "H.H.H;;Device ID";
417             }
418         }
419     }
420
421     grouping class-map-appnav-match-grouping {
422         // class-map * / peer
423         leaf peer {
424             when "../../type = 'appnav'";
425             tailf:info "APPNAV Peer Filter";
426             description "APPNAV Peer Filter";
427             type string {
428                 tailf:info "H.H.H;;Device ID";
429             }
430         }
431     }
432
433     grouping class-map-match-grouping {
434         // class-map * / match application
435         container application {
436             tailf:info "Application to match";
437             description "Application to match";
438             container application-group {
439                 tailf:info "Application Group to match";
440                 description "Application Group to match";
441                 leaf telepresence-group {
442                     tailf:info "Telepresence Group";
443                     description "Telepresence Group";
444                     tailf:cli-full-command;
445                     type empty;
446                 }
447                 leaf vmware-group {
448                     tailf:info "VMWARE Group";
449                     description "VMWARE Group";
450                     tailf:cli-full-command;
451                     type empty;
452                 }
453                 leaf webex-group {
454                     tailf:info "WebEx Group";
455                     description "WebEx Group";
456                     tailf:cli-full-command;
457                     type empty;
458                 }
459             }
460             container attribute {
461                 tailf:info "Application attribute to match";
462                 description "Application attribute to match";
463                 leaf media-type {
464                     tailf:info "Media type attribute to match";
465                     description "Media type attribute to match";
466                     type enumeration {
467                         enum audio {
468                             tailf:info "Audio";
469                         }
470                         enum audio-video {
471                             tailf:info "Audio Video";
472                         }
473                         enum control {
474                             tailf:info "Control";
475                         }
476                         enum data {
477                             tailf:info "Data";
478                         }
479                         enum video {
480                             tailf:info "Video";
481                         }
482                     }
483                 }
484             }
485         }
486         // class-map * / match access-group
487         container access-group {
488             tailf:info "Access group";
489             description "Access group";
490             leaf index {
491                 tailf:cli-drop-node-name;
492                 type uint32 {
493                     range "1..2699" {
494                         tailf:info "<1-2699>;;Access list index";
495                     }
496                 }
497             }
498             leaf-list name {
499                 tailf:info "Named Access List";
500                 description "Named Access List";
501                 tailf:cli-list-syntax;
502                 type string {
503                     tailf:info "WORD;;Access List name";
504                 }
505             }
506         }
507         // class-map * / match any
508         leaf any {
509             tailf:info "Any packets";
510             description "Any packets";
511             type empty;
512         }
513         // class-map * / match class-map
514         leaf-list class-map {
515             tailf:info "Class map";
516             description "Class map";
517             tailf:cli-list-syntax;
518             type leafref {
519                 path "/ios:native/class-map/name";
520                 // tailf:info "WORD;;Match class-map name";
521             }
522         }
523         // class-map * / match cos
524         leaf-list cos {
525             tailf:info "IEEE 802.1Q/ISL class of service/user priority values";
526             description "IEEE 802.1Q/ISL class of service/user priority values";
527             tailf:cli-flat-list-syntax;
528             type uint8 {
529                 range "0..7";
530                 tailf:info "<0-7>;;Enter up to 4 class-of-service values"+
531                     " separated by white-spaces";
532             }
533         }
534         // class-map * / match destination-address
535         container destination-address {
536             tailf:info "Destination address";
537             description "Destination address";
538             leaf-list mac {
539                 tailf:info "MAC address";
540                 description "MAC address";
541                 tailf:cli-list-syntax;
542                 type yang:mac-address {
543                     tailf:info "H.H.H;;MAC address";
544                 }
545             }
546         }
547         // class-map * / discard-class
548         leaf-list discard-class {
549             tailf:info "Discard behavior identifier";
550             description "Discard behavior identifier";
551             tailf:cli-list-syntax;
552             type uint8 {
553                 range "0..7";
554                 tailf:info "<0-7>;;Discard Class value";
555             }
556         }
557         // class-map * / dscp
558         leaf-list dscp {
559             tailf:info "Match DSCP in IP(v4) and IPv6 packets";
560             description "Match DSCP in IP(v4) and IPv6 packets";
561             tailf:cli-flat-list-syntax;
562             tailf:cli-list-syntax;
563             type dscp-type;
564         }
565         // class-map * / fr-de
566         leaf fr-de {
567             tailf:info "Match on Frame-relay DE bit";
568             description "Match on Frame-relay DE bit";
569             type empty;
570         }
571         // class-map * / fr-dlci
572         leaf-list fr-dlci {
573             tailf:info "Match on fr-dlci";
574             description "Match on fr-dlci";
575             tailf:cli-list-syntax;
576             type uint16 {
577                 range "16..1007";
578                 tailf:info "<16-1007>;;frame-relay dlci number";
579             }
580         }
581         // class-map * / input-interface
582         leaf-list input-interface {
583             tailf:info "Select an input interface to match";
584             description "Select an input interface to match";
585             tailf:cli-list-syntax;
586             //FIXME: interface dependency
587             type string;
588         }
589         // class-map * / ip
590         container ip {
591             tailf:info "IP specific values";
592             description "IP specific values";
593             // class-map * / ip dscp
594             leaf-list dscp {
595                 tailf:info "Match IP DSCP (DiffServ CodePoints)";
596                 description "Match IP DSCP (DiffServ CodePoints)";
597                 tailf:cli-flat-list-syntax;
598                 tailf:cli-list-syntax;
599                 type dscp-type;
600             }
601             // class-map * / ip precedence
602             leaf-list precedence {
603                 tailf:info "Match IP precedence";
604                 description "Match IP precedence";
605                 tailf:cli-flat-list-syntax;
606                 type precedence-type;
607             }
608             // class-map * / ip rtp
609             list rtp {
610                 tailf:info "Match RTP port nos";
611                 description "Match RTP port nos";
612                 key "port1 port2";
613                 leaf port1 {
614                     type uint16 {
615                         range "2000..65535";
616                         tailf:info "<2000-65535>;;Lower bound of UDP"+
617                             " destination port";
618                     }
619                 }
620                 leaf port2 {
621                     type uint16 {
622                         range "0..16383";
623                         tailf:info "<0-16383>;;Range of UDP ports";
624                     }
625                 }
626             }
627         }
628         // class-map * / non-client-nrt
629         leaf non-client-nrt {
630             tailf:cli-full-command;
631             type empty;
632         }
633         // class-map * / mpls
634         container mpls {
635             tailf:info "Multi Protocol Label Switching specific values";
636             description "Multi Protocol Label Switching specific values";
637             container experimental {
638                 tailf:info "Match MPLS experimental";
639                 description "Match MPLS experimental";
640                 leaf-list topmost {
641                     tailf:info "Match MPLS experimental value on topmost label";
642                     description "Match MPLS experimental value on topmost label";
643                     tailf:cli-flat-list-syntax;
644                     type uint8 {
645                     range "0..7";
646                     tailf:info "<0-7>;;Enter up to 8 experimental values "+
647                         "separated by white-spaces";
648                     }
649                 }
650             }
651         }
652         // class-map * / packet
653         container packet {
654             tailf:info "Layer 3 Packet length";
655             description "Layer 3 Packet length";
656             container "length" {
657                 tailf:info "Layer 3 Packet length";
658                 description "Layer 3 Packet length";
659                 leaf max {
660                     tailf:info "Maximum length of packet";
661                     description "Maximum length of packet";
662                     type uint16 {
663                         range "1..2000";
664                         tailf:info "<1-2000>;;Packet length in bytes";
665                     }
666                 }
667                 leaf min {
668                     tailf:info "Minimum length of packet";
669                     description "Minimum length of packet";
670                     type uint16 {
671                         range "1..2000";
672                         tailf:info "<1-2000>;;Packet length in bytes";
673                     }
674                 }
675             }
676         }
677         // class-map * / precedence
678         leaf-list precedence {
679             tailf:info "Match Precedence in IP(v4) and IPv6 packets";
680             description "Match Precedence in IP(v4) and IPv6 packets";
681             tailf:cli-flat-list-syntax;
682             type precedence-type;
683         }
684         // class-map * / protocol
685         container protocol {
686             tailf:info "Protocol";
687             description "Protocol";
688             leaf protocols {
689                 tailf:cli-drop-node-name;
690                 type enumeration {
691                     enum x802-11-iapp {
692                         tailf:info "IEEE 802.11 WLANs WG IAPP";
693                     }
694                     enum ace-svr {
695                         tailf:info "ACE Server/Propagation";
696                     }
697                     enum aol {
698                         tailf:info "America-Online Instant Messenger";
699                     }
700                     enum appleqtc {
701                         tailf:info "Apple QuickTime";
702                     }
703                     enum biff {
704                         tailf:info "Bliff mail notification";
705                     }
706                     enum bittorrent {
707                         tailf:info "bittorrent";
708                     }
709                     enum bootpc {
710                         tailf:info "Bootstrap Protocol Client";
711                     }
712                     enum bootps {
713                         tailf:info "Bootstrap Protocol Server";
714                     }
715                     enum cddbp {
716                         tailf:info "CD Database Protocol";
717                     }
718                     enum cifs {
719                         tailf:info "CIFS";
720                     }
721                     enum cisco-fna {
722                         tailf:info "Cisco FNATIVE";
723                     }
724                     enum cisco-net-mgmt {
725                         tailf:info "cisco-net-mgmt";
726                     }
727                     enum cisco-svcs {
728                         tailf:info "cisco license/perf/GDP/X.25/ident svcs";
729                     }
730                     enum cisco-sys {
731                         tailf:info "Cisco SYSMAINT";
732                     }
733                     enum cisco-tdp {
734                         tailf:info "Cisco TDP";
735                     }
736                     enum cisco-tna {
737                         tailf:info "Cisco TNATIVE";
738                     }
739                     enum citriximaclient {
740                         tailf:info "Citrix IMA Client";
741                     }
742                     enum clp {
743                         tailf:info "Cisco Line Protocol";
744                     }
745                     enum creativepartnr {
746                         tailf:info "Creative Partnr";
747                     }
748                     enum creativeserver {
749                         tailf:info "Creative Server";
750                     }
751                     enum daytime {
752                         tailf:info "Daytime (RFC 867)";
753                     }
754                     enum dbase {
755                         tailf:info "dBASE Unix";
756                     }
757                     enum dbcontrol_agent {
758                         tailf:info "Oracle dbControl Agent po";
759                     }
760                     enum ddns-v3 {
761                         tailf:info "Dynamic DNS Version 3";
762                     }
763                     enum dhcp-failover {
764                         tailf:info "DHCP Failover";
765                     }
766                     enum directconnect {
767                         tailf:info "Direct Connect Version 2.0";
768                     }
769                     enum discard {
770                         tailf:info "Discard port";
771                     }
772                     enum dnsix {
773                         tailf:info "DNSIX Securit Attribute Token Map";
774                     }
775                     enum echo {
776                         tailf:info "Echo port";
777                     }
778                     enum entrust-svc-hdlr {
779                         tailf:info "Entrust KM/Admin Service Handler";
780                     }
781                     enum entrust-svcs {
782                         tailf:info "Entrust sps/aaas/aams";
783                     }
784                     enum exec {
785                         tailf:info "Remote Process Execution";
786                     }
787                     enum fcip-port {
788                         tailf:info "FCIP";
789                     }
790                     enum ftps {
791                         tailf:info "FTP over TLS/SSL";
792                     }
793                     enum gdoi {
794                         tailf:info "GDOI";
795                     }
796                     enum giop {
797                         tailf:info "Oracle GIOP/SSL";
798                     }
799                     enum gtpv0 {
800                         tailf:info "GPRS Tunneling Protocol Version 0";
801                     }
802                     enum gtpv1 {
803                         tailf:info "GPRS Tunneling Protocol Version 1";
804                     }
805                     enum h225ras {
806                         tailf:info "H225 RAS over Unicast";
807                     }
808                     enum h323callsigalt {
809                         tailf:info "h323 Call Signal Alternate";
810                     }
811                     enum hp-alarm-mgr {
812                         tailf:info "HP Performance data alarm manager";
813                     }
814                     enum hp-collector {
815                         tailf:info "HP Performance data collector";
816                     }
817                     enum hp-managed-node {
818                         tailf:info "HP Performance data managed node";
819                     }
820                     enum hsrp {
821                         tailf:info "Hot Standby Router Protocol";
822                     }
823                     enum https {
824                         tailf:info "Secure Hypertext Transfer Protocol";
825                     }
826                     enum ica {
827                         tailf:info "ica (Citrix)";
828                     }
829                     enum icabrowser {
830                         tailf:info "icabrowser (Citrix)";
831                     }
832                     enum ident {
833                         tailf:info "Authentication Service";
834                     }
835                     enum igmpv3lite {
836                         tailf:info "IGMP over UDP for SSM";
837                     }
838                     enum imap3 {
839                         tailf:info "Interactive Mail Access Protocol 3";
840                     }
841                     enum imaps {
842                         tailf:info "IMAP over TLS/SSL";
843                     }
844                     enum ipass {
845                         tailf:info "IPASS";
846                     }
847                     enum ipsec-msft {
848                         tailf:info "Microsoft IPsec NAT-T";
849                     }
850                     enum irc-serv {
851                         tailf:info "IRC-SERV";
852                     }
853                     enum ircs {
854                         tailf:info "IRC over TLS/SSL";
855                     }
856                     enum ircu {
857                         tailf:info "IRCU";
858                     }
859                     enum isakmp {
860                         tailf:info "ISAKMP";
861                     }
862                     enum iscsi {
863                         tailf:info "iSCSI";
864                     }
865                     enum iscsi-target {
866                         tailf:info "iSCSI port";
867                     }
868                     enum kermit {
869                         tailf:info "kermit";
870                     }
871                     enum ldap-admin {
872                         tailf:info "LDAP admin server port";
873                     }
874                     enum ldaps {
875                         tailf:info "LDAP over TLS/SSL";
876                     }
877                     enum login {
878                         tailf:info "Remote login";
879                     }
880                     enum lotusmtap {
881                         tailf:info "Lotus Mail Tracking Agent Protocol";
882                     }
883                     enum lotusnote {
884                         tailf:info "Lotus Note";
885                     }
886                     // AppNav match protocol
887                     enum mapi {
888                         tailf:info "MAPI";
889                     }
890                     enum ms-ad-rep {
891                         tailf:info "MS-AD-REP";
892                     }
893                     enum ms-exch-nspi {
894                         tailf:info "MS-EXCH-NSPI";
895                     }
896                     enum ms-frs {
897                         tailf:info "MS-FRS";
898                     }
899                     enum ms-frsapi {
900                         tailf:info "MS-FRSAPI";
901                     }
902                     enum ms-rfr {
903                         tailf:info "MS-RFR";
904                     }
905                     //ms-sql         MS-SQL
906                     enum msn-messenger {
907                         tailf:info "MSN-MESSENGER";
908                     }
909                     enum netlogon {
910                         tailf:info "NETLOGON";
911                     }
912                     enum microsoft-ds {
913                         tailf:info "Microsoft-DS";
914                     }
915                     enum ms-cluster-net {
916                         tailf:info "MS Cluster Net";
917                     }
918                     enum ms-dotnetster {
919                         tailf:info "Microsoft .NETster Port";
920                     }
921                     enum ms-sna {
922                         tailf:info "Microsoft SNA Server/Base";
923                     }
924                     enum ms-sql {
925                         tailf:info "Microsoft SQL";
926                     }
927                     enum ms-sql-m {
928                         tailf:info "Microsoft SQL Monitor";
929                     }
930                     enum msexch-routing {
931                         tailf:info "Microsoft Exchange Routing";
932                     }
933                     enum msnmsgr {
934                         tailf:info "MSN Instant Messenger";
935                     }
936                     enum msrpc {
937                         tailf:info "Microsoft Remote Procedure Call";
938                     }
939                     enum mysql {
940                         tailf:info "MySQL";
941                     }
942                     enum n2h2server {
943                         tailf:info "N2H2 Filter Service Port";
944                     }
945                     enum ncp {
946                         tailf:info "NCP (Novell)";
947                     }
948                     enum net8-cman {
949                         tailf:info "Oracle Net8 Cman/Admin";
950                     }
951                     enum netbios-dgm {
952                         tailf:info "NETBIOS Datagram Service";
953                     }
954                     enum netbios-ns {
955                         tailf:info "NETBIOS Name Service";
956                     }
957                     enum netbios-ssn {
958                         tailf:info "NETBIOS Session Service";
959                     }
960                     enum netstat {
961                         tailf:info "Variant of systat";
962                     }
963                     enum oem-agent {
964                         tailf:info "OEM Agent (Oracle)";
965                     }
966                     enum oracle {
967                         tailf:info "Oracle";
968                     }
969                     enum oracle-em-vp {
970                         tailf:info "Oracle EM/VP";
971                     }
972                     enum oraclenames {
973                         tailf:info "Oracle Names";
974                     }
975                     enum orasrv {
976                         tailf:info "Oracle SQL*Net v1/v2";
977                     }
978                     enum pcanywheredata {
979                         tailf:info "pcANYWHEREdata";
980                     }
981                     enum pcanywherestat {
982                         tailf:info "pcANYWHEREstat";
983                     }
984                     enum pop3s {
985                         tailf:info "POP3 over TLS/SSL";
986                     }
987                     enum pwdgen {
988                         tailf:info "Password  Generator Protocol";
989                     }
990                     enum qmtp {
991                         tailf:info "Quick Mail Transfer Protocol";
992                     }
993                     enum r-winsock {
994                         tailf:info "remote-winsock";
995                     }
996                     enum radius {
997                         tailf:info "RADIUS & Accounting";
998                     }
999                     enum rdb-dbs-disp {
1000                         tailf:info "Oracle RDB";
1001                     }
1002                     enum realmedia {
1003                         tailf:info "RealNetwork's Realmedia Protocol";
1004                     }
1005                     enum realsecure {
1006                         tailf:info "ISS Real Secure Console Service Port";
1007                     }
1008                     enum router {
1009                         tailf:info "Local Routing Process";
1010                     }
1011                     enum rsvp-encap {
1012                         tailf:info "RSVP ENCAPSULATION-1/2";
1013                     }
1014                     enum rsvp_tunnel {
1015                         tailf:info "RSVP Tunnel";
1016                     }
1017                     enum rtc-pm-port {
1018                         tailf:info "Oracle RTC-PM port";
1019                     }
1020                     enum rtelnet {
1021                         tailf:info "Remote Telnet Service";
1022                     }
1023                     enum send {
1024                         tailf:info "SEND";
1025                     }
1026                     enum shell {
1027                         tailf:info "Remote command";
1028                     }
1029                     enum sip-tls {
1030                         tailf:info "SIP-TLS";
1031                     }
1032                     enum sms {
1033                         tailf:info "SMS RCINFO/XFER/CHAT";
1034                     }
1035                     enum snmptrap {
1036                         tailf:info "SNMP Trap";
1037                     }
1038                     enum sql-net {
1039                         tailf:info "SQL-NET";
1040                     }
1041                     enum sqlserv {
1042                         tailf:info "SQL Services";
1043                     }
1044                     enum sqlsrv {
1045                         tailf:info "SQL Service";
1046                     }
1047                     enum sshell {
1048                         tailf:info "SSLshell";
1049                     }
1050                     enum ssp {
1051                         tailf:info "State Sync Protocol";
1052                     }
1053                     enum syslog-conn {
1054                         tailf:info "Reliable Syslog Service";
1055                     }
1056                     enum tacacs {
1057                         tailf:info "Login Host Protocol (TACACS)";
1058                     }
1059                     enum tacacs-ds {
1060                         tailf:info "TACACS-Database Service";
1061                     }
1062                     enum tarantella {
1063                         tailf:info "Tarantella";
1064                     }
1065                     enum tcp {
1066                         tailf:info "TCP";
1067                     }
1068                     enum telnets {
1069                         tailf:info "Telnet over TLS/SSL";
1070                     }
1071                     enum time {
1072                         tailf:info "Time";
1073                     }
1074                     enum timed {
1075                         tailf:info "Time server";
1076                     }
1077                     enum tr-rsrb {
1078                         tailf:info "cisco RSRB";
1079                     }
1080                     enum ttc {
1081                         tailf:info "Oracle TTC/SSL";
1082                     }
1083                     enum udp {
1084                         tailf:info "UDP";
1085                     }
1086                     enum uucp {
1087                         tailf:info "UUCPD/UUCP-RLOGIN";
1088                     }
1089                     enum vqp {
1090                         tailf:info "VQP";
1091                     }
1092                     enum webster {
1093                         tailf:info "Network Disctionary";
1094                     }
1095                     enum who {
1096                       tailf:info "Who's service";
1097                     }
1098                     enum wins {
1099                       tailf:info "Microsoft WINS";
1100                     }
1101                     enum x11 {
1102                        tailf:info "X Window System";
1103                     }
1104                     enum xdmcp {
1105                       tailf:info "XDM Control Protocol";
1106                     }
1107                     enum ymsgr {
1108                       tailf:info "Yahoo! Instant Messenger";
1109                     }
1110                     enum aarp {
1111                       tailf:info "AppleTalk ARP";
1112                     }
1113                     enum appletalk {
1114                        tailf:info "AppleTalk";
1115                     }
1116                     enum arp {
1117                        tailf:info "IP ARP";
1118                     }
1119                     enum bgp {
1120                       tailf:info "Border Gateway Protocol";
1121                     }
1122                     enum bridge {
1123                         tailf:info "Bridging";
1124                     }
1125                     enum bstun {
1126                         tailf:info "Block Serial Tunnel";
1127                     }
1128                     enum cdp {
1129                         tailf:info "Cisco Discovery Protocol";
1130                     }
1131                 }
1132             }
1133             container citrix {
1134                 tailf:info "Citrix Systems ICA protocol";
1135                 description "Citrix Systems ICA protocol";
1136                 presence "enable citrix system protocol matching";
1137                 leaf ica-tag {
1138                     tailf:info "Citrix ICA tag 0-high 1-medium 2-low "+
1139                         "3-background";
1140                     description "Citrix ICA tag 0-high 1-medium 2-low "+
1141                         "3-background";
1142                     type string {
1143                         tailf:info "WORD;;Enter a string as the sub-protocol "+
1144                         "parameter";
1145                     }
1146                 }
1147             }
1148             leaf clns {
1149                 tailf:info "ISO CLNS";
1150                 description "ISO CLNS";
1151                 type empty;
1152             }
1153             leaf clns_es {
1154                 tailf:info "ISO CLNS End System";
1155                 description "ISO CLNS End System";
1156                 type empty;
1157             }
1158             leaf clns_is {
1159                 tailf:info "ISO CLNS Intermediate System";
1160                 description "ISO CLNS Intermediate System";
1161                 type empty;
1162             }
1163             leaf cmns {
1164                 tailf:info "ISO CMNS";
1165                 description "ISO CMNS";
1166                 type empty;
1167             }
1168             leaf compressedtcp {
1169                 tailf:info "Compressed TCP (VJ";
1170                 description "Compressed TCP (VJ";
1171                 type empty;
1172             }
1173             leaf cuseeme {
1174                 tailf:info "CU-SeeMe desktop video conference";
1175                 description "CU-SeeMe desktop video conference";
1176                 type empty;
1177             }
1178             leaf decnet {
1179                 tailf:info "DECnet";
1180                 description "DECnet";
1181                 type empty;
1182             }
1183             leaf decnet_node {
1184                 tailf:info "DECnet Node";
1185                 description "DECnet Node";
1186                 type empty;
1187             }
1188             leaf decnet_router-l1 {
1189                 tailf:info "DECnet Router L1";
1190                 description "DECnet Router L1";
1191                 type empty;
1192             }
1193             leaf decnet_router-l2 {
1194                 tailf:info "DECnet Router L2";
1195                 description "DECnet Router L2";
1196                 type empty;
1197             }
1198             leaf dhcp {
1199                 tailf:info "Dynamic Host Configuration";
1200                 description "Dynamic Host Configuration";
1201                 type empty;
1202             }
1203             leaf dlsw {
1204                 type empty;
1205                 tailf:info "Data Link Switching (Direct encapsulation only";
1206             }
1207             leaf dns {
1208                 type empty;
1209                 tailf:info "Domain Name Server lookup";
1210             }
1211             leaf edonkey {
1212                 type empty;
1213                 tailf:info "eDonkey";
1214             }
1215             leaf egp {
1216                 type empty;
1217                 tailf:info "Exterior Gateway Protocol";
1218             }
1219             leaf eigrp {
1220                 type empty;
1221                 tailf:info "Enhanced Interior Gateway Routing Protocol";
1222             }
1223             leaf exchange {
1224                 type empty;
1225                 tailf:info "MS-RPC for Exchange";
1226             }
1227             container fasttrack {
1228                 tailf:info "FastTrack Traffic - KaZaA, Morpheus, Grokster";
1229                 description "FastTrack Traffic - KaZaA, Morpheus, Grokster";
1230                 presence "enable fasttrack matching";
1231                 leaf file-transfer {
1232                     tailf:info "File transfer stream";
1233                     description "File transfer stream";
1234                     type string {
1235                         tailf:info "WORD;;Enter a string as the sub-protocol "+
1236                         "parameter";
1237                     }
1238                 }
1239             }
1240             leaf finger {
1241                 type empty;
1242                 tailf:info "Finger";
1243             }
1244             leaf ftp {
1245                 type empty;
1246                 tailf:info "File Transfer Protocol";
1247             }
1248             container gnutella {
1249                 tailf:info "Gnutella Version2 Traffic - BearShare, Shareeza, "+
1250                     "Morpheus";
1251                 description "Gnutella Version2 Traffic - BearShare, Shareeza, "+
1252                     "Morpheus";
1253                 presence "enable gnutella matching";
1254                 leaf file-transfer {
1255                     tailf:info "File transfer stream";
1256                     description "File transfer stream";
1257                     type string {
1258                         tailf:info "WORD;;Enter a string as the sub-protocol "+
1259                             "parameter";
1260                     }
1261                 }
1262             }
1263             leaf gopher {
1264                 type empty;
1265                 tailf:info "Gopher";
1266             }
1267             leaf gre {
1268                 type empty;
1269                 tailf:info "Generic Routing Encapsulation";
1270             }
1271             leaf h323 {
1272                 type empty;
1273                 tailf:info "H323 Protocol";
1274             }
1275             container http {
1276                 tailf:info "World Wide Web traffic";
1277                 description "World Wide Web traffic";
1278                 presence "enable http traffic matching";
1279                 leaf c-header-field {
1280                 tailf:info "Client general Header Field";
1281                 description "Client general Header Field";
1282                 type string {
1283                     tailf:info "WORD;;Enter a string as the sub-protocol "+
1284                         "parameter";
1285                 }
1286             }
1287             leaf host {
1288                 tailf:info "Server Host Name";
1289                 description "Server Host Name";
1290                 type string {
1291                     tailf:info "WORD;;Enter a string as the sub-protocol "+
1292                         "parameter";
1293                 }
1294             }
1295             leaf mime {
1296                 tailf:info "Match MIME Type";
1297                 description "Match MIME Type";
1298                 type string {
1299                     tailf:info "WORD;;Enter a string as the sub-protocol "+
1300                         "parameter";
1301                 }
1302             }
1303             leaf s-header-field {
1304                 tailf:info "Server general Header Field";
1305                 description "Server general Header Field";
1306                 type string {
1307                     tailf:info "WORD;;Enter a string as the sub-protocol "+
1308                         "parameter";
1309                 }
1310             }
1311             leaf url {
1312                 tailf:info "Match URL String";
1313                 description "Match URL String";
1314                     type string {
1315                         tailf:info "WORD;;Enter a string as the sub-protocol "+
1316                             "parameter";
1317                     }
1318                 }
1319             }
1320             leaf icmp {
1321                 tailf:info "Internet Control Message";
1322                 description "Internet Control Message";
1323                 type empty;
1324             }
1325             leaf imap {
1326                 tailf:info "Internet Message Access Protocol";
1327                 description "Internet Message Access Protocol";
1328                 type empty;
1329             }
1330             leaf ip {
1331                 tailf:info "IP";
1332                 description "IP";
1333                 type empty;
1334             }
1335             leaf ipinip {
1336                 tailf:info "IP in IP (encapsulation";
1337                 description "IP in IP (encapsulation";
1338                 type empty;
1339             }
1340             leaf ipsec {
1341                 tailf:info "IP Security Protocol (ESP/AH";
1342                 description "IP Security Protocol (ESP/AH";
1343                 type empty;
1344             }
1345             leaf ipv6 {
1346                 tailf:info "IPV6";
1347                 description "IPV6";
1348                 type empty;
1349             }
1350             leaf ipx {
1351                 tailf:info "Novell IPX";
1352                 description "Novell IPX";
1353                 type empty;
1354             }
1355             leaf irc {
1356                 type empty;
1357                 tailf:info "Internet Relay Chat";
1358                 description "Internet Relay Chat";
1359             }
1360             container kazaa2 {
1361                 tailf:info "Kazaa Version 2";
1362                 description "Kazaa Version 2";
1363                 presence "enable kazaa version 2 matching";
1364                 leaf file-transfer {
1365                     tailf:info "File transfer stream";
1366                     description "File transfer stream";
1367                     type string {
1368                         tailf:info "WORD;;Enter a string as the sub-protocol "+
1369                             "parameter";
1370                     }
1371                 }
1372             }
1373             leaf kerberos {
1374                 tailf:info "Kerberos";
1375                 description "Kerberos";
1376                 type empty;
1377             }
1378             leaf l2tp {
1379                 tailf:info "L2F/L2TP tunnel";
1380                 description "L2F/L2TP tunnel";
1381                 type empty;
1382             }
1383             leaf ldap {
1384                 tailf:info "Lightweight Directory Access Protocol";
1385                 description "Lightweight Directory Access Protocol";
1386                 type empty;
1387             }
1388             leaf llc2 {
1389                 tailf:info "llc2";
1390                 description "llc2";
1391                 type empty;
1392             }
1393             leaf mgcp {
1394                 tailf:info "Media Gateway Control Protocol";
1395                 description "Media Gateway Control Protocol";
1396                 type empty;
1397             }
1398             container napster {
1399                 tailf:info "Napster Traffic";
1400                 description "Napster Traffic";
1401                 presence "enable napster matching";
1402                 leaf non-std {
1403                     tailf:info "Non-standard port advertizements";
1404                     description "Non-standard port advertizements";
1405                     type empty;
1406                 }
1407             }
1408             leaf netbios {
1409                 tailf:info "NetBIOS";
1410                 description "NetBIOS";
1411                 type empty;
1412             }
1413             leaf netshow {
1414                 tailf:info "Microsoft Netshow";
1415                 description "Microsoft Netshow";
1416                 type empty;
1417             }
1418             leaf nfs {
1419                 tailf:info "Network File System";
1420                 description "Network File System";
1421                 type empty;
1422             }
1423             leaf nntp {
1424                 tailf:info "Network News Transfer Protocol";
1425                 description "Network News Transfer Protocol";
1426                 type empty;
1427             }
1428             leaf notes {
1429                 tailf:info "Lotus Notes(R";
1430                 description "Lotus Notes(R";
1431                 type empty;
1432             }
1433             leaf novadigm {
1434                 tailf:info "Novadigm EDM";
1435                 description "Novadigm EDM";
1436                 type empty;
1437             }
1438             leaf ntp {
1439                 tailf:info "Network Time Protocol";
1440                 description "Network Time Protocol";
1441                 type empty;
1442             }
1443             leaf ospf {
1444                 tailf:info "Open Shortest Path First";
1445                 description "Open Shortest Path First";
1446                 type empty;
1447             }
1448             leaf pad {
1449                 tailf:info "PAD links";
1450                 description "PAD links";
1451                 type empty;
1452             }
1453             leaf pcanywhere {
1454                 tailf:info "Symantec pcANYWHERE";
1455                 description "Symantec pcANYWHERE";
1456                 type empty;
1457             }
1458             leaf pop3 {
1459                 tailf:info "Post Office Protocol";
1460                 description "Post Office Protocol";
1461                 type empty;
1462             }
1463             leaf pppoe {
1464                 tailf:info "PPP over Ethernet";
1465                 description "PPP over Ethernet";
1466                 type empty;
1467             }
1468             leaf pptp {
1469                 tailf:info "Point-to-Point Tunneling Protocol";
1470                 description "Point-to-Point Tunneling Protocol";
1471                 type empty;
1472             }
1473             leaf printer {
1474                 tailf:info "print spooler/lpd";
1475                 description "print spooler/lpd";
1476                 type empty;
1477             }
1478             leaf qllc {
1479                 tailf:info "qllc protocol";
1480                 description "qllc protocol";
1481                 type empty;
1482             }
1483             leaf rcmd {
1484                 tailf:info "BSD r-commands (rsh, rlogin, rexec";
1485                 description "BSD r-commands (rsh, rlogin, rexec";
1486                 type empty;
1487             }
1488             leaf rip {
1489                 tailf:info "Routing Information Protocol";
1490                 description "Routing Information Protocol";
1491                 type empty;
1492             }
1493             leaf rsrb {
1494                 tailf:info "Remote Source-Route Bridging";
1495                 description "Remote Source-Route Bridging";
1496                 type empty;
1497             }
1498             leaf rsvp {
1499                 tailf:info "Resource Reservation Protocol";
1500                 description "Resource Reservation Protocol";
1501                 type empty;
1502             }
1503             leaf rtcp {
1504                 tailf:info "Real Time Control Protocol";
1505                 description "Real Time Control Protocol";
1506                 type empty;
1507             }
1508             container rtp {
1509                 tailf:info "Real Time Protocol";
1510                 description "Real Time Protocol";
1511                 presence "enable rtp matching";
1512                 leaf audio {
1513                     tailf:info "Match voice packets";
1514                     description "Match voice packets";
1515                     type empty;
1516                 }
1517                 leaf payload-type {
1518                     tailf:info "Match an explicit PT";
1519                     description "Match an explicit PT";
1520                     type string {
1521                         tailf:info "WORD;;Enter a string as the sub-protocol "+
1522                                 "parameter";
1523                     }
1524                 }
1525                 leaf video {
1526                     tailf:info "Match video packets";
1527                     description "Match video packets";
1528                     type empty;
1529                 }
1530             }
1531             leaf rtsp {
1532                 tailf:info "Real Time Streaming Protocol";
1533                 description "Real Time Streaming Protocol";
1534                 type empty;
1535             }
1536             leaf secure-ftp {
1537                 tailf:info "FTP over TLS/SSL";
1538                 description "FTP over TLS/SSL";
1539                 type empty;
1540             }
1541             leaf secure-http {
1542                 tailf:info "Secured HTTP";
1543                 description "Secured HTTP";
1544                 type empty;
1545             }
1546             leaf secure-imap {
1547                 tailf:info "Internet Message Access Protocol over TLS/SSL";
1548                 description "Internet Message Access Protocol over TLS/SSL";
1549                 type empty;
1550             }
1551             leaf secure-irc {
1552                 tailf:info "Internet Relay Chat over TLS/SSL";
1553                 description "Internet Relay Chat over TLS/SSL";
1554                 type empty;
1555             }
1556             leaf secure-ldap {
1557                 tailf:info "Lightweight Directory Access Protocol over TLS/SSL";
1558                 description "Lightweight Directory Access Protocol over TLS/SSL";
1559                 type empty;
1560             }
1561             leaf secure-nntp {
1562                 tailf:info "Network News Transfer Protocol over TLS/SSL";
1563                 description "Network News Transfer Protocol over TLS/SSL";
1564                 type empty;
1565             }
1566             leaf secure-pop3 {
1567                 tailf:info "Post Office Protocol over TLS/SSL";
1568                 description "Post Office Protocol over TLS/SSL";
1569                 type empty;
1570             }
1571             leaf secure-telnet {
1572                 tailf:info "Telnet over TLS/SSL";
1573                 description "Telnet over TLS/SSL";
1574                 type empty;
1575             }
1576             leaf sip {
1577                 tailf:info "Session Initiation Protocol";
1578                 description "Session Initiation Protocol";
1579                 type empty;
1580             }
1581             leaf skinny {
1582                 tailf:info "Skinny Protocol";
1583                 description "Skinny Protocol";
1584                 type empty;
1585             }
1586             container smtp {
1587                 tailf:info "Simple Mail Transfer Protocol";
1588                 description "Simple Mail Transfer Protocol";
1589                 leaf extended {
1590                     type empty;
1591                 }
1592             }
1593             leaf snapshot {
1594                 tailf:info "Snapshot routing support";
1595                 description "Snapshot routing support";
1596                 type empty;
1597             }
1598             leaf snmp {
1599                 tailf:info "Simple Network Management Protocol";
1600                 description "Simple Network Management Protocol";
1601                 type empty;
1602             }
1603             leaf socks {
1604                 tailf:info "SOCKS";
1605                 description "SOCKS";
1606                 type empty;
1607             }
1608             leaf sqlnet {
1609                 tailf:info "SQL*NET for Oracle";
1610                 description "SQL*NET for Oracle";
1611                 type empty;
1612                 }
1613             leaf sqlserver {
1614                 tailf:info "MS SQL Server";
1615                 description "MS SQL Server";
1616                 type empty;
1617             }
1618             leaf ssh {
1619                 tailf:info "Secured Shell";
1620                 description "Secured Shell";
1621                 type empty;
1622             }
1623             leaf streamwork {
1624                 tailf:info "Xing Technology StreamWorks player";
1625                 description "Xing Technology StreamWorks player";
1626                 type empty;
1627             }
1628             leaf stun {
1629                 tailf:info "Serial Tunnel";
1630                 description "Serial Tunnel";
1631                 type empty;
1632             }
1633             leaf sunrpc {
1634                 tailf:info "Sun RPC";
1635                 description "Sun RPC";
1636                 type empty;
1637             }
1638             leaf syslog {
1639                 tailf:info "WORD;;Enter a string as the sub-protocol "+
1640                   "parameter";       tailf:info "System Logging Utility";
1641                 description "System Logging Utility";
1642                 type empty;
1643             }
1644             leaf telnet {
1645                 tailf:info "Telnet";
1646                 description "Telnet";
1647                 type empty;
1648             }
1649             leaf tftp {
1650                 tailf:info "Trivial File Transfer Protocol";
1651                 description "Trivial File Transfer Protocol";
1652                 type empty;
1653             }
1654             leaf vdolive {
1655                 tailf:info "VDOLive streaming video";
1656                 description "VDOLive streaming video";
1657                 type empty;
1658             }
1659             leaf vofr {
1660                 tailf:info "voice over Frame Relay packets";
1661                 description "voice over Frame Relay packets";
1662                 type empty;
1663             }
1664             leaf winmx {
1665                 tailf:info "WinMx file-sharing application";
1666                 description "WinMx file-sharing application";
1667                 type empty;
1668             }
1669             leaf xwindows {
1670                 tailf:info "X-Windows remote access";
1671                 description "X-Windows remote access";
1672                 type empty;
1673             }
1674         }
1675         // class-map * / qos-group
1676         leaf-list qos-group {
1677             tailf:info "Qos-group";
1678             description "Qos-group";
1679             tailf:cli-list-syntax;
1680             type uint16 {
1681                 tailf:info "<0-99>;;Qos Group value";
1682                 range "0..99";
1683             }
1684         }
1685         // class-map * / match security-group
1686         container security-group {
1687             tailf:info "Security group";
1688             description "Security group";
1689             container destination {
1690                 tailf:info "Destination security group";
1691                 description "Destination security group";
1692                 leaf tag {
1693                     tailf:info "Security group tag";
1694                     description "Security group tag";
1695                     type uint16 {
1696                         tailf:info "<1-65533>;;Security group tag id";
1697                     }
1698                 }
1699             }
1700             container source {
1701                 tailf:info "Source security group";
1702                 description "Source security group";
1703                 leaf tag {
1704                     tailf:info "Security group tag";
1705                     description "Security group tag";
1706                     type uint16 {
1707                         tailf:info "<1-65533>;;Security group tag id";
1708                     }
1709                 }
1710             }
1711         }
1712         // class-map * / source-address
1713         container source-address {
1714             tailf:info "Source address";
1715             description "Source address";
1716             leaf-list mac {
1717                 tailf:info "MAC address";
1718                 description "MAC address";
1719                 tailf:cli-list-syntax;
1720                 type yang:mac-address {
1721                     tailf:info "H.H.H;;MAC address";
1722                 }
1723             }
1724         }
1725         // class-map * / match vlan
1726         leaf-list vlan {
1727             tailf:info "VLANs to match";
1728             description "VLANs to match";
1729             tailf:cli-range-list-syntax;
1730             tailf:cli-list-syntax;
1731             type uint16 {
1732                 tailf:info "<1-4094>;;VLAN id";
1733                 range "1..4094";
1734             }
1735         }
1736     }
1737
1738     grouping config-service-chain-grouping {
1739         leaf description {
1740             tailf:info "Service function forwarder description";
1741             description "Service function forwarder description";
1742             tailf:cli-multi-value;
1743             type string {
1744                 tailf:info "LINE;;Up to 256 characters describing this " + "service function forwarder";
1745                 length "1..256";
1746             }
1747         }
1748         container ip {
1749             tailf:info "IP address for Service Function Forwarder";
1750             description "IP address for Service Function Forwarder";
1751             leaf address {
1752                 tailf:info "Set IPv4 address";
1753                 description "Set IPv4 address";
1754                 type inet:ipv4-address {
1755                     tailf:info "A.B.C.D;;IP address of Service Function Forwarder";
1756                 }
1757             }
1758         }
1759     }
1760
1761     grouping interface-atm-grouping {
1762         // Removed body
1763     }
1764
1765     grouping interface-cellular-grouping {
1766         //interface * / dialer
1767         container dialer {
1768             leaf in-band {
1769                 type empty;
1770             }
1771             leaf idle-timeout {
1772                 type uint32;
1773             }
1774             leaf string {
1775                 type string;
1776             }
1777             leaf watch-group {
1778                 type uint32;
1779             }
1780         }
1781         //interface * / async
1782         container async {
1783             leaf mode {
1784                 type enumeration {
1785                     enum interactive;
1786                 }
1787             }
1788         }
1789     }
1790
1791     grouping interface-common-grouping {
1792         // interface * / service-policy
1793         container service-policy {
1794             tailf:info "Configure QoS Service Policy";
1795             description "Configure QoS Service Policy";
1796             leaf history {
1797                 tailf:cli-full-command;
1798                 tailf:info "Keep history of QoS metrics";
1799                     description "Keep history of QoS metrics";
1800                 type empty;
1801             }
1802             leaf "input" {
1803                 tailf:cli-full-command;
1804                 tailf:info "Assign policy-map to the input of an interface";
1805                 description "Assign policy-map to the input of an interface";
1806                 type string {
1807                     tailf:info "WORD;;policy-map name";
1808                 }
1809                 tailf:non-strict-leafref {
1810                     path "/ios:native/policy-map/name";
1811                 }
1812             }
1813             leaf "output" {
1814                 tailf:cli-full-command;
1815                 tailf:info "Assign policy-map to the output of an interface";
1816                 description "Assign policy-map to the output of an interface";
1817                 type string {
1818                     tailf:info "WORD;;policy-map name";
1819                 }
1820                 tailf:non-strict-leafref {
1821                     path "/ios:native/policy-map/name";
1822                 }
1823             }
1824             container "type" {
1825                 tailf:info "Configure CPL Service Policy";
1826                 description "Configure CPL Service Policy";
1827                 container performance-monitor {
1828                     tailf:info "Configure media monitor service-policy type";
1829                     description "Configure media monitor service-policy type";
1830                     tailf:cli-sequence-commands;
1831                     tailf:cli-compact-syntax;
1832                     leaf direction {
1833                         tailf:cli-drop-node-name;
1834                         type enumeration {
1835                             enum "input" {
1836                                 tailf:info "Assign policy-map to the input of an interfcae";
1837                             }
1838                             enum "output" {
1839                                 tailf:info "Assign policy-map to the output of an interfcae";
1840                             }
1841                         }
1842                     }
1843                     leaf name {
1844                         tailf:cli-drop-node-name;
1845                         type string {
1846                             tailf:info "WORD;;policy-map name";
1847                         }
1848                         tailf:non-strict-leafref {
1849                             path "/ios:native/policy-map/name";
1850                         }
1851                     }
1852                 }
1853                 // interface * / service-policy type * / service-chain
1854                 container service-chain {
1855                     tailf:info "Configure Service-chain Service Policy";
1856                     description "Configure Service-chain Service Policy";
1857                     tailf:cli-sequence-commands;
1858                     tailf:cli-compact-syntax;
1859                     leaf direction {
1860                         tailf:cli-drop-node-name;
1861                         type enumeration {
1862                             enum "input" {
1863                                 tailf:info "Assign policy-map to the input of an interfcae";
1864                             }
1865                             enum "output" {
1866                                 tailf:info "Assign policy-map to the output of an interfcae";
1867                             }
1868                         }
1869                     }
1870                     leaf name {
1871                         tailf:cli-drop-node-name;
1872                         type string {
1873                             tailf:info "WORD;;policy-map name";
1874                         }
1875                         tailf:non-strict-leafref {
1876                             path "/ios:native/policy-map/name";
1877                         }
1878                     }
1879                 }
1880             }
1881         }
1882     }
1883
1884     grouping interface-ethernet-grouping {
1885         // Removed body
1886     }
1887
1888     grouping interface-grouping {
1889         // Removed body
1890     }
1891
1892     grouping interface-overlay-grouping {
1893         // Removed body
1894     }
1895
1896     grouping interface-pointtopoint-grouping {
1897         // Removed body
1898     }
1899
1900     grouping interface-pseudowire-grouping {
1901         // Removed body
1902     }
1903
1904     grouping interface-switch-grouping {
1905         // Removed body
1906     }
1907
1908     grouping interface-tunnel-grouping {
1909         // Removed body
1910     }
1911
1912     grouping interface-zone-member-grouping {
1913         // interface * / zone-member
1914         container zone-member {
1915             tailf:info "Apply zone name";
1916             description "Apply zone name";
1917             leaf security {
1918                 tailf:info "Security zone";
1919                 description "Security zone";
1920                 type string;
1921                 tailf:non-strict-leafref {
1922                     path "/ios:native/zone/security/id";
1923                 }
1924             }
1925         }
1926     }
1927
1928     grouping police-action-drop-grouping {
1929         leaf drop {
1930             tailf:info "drop packet";
1931             description "drop packet";
1932             type empty;
1933         }
1934     }
1935
1936     grouping police-action-grouping {
1937         container actions {
1938             tailf:cli-break-sequence-commands;
1939             tailf:cli-no-keyword;
1940             tailf:cli-drop-node-name;
1941             tailf:cli-flatten-container;
1942             // policy-map * / class * / police ? / conform-action
1943             uses police-conform-action-grouping;
1944             // policy-map * / class * / police ? / exceed-action
1945             uses police-exceed-action-grouping;
1946             // policy-map * / class * / police ? / violate-action
1947             uses police-violate-action-grouping;
1948         }
1949     }
1950
1951     grouping police-conform-action-grouping {
1952         container conform-set-clp-transmit {
1953             tailf:cli-no-keyword;
1954             tailf:cli-drop-node-name;
1955             tailf:cli-flatten-container;
1956             container conform-action {
1957                 tailf:info "action when rate is less than conform burst";
1958                 description "action when rate is less than conform burst";
1959                 tailf:cli-flatten-container;
1960                 leaf set-clp-transmit {
1961                     tailf:info "set atm clp and send it";
1962                     description "set atm clp and send it";
1963                     type empty;
1964                 }
1965             }
1966         }
1967         container conform-set-cos-transmit {
1968             tailf:cli-no-keyword;
1969             tailf:cli-drop-node-name;
1970             tailf:cli-flatten-container;
1971             container conform-action {
1972                 tailf:info "action when rate is less than conform burst";
1973                 description "action when rate is less than conform burst";
1974                 tailf:cli-flatten-container;
1975                 leaf set-cos-transmit {
1976                     tailf:info "rewrite packet cos and send it";
1977                     description "rewrite packet cos and send it";
1978                     type cos_value-type;
1979                 }
1980             }
1981         }
1982         container conform-set-cos-transmit-table {
1983             tailf:cli-no-keyword;
1984             tailf:cli-drop-node-name;
1985             tailf:cli-flatten-container;
1986             container conform-action {
1987                 tailf:info "action when rate is less than conform burst";
1988                 description "action when rate is less than conform burst";
1989                 tailf:cli-compact-syntax;
1990                 tailf:cli-flatten-container;
1991                 tailf:cli-sequence-commands;
1992                 leaf set-cos-transmit {
1993                     tailf:info "rewrite packet cos and send it";
1994                     description "rewrite packet cos and send it";
1995                     type cos_value-type;
1996                 }
1997                 leaf table {
1998                     tailf:info "Specify table-map";
1999                     description "Specify table-map";
2000                     type leafref {
2001                         path "/ios:native/table-map/name";
2002                     }
2003                 }
2004             }
2005         }
2006         container conform-set-discard-class-transmit {
2007             tailf:cli-no-keyword;
2008             tailf:cli-drop-node-name;
2009             tailf:cli-flatten-container;
2010             container conform-action {
2011                 tailf:info "action when rate is less than conform burst";
2012                 description "action when rate is less than conform burst";
2013                 tailf:cli-flatten-container;
2014                 leaf set-discard-class-transmit {
2015                     tailf:info "set discard-class and send it";
2016                     description "set discard-class and send it";
2017                     type uint8 {
2018                         tailf:info "<0-7>;;new discard-class";
2019                         range "0..7";
2020                     }
2021                 }
2022             }
2023         }
2024         container conform-set-dscp-transmit {
2025             tailf:cli-no-keyword;
2026             tailf:cli-drop-node-name;
2027             tailf:cli-flatten-container;
2028             container conform-action {
2029                 tailf:info "action when rate is less than conform burst";
2030                 description "action when rate is less than conform burst";
2031                 tailf:cli-flatten-container;
2032                 leaf set-dscp-transmit {
2033                     tailf:info "set dscp and send it";
2034                     description "set dscp and send it";
2035                     type dscp-type;
2036                 }
2037             }
2038         }
2039         container conform-set-dscp-transmit-table {
2040             tailf:cli-no-keyword;
2041             tailf:cli-drop-node-name;
2042             tailf:cli-flatten-container;
2043             container conform-action {
2044                 tailf:info "action when rate is less than conform burst";
2045                 description "action when rate is less than conform burst";
2046                 tailf:cli-compact-syntax;
2047                 tailf:cli-flatten-container;
2048                 tailf:cli-sequence-commands;
2049                 leaf set-dscp-transmit {
2050                     tailf:info "set dscp and send it";
2051                     description "set dscp and send it";
2052                     type dscp-type;
2053                 }
2054                 leaf table {
2055                     tailf:info "Specify table-map";
2056                     description "Specify table-map";
2057                     type leafref {
2058                         path "/ios:native/table-map/name";
2059                     }
2060                 }
2061             }
2062         }
2063         container conform-set-frde-transmit {
2064             tailf:cli-no-keyword;
2065             tailf:cli-drop-node-name;
2066             tailf:cli-flatten-container;
2067             container conform-action {
2068                 tailf:info "action when rate is less than conform burst";
2069                 description "action when rate is less than conform burst";
2070                 tailf:cli-flatten-container;
2071                 leaf set-frde-transmit {
2072                     tailf:info "set FR DE and send it";
2073                     description "set FR DE and send it";
2074                     type empty;
2075                 }
2076             }
2077         }
2078         container conform-set-mpls-exp-imposition-transmit {
2079             tailf:cli-no-keyword;
2080             tailf:cli-drop-node-name;
2081             tailf:cli-flatten-container;
2082             container conform-action {
2083                 tailf:info "action when rate is less than conform burst";
2084                 description "action when rate is less than conform burst";
2085                 tailf:cli-flatten-container;
2086                 leaf set-mpls-exp-imposition-transmit {
2087                     tailf:info "set exp at tag imposition and send it";
2088                     description "set exp at tag imposition and send it";
2089                     type exp_value-type;
2090                 }
2091             }
2092         }
2093         container conform-set-mpls-exp-imposition-transmit-table {
2094             tailf:cli-no-keyword;
2095             tailf:cli-drop-node-name;
2096             tailf:cli-flatten-container;
2097             container conform-action {
2098                 tailf:info "action when rate is less than conform burst";
2099                 description "action when rate is less than conform burst";
2100                 tailf:cli-compact-syntax;
2101                 tailf:cli-flatten-container;
2102                 tailf:cli-sequence-commands;
2103                 leaf set-mpls-exp-imposition-transmit {
2104                     tailf:info "set exp at tag imposition and send it";
2105                         description "set exp at tag imposition and send it";
2106                         type exp_value-type;
2107                     }
2108                 leaf table {
2109                     tailf:info "Specify table-map";
2110                     description "Specify table-map";
2111                     type leafref {
2112                         path "/ios:native/table-map/name";
2113                     }
2114                 }
2115             }
2116         }
2117         container conform-set-mpls-exp-topmost-transmit {
2118             tailf:cli-no-keyword;
2119             tailf:cli-drop-node-name;
2120             tailf:cli-flatten-container;
2121             container conform-action {
2122                 tailf:info "action when rate is less than conform burst";
2123                 description "action when rate is less than conform burst";
2124                 tailf:cli-flatten-container;
2125                 leaf set-mpls-exp-topmost-transmit {
2126                     tailf:info "set exp on topmost label and send it";
2127                     description "set exp on topmost label and send it";
2128                     type exp_value-type;
2129                 }
2130             }
2131         }
2132         container conform-set-mpls-exp-topmost-transmit-table {
2133             tailf:cli-no-keyword;
2134             tailf:cli-drop-node-name;
2135             tailf:cli-flatten-container;
2136             container conform-action {
2137                 tailf:info "action when rate is less than conform burst";
2138                 description "action when rate is less than conform burst";
2139                 tailf:cli-compact-syntax;
2140                 tailf:cli-flatten-container;
2141                 tailf:cli-sequence-commands;
2142                 leaf set-mpls-exp-topmost-transmit {
2143                     tailf:info "set exp on topmost label and send it";
2144                     description "set exp on topmost label and send it";
2145                     type exp_value-type;
2146                 }
2147                 leaf table {
2148                     tailf:info "Specify table-map";
2149                     description "Specify table-map";
2150                     type leafref {
2151                         path "/ios:native/table-map/name";
2152                     }
2153                 }
2154             }
2155         }
2156         container conform-set-prec-transmit {
2157             tailf:cli-no-keyword;
2158             tailf:cli-drop-node-name;
2159             tailf:cli-flatten-container;
2160             container conform-action {
2161                 tailf:info "action when rate is less than conform burst";
2162                 description "action when rate is less than conform burst";
2163                 tailf:cli-flatten-container;
2164                 leaf set-prec-transmit {
2165                     tailf:info "rewrite packet precedence and send it";
2166                     description "rewrite packet precedence and send it";
2167                     type prec_value-type;
2168                 }
2169             }
2170         }
2171         container conform-set-prec-transmit-table {
2172             tailf:cli-no-keyword;
2173             tailf:cli-drop-node-name;
2174             tailf:cli-flatten-container;
2175             container conform-action {
2176                 tailf:info "action when rate is less than conform burst";
2177                 description "action when rate is less than conform burst";
2178                 tailf:cli-compact-syntax;
2179                 tailf:cli-flatten-container;
2180                 tailf:cli-sequence-commands;
2181                 leaf set-prec-transmit {
2182                     tailf:info "rewrite packet precedence and send it";
2183                     description "rewrite packet precedence and send it";
2184                     type prec_value-type;
2185                 }
2186                 leaf table {
2187                     tailf:info "Specify table-map";
2188                     description "Specify table-map";
2189                     type leafref {
2190                         path "/ios:native/table-map/name";
2191                     }
2192                 }
2193             }
2194         }
2195         container conform-set-qos-transmit {
2196             tailf:cli-no-keyword;
2197             tailf:cli-drop-node-name;
2198             tailf:cli-flatten-container;
2199             container conform-action {
2200                 tailf:info "action when rate is less than conform burst";
2201                 description "action when rate is less than conform burst";
2202                 tailf:cli-flatten-container;
2203                 leaf set-qos-transmit {
2204                     tailf:info "set qos-group and send it";
2205                     description "set qos-group and send it";
2206                     type qos_value-type;
2207                 }
2208             }
2209         }
2210         container conform-set-qos-transmit-table {
2211         tailf:cli-no-keyword;
2212         tailf:cli-drop-node-name;
2213         tailf:cli-flatten-container;
2214             container conform-action {
2215                 tailf:info "action when rate is less than conform burst";
2216                 description "action when rate is less than conform burst";
2217                 tailf:cli-compact-syntax;
2218                 tailf:cli-flatten-container;
2219                 tailf:cli-sequence-commands;
2220                 leaf set-qos-transmit {
2221                     tailf:info "set qos-group and send it";
2222                     description "set qos-group and send it";
2223                     type qos_value-type;
2224                 }
2225                 leaf table {
2226                     tailf:info "Specify table-map";
2227                     description "Specify table-map";
2228                     type leafref {
2229                         path "/ios:native/table-map/name";
2230                     }
2231                 }
2232             }
2233         }
2234         container conform-transmit {
2235             tailf:cli-no-keyword;
2236             tailf:cli-drop-node-name;
2237             tailf:cli-flatten-container;
2238             container conform-action {
2239                 tailf:info "action when rate is less than conform burst";
2240                 description "action when rate is less than conform burst";
2241                 tailf:cli-flatten-container;
2242                 uses police-action-transmit-grouping;
2243             }
2244         }
2245         container conform-drop {
2246             tailf:cli-no-keyword;
2247             tailf:cli-drop-node-name;
2248             tailf:cli-flatten-container;
2249             container conform-action {
2250                 tailf:info "action when rate is less than conform burst";
2251                 description "action when rate is less than conform burst";
2252                 tailf:cli-flatten-container;
2253                 uses police-action-drop-grouping;
2254             }
2255         }
2256     }
2257
2258     grouping police-action-transmit-grouping {
2259         leaf transmit {
2260             tailf:info "transmit packet";
2261             description "transmit packet";
2262             type empty;
2263         }
2264     }
2265
2266     grouping police-exceed-action-grouping {
2267         container exceed-dscp {
2268             tailf:cli-no-keyword;
2269             tailf:cli-drop-node-name;
2270             tailf:cli-flatten-container;
2271             container exceed-action {
2272                 tailf:info "action when rate is within conform and "+
2273                 "conform + exceed burst";
2274                 description "action when rate is within conform and "+
2275                     "conform + exceed burst";
2276                 tailf:cli-flatten-container;
2277                 leaf dscp {
2278                     //tailf:info
2279                     type dscp-type;
2280                 }
2281             }
2282         }
2283         container exceed-set-clp-transmit {
2284             tailf:cli-no-keyword;
2285             tailf:cli-drop-node-name;
2286             tailf:cli-flatten-container;
2287             container exceed-action {
2288                 tailf:info "action when rate is within conform and "+
2289                 "conform + exceed burst";
2290                 description "action when rate is within conform and "+
2291                     "conform + exceed burst";
2292                 tailf:cli-flatten-container;
2293                     leaf set-clp-transmit {
2294                     tailf:info "set atm clp and send it";
2295                     description "set atm clp and send it";
2296                     type empty;
2297                 }
2298             }
2299         }
2300         container exceed-set-cos-transmit {
2301             tailf:cli-no-keyword;
2302             tailf:cli-drop-node-name;
2303             tailf:cli-flatten-container;
2304             container exceed-action {
2305                 tailf:info "action when rate is within conform and "+
2306                 "conform + exceed burst";
2307                 description "action when rate is within conform and "+
2308                     "conform + exceed burst";
2309                 tailf:cli-flatten-container;
2310                 leaf set-cos-transmit {
2311                     tailf:info "rewrite packet cos and send it";
2312                     description "rewrite packet cos and send it";
2313                     type cos_value-type;
2314                 }
2315             }
2316         }
2317         container exceed-set-discard-class-transmit {
2318             tailf:cli-no-keyword;
2319             tailf:cli-drop-node-name;
2320             tailf:cli-flatten-container;
2321             container exceed-action {
2322                 tailf:info "action when rate is within conform and "+
2323                 "conform + exceed burst";
2324                 description "action when rate is within conform and "+
2325                     "conform + exceed burst";
2326                 tailf:cli-flatten-container;
2327                 leaf set-discard-class-transmit {
2328                     tailf:info "set discard-class and send it";
2329                     description "set discard-class and send it";
2330                     type uint8 {
2331                         tailf:info "<0-7>;;new discard-class";
2332                         range "0..7";
2333                     }
2334                 }
2335             }
2336         }
2337         container exceed-set-dscp-transmit {
2338             tailf:cli-no-keyword;
2339             tailf:cli-drop-node-name;
2340             tailf:cli-flatten-container;
2341             container exceed-action {
2342                 tailf:info "action when rate is within conform and "+
2343                 "conform + exceed burst";
2344                 description "action when rate is within conform and "+
2345                     "conform + exceed burst";
2346                 tailf:cli-flatten-container;
2347                 leaf set-dscp-transmit {
2348                     tailf:info "set dscp and send it";
2349                     description "set dscp and send it";
2350                     type dscp-type;
2351                 }
2352                 container set-dscp-transmit-c {
2353                     tailf:alt-name "set-dscp-transmit";
2354                     container dscp {
2355                         leaf table {
2356                             type enumeration {
2357                                 enum policed-dscp;
2358                             }
2359                         }
2360                     }
2361                 }
2362             }
2363         }
2364         container exceed-set-frde-transmit {
2365             tailf:cli-no-keyword;
2366             tailf:cli-drop-node-name;
2367             tailf:cli-flatten-container;
2368             container exceed-action {
2369                 tailf:info "action when rate is within conform and "+
2370                 "conform + exceed burst";
2371                 description "action when rate is within conform and "+
2372                 "conform + exceed burst";
2373                 tailf:cli-flatten-container;
2374                 leaf set-frde-transmit {
2375                     tailf:info "set FR DE and send it";
2376                     description "set FR DE and send it";
2377                     type empty;
2378                 }
2379             }
2380         }
2381         container exceed-set-mpls-exp-imposition-transmit {
2382             tailf:cli-no-keyword;
2383             tailf:cli-drop-node-name;
2384             tailf:cli-flatten-container;
2385             container exceed-action {
2386                 tailf:info "action when rate is within conform and "+
2387                     "conform + exceed burst";
2388                 description "action when rate is within conform and "+
2389                     "conform + exceed burst";
2390                 tailf:cli-flatten-container;
2391                 leaf set-mpls-exp-imposition-transmit {
2392                     tailf:info "set exp at tag imposition and send it";
2393                     description "set exp at tag imposition and send it";
2394                     type exp_value-type;
2395                 }
2396             }
2397         }
2398         container exceed-set-mpls-exp-topmost-transmit {
2399             tailf:cli-no-keyword;
2400             tailf:cli-drop-node-name;
2401             tailf:cli-flatten-container;
2402             container exceed-action {
2403                 tailf:info "action when rate is within conform and "+
2404                     "conform + exceed burst";
2405                 description "action when rate is within conform and "+
2406                 "conform + exceed burst";
2407                 tailf:cli-flatten-container;
2408                 leaf set-mpls-exp-topmost-transmit {
2409                     tailf:info "set exp on topmost label and send it";
2410                     description "set exp on topmost label and send it";
2411                     type exp_value-type;
2412                 }
2413             }
2414         }
2415         container exceed-set-prec-transmit {
2416             tailf:cli-no-keyword;
2417             tailf:cli-drop-node-name;
2418             tailf:cli-flatten-container;
2419             container exceed-action {
2420                 tailf:info "action when rate is within conform and "+
2421                     "conform + exceed burst";
2422                 description "action when rate is within conform and "+
2423                     "conform + exceed burst";
2424                 tailf:cli-flatten-container;
2425                 leaf set-prec-transmit {
2426                     tailf:info "rewrite packet precedence and send it";
2427                     description "rewrite packet precedence and send it";
2428                     type prec_value-type;
2429                 }
2430             }
2431         }
2432         container exceed-set-qos-transmit {
2433             tailf:cli-no-keyword;
2434             tailf:cli-drop-node-name;
2435             tailf:cli-flatten-container;
2436             container exceed-action {
2437                 tailf:info "action when rate is within conform and "+
2438                         "conform + exceed burst";
2439                 description "action when rate is within conform and "+
2440                         "conform + exceed burst";
2441                 tailf:cli-flatten-container;
2442                 leaf set-qos-transmit {
2443                     tailf:info "set qos-group and send it";
2444                     description "set qos-group and send it";
2445                     type qos_value-type;
2446                 }
2447             }
2448         }
2449         container exceed-transmit {
2450             tailf:cli-no-keyword;
2451             tailf:cli-drop-node-name;
2452             tailf:cli-flatten-container;
2453             container exceed-action {
2454                 tailf:info "action when rate is within conform and "+
2455                         "conform + exceed burst";
2456                 description "action when rate is within conform and "+
2457                         "conform + exceed burst";
2458                 tailf:cli-flatten-container;
2459                 uses police-action-transmit-grouping;
2460             }
2461         }
2462         container exceed-drop {
2463             tailf:cli-no-keyword;
2464             tailf:cli-drop-node-name;
2465             tailf:cli-flatten-container;
2466             container exceed-action {
2467                 tailf:info "action when rate is within conform and "+
2468                         "conform + exceed burst";
2469                 description "action when rate is within conform and "+
2470                         "conform + exceed burst";
2471                 tailf:cli-flatten-container;
2472                 uses police-action-drop-grouping;
2473             }
2474         }
2475     }
2476
2477     grouping police-violate-action-grouping {
2478         container violate-set-clp-transmit {
2479             tailf:cli-no-keyword;
2480             tailf:cli-drop-node-name;
2481             tailf:cli-flatten-container;
2482             container violate-action {
2483                 tailf:info "action when rate is greater than conform + "+
2484                         "exceed burst";
2485                 description "action when rate is greater than conform + "+
2486                         "exceed burst";
2487                 tailf:cli-flatten-container;
2488                 leaf set-clp-transmit {
2489                   tailf:info "set atm clp and send it";
2490                   description "set atm clp and send it";
2491                   type empty;
2492                 }
2493             }
2494         }
2495         container violate-set-cos-transmit {
2496             tailf:cli-no-keyword;
2497             tailf:cli-drop-node-name;
2498             tailf:cli-flatten-container;
2499             container violate-action {
2500                 tailf:info "action when rate is greater than conform + "+
2501                         "exceed burst";
2502                 description "action when rate is greater than conform + "+
2503                         "exceed burst";
2504                 tailf:cli-flatten-container;
2505                 leaf set-cos-transmit {
2506                   tailf:info "rewrite packet cos and send it";
2507                   description "rewrite packet cos and send it";
2508                   type cos_value-type;
2509                 }
2510             }
2511         }
2512         container violate-set-discard-class-transmit {
2513             tailf:cli-no-keyword;
2514             tailf:cli-drop-node-name;
2515             tailf:cli-flatten-container;
2516             container violate-action {
2517                 tailf:info "action when rate is greater than conform + "+
2518                         "exceed burst";
2519                 description "action when rate is greater than conform + "+
2520                         "exceed burst";
2521                 tailf:cli-flatten-container;
2522                 leaf set-discard-class-transmit {
2523                     tailf:info "set discard-class and send it";
2524                     description "set discard-class and send it";
2525                     type uint8 {
2526                         tailf:info "<0-7>;;new discard-class";
2527                         range "0..7";
2528                     }
2529                 }
2530             }
2531         }
2532         container violate-set-dscp-transmit {
2533             tailf:cli-no-keyword;
2534             tailf:cli-drop-node-name;
2535             tailf:cli-flatten-container;
2536             container violate-action {
2537                 tailf:info "action when rate is greater than conform + "+
2538                         "exceed burst";
2539                 description "action when rate is greater than conform + "+
2540                         "exceed burst";
2541                 tailf:cli-flatten-container;
2542                 leaf set-dscp-transmit {
2543                     tailf:info "set dscp and send it";
2544                     description "set dscp and send it";
2545                     type dscp-type;
2546                 }
2547             }
2548         }
2549         container violate-set-frde-transmit {
2550             tailf:cli-no-keyword;
2551             tailf:cli-drop-node-name;
2552             tailf:cli-flatten-container;
2553             container violate-action {
2554                 tailf:info "action when rate is greater than conform + "+
2555                         "exceed burst";
2556                 description "action when rate is greater than conform + "+
2557                         "exceed burst";
2558                 tailf:cli-flatten-container;
2559                 leaf set-frde-transmit {
2560                     tailf:info "set FR DE and send it";
2561                     description "set FR DE and send it";
2562                     type empty;
2563                 }
2564             }
2565         }
2566         container violate-set-mpls-exp-imposition-transmit {
2567             tailf:cli-no-keyword;
2568             tailf:cli-drop-node-name;
2569             tailf:cli-flatten-container;
2570             container violate-action {
2571                 tailf:info "action when rate is greater than conform + "+
2572                         "exceed burst";
2573                 description "action when rate is greater than conform + "+
2574                         "exceed burst";
2575                 tailf:cli-flatten-container;
2576                 leaf set-mpls-exp-imposition-transmit {
2577                     tailf:info "set exp at tag imposition and send it";
2578                     description "set exp at tag imposition and send it";
2579                     type exp_value-type;
2580                 }
2581             }
2582         }
2583         container violate-set-mpls-exp-topmost-transmit {
2584             tailf:cli-no-keyword;
2585             tailf:cli-drop-node-name;
2586             tailf:cli-flatten-container;
2587             container violate-action {
2588                 tailf:info "action when rate is greater than conform + "+
2589                         "exceed burst";
2590                 description "action when rate is greater than conform + "+
2591                         "exceed burst";
2592                 tailf:cli-flatten-container;
2593                 leaf set-mpls-exp-topmost-transmit {
2594                     tailf:info "set exp on topmost label and send it";
2595                     description "set exp on topmost label and send it";
2596                     type exp_value-type;
2597                 }
2598             }
2599         }
2600         container violate-set-prec-transmit {
2601             tailf:cli-no-keyword;
2602             tailf:cli-drop-node-name;
2603             tailf:cli-flatten-container;
2604             container violate-action {
2605                 tailf:info "action when rate is greater than conform + "+
2606                         "exceed burst";
2607                 description "action when rate is greater than conform + "+
2608                         "exceed burst";
2609                 tailf:cli-flatten-container;
2610                 leaf set-prec-transmit {
2611                     tailf:info "rewrite packet precedence and send it";
2612                     description "rewrite packet precedence and send it";
2613                     type prec_value-type;
2614                 }
2615             }
2616         }
2617         container violate-set-qos-transmit {
2618             tailf:cli-no-keyword;
2619             tailf:cli-drop-node-name;
2620             tailf:cli-flatten-container;
2621             container violate-action {
2622                 tailf:info "action when rate is greater than conform + "+
2623                         "exceed burst";
2624                 description "action when rate is greater than conform + "+
2625                         "exceed burst";
2626                 tailf:cli-flatten-container;
2627                 leaf set-qos-transmit {
2628                     tailf:info "set qos-group and send it";
2629                     description "set qos-group and send it";
2630                     type qos_value-type;
2631                 }
2632             }
2633         }
2634         container violate-transmit {
2635             tailf:cli-no-keyword;
2636             tailf:cli-drop-node-name;
2637             tailf:cli-flatten-container;
2638             container violate-action {
2639                 tailf:info "action when rate is greater than conform + "+
2640                         "exceed burst";
2641                 description "action when rate is greater than conform + "+
2642                         "exceed burst";
2643                 tailf:cli-flatten-container;
2644                 uses police-action-transmit-grouping;
2645             }
2646         }
2647             container violate-drop {
2648             tailf:cli-no-keyword;
2649             tailf:cli-drop-node-name;
2650             tailf:cli-flatten-container;
2651             container violate-action {
2652                 tailf:info "action when rate is greater than conform + "+
2653                         "exceed burst";
2654                 description "action when rate is greater than conform + "+
2655                         "exceed burst";
2656                 tailf:cli-flatten-container;
2657                 uses police-action-drop-grouping;
2658             }
2659         }
2660     }
2661
2662     grouping pseudowire-grouping {
2663         // Removed body
2664     }
2665
2666     grouping random-detect-grouping {
2667         leaf min-threshold {
2668             tailf:cli-drop-node-name;
2669             tailf:cli-incomplete-command;
2670             type uint16 {
2671                 range "1..4096";
2672                 tailf:info "<1-4096>;;minimum threshold (number of packets)";
2673             }
2674         }
2675         leaf max-threshold {
2676             tailf:cli-drop-node-name;
2677             tailf:cli-incomplete-command;
2678             type uint16 {
2679                 range "1..4096";
2680                 tailf:info "<1-4096>;;maximum threshold (number of packets)";
2681             }
2682         }
2683         leaf denominator {
2684             tailf:cli-drop-node-name;
2685             type uint32 {
2686                 range "1..65535";
2687                 tailf:info "<1-65535>;;mark probability denominator";
2688             }
2689         }
2690     }
2691
2692
2693 /// ========================================================================
2694 /// native
2695 /// ========================================================================
2696
2697     container native {
2698         tailf:cli-drop-node-name;
2699         container table-map {
2700             tailf:info "Map external entry attributes into routing table";
2701             tailf:cli-full-command;
2702             description "Map external entry attributes into routing table";
2703             tailf:display-when "ipv4 or ../../ipv4 or ../ipv4 " +
2704                 " or ipv6 or ../../ipv6 or ../ipv6 ";
2705             leaf name {
2706                 description "route-map name";
2707                 tailf:cli-drop-node-name;
2708                 type string {
2709                     tailf:info "WORD;;route-map name";
2710                 }
2711             }
2712             leaf filter {
2713                 tailf:info "Selective route download";
2714                 type empty;
2715             }
2716         }
2717
2718 /// ========================================================================
2719 /// interface
2720 /// ========================================================================
2721
2722     container interface {
2723         tailf:info "Configure interfaces";
2724         description "Configure interfaces";
2725         tailf:cli-diff-dependency "/ios:native/vrf";
2726         tailf:cli-explicit-exit;
2727
2728         // interface AppNav-Compress
2729         list AppNav-Compress {
2730             tailf:info "Service-Context Virtual Interface Compress";
2731             description "Service-Context Virtual Interface Compress";
2732             tailf:cli-allow-join-with-key {
2733                 tailf:cli-display-joined;
2734             }
2735             tailf:cli-mode-name "config-if";
2736             tailf:cli-suppress-key-abbreviation;
2737             key name;
2738             leaf name {
2739                 type uint16 {
2740                     tailf:info "<1-1000>;;AppNav-Compress interface number";
2741                     range "1..1000";
2742                 }
2743             }
2744             uses interface-common-grouping;
2745         }
2746         // interface AppNav-UnCompress
2747         list AppNav-UnCompress {
2748             tailf:info "Service-Context Virtual Interface UnCompress";
2749             description "Service-Context Virtual Interface UnCompress";
2750             tailf:cli-allow-join-with-key {
2751                 tailf:cli-display-joined;
2752             }
2753             tailf:cli-mode-name "config-if";
2754             tailf:cli-suppress-key-abbreviation;
2755             key name;
2756             leaf name {
2757                 type uint16 {
2758                     tailf:info "<1-1000>;;AppNav-UnCompress interface number";
2759                     range "1..1000";
2760                 }
2761             }
2762             uses interface-common-grouping;
2763         }
2764
2765         // interface ATM #
2766         list ATM {
2767             tailf:info "ATM interface";
2768             description "ATM interface";
2769             tailf:cli-allow-join-with-key {
2770                 tailf:cli-display-joined;
2771             }
2772             tailf:cli-mode-name "config-if";
2773             tailf:cli-suppress-key-abbreviation;
2774             key name;
2775             leaf name {
2776                 type string {
2777                     tailf:info "<slot>/<subslot>/<port>;;ATM interface number";
2778                     pattern "([0-9]/){2}([0-9]|(ima[0-9]))(:[0-9])?";
2779                 }
2780             }
2781             uses interface-atm-grouping;
2782         }
2783
2784         // subinterface ATM #.#
2785         container ATM-subinterface {
2786             tailf:cli-drop-node-name;
2787             list ATM {
2788                 tailf:cli-allow-join-with-key {
2789                     tailf:cli-display-joined;
2790                 }
2791                 tailf:cli-mode-name "config-subif";
2792                 tailf:cli-suppress-key-abbreviation;
2793                 key name;
2794                 leaf name {
2795                     type string {
2796                         pattern "([0-9]/){2}[0-9]\.([0-9]/){3}[0-9]";
2797                     }
2798                 }
2799                 uses interface-atm-grouping;
2800             }
2801         }
2802
2803         // interface ATM-ACR #
2804         list ATM-ACR {
2805             tailf:info "ATM-ACR interface";
2806             description "ATM-ACR interface";
2807             tailf:cli-allow-join-with-key {
2808                 tailf:cli-display-joined;
2809             }
2810             tailf:cli-mode-name "config-if";
2811             tailf:cli-suppress-key-abbreviation;
2812             key name;
2813             leaf name {
2814                 type string {
2815                     tailf:info "<slot>/<subslot>/<port>;;ATM-ACR interface number";
2816                     pattern "[0-9]";
2817                 }
2818             }
2819             uses interface-atm-grouping;
2820         }
2821
2822         // subinterface ATM-ACR #.#
2823         container ATM-ACRsubinterface {
2824             tailf:cli-drop-node-name;
2825             list ATM-ACR {
2826                 tailf:cli-allow-join-with-key {
2827                     tailf:cli-display-joined;
2828                 }
2829                 tailf:cli-mode-name "config-subif";
2830                 tailf:cli-suppress-key-abbreviation;
2831                 key name;
2832                 leaf name {
2833                     type string {
2834                         pattern "[0-9]\.([0-9]/){3}[0-9]";
2835                     }
2836                 }
2837                 uses interface-atm-grouping;
2838             }
2839         }
2840         // interface BDI
2841         list BDI {
2842             tailf:info "Bridge-Domain interface";
2843             description "Bridge-Domain interface";
2844             tailf:cli-allow-join-with-key {
2845                 tailf:cli-display-joined;
2846             }
2847             tailf:cli-mode-name "config-if";
2848             key name;
2849             leaf name {
2850                 type string {
2851                     // pattern "([0-9])+/([0-9])+(/([0-9])+)?";
2852                     tailf:info "<1-16000>;;BDI interface number";
2853                 }
2854             }
2855             uses interface-common-grouping;
2856         }
2857
2858         // interface CEM #
2859         list CEM {
2860             tailf:info "Circuit Emulation interface";
2861             description "Circuit Emulation interface";
2862             tailf:cli-allow-join-with-key {
2863                 tailf:cli-display-joined;
2864             }
2865             tailf:cli-mode-name "config-if";
2866             tailf:cli-suppress-key-abbreviation;
2867             key name;
2868             leaf name {
2869                 type string {
2870                     tailf:info "<slot>/<port>;;CEM interface number";
2871                     pattern "([0-9]/){2}[0-9]";
2872                 }
2873             }
2874             uses interface-atm-grouping;
2875         }
2876
2877         // interface CEM-ACR #
2878         list CEM-ACR {
2879             tailf:info "Circuit Emulation interface";
2880             description "Circuit Emulation interface";
2881             tailf:cli-allow-join-with-key {
2882                 tailf:cli-display-joined;
2883             }
2884             tailf:cli-mode-name "config-if";
2885             tailf:cli-suppress-key-abbreviation;
2886             key name;
2887             leaf name {
2888                 type uint8 {
2889                     tailf:info "<0-255>;;CEM-ACR interface number";
2890                     range "0..255";
2891                 }
2892             }
2893             uses interface-atm-grouping;
2894         }
2895
2896         // interface Embedded-Service-Engine
2897         list Embedded-Service-Engine {
2898             tailf:info "cisco embedded service engine module";
2899             description "cisco embedded service engine module";
2900             tailf:cli-allow-join-with-key {
2901                 tailf:cli-display-joined;
2902             }
2903             tailf:cli-mode-name "config-if";
2904             // tailf:cli-full-command;
2905             key name;
2906             leaf name {
2907                 type string {
2908                     tailf:info "<0-2>/<0-0>;;Embedded-Service-Engine interface number";
2909                 }
2910             }
2911             uses interface-common-grouping;
2912         }
2913
2914         // interface FastEthernet
2915         list FastEthernet {
2916             tailf:info "FastEthernet IEEE 802.3";
2917             description "FastEthernet IEEE 802.3";
2918             tailf:cli-allow-join-with-key {
2919                 tailf:cli-display-joined;
2920             }
2921             tailf:cli-mode-name "config-if";
2922                 // tailf:cli-full-command;
2923             key name;
2924             leaf name {
2925                 type string {
2926                     //pattern "([0-9])+(/([0-9])+)*";
2927                     tailf:info "<0-66>/<0-128>;;FastEthernet interface number";
2928                 }
2929             }
2930             uses interface-ethernet-grouping;
2931             uses interface-common-grouping;
2932             uses interface-zone-member-grouping;
2933             uses interface-switch-grouping; //CATALYST
2934         }
2935
2936         // interface GigabitEthernet
2937         list GigabitEthernet {
2938             tailf:info "GigabitEthernet IEEE 802.3z";
2939             description "GigabitEthernet IEEE 802.3z";
2940             tailf:cli-allow-join-with-key {
2941                 tailf:cli-display-joined;
2942             }
2943             tailf:cli-mode-name "config-if";
2944                 // tailf:cli-full-command;
2945             key name;
2946             leaf name {
2947                 type string {
2948                     //pattern "([0-9])+(/([0-9])+)*";
2949                     tailf:info "<0-66>/<0-128>;;"+
2950                         "GigabitEthernet interface number";
2951                 }
2952             }
2953             leaf media-type {
2954                 tailf:info "Media type";
2955                 description "Media type";
2956                 type enumeration {
2957                     enum auto-select {
2958                         tailf:info "Use whichever connector is attached";
2959                     }
2960                     enum rj45 {
2961                         tailf:info "Copper";
2962                     }
2963                     enum sfp {
2964                         tailf:info "Fiber";
2965                     }
2966                 }
2967             }
2968             leaf port-type {
2969                 //FIXME: tailf:info
2970                 //FIXME: 3600 only?
2971                 type enumeration {
2972                     enum nni;
2973                 }
2974             }
2975             uses interface-ethernet-grouping;
2976             uses interface-common-grouping;
2977             uses interface-zone-member-grouping;
2978             uses interface-switch-grouping; //CATALYST
2979         }
2980
2981         // interface TenGigabitEthernet
2982         list TenGigabitEthernet {
2983             tailf:info "Ten Gigabit Ethernet";
2984             description "Ten Gigabit Ethernet";
2985             tailf:cli-allow-join-with-key {
2986                 tailf:cli-display-joined;
2987             }
2988             tailf:cli-mode-name "config-if";
2989                 // tailf:cli-full-command;
2990             key name;
2991             leaf name {
2992                 type string {
2993                     //pattern "([0-9])+(/([0-9])+)*";
2994                     tailf:info "<0-66>/<0-128>;;"+
2995                         "TenGigabitEthernet interface number";
2996                 }
2997             }
2998             leaf media-type {
2999                 tailf:info "Media type";
3000                 description "Media type";
3001                 type enumeration {
3002                     enum auto-select {
3003                         tailf:info "Use whichever connector is attached";
3004                     }
3005                     enum rj45 {
3006                         tailf:info "Copper";
3007                     }
3008                         enum sfp {
3009                         tailf:info "Fiber";
3010                     }
3011                 }
3012             }
3013             leaf port-type {
3014                 //FIXME: tailf:info
3015                 //FIXME: 3600 only?
3016                 type enumeration {
3017                     enum nni;
3018                 }
3019             }
3020             uses interface-ethernet-grouping;
3021             uses interface-common-grouping;
3022             uses interface-zone-member-grouping;
3023             uses interface-switch-grouping; //CATALYST
3024         }
3025
3026         // interface Loopback
3027         list Loopback {
3028             // pvh hide Loopback interfaces
3029             //    tailf:hidden full;
3030             tailf:info "Loopback interface";
3031             description "Loopback interface";
3032             tailf:cli-allow-join-with-key {
3033                 tailf:cli-display-joined;
3034             }
3035             tailf:cli-mode-name "config-if";
3036                 // tailf:cli-full-command;
3037             key name;
3038             leaf name {
3039                 type string {
3040                     // pattern "([0-9])+/([0-9])+(/([0-9])+)?";
3041                     tailf:info "<0-2147483647>;;Loopback interface number";
3042                 }
3043             }
3044             uses interface-common-grouping;
3045         }
3046
3047         list nve {
3048             tailf:info "Network virtualization endpoint interface";
3049             description "Network virtualization endpoint interface";
3050             tailf:cli-allow-join-with-key {
3051                 tailf:cli-display-joined;
3052             }
3053             tailf:cli-mode-name "config-if";
3054             key name;
3055             leaf name {
3056                 type uint16 {
3057                     tailf:info "<1-4096>;;nve interface number";
3058                     range "1..4096";
3059                 }
3060             }
3061
3062             container source-interface {
3063                 tailf:info "Specify source interface for NVE";
3064                 description "Specify source interface for NVE";
3065                 // FIXME: tailf:cli-diff-dependency "/ios:native/interface";
3066                 uses interface-grouping;
3067             }
3068             container member {
3069                 tailf:cli-incomplete-command;
3070                 tailf:cli-sequence-commands;
3071                 list vni {
3072                     tailf:info "Configure VNI information";
3073                     description "Configure VNI information";
3074                     tailf:cli-sequence-commands;
3075                     tailf:cli-compact-syntax;
3076
3077                     key vni-range;
3078                     leaf vni-range {
3079                         type string {
3080                             tailf:info "WORD;;VNI range or instance between 4096-16777215 example: 6010-6030 or 7115";
3081                         }
3082                     }
3083                     container mcast-group {
3084                         tailf:cli-incomplete-command;
3085                         tailf:cli-sequence-commands;
3086                         leaf multicast-group-min {
3087                             tailf:cli-drop-node-name;
3088                             tailf:info "Starting Multicast Group IPv4 Address";
3089                             description "Starting Multicast Group IPv4 Address";
3090                             type inet:ipv4-address {
3091                                 tailf:info "A.B.C.D;;IP address";
3092                             }
3093                         }
3094                         leaf multicast-group-max {
3095                             tailf:cli-drop-node-name;
3096                             tailf:info "Ending Multicast Group IPv4 Address";
3097                             description "Ending Multicast Group IPv4 Address";
3098                             type inet:ipv4-address {
3099                                 tailf:info "A.B.C.D;;IP address";
3100                             }
3101                         }
3102                     }
3103                 }
3104             }
3105         }
3106
3107         // interface overlay
3108         list overlay {
3109             tailf:info "Overlay interface";
3110             description "Overlay interface";
3111             tailf:cli-allow-join-with-key {
3112                 tailf:cli-display-joined;
3113             }
3114             tailf:cli-mode-name "config-if";
3115             key name;
3116             leaf name {
3117                 type uint16 {
3118                     tailf:info "<0-512>;;Overlay interface number";
3119                     range "0..512";
3120                 }
3121             }
3122             uses interface-common-grouping;
3123             uses interface-ethernet-grouping;
3124             uses interface-overlay-grouping;
3125         }
3126
3127         // interface Port-channel
3128         list Port-channel {
3129             tailf:info "Ethernet Channel of interfaces";
3130             description "Ethernet Channel of interfaces";
3131             tailf:cli-allow-join-with-key {
3132                 tailf:cli-display-joined;
3133             }
3134             tailf:cli-mode-name "config-if";
3135                 // tailf:cli-full-command;
3136             key name;
3137             leaf name {
3138                 type uint32 {
3139                     tailf:info "<1-512>;;Port-channel interface number";
3140                     range "1..512";
3141                 }
3142             }
3143             leaf pc-speed {
3144                 tailf:alt-name "speed";
3145                 tailf:info "Configure speed operation.";
3146                 description "Configure speed operation.";
3147                 type enumeration {
3148                     enum "10" {
3149                         tailf:info "Force 10 Mbps operation";
3150                     }
3151                     enum "100" {
3152                         tailf:info "Force 100 Mbps operation";
3153                     }
3154                     enum "1000" {
3155                         tailf:info "Enable AUTO speed configuration";
3156                     }
3157                     enum "nonegotiate" {
3158                         //FIXME
3159                     }
3160                     enum "auto" {
3161                         tailf:info "Enable AUTO speed configuration";
3162                     }
3163                 }
3164             }
3165             uses interface-common-grouping;
3166             uses interface-switch-grouping; //CATALYST
3167             uses interface-ethernet-grouping;
3168         }
3169
3170         // subinterface Port-channel #.#
3171         container Port-channel-subinterface {
3172             tailf:cli-drop-node-name;
3173             list Port-channel {
3174                 tailf:cli-allow-join-with-key {
3175                     tailf:cli-display-joined;
3176                 }
3177                 tailf:cli-mode-name "config-subif";
3178                 tailf:cli-suppress-key-abbreviation;
3179                 key name;
3180                 leaf name {
3181                     type string;
3182                 }
3183                 uses interface-common-grouping;
3184                 uses interface-switch-grouping; //CATALYST
3185                 uses interface-ethernet-grouping;
3186             }
3187         }
3188
3189         //interface pseudowire
3190         list pseudowire {
3191             tailf:info "Pseudowire Interface";
3192             description "Pseudowire Interface";
3193             tailf:cli-mode-name "config-if";
3194             tailf:cli-allow-join-with-key {
3195                 tailf:cli-display-joined;
3196             }
3197             key name;
3198             leaf name {
3199                 type uint32 {
3200                     tailf:info "<1-231072>;;pseudowire interface number";
3201                     range "1..231072";
3202                 }
3203             }
3204             uses pseudowire-grouping;
3205         }
3206         //interface SM
3207         list "SM" {
3208             tailf:info "SM Interface";
3209             description "SM Interface";
3210             tailf:cli-mode-name "config-if";
3211             tailf:cli-allow-join-with-key {
3212                 tailf:cli-display-joined;
3213             }
3214             key name;
3215             leaf name {
3216                 type string {
3217                     pattern "([0-9])+(/([0-9])+)?";
3218                 }
3219             }
3220             uses interface-common-grouping;
3221         }
3222         //interface Cellular
3223         list Cellular {
3224             tailf:info "Cellular Interface";
3225             description "Cellular Interface";
3226             tailf:cli-mode-name "config-if";
3227             tailf:cli-allow-join-with-key {
3228                 tailf:cli-display-joined;
3229             }
3230             key name;
3231             leaf name {
3232                 type string {
3233                     pattern "([0-9])+(/([0-9])+)?";
3234                 }
3235             }
3236             uses interface-common-grouping;
3237             uses interface-cellular-grouping;
3238         }
3239
3240         // interface Vlan
3241         list Vlan {
3242             tailf:info "Catalyst Vlans";
3243             description "Catalyst Vlans";
3244             tailf:cli-allow-join-with-key {
3245                 tailf:cli-display-joined;
3246             }
3247             key name;
3248             leaf name {
3249                 type uint16 {
3250                     tailf:info "<1-4094>;;Vlan interface number";
3251                     range "1..4094";
3252                 }
3253             }
3254             uses interface-common-grouping;
3255             uses interface-zone-member-grouping;
3256         }
3257
3258         // interface Group-Async
3259         list Group-Async {
3260             tailf:info "Async Group interface";
3261             description "Async Group interface";
3262             tailf:cli-allow-join-with-key {
3263                 tailf:cli-display-joined;
3264             }
3265             key name;
3266             leaf name {
3267                 type uint16 {
3268                     tailf:info "<0-64>;;Group-Async interface number";
3269                     range "0..64";
3270                 }
3271             }
3272             leaf physical-layer {
3273                 tailf:info "Configure sync or async physical layer on serial "+
3274                     "interface";
3275                 description "Configure sync or async physical layer on serial "+
3276                     "interface";
3277                 type enumeration {
3278                     enum async {
3279                         tailf:info "Configure asynchronous physical layer on serial "
3280                         +"interface";
3281                     }
3282                     enum sync {
3283                     tailf:info "Configure synchronous physical layer on serial "+
3284                         "interface";
3285                     }
3286                 }
3287             }
3288             uses interface-common-grouping;
3289         }
3290
3291         // interface Multilink
3292         list Multilink {
3293             tailf:info "Multilink-group interface";
3294             description "Multilink-group interface";
3295             tailf:cli-allow-join-with-key {
3296                 tailf:cli-display-joined;
3297             }
3298             tailf:cli-mode-name "config-if";
3299             tailf:cli-full-command;
3300             key name;
3301             leaf name {
3302                 type uint16 {
3303                     tailf:info "<1-65535>;;Multilink interface number";
3304                     range "1..65535";
3305                 }
3306             }
3307             uses interface-common-grouping;
3308             uses interface-pointtopoint-grouping;
3309         }
3310
3311         // interface Serial
3312         list Serial {
3313             tailf:info "Serial interface";
3314             description "Serial interface";
3315             tailf:cli-allow-join-with-key {
3316                 tailf:cli-display-joined;
3317             }
3318             tailf:cli-mode-name "config-if";
3319             tailf:cli-full-command;
3320             key name;
3321             leaf name {
3322                 type string {
3323                     pattern "([0-9])+/([0-9])+/([0-9])+\.([0-9])+/([0-9])+/([0-9])+/([0-9])+:([0-9])";
3324                     //FIXME: info + syntax
3325                 }
3326             }
3327             uses interface-common-grouping;
3328             uses interface-pointtopoint-grouping;
3329         }
3330
3331         // interface Tunnel #
3332         list Tunnel {
3333             tailf:info "Tunnel interface";
3334             description "Tunnel interface";
3335             tailf:cli-allow-join-with-key {
3336                 tailf:cli-display-joined;
3337             }
3338             tailf:cli-mode-name "config-if";
3339             tailf:cli-suppress-key-abbreviation;
3340             key name;
3341             leaf name {
3342                 type uint32 {
3343                     tailf:info "<0-2147483647>;;Tunnel interface number";
3344                 }
3345             }
3346             uses interface-common-grouping;
3347
3348             // interface Tunnel* / qos
3349             container qos {
3350                 tailf:info "Quality of Service related commands";
3351                 description "Quality of Service related commands";
3352                 leaf pre-classify {
3353                     tailf:info "Enable QOS classification before packets are tunnel "+
3354                         "encapsulated";
3355                     description "Enable QOS classification before packets are tunnel "+
3356                         "encapsulated";
3357                     type empty;
3358                 }
3359             }
3360
3361             // interface Tunnel* / tunnel
3362             uses interface-tunnel-grouping;
3363         }
3364
3365         // interface Virtual-Template
3366         list Virtual-Template {
3367             tailf:info "Virtual Template interface";
3368             description "Virtual Template interface";
3369             tailf:cli-allow-join-with-key {
3370                 tailf:cli-display-joined;
3371             }
3372             tailf:cli-mode-name "config-if";
3373             tailf:cli-full-command;
3374             tailf:cli-explicit-exit;
3375             key name;
3376             leaf name {
3377                 type uint16 {
3378                     tailf:info "<1-4095>;;Virtual-Template interface number";
3379                     range "1..4095";
3380                 }
3381             }
3382             leaf type {
3383                 tailf:info "type of the virtual-template";
3384                 description "type of the virtual-template";
3385                 tailf:cli-hide-in-submode;
3386                 type enumeration {
3387                     enum ethernet {
3388                       tailf:info "Set VT type as ethernet";
3389                     }
3390                     enum serial {
3391                       tailf:info "Set VT type as serial";
3392                     }
3393                     enum tunnel {
3394                       tailf:info "Set VT type as tunnel";
3395                     }
3396                     enum vpn {
3397                       tailf:info "Set VT type as vpn";
3398                     }
3399                 }
3400             }
3401
3402             uses interface-ethernet-grouping;
3403             uses interface-common-grouping;
3404             uses interface-zone-member-grouping;
3405             uses interface-switch-grouping; //CATALYST
3406             uses interface-pointtopoint-grouping;
3407             // interface Tunnel* / tunnel
3408             uses interface-tunnel-grouping;
3409         }
3410
3411         // interface VirtualPortGroup
3412         list VirtualPortGroup {
3413             tailf:info "Virtual Port Group";
3414             description "Virtual Port Group";
3415             tailf:cli-allow-join-with-key {
3416                 tailf:cli-display-joined;
3417             }
3418             tailf:cli-mode-name "config-if";
3419             tailf:cli-full-command;
3420             tailf:cli-explicit-exit;
3421             key name;
3422             leaf name {
3423                 type uint16 {
3424                     tailf:info " <0-31>;;VirtualPortGroup interface number";
3425                     range "0..31";
3426                 }
3427             }
3428             uses interface-switch-grouping; //CATALYST
3429             uses interface-ethernet-grouping;
3430             uses interface-common-grouping;
3431         }
3432         // interface vasileft
3433         list vasileft {
3434             tailf:info "vasileft";
3435             description "vasileft";
3436             tailf:cli-allow-join-with-key {
3437                 tailf:cli-display-joined;
3438             }
3439             tailf:cli-mode-name "config-if";
3440             tailf:cli-full-command;
3441             tailf:cli-explicit-exit;
3442             key name;
3443             leaf name {
3444                 type uint16 {
3445                     tailf:info "<1-2000>;;vasileft interface number";
3446                     range "1..2000";
3447                 }
3448             }
3449             uses interface-switch-grouping; //CATALYST
3450             uses interface-ethernet-grouping;
3451             uses interface-common-grouping;
3452         }
3453
3454         // interface vasiright
3455         list vasiright {
3456             tailf:info "vasiright";
3457             description "vasiright";
3458             tailf:cli-allow-join-with-key {
3459                 tailf:cli-display-joined;
3460             }
3461             tailf:cli-mode-name "config-if";
3462             tailf:cli-full-command;
3463             tailf:cli-explicit-exit;
3464             key name;
3465             leaf name {
3466                 type uint16 {
3467                     tailf:info "<1-2000>;;vasiright interface number";
3468                     range "1..2000";
3469                  }
3470             }
3471             uses interface-switch-grouping; //CATALYST
3472             uses interface-ethernet-grouping;
3473             uses interface-common-grouping;
3474         }
3475     }
3476
3477
3478 /// ========================================================================
3479 /// mls
3480 /// ========================================================================
3481 /// Note: must come before class-map and policy-map.
3482
3483         container mls {
3484             tailf:info "mls global commands";
3485             description "mls global commands";
3486             tailf:cli-incomplete-no;
3487
3488             // mls acl
3489             container acl {
3490                 tailf:info "MLS ACL operation";
3491                 description "MLS ACL operation";
3492                 // mls acl tcam
3493                 container tcam {
3494                     tailf:info "ACL TCAM";
3495                     description "ACL TCAM";
3496                     leaf default-result {
3497                         tailf:info "Default result to be used during tcam programming";
3498                         description "Default result to be used during tcam programming";
3499                         type enumeration {
3500                             enum bridge {
3501                                 tailf:info "Bridge result";
3502                             }
3503                             enum deny {
3504                                 tailf:info "Deny result";
3505                             }
3506                             enum permit {
3507                                 tailf:info "Permit result";
3508                             }
3509                         }
3510                     }
3511                     container log-update {
3512                         tailf:info "Log TCAM updates";
3513                         description "Log TCAM updates";
3514                         presence true;
3515                         leaf rate-limit-msg {
3516                             tailf:info "Enable/Disable syslog ratelimiting";
3517                             description "Enable/Disable syslog ratelimiting";
3518                             type enumeration {
3519                                 enum disable {
3520                                     tailf:info "Disable ratelimiting syslog";
3521                                 }
3522                                 enum enable {
3523                                     tailf:info "Enable syslog ratelimiting at 1 per second";
3524                                 }
3525                             }
3526                         }
3527                     }
3528                     leaf share-global {
3529                         tailf:info "share global deny or permit any entries";
3530                         description "share global deny or permit any entries";
3531                         tailf:cli-boolean-no;
3532                         tailf:cli-trim-default;
3533                         type boolean;
3534                         default true;
3535                     }
3536                 }
3537             }
3538
3539             //  aging L3 aging
3540             // mls cef
3541             container cef {
3542                 tailf:info "cef keyword";
3543                 description "cef keyword";
3544                 container error {
3545                     leaf action {
3546                         type enumeration {
3547                             enum reset;
3548                         }
3549                     }
3550                 }
3551                //  maximum-routes  Configure route allocation for protocols
3552                //  tunnel          Allow tunnel fragmentation
3553             }
3554             //  erm         FIB Exception Recovery Manager
3555             //  exclude     exclude keyword
3556             // mls flow
3557             container flow {
3558                 tailf:info "flowmask keyword";
3559                 description "flowmask keyword";
3560                 leaf ip {
3561                     tailf:info "flowmask ip keyword";
3562                     description "flowmask ip keyword";
3563                     type enumeration {
3564                         enum interface-destination {
3565                             tailf:info "interface-destination flow keyword";
3566                         }
3567                         enum interface-destination-source {
3568                             tailf:info "interface-destination-source flow keyword";
3569                         }
3570                         enum interface-full {
3571                             tailf:info "interface-full flow keyword";
3572                         }
3573                         enum interface-source {
3574                             tailf:info "interface-source only flow keyword";
3575                         }
3576                     }
3577                 }
3578             }
3579             // mls ip
3580             container ip {
3581                 tailf:info "ip keyword";
3582                 description "ip keyword";
3583                 //  cef        cef keyword
3584                 //  inspect    inspect
3585                 // mls ip multicast
3586                 container multicast {
3587                     tailf:info "multicast keyword";
3588                     description "multicast keyword";
3589                     tailf:cli-display-separated;
3590                     presence true;
3591                     //  bidir              Bidir commands
3592                     //  connected          Enable download of interface/mask entry
3593                     container consistency-check {
3594                         tailf:info "Set consistency checking characteristics";
3595                         description "Set consistency checking characteristics";
3596                         presence true;
3597                         leaf settle-time {
3598                             tailf:info "Settle time for entry/oif for consistancy-checker";
3599                             description "Settle time for entry/oif for consistancy-checker";
3600                             type uint16 {
3601                                 tailf:info "<2-3600>;;Settle time for entry/oif in seconds";
3602                                 range "2..3600";
3603                             }
3604                         }
3605                         //  type         Set consistency checker type
3606                     }
3607                     //  egress             Set egress replication options
3608                     leaf flow-stat-timer {
3609                         tailf:info "timer for flow statistic used by mls-msc and mlsm";
3610                         description "timer for flow statistic used by mls-msc and mlsm";
3611                         type uint8 {
3612                             tailf:info "<1-100>;;#seconds between one batch and another";
3613                             range "1..100";
3614                         }
3615                     }
3616                     //  met-optimization   Enable or disable met optimisation
3617                     //  non-rpf            Enable rate-limiting of non-RPF traffic
3618                     //  replication-mode   Disable auto-detection mode for egress
3619                     //  sso                Stateful switchover parameters
3620                     //  threshold          Threshold rate for installing h/w shortcuts
3621                 }
3622                 //  nat        nat keyword
3623                 //  slb        Server Load Balancing
3624             }
3625             //  nde         netflow data export (nde) keyword
3626             //  netflow     netflow keyword
3627             // mls qos
3628             container mls-qos-conf {
3629                 tailf:cli-no-keyword;
3630                 tailf:cli-drop-node-name;
3631                 leaf qos {
3632                     type empty;
3633                 }
3634             }
3635             // mls qos
3636             container qos {
3637                 tailf:info "QoS parameters";
3638                 description "QoS parameters";
3639                 tailf:cli-incomplete-command;
3640                 tailf:cli-incomplete-no;
3641                 // mls qos aggregate-policer *
3642                 list aggregate-policer {
3643                     tailf:info "Assign aggregate policer";
3644                     description "Assign aggregate policer";
3645                     tailf:cli-suppress-mode;
3646                     tailf:cli-delete-when-empty;
3647                     tailf:cli-compact-syntax;
3648                     tailf:cli-sequence-commands {
3649                         tailf:cli-reset-all-siblings;
3650                     }
3651                     key name;
3652                     leaf name {
3653                         type string {
3654                            tailf:info "WORD;;aggregate policer name";
3655                         }
3656                     }
3657                     leaf target-bit-rate {
3658                         tailf:cli-drop-node-name;
3659                         type uint64 {
3660                             tailf:info "<32000-60000000000>;;Target Bit Rate (bits per "
3661                              +"second) (postfix k, m, g optional; decimal point allowed)";
3662                             range "32000..60000000000";
3663                         }
3664                     }
3665                     leaf burst-normal {
3666                         tailf:cli-drop-node-name;
3667                         tailf:cli-optional-in-sequence;
3668                         type uint32 {
3669                          tailf:info "<1000-31250000>;;Normal burst bytes";
3670                          range "1000..31250000";
3671                        }
3672                     }
3673                     leaf burst-max {
3674                         tailf:cli-drop-node-name;
3675                         tailf:cli-optional-in-sequence;
3676                         when "../burst-normal" {
3677                             tailf:dependency "../burst-normal";
3678                         }
3679                         type uint32 {
3680                             tailf:info "<1000-31250000>;;Maximum burst bytes";
3681                             range "1000..31250000";
3682                         }
3683                     }
3684                     leaf pir {
3685                         tailf:info "PIR";
3686                         description "PIR";
3687                         tailf:cli-optional-in-sequence;
3688                         type uint64 {
3689                             tailf:info "<32000-60000000000>;;Target Bit Rate (bits per "
3690                             +"second) (postfix k, m, g optional; decimal point allowed)";
3691                             range "32000..60000000000";
3692                         }
3693                     }
3694                     container conform-action {
3695                         tailf:info "action when rate is not exceeded";
3696                         description "action when rate is not exceeded";
3697                         tailf:cli-optional-in-sequence;
3698                         tailf:cli-compact-syntax;
3699                         tailf:cli-flatten-container;
3700                         choice action-choice {
3701                             leaf drop {
3702                                 tailf:info "drop packet";
3703                                 description "drop packet";
3704                                 type empty;
3705                             }
3706                             leaf set-dscp-transmit {
3707                                 tailf:info "set dscp and send it";
3708                                 description "set dscp and send it";
3709                                 type dscp-type;
3710                             }
3711                             leaf set-mpls-exp-imposition-transmit {
3712                                 tailf:info "set exp at tag imposition and send it";
3713                                 description "set exp at tag imposition and send it";
3714                                 type uint8 {
3715                                     tailf:info "<0-7>;;new exp";
3716                                     range "0..7";
3717                                 }
3718                             }
3719                             leaf set-prec-transmit {
3720                                 tailf:info "rewrite packet precedence and send it";
3721                                 description "rewrite packet precedence and send it";
3722                                 type uint8 {
3723                                     tailf:info "<0-7>;;new precedence";
3724                                     range "0..7";
3725                                 }
3726                             }
3727                             leaf transmit {
3728                                 tailf:info "transmit packet";
3729                                 description "transmit packet";
3730                                 type empty;
3731                             }
3732                         }
3733                     }
3734                     leaf exceed-action {
3735                         tailf:info "action when rate is exceeded";
3736                         description "action when rate is exceeded";
3737                         tailf:cli-optional-in-sequence;
3738                         type enumeration {
3739                             enum drop {
3740                                 tailf:info "drop packet";
3741                             }
3742                             enum policed-dscp-transmit {
3743                                 tailf:info "change dscp per policed-dscp map and send it";
3744                             }
3745                             enum transmit {
3746                                 tailf:info "transmit packet";
3747                             }
3748                         }
3749                     }
3750                     leaf violate-action {
3751                         tailf:info "action when rate violated";
3752                         description "action when rate violated";
3753                         type enumeration {
3754                             enum drop {
3755                                 tailf:info "drop packet";
3756                             }
3757                             enum policed-dscp-transmit {
3758                                 tailf:info "change dscp per policed-dscp map and send it";
3759                             }
3760                             enum transmit {
3761                                 tailf:info "transmit packet";
3762                             }
3763                         }
3764                     }
3765                 }
3766                 //  map                Define QoS mapping
3767                 //  mls qos map
3768                 container map {
3769                     tailf:info "qos map keyword";
3770                     description "qos map keyword";
3771                     leaf-list cos-dscp {
3772                         tailf:info "cos-dscp map: eight dscp values for cos 0-7";
3773                         description "cos-dscp map: eight dscp values for cos 0-7";
3774                         tailf:cli-flat-list-syntax;
3775                         //max-elements 8;
3776                         type uint8 {
3777                             tailf:info "<0-63>;;CoS values separated by spaces (up to 8 values total)";
3778                             range "0..63";
3779                         }
3780                     }
3781                     leaf-list policed-dscp {
3782                         tailf:info "policed-dscp map keyword";
3783                         description  "policed-dscp map keyword";
3784                         ordered-by user;
3785                         tailf:cli-flat-list-syntax;
3786                         type union {
3787                             type uint8 {
3788                                 tailf:info "<0-63>;;DSCP values separated by spaces (up to 8 values total)";
3789                                 range "0..63";
3790                             }
3791                             type enumeration {
3792                                 enum to {
3793                                     tailf:info "to keyword";
3794                                 }
3795                             }
3796                         }
3797                     }
3798                 }
3799                 //  marking            marking keyword
3800                 //  police             police keyword
3801                 //  protocol           protocol keyword
3802                 //  queueing-only      queueing-only (no QoS rewrite,  no policing)
3803                 //  recirc             recirculate path
3804                 //  mls qos rewrite
3805                 container rewrite {
3806                     tailf:info "packet qos rewrite enable/disable";
3807                     description "packet qos rewrite enable/disable";
3808                     container ip {
3809                         tailf:info "ip packet qos rewrite enable/disable";
3810                         description "ip packet qos rewrite enable/disable";
3811                         container dscp {
3812                             tailf:info "packet ip dscp rewrite enable/disable";
3813                             description "packet ip dscp rewrite enable/disable";
3814                             presence true;
3815                             leaf slot {
3816                                 tailf:info "slot number";
3817                                 description "slot number";
3818                                 type string {
3819                                     tailf:info "WORD;;Slots seperated by commas. Valid slots: 1,2,"
3820                                     +"3,4,5,6,7,8,9";
3821                                 }
3822                             }
3823                         }
3824                     }
3825                 }
3826                 // mls qos queue-set
3827                 container queue-set {
3828                     tailf:info "Choose a queue set for this queue";
3829                     description "Choose a queue set for this queue";
3830                     container output {
3831                         tailf:info "Direction the command applies for this command";
3832                         description "Direction the command applies for this command";
3833                         tailf:cli-sequence-commands;
3834                         tailf:cli-compact-syntax;
3835                         leaf queue-set-id {
3836                             tailf:cli-drop-node-name;
3837                             type uint8 {
3838                                 tailf:info "<1-2>;;queue-set id";
3839                                 range "1..2";
3840                             }
3841                         }
3842                         list threshold {
3843                             tailf:info "Assign threshold values to a queue";
3844                             description "Assign threshold values to a queue";
3845                             tailf:cli-suppress-mode;
3846                             tailf:cli-break-sequence-commands;
3847                             tailf:cli-compact-syntax;
3848                             tailf:cli-sequence-commands;
3849                             key queue-id;
3850                             leaf queue-id {
3851                                 type uint8 {
3852                                     tailf:info "<1-4>;;enter queue id in this queue set";
3853                                     range "1..4";
3854                                 }
3855                             }
3856                             leaf drop1 {
3857                                 tailf:cli-drop-node-name;
3858                                 description "drop threshold1 1-3200";
3859                                 type uint32 {
3860                                     tailf:info "<1-3200>;;enter drop threshold1 1-3200";
3861                                     range "1..3200";
3862                                 }
3863                             }
3864                             leaf drop2 {
3865                                 tailf:cli-drop-node-name;
3866                                 description "drop threshold2 1-3200";
3867                                 type uint32 {
3868                                     tailf:info "<1-3200>;;enter drop threshold2 1-3200";
3869                                     range "1..3200";
3870                                 }
3871                             }
3872                             leaf reserved {
3873                                 tailf:cli-drop-node-name;
3874                                 description "reserved threshold 1-100";
3875                                 type uint32 {
3876                                     tailf:info "<1-3200>;;enter drop threshold2 1-3200";
3877                                     range "1..3200";
3878                                 }
3879                             }
3880                             leaf maximum {
3881                                 tailf:cli-drop-node-name;
3882                                 description "maximum threshold1 1-3200";
3883                                 type uint32 {
3884                                     tailf:info "<1-3200>;;enter maximum threshold1 1-3200";
3885                                     range "1..3200";
3886                                 }
3887                             }
3888                         }
3889                         leaf-list buffers {
3890                             tailf:info "assign buffers to each egress queue";
3891                             description "assign buffers to each egress queue";
3892                             tailf:cli-flat-list-syntax;
3893                             type uint16 {
3894                                 tailf:info "<0-99>/<1-100>;;enter buffer percentage for queue x 0-99/2 1-100";
3895                                 range "0..100";
3896                             }
3897                         }
3898                     }
3899                 }
3900                 // mls qos srr-queue
3901                 container srr-queue {
3902                     tailf:info "Configure SRR receive queues";
3903                     description "Configure SRR receive queues";
3904                     container input {
3905                         tailf:info "input keyword";
3906                         description "input keyword";
3907                         leaf-list bandwidth {
3908                             tailf:info "Configure SRR bandwidth";
3909                             description "Configure SRR bandwidth";
3910                             tailf:cli-flat-list-syntax;
3911                             type uint8 {
3912                                 tailf:info "<1-100>;;enter bandwidth weight for queue id x";
3913                                 range "1..100";
3914                             }
3915                         }
3916                         list threshold {
3917                             tailf:info "Configure queue tail-drop thresholds";
3918                             description "Configure queue tail-drop thresholds";
3919                             tailf:cli-suppress-mode;
3920                             key queue-id;
3921                             leaf queue-id {
3922                                 type uint8 {
3923                                     tailf:info "<1-2>;;enter threshold queue id (1-2)";
3924                                     range "1..2";
3925                                 }
3926                             }
3927                             leaf-list queue-size-percent {
3928                                 tailf:cli-drop-node-name;
3929                                 tailf:cli-flat-list-syntax;
3930                                 type uint8 {
3931                                     tailf:info "<1-100>;;enter percent of queue size for threshold x";
3932                                     range "1..100";
3933                                 }
3934                             }
3935                         }
3936                         list priority-queue {
3937                             tailf:info "Configure priority scheduling";
3938                             description "Configure priority scheduling";
3939                             tailf:cli-suppress-mode;
3940                             key queue-number;
3941                             leaf queue-number {
3942                                 type uint8 {
3943                                     tailf:info "<1-2>;;enter priority queue number [1-2]";
3944                                 }
3945                             }
3946                             leaf bandwidth {
3947                                 tailf:info "ingress priority queue bandwidth % of stack ring";
3948                                 description "ingress priority queue bandwidth % of stack ring";
3949                                 type uint8 {
3950                                     tailf:info "<0-40>;;enter bandwidth number [0-40]";
3951                                     range "0..40";
3952                                 }
3953                             }
3954                         }
3955                         list cos-map {
3956                             tailf:info "Configure cos-map for a queue id";
3957                             description "Configure cos-map for a queue id";
3958                             tailf:cli-suppress-mode;
3959                             key "queue threshold";
3960                             leaf queue {
3961                                 tailf:info "Assign COS values to a queue";
3962                                 description "Assign COS values to a queue";
3963                                 tailf:cli-expose-key-name;
3964                                 type uint8 {
3965                                     tailf:info "<1-4>;;enter cos-map output queue id";
3966                                     range "1..4";
3967                                 }
3968                             }
3969                             leaf threshold {
3970                                 tailf:info "Assign COS values to a queue threshold";
3971                                 description "Assign COS values to a queue threshold";
3972                                 tailf:cli-expose-key-name;
3973                                 type uint8 {
3974                                     tailf:info "<1-3>;;enter cos-map threshold id";
3975                                     range "1..3";
3976                                 }
3977                             }
3978                             leaf-list cos {
3979                                 tailf:cli-drop-node-name;
3980                                 tailf:cli-flat-list-syntax;
3981                                 max-elements 8;
3982                                 type uint8 {
3983                                     tailf:info "<0-7>;;8 cos values separated by spaces";
3984                                     range "0..7";
3985                                 }
3986                             }
3987                         }
3988                         list dscp-map {
3989                             tailf:info "Configure dscp-map for a queue id";
3990                             description "Configure dscp-map for a queue id";
3991                             tailf:cli-suppress-mode;
3992                             key "queue threshold";
3993                             leaf queue {
3994                                 tailf:info "Assign DSCP values to a queue";
3995                                 description "Assign DSCP values to a queue";
3996                                 tailf:cli-expose-key-name;
3997                                 type uint8 {
3998                                     tailf:info "<1-4>;;enter dscp-map output queue id";
3999                                     range "1..4";
4000                                 }
4001                             }
4002                             leaf threshold {
4003                                 tailf:info "Assign DSCP values to a queue threshold";
4004                                 description "Assign DSCP values to a queue threshold";
4005                                 tailf:cli-expose-key-name;
4006                                 type uint8 {
4007                                     tailf:info "<1-3>;;enter dscp-map threshold id";
4008                                     range "1..3";
4009                                 }
4010                             }
4011                             leaf-list dscp {
4012                                 tailf:cli-drop-node-name;
4013                                 tailf:cli-flat-list-syntax;
4014                                 max-elements 8;
4015                                 type uint8 {
4016                                     tailf:info "<0-63>;;dscp values separated by spaces (up to 8 values total)";
4017                                     range "0..63";
4018                                 }
4019                             }
4020                         }
4021                     }
4022                     container output {
4023                         tailf:info "output keyword";
4024                         description "output keyword";
4025                         list cos-map {
4026                             tailf:info "Configure cos-map for a queue id";
4027                             description "Configure cos-map for a queue id";
4028                             tailf:cli-suppress-mode;
4029                             key "queue threshold";
4030                             leaf queue {
4031                                 tailf:info "Assign COS values to a queue";
4032                                 description "Assign COS values to a queue";
4033                                 tailf:cli-expose-key-name;
4034                                 type uint8 {
4035                                     tailf:info "<1-4>;;enter cos-map output queue id";
4036                                     range "1..4";
4037                                 }
4038                             }
4039                             leaf threshold {
4040                                 tailf:info "Assign COS values to a queue threshold";
4041                                 description "Assign COS values to a queue threshold";
4042                                 tailf:cli-expose-key-name;
4043                                 type uint8 {
4044                                     tailf:info "<1-3>;;enter cos-map threshold id";
4045                                     range "1..3";
4046                                 }
4047                             }
4048                             leaf-list cos {
4049                                 tailf:cli-drop-node-name;
4050                                 tailf:cli-flat-list-syntax;
4051                                 max-elements 8;
4052                                 type uint8 {
4053                                     tailf:info "<0-7>;;8 cos values separated by spaces";
4054                                     range "0..7";
4055                                 }
4056                             }
4057                         }
4058                         list dscp-map {
4059                             tailf:info "Configure dscp-map for a queue id";
4060                             description "Configure dscp-map for a queue id";
4061                             tailf:cli-suppress-mode;
4062                             key "queue threshold";
4063                             leaf queue {
4064                                 tailf:info "Assign DSCP values to a queue";
4065                                 description "Assign DSCP values to a queue";
4066                                 tailf:cli-expose-key-name;
4067                                 type uint8 {
4068                                     tailf:info "<1-4>;;enter dscp-map output queue id";
4069                                     range "1..4";
4070                                 }
4071                             }
4072                             leaf threshold {
4073                                 tailf:info "Assign DSCP values to a queue threshold";
4074                                 description "Assign DSCP values to a queue threshold";
4075                                 tailf:cli-expose-key-name;
4076                                 type uint8 {
4077                                     tailf:info "<1-3>;;enter dscp-map threshold id";
4078                                     range "1..3";
4079                                 }
4080                             }
4081                             leaf-list dscp {
4082                                 tailf:cli-drop-node-name;
4083                                 tailf:cli-flat-list-syntax;
4084                                 max-elements 8;
4085                                 type uint8 {
4086                                     tailf:info "<0-63>;;dscp values separated by spaces (up to 8 values total)";
4087                                     range "0..63";
4088                                 }
4089                             }
4090                         }
4091                     }
4092                 }
4093             }
4094             //  statistics-export  qos statistics data export
4095             // mls rate-limit
4096             container rate-limit {
4097                 tailf:info "Rate limit different behaviors";
4098                 description "Rate limit different behaviors";
4099                 //  all        Rate Limiting for both Unicast and Multicast packets
4100                 container layer2 {
4101                     tailf:info "layer2 protocol cases";
4102                     description "layer2 protocol cases";
4103                     //  ip-admission   IP admission on Layer2 ports
4104                     container l2pt {
4105                         tailf:cli-compact-syntax;
4106                         tailf:cli-sequence-commands {
4107                             tailf:cli-reset-siblings;
4108                         }
4109                         tailf:info "layer2 protocol tunnelling packets";
4110                         leaf packets-per-second {
4111                             description "layer2 protocol tunnelling packets";
4112                             tailf:cli-drop-node-name;
4113                             type uint32 {
4114                                  tailf:info "<10-1000000>;;packets per second";
4115                                  range "10..1000000";
4116                             }
4117                         }
4118                         leaf packets-in-burst {
4119                             tailf:cli-drop-node-name;
4120                             type uint32 {
4121                                 tailf:info "<1-255>;;packets in burst";
4122                                 range "1..255";
4123                             }
4124                         }
4125                     }
4126                     //  mac-security   Mac security traffics
4127                     container pdu {
4128                         tailf:info "layer2 protocol data unit packets";
4129                         description "layer2 protocol data unit packets";
4130                         tailf:cli-compact-syntax;
4131                         tailf:cli-sequence-commands {
4132                             tailf:cli-reset-siblings;
4133                         }
4134                         leaf packets-per-second {
4135                             tailf:cli-drop-node-name;
4136                             type uint32 {
4137                                tailf:info "<10-1000000>;;packets per second";
4138                                range "10..1000000";
4139                             }
4140                         }
4141                         leaf packets-in-burst {
4142                             tailf:cli-drop-node-name;
4143                             type uint32 {
4144                                 tailf:info "<1-255>;;packets in burst";
4145                                 range "1..255";
4146                             }
4147                         }
4148                     }
4149                     //  port-security  Port security traffics
4150                 }
4151                 //  multicast  Rate limiting for Multicast packets
4152                 //  unicast    Rate limiting for Unicast packets
4153             }
4154             //  rp          rp
4155             //  sampling    sampling keyword
4156             // mls verify
4157             container verify {
4158                 tailf:info "enable hardware packet parsing error checks";
4159                 description "enable hardware packet parsing error checks";
4160                 container ip {
4161                     tailf:info "check on IP packets";
4162                     description "check on IP packets";
4163                     leaf checksum {
4164                         tailf:info "check for packet checksum errors";
4165                         description "check for packet checksum errors";
4166                         tailf:cli-boolean-no;
4167                         tailf:cli-trim-default;
4168                         type boolean;
4169                         default true;
4170                     }
4171                     container "length" {
4172                        tailf:info "check for packet length errors";
4173                         description "check for packet length errors";
4174                         leaf consistent {
4175                             tailf:info "check length in header against physical frame length";
4176                             description "check length in header against physical frame length";
4177                             tailf:cli-boolean-no;
4178                             tailf:cli-trim-default;
4179                             type boolean;
4180                             default true;
4181                         }
4182                         leaf minimum {
4183                             tailf:info "check for minimum packet length";
4184                             description "check for minimum packet length";
4185                             tailf:cli-boolean-no;
4186                             tailf:cli-trim-default;
4187                             type boolean;
4188                             default true;
4189                         }
4190                     }
4191                     leaf same-address {
4192                         tailf:info "check for packet having equal source and destination IP "
4193                         +"addresses";
4194                         description "check for packet having equal source and destination IP "
4195                         +"addresses";
4196                         type empty;
4197                     }
4198                     leaf syslog {
4199                         tailf:info "syslog packet parse errors";
4200                         description "syslog packet parse errors";
4201                         type empty;
4202                     }
4203                 }
4204             }
4205         }
4206
4207 /// ========================================================================
4208 /// policer
4209 /// ========================================================================
4210 // Note: must come before class-map and policy-map.
4211
4212         container policer {
4213             tailf:info "Switch policer";
4214             description "Switch policer";
4215             // policer aggregate *
4216             list aggregate {
4217                 tailf:info "Named aggregate policer";
4218                 description "Named aggregate policer";
4219                 tailf:cli-suppress-mode;
4220                 tailf:cli-delete-when-empty;
4221                 tailf:cli-compact-syntax;
4222                 tailf:cli-reset-container;
4223                 tailf:cli-sequence-commands {
4224                     tailf:cli-reset-siblings;
4225                 }
4226                 key name;
4227                 leaf name {
4228                     type string {
4229                         tailf:info "WORD;;aggregate policer Name";
4230                     }
4231                 }
4232                 // cir <cir-bps>
4233                 leaf cir {
4234                     tailf:info "Committed information rate";
4235                     description "Committed information rate";
4236                     type uint32 {
4237                         tailf:info "<8000-1000000000>;;Bits per second";
4238                         range "8000..1000000000";
4239                     }
4240                 }
4241                 // bc <burst>
4242                 leaf bc {
4243                     tailf:info "Conform burst";
4244                     description "Conform burst";
4245                     tailf:cli-optional-in-sequence;
4246                     type uint32 {
4247                         tailf:info "<8000-1000000000>;;Burst bytes";
4248                         range "8000..1000000000";
4249                     }
4250                 }
4251                 // conform-action
4252                 leaf conform-action {
4253                     tailf:info "action when rate is within conform and conform + "+
4254                         "exceed burst";
4255                     description "action when rate is within conform and conform + "+
4256                         "exceed burst";
4257                     tailf:cli-optional-in-sequence;
4258                     type empty;
4259                 }
4260                 leaf set-qos-transmit {
4261                     tailf:info "set qos-group and send it";
4262                     description "set qos-group and send it";
4263                     when "../conform-action";
4264                     tailf:cli-optional-in-sequence;
4265                     type uint8 {
4266                         tailf:info "<0-99>;;new qos-group";
4267                         range "0..99";
4268                     }
4269                 }
4270                 leaf set-dot1ad-dei-transmit {
4271                     tailf:info "set dei and send it";
4272                     description "set dei and send it";
4273                     when "../conform-action";
4274                     tailf:cli-optional-in-sequence;
4275                     type uint8 {
4276                         tailf:info "<0-1>;;new dei value";
4277                         range "0..1";
4278                     }
4279                 }
4280                 leaf set-prec-transmit {
4281                     tailf:info "rewrite packet precedence and send it";
4282                     description "rewrite packet precedence and send it";
4283                     when "../conform-action";
4284                     tailf:cli-optional-in-sequence;
4285                     type prec_value-type;
4286                 }
4287                 container set-prec-transmit-table {
4288                     when "../set-prec-transmit";
4289                     tailf:cli-no-keyword;
4290                     tailf:cli-drop-node-name;
4291                     tailf:cli-optional-in-sequence;
4292                     tailf:cli-flatten-container;
4293                     leaf table {
4294                         tailf:info "Set packet cos from cos based on table map";
4295                         description "Set packet cos from cos based on table map";
4296                         tailf:cli-optional-in-sequence;
4297                         type string;
4298                         tailf:non-strict-leafref {
4299                             path "/ios:native/table-map/name";
4300                         }
4301                     }
4302                 }
4303                 leaf set-dscp-transmit {
4304                     tailf:info "set dscp and send it";
4305                     description "set dscp and send it";
4306                     when "../conform-action";
4307                     tailf:cli-optional-in-sequence;
4308                     type dscp-type;
4309                 }
4310                 container set-dscp-transmit-table {
4311                     when "../set-dscp-transmit";
4312                     tailf:cli-no-keyword;
4313                     tailf:cli-drop-node-name;
4314                     tailf:cli-optional-in-sequence;
4315                     tailf:cli-flatten-container;
4316                     leaf table {
4317                         tailf:info "Set packet cos from cos based on table map";
4318                         description "Set packet cos from cos based on table map";
4319                         tailf:cli-optional-in-sequence;
4320                         type string;
4321                         tailf:non-strict-leafref {
4322                             path "/ios:native/table-map/name";
4323                         }
4324                     }
4325                 }
4326                 leaf set-cos-transmit {
4327                     tailf:info "set cos and send it";
4328                     description "set cos and send it";
4329                     when "../conform-action";
4330                     tailf:cli-optional-in-sequence;
4331                     type cos_value-type;
4332                 }
4333                 container set-cos-transmit-table {
4334                     when "../set-cos-transmit";
4335                     tailf:cli-no-keyword;
4336                     tailf:cli-drop-node-name;
4337                     tailf:cli-optional-in-sequence;
4338                     tailf:cli-flatten-container;
4339                     leaf table {
4340                         tailf:info "Set packet cos from cos based on table map";
4341                         description "Set packet cos from cos based on table map";
4342                         tailf:cli-optional-in-sequence;
4343                         type string;
4344                         tailf:non-strict-leafref {
4345                             path "/ios:native/table-map/name";
4346                         }
4347                     }
4348                 }
4349                 leaf transmit {
4350                     tailf:info "transmit packet";
4351                     description "transmit packet";
4352                     when "../conform-action";
4353                     tailf:cli-optional-in-sequence;
4354                     type empty;
4355                 }
4356                 // exceed-action
4357                 leaf exceed-action {
4358                     tailf:info "action when rate is within conform and conform + "+
4359                         "exceed burst";
4360                     description "action when rate is within conform and conform + "+
4361                         "exceed burst";
4362                     type empty;
4363                 }
4364                 leaf drop {
4365                     tailf:info "drop packet";
4366                     description "drop packet";
4367                     when "../exceed-action";
4368                     tailf:cli-optional-in-sequence;
4369                     tailf:cli-full-command;
4370                     type empty;
4371                 }
4372                 container exceed-transmit {
4373                     tailf:cli-no-keyword;
4374                     tailf:cli-drop-node-name;
4375                     tailf:cli-optional-in-sequence;
4376                     tailf:cli-flatten-container;
4377                     leaf transmit {
4378                         tailf:info "transmit packet";
4379                         description "transmit packet";
4380                         when "../../exceed-action";
4381                         tailf:cli-optional-in-sequence;
4382                         type empty;
4383                     }
4384                 }
4385             }
4386         }
4387
4388 /// ========================================================================
4389 /// class-map
4390 /// ========================================================================
4391
4392         list class-map {
4393             tailf:info "Configure QoS Class Map";
4394             description "Configure QoS Class Map";
4395             tailf:cli-mode-name "config-cmap";
4396             tailf:cli-suppress-list-no;
4397             tailf:cli-delete-when-empty;
4398             tailf:cli-no-key-completion;
4399             // class-map *
4400             key name;
4401             leaf name {
4402                 type string {
4403                     tailf:info "WORD;;class-map name";
4404                 }
4405                 tailf:cli-disallow-value "type";
4406             }
4407             // class-map * type inspect
4408             leaf "type" {
4409                 tailf:info "type of the class-map";
4410                 description "type of the class-map";
4411                 tailf:cli-prefix-key;
4412                 type enumeration {
4413                     enum access-control {
4414                             tailf:info "access-control specific class-map";
4415                         }
4416                     enum appnav {
4417                         tailf:info "Configure a APPNAV Class Map";
4418                     }
4419                     enum control {
4420                         tailf:info "Configure a control policy class-map";
4421                     }
4422                     enum inspect {
4423                         tailf:info "Configure Firewall Class Map";
4424                     }
4425                     enum multicast-flows {
4426                         tailf:info "multicast class-maps";
4427                     }
4428                     enum stack {
4429                         tailf:info "class-map for protocol header stack specification";
4430                     }
4431                     enum traffic {
4432                         tailf:info "Configure a subscriber policy traffic classmap";
4433                     }
4434                 }
4435             }
4436             // class-map * <protocol>
4437             leaf protocol {
4438                 when "../type = 'inspect'";
4439                 tailf:cli-drop-node-name;
4440                 tailf:cli-prefix-key;
4441                 type enumeration {
4442                     enum aol {
4443                         tailf:info "Configure CBAC class-map for IM-AOL protocol";
4444                     }
4445                     enum edonkey {
4446                         tailf:info "eDonkey";
4447                     }
4448                     enum fasttrack {
4449                         tailf:info "FastTrack Traffic - KaZaA, Morpheus, Grokster...";
4450                     }
4451                     enum gnutella {
4452                         tailf:info "Gnutella Version2 Traffic - BearShare, Shareeza, "
4453                         +"Morpheus ...";
4454                     }
4455                     enum http {
4456                         tailf:info "Configure CBAC class-map for HTTP protocol";
4457                     }
4458                     enum imap {
4459                         tailf:info "Configure CBAC class-map for IMAP protocol";
4460                     }
4461                     enum kazaa2 {
4462                         tailf:info "Kazaa Version 2";
4463                     }
4464                     enum msnmsgr {
4465                         tailf:info "Configure CBAC class-map for IM-MSN protocol";
4466                     }
4467                     enum pop3 {
4468                         tailf:info "Configure CBAC class-map for POP3 protocol";
4469                     }
4470                     enum smtp {
4471                         tailf:info "Configure CBAC class-map for SMTP protocol";
4472                     }
4473                     enum sunrpc {
4474                         tailf:info "Configure CBAC class-map for RPC protocol";
4475                     }
4476                     enum ymsgr {
4477                         tailf:info "Configure CBAC class-map for IM-YAHOO protocol";
4478                     }
4479                 }
4480             }
4481             // class-map * <match-any|match-all>
4482             leaf prematch {
4483                 tailf:cli-no-keyword;
4484                 tailf:cli-prefix-key;
4485                 tailf:cli-drop-node-name;
4486                 type enumeration {
4487                     enum match-all {
4488                         tailf:info "Logical-AND all matching statements under "+
4489                             "this classmap";
4490                     }
4491                     enum match-any {
4492                         tailf:info "Logical-OR all matching statements under this "+
4493                         "classmap";
4494                     }
4495                 }
4496                 mandatory true;
4497             }
4498             // class-map * / description
4499             leaf "description" {
4500                 tailf:info "Class-Map description";
4501                 description "Class-Map description";
4502                 tailf:cli-multi-value;
4503                 type string {
4504                     tailf:info "LINE;;Description of this class-map (up to 200 "+
4505                           "characters)";
4506                 }
4507             }
4508             // class-map * / match
4509             container match {
4510                 tailf:info "classification criteria";
4511                 description "classification criteria";
4512                 uses class-map-match-grouping;
4513                 uses class-map-appnav-match-grouping;
4514                 container not {
4515                     tailf:info "Negate this match result";
4516                     description "Negate this match result";
4517                     uses class-map-match-grouping;
4518                     uses class-map-appnav-not-match-grouping;
4519                 }
4520             }
4521         }
4522
4523 /// ========================================================================
4524 /// policy-map
4525 /// ========================================================================
4526
4527         list policy-map {
4528             tailf:info "Configure QoS Policy Map";
4529             description "Configure QoS Policy Map";
4530             tailf:cli-mode-name "config-pmap";
4531             tailf:cli-diff-dependency "/ios:native/class-map";
4532             tailf:cli-diff-dependency "/ios:native/table-map";
4533             tailf:cli-diff-dependency "/ios:native/mls/qos/aggregate-policer";
4534             tailf:cli-diff-dependency "/ios:native/policer/aggregate";
4535             key name;
4536             leaf name {
4537                 type string {
4538                     tailf:info "WORD;;policy-map name";
4539                 }
4540                 tailf:cli-disallow-value
4541                 "(type)|(http)|(im)|(imap)|(p2p)|(pop3)|(smtp)|(sunrpc)";
4542             }
4543             leaf "type" {
4544                 tailf:info "type of the policy-map";
4545                 description "type of the policy-map";
4546                 tailf:cli-prefix-key;
4547                 type enumeration {
4548                     enum access-control {
4549                         tailf:info "access-control specific policy-map";
4550                     }
4551                     enum appnav {
4552                         tailf:info "Configure a APPNAV Policy Map";
4553                     }
4554                     enum inspect {
4555                          tailf:info "Configure Firewall Policy Map";
4556                     }
4557                     enum packet-service {
4558                         tailf:info "Configure Packet Service Policy Map";
4559                     }
4560                     enum performance-monitor {
4561                         tailf:info "Performance monitoring policy-map type";
4562                     }
4563                     enum service {
4564                         tailf:info "policymap service configuration";
4565                     }
4566                     enum service-chain {
4567                         tailf:info "Configure Service Chain Policy Map";
4568                     }
4569                 }
4570             }
4571             leaf protocol {
4572                 when "../type = 'inspect'";
4573                 tailf:cli-drop-node-name;
4574                 tailf:cli-prefix-key;
4575                 type enumeration {
4576                     enum http {
4577                         tailf:info "Configure CBAC policy-map for HTTP protocol";
4578                     }
4579                     enum im {
4580                         tailf:info "Configure CBAC policy-map for IM protocol";
4581                     }
4582                     enum imap {
4583                         tailf:info "Configure CBAC policy-map for IMAP protocol";
4584                     }
4585                     enum p2p {
4586                         tailf:info "Configure CBAC policy-map for P2P protocols";
4587                     }
4588                     enum pop3 {
4589                         tailf:info "Configure CBAC policy-map for POP3 protocol";
4590                     }
4591                     enum smtp {
4592                         tailf:info "Configure CBAC policy-map for SMTP protocol";
4593                     }
4594                     enum sunrpc {
4595                         tailf:info "Configure CBAC policy-map for RPC protocol";
4596                     }
4597                 }
4598             }
4599             // policy-map * / class *
4600             list class {
4601                 tailf:info "policy criteria";
4602                 description "policy criteria";
4603                 tailf:cli-mode-name "config-pmap-c";
4604                 key name;
4605                 leaf name {
4606                     tailf:cli-disallow-value "type";
4607                     type class-name-type;
4608                 }
4609                 // policy-map * / class * / type
4610                 leaf "type" {
4611                     tailf:info "type of the class-map";
4612                     description "type of the class-map";
4613                     tailf:cli-prefix-key;
4614                     type enumeration {
4615                         enum inspect {
4616                             tailf:info "Configure CBAC Class Map";
4617                         }
4618                     }
4619                 }
4620                 leaf insert-before {
4621                     tailf:info "Insert the class before a specified class";
4622                     description "Insert the class before a specified class";
4623                     tailf:cli-hide-in-submode;
4624                     when "../../type = 'appnav'";
4625                     type string {
4626                         tailf:info "WORD;;Insert the class before a specified class";
4627                     }
4628                 }
4629                 // policy-map * / class * / appnav policy
4630                 container appnav-policy {
4631                     when "../../type = 'appnav'";
4632                     tailf:cli-drop-node-name;
4633                     list distribute {
4634                         tailf:info "Distribute action";
4635                         description "Distribute action";
4636                         tailf:cli-suppress-mode;
4637                         key service-node-group;
4638                         leaf service-node-group {
4639                             tailf:info "Distribute to service-node-group";
4640                             description "Distribute to service-node-group";
4641                             tailf:cli-expose-key-name;
4642                             type string {
4643                                 tailf:info "WORD;;service-node-group name";
4644                             }
4645                         }
4646                         leaf insert-before {
4647                             tailf:info "Insert before specific node";
4648                             description "Insert before specific node";
4649                             tailf:cli-optional-in-sequence;
4650                             type string {
4651                                 tailf:info "WORD;;service-node-group name";
4652                             }
4653                         }
4654                     }
4655                     leaf monitor-load {
4656                         tailf:info "Monitor AO";
4657                         description "Monitor AO";
4658                         when "../distribute";
4659                         type enumeration {
4660                             enum MS-port-mapper {
4661                                 tailf:info "Monitor Microsoft Endpoint Port Mapper load";
4662                             }
4663                             enum cifs {
4664                                 tailf:info "Monitor CIFS Accelerator load";
4665                             }
4666                             enum http {
4667                                 tailf:info "Monitor HTTP Accelerator load";
4668                             }
4669                             enum ica {
4670                                 tailf:info "Monitor ICA Accelerator load";
4671                             }
4672                             enum mapi {
4673                                 tailf:info "Monitor MAPI Accelerator load";
4674                             }
4675                             enum nfs {
4676                                 tailf:info "Monitor NFS Accelerator load";
4677                             }
4678                             enum ssl {
4679                                 tailf:info "Monitor SSL accelerator load";
4680                             }
4681                             enum video {
4682                                 tailf:info "Monitor Video Accelerator load";
4683                             }
4684                         }
4685                     }
4686                     leaf pass-through {
4687                         tailf:info "pass-through action";
4688                         description "pass-through action";
4689                         type empty;
4690                     }
4691                 }
4692                 // policy-map * / class * / inspect policy
4693                 container policy {
4694                     when "../../type = 'inspect'";
4695                     tailf:cli-drop-node-name;
4696                     tailf:cli-sequence-commands {
4697                         tailf:cli-reset-siblings;
4698                     }
4699                     leaf action {
4700                         tailf:cli-drop-node-name;
4701                         tailf:cli-remove-before-change;
4702                         type enumeration {
4703                             enum cxsc {
4704                                 tailf:info "CXSC Inspection";
4705                             }
4706                             enum drop {
4707                                 tailf:info "Drop the packet";
4708                             }
4709                             enum inspect {
4710                                 tailf:info "Context-based Access Control Engine";
4711                             }
4712                             enum pass {
4713                                 tailf:info "Pass the packet";
4714                             }
4715                             enum service-policy {
4716                                 tailf:info "Deep Packet Inspection Engine";
4717                             }
4718                         }
4719                     }
4720                     leaf log {
4721                         tailf:info "Send logging message for drop or pass";
4722                         description "Send logging message for drop or pass";
4723                         when "../action = 'drop'or ../action = 'pass'";
4724                         type empty;
4725                     }
4726                     leaf parameter-map {
4727                         tailf:cli-drop-node-name;
4728                         when "../action = 'inspect' or ../action = 'cxsc'";
4729                         type string;
4730                         tailf:non-strict-leafref {
4731                             path "/ios:native/parameter-map/name";
4732                         }
4733                     }
4734                     container dpi {
4735                         tailf:cli-drop-node-name;
4736                         when "../action = 'service-policy'";
4737                         tailf:cli-sequence-commands;
4738                         tailf:cli-compact-syntax;
4739                         leaf type {
4740                             tailf:cli-drop-node-name;
4741                             type enumeration {
4742                                 enum gtpv0 {
4743                                     tailf:info "GTPv0 DPI";
4744                                 }
4745                                 enum gtpv1 {
4746                                     tailf:info "GTPv1 DPI";
4747                                 }
4748                                 enum imap {
4749                                     tailf:info "IMAP DPI";
4750                                 }
4751                                 enum pop3 {
4752                                     tailf:info "POP3 DPI";
4753                                 }
4754                                 enum smtp {
4755                                     tailf:info "SMTP DPI";
4756                                 }
4757                                 enum sunrpc {
4758                                     tailf:info "RPC DPI";
4759                                 }
4760                             }
4761                         }
4762                         leaf policy-map {
4763                             tailf:cli-drop-node-name;
4764                             type string {
4765                                 tailf:info "WORD;;DPI policy-map name";
4766                             }
4767                         }
4768                     }
4769                 }
4770                 // policy-map * / class * / performance-monitor policy
4771                 container pm-policy {
4772                     when "../../type = 'performance-monitor'";
4773                         tailf:cli-drop-node-name;
4774                     container flow {
4775                         tailf:info "Flow subcommands";
4776                         description "Flow subcommands";
4777                         leaf monitor {
4778                             tailf:info "Apply a Flow Monitor";
4779                             description "Apply a Flow Monitor";
4780                             type string {
4781                                 tailf:info "WORD;;Flow monitor name";
4782                             }
4783                         }
4784                     }
4785                     container monitor {
4786                         tailf:info "Monitor related parameters";
4787                         description "Monitor related parameters";
4788                         container metric {
4789                             tailf:info "Monitor metric";
4790                             description "Monitor metric";
4791                             container rtp {
4792                                 tailf:info "RTP metrics parameters";
4793                                 description "RTP metrics parameters";
4794                                 tailf:cli-add-mode;
4795                                 tailf:cli-mode-name "config-pmap-c-mrtp";
4796                                 list clock-rate {
4797                                     tailf:info "RTP timestamp field's sampling frequency";
4798                                     description "RTP timestamp field's sampling frequency";
4799                                     tailf:cli-suppress-mode;
4800                                     tailf:cli-sequence-commands;
4801                                     tailf:cli-compact-syntax;
4802                                     key number;
4803                                     leaf number {
4804                                         type union {
4805                                             type uint8 {
4806                                                 tailf:info "<0-127>;;payload type number";
4807                                                 range "0..127";
4808                                             }
4809                                             type enumeration {
4810                                                 enum celb {
4811                                                     tailf:info "CELB(25)";
4812                                                 }
4813                                                 enum cn {
4814                                                     tailf:info "CN(13)";
4815                                                 }
4816                                                 enum default {
4817                                                     tailf:info "Change the default clock rate for all the dynamic payload type";
4818                                                 }
4819                                                 enum dvi4 {
4820                                                     tailf:info "DVI4 RFC-3551 8000Hz(5)";
4821                                                 }
4822                                                 enum dvi4-2 {
4823                                                     tailf:info "DVI4 RFC-3551 16000Hz(6)";
4824                                                 }
4825                                                 enum dvi4-3 {
4826                                                     tailf:info "DVI4 Dipol 11025Hz(16)";
4827                                                 }
4828                                                 enum dvi4-4 {
4829                                                     tailf:info "DVI4 Dipol 22050Hz(17)";
4830                                                 }
4831                                                 enum g722 {
4832                                                     tailf:info "G722(9)";
4833                                                 }
4834                                                 enum g723 {
4835                                                     tailf:info "G723(4)";
4836                                                 }
4837                                                 enum g728 {
4838                                                     tailf:info "G728(15)";
4839                                                 }
4840                                                 enum g729 {
4841                                                     tailf:info "G729(18)";
4842                                                 }
4843                                                 enum gsm {
4844                                                     tailf:info "GSM(3)";
4845                                                 }
4846                                                 enum h261 {
4847                                                     tailf:info "H261(31)";
4848                                                 }
4849                                                 enum h263 {
4850                                                     tailf:info "H263(34)";
4851                                                 }
4852                                                 enum jpeg {
4853                                                     tailf:info "JPEG(26)";
4854                                                 }
4855                                                 enum l16 {
4856                                                     tailf:info "L16 channel 1(11)";
4857                                                 }
4858                                                 enum l16-2 {
4859                                                     tailf:info "L16 channel 2(10)";
4860                                                 }
4861                                                 enum lpc {
4862                                                     tailf:info "LPC(7)";
4863                                                 }
4864                                                 enum mp2t {
4865                                                     tailf:info "MP2T(33)";
4866                                                 }
4867                                                 enum mpa {
4868                                                     tailf:info "MPA(14)";
4869                                                 }
4870                                                 enum mpv {
4871                                                     tailf:info "MPV(32)";
4872                                                 }
4873                                                 enum nv {
4874                                                     tailf:info "NV(28)";
4875                                                 }
4876                                                 enum pcma {
4877                                                     tailf:info "PCMA(8)";
4878                                                 }
4879                                                 enum pcmu {
4880                                                     tailf:info "PCMU(0)";
4881                                                 }
4882                                                 enum qcelp {
4883                                                     tailf:info "QCELP(12)";
4884                                                 }
4885                                             }
4886                                         }
4887                                     }
4888                                     leaf frequency {
4889                                         tailf:cli-drop-node-name;
4890                                         type uint32 {
4891                                             tailf:info "<1000-192000>;;frequency in Hz";
4892                                             range "1000..192000";
4893                                         }
4894                                     }
4895                                 }
4896                             }
4897                         }
4898                     }
4899                     list react {
4900                         tailf:info "Configure threshold crossing actions";
4901                         description "Configure threshold crossing actions";
4902                         tailf:cli-mode-name "config-pmap-c-react";
4903                         key id;
4904                         leaf id {
4905                             type uint16 {
4906                                 tailf:info "<1-65535>  React instance id";
4907                             }
4908                         }
4909                         leaf mode {
4910                             tailf:cli-drop-node-name;
4911                             tailf:cli-hide-in-submode;
4912                             type enumeration {
4913                                 enum media-stop {
4914                                     tailf:info "Media stream stopped";
4915                                 }
4916                                 enum  mrv {
4917                                     tailf:info "Variation in packet rate from configured expected rate";
4918                                 }
4919                                 enum rtp-jitter-average {
4920                                     tailf:info "Mean jitter for the RTP stream";
4921                                 }
4922                                 enum transport-packets-lost-rate {
4923                                     tailf:info "Ratio of lost packets to total reaceived packets";
4924                                 }
4925                             }
4926                         }
4927                         leaf description {
4928                             tailf:info "Description for threshold crossing action instance";
4929                             description "Description for the instance";
4930                             tailf:cli-multi-value;
4931                             type string;
4932                         }
4933                         container action {
4934                             tailf:info "Config react action";
4935                             description "Config react action";
4936                             leaf snmp {
4937                                 tailf:info "SNMP is notified of the event";
4938                                 description "SNMP is notified of the event";
4939                                 tailf:cli-full-command;
4940                                 type empty;
4941                             }
4942                             leaf syslog {
4943                                 tailf:info "The threshold-crossing event is logged to syslog";
4944                                 description "The threshold-crossing event is logged to syslog";
4945                                 tailf:cli-full-command;
4946                                 type empty;
4947                              }
4948                         }
4949                         container alarm {
4950                             tailf:info "Config react alarm";
4951                             description "Config react alarm";
4952                             leaf severity {
4953                                 tailf:info "Alarm severity - default level none";
4954                                 description "Alarm severity - default level none";
4955                                 type enumeration {
4956                                     enum alert {
4957                                         tailf:info "TCA severity level critical (severity = 2)";
4958                                     }
4959                                     enum critical {
4960                                         tailf:info "TCA severity level major (severity = 3)";
4961                                     }
4962                                     enum emergency {
4963                                         tailf:info "TCA severity level critical (severity = 1)";
4964                                     }
4965                                     enum error {
4966                                         tailf:info "TCA severity level minor (severity = 4)";
4967                                     }
4968                                     enum info {
4969                                         tailf:info "TCA severity level default (severity = 5)";
4970                                     }
4971                                 }
4972                             }
4973                             container type {
4974                                 tailf:info "Alarm raised type - for each flow or a group";
4975                                 description "Alarm raised type - for each flow or a group";
4976                                 leaf discrete {
4977                                     tailf:info "Alert for each flow within the class";
4978                                     description "Alert for each flow within the class";
4979                                     tailf:cli-full-command;
4980                                     type empty;
4981                                 }
4982                                 container grouped {
4983                                     tailf:info "Alert if more than one flow cross the threshold";
4984                                     description "Alert if more than one flow cross the threshold";
4985                                     leaf count {
4986                                         tailf:info "Number of flows in the group cross the threshold";
4987                                         description "Number of flows in the group cross the threshold";
4988                                         tailf:cli-full-command;
4989                                         type uint16 {
4990                                             tailf:info "<1-65535>;;Number of flows";
4991                                         }
4992                                     }
4993                                    leaf percent {
4994                                         tailf:info "Percent of flows in the group cross the threshold";
4995                                         description "Percent of flows in the group cross the threshold";
4996                                         tailf:cli-full-command;
4997                                         type uint8 {
4998                                             tailf:info "<1-100>;;Percent of flows";
4999                                             range "1..100";
5000                                         }
5001                                     }
5002                                 }
5003                             }
5004                         }
5005                         container threshold {
5006                             tailf:info "Config react threshold";
5007                             description "Config react threshold";
5008                             container value {
5009                                 tailf:info "Range of percentage loss that would trigger the alarm";
5010                                 description "Range of percentage loss that would trigger the alarm";
5011                                 leaf ge {
5012                                     tailf:info "greater and equal to";
5013                                     description "greater and equal to";
5014                                     tailf:cli-full-command;
5015                                     type string {
5016                                         tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)";
5017                                     }
5018                                 }
5019                                 leaf gt {
5020                                     tailf:info "greater than";
5021                                     description "greater than";
5022                                     tailf:cli-full-command;
5023                                     type string {
5024                                         tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)";
5025                                     }
5026                                 }
5027                                 leaf le {
5028                                     tailf:info "less and equal to";
5029                                     description "less and equal to";
5030                                     tailf:cli-full-command;
5031                                     type string {
5032                                         tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)";
5033                                     }
5034                                 }
5035                                 leaf lt {
5036                                     tailf:info "less than";
5037                                     description "less than";
5038                                     tailf:cli-full-command;
5039                                     type string {
5040                                         tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)";
5041                                     }
5042                                 }
5043                                 container range {
5044                                     tailf:info "threshold within the range of";
5045                                     description "threshold within the range of";
5046                                     tailf:cli-sequence-commands;
5047                                     tailf:cli-compact-syntax;
5048                                     leaf low {
5049                                         tailf:cli-drop-node-name;
5050                                         type string {
5051                                             tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)";
5052                                         }
5053                                     }
5054                                     leaf high {
5055                                         tailf:cli-drop-node-name;
5056                                         type string {
5057                                             tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)";
5058                                         }
5059                                     }
5060                                 }
5061                             }
5062                         }
5063                     }
5064                 }
5065                 // policy-map * / class * / inspect-police
5066                 container inspect-police {
5067                     when "../policy/action = 'inspect'";
5068                     tailf:cli-drop-node-name;
5069                     container police {
5070                         tailf:info "Police";
5071                         description "Police";
5072                         tailf:cli-sequence-commands {
5073                             tailf:cli-reset-siblings;
5074                         }
5075                         tailf:cli-compact-syntax;
5076                         leaf rate {
5077                             tailf:info "Specify police rate";
5078                             description "Specify police rate";
5079                             type uint32 {
5080                                 tailf:info "<8000-2000000000>;;Rate value in bps";
5081                                 range "8000..2000000000";
5082                             }
5083                         }
5084                         leaf burst {
5085                             tailf:info "Specify 'burst' parameter";
5086                             description "Specify 'burst' parameter";
5087                             type uint32 {
5088                                 tailf:info "<1000-512000000>;;Burst value in bytes";
5089                                 range "1000..512000000";
5090                             }
5091                         }
5092                     }
5093                 }
5094                 list action-list {
5095                     tailf:cli-drop-node-name;
5096                     tailf:cli-suppress-mode;
5097                     key action-type;
5098                     ordered-by user;
5099                     leaf action-type {
5100                         type policy-action-type;
5101                     }
5102                     choice action-param {
5103                         case bandwidth-case {
5104                             // policy-map * / class * / bandwidth
5105                             container bandwidth {
5106                                 //tailf:info "Bandwidth";
5107                                 tailf:cli-drop-node-name;
5108                                 when "../action-type = 'bandwidth'";
5109                                 leaf bits {
5110                                     tailf:cli-drop-node-name;
5111                                     type uint32 {
5112                                         range "8..2000000";
5113                                         tailf:info "<8-2000000>;;Kilo Bits per second";
5114                                     }
5115                                 }
5116                                 leaf percent {
5117                                     tailf:info "% of total Bandwidth";
5118                                     description "% of total Bandwidth";
5119                                     type percentage-type;
5120                                 }
5121                                 container remaining {
5122                                     tailf:info "% of the remaining bandwidth";
5123                                     description "% of the remaining bandwidth";
5124                                     leaf percent {
5125                                         tailf:info "% of the remaining bandwidth";
5126                                         description "% of the remaining bandwidth";
5127                                         type percentage-type;
5128                                     }
5129                                     leaf ratio {
5130                                         tailf:info "ratio for sharing excess bandwidth";
5131                                         description "ratio for sharing excess bandwidth";
5132                                         type uint16 {
5133                                             tailf:info "<1-65536>;;Ratio";
5134                                         }
5135                                     }
5136                                 }
5137                             }
5138                         }
5139                         case compression-case {
5140                             // policy-map * / class * / compression
5141                             container compression {
5142                                 //tailf:info "Activate Compression";
5143                                 tailf:cli-drop-node-name;
5144                                 //presence "Activate Compression";
5145                                 when "../action-type = 'compression'";
5146                                 container header {
5147                                     tailf:info "configure header compression";
5148                                     description "configure header compression";
5149                                     presence "configure header compression";
5150                                     leaf ip {
5151                                         tailf:info "configure ip header compression";
5152                                         description "configure ip header compression";
5153                                         type enumeration {
5154                                             enum rtp {
5155                                                 tailf:code-name "header_rtp";
5156                                                 tailf:info "configure rtp header compression";
5157                                             }
5158                                             enum tcp {
5159                                                 tailf:info "configure tcp header compression";
5160                                             }
5161                                         }
5162                                     }
5163                                 }
5164                             }
5165                         }
5166                         //case drop-case {
5167                             // policy-map * / class * / drop
5168                             //leaf drop {
5169                                 //tailf:info "Drop all packets";
5170                                 // tailf:cli-full-command;
5171                                 //type empty;
5172                             //}
5173                         //}
5174                         case estimate-case {
5175                             // policy-map * / class * / estimate
5176                             container estimate {
5177                                 //tailf:info "estimate resources required for this class";
5178                                 tailf:cli-drop-node-name;
5179                                 when "../action-type = 'estimate'";
5180                                 container bandwidth {
5181                                     presence "bandwidth required to service this class";
5182                                     tailf:info "bandwidth required to service this class";
5183                                     description "bandwidth required to service this class";
5184                                     tailf:cli-sequence-commands;
5185                                     tailf:cli-compact-syntax;
5186                                     container delay-one-in {
5187                                         tailf:info "specify QoS target delay";
5188                                         description "specify QoS target delay";
5189                                         tailf:cli-compact-syntax;
5190                                         tailf:cli-sequence-commands;
5191                                         leaf doi {
5192                                             tailf:cli-drop-node-name;
5193                                             tailf:cli-incomplete-command;
5194                                             type uint32 {
5195                                                 range "50..1000000";
5196                                                 tailf:info "<50-1000000>;;delay one packet "+
5197                                                     "of N";
5198                                             }
5199                                         }
5200                                         leaf milliseconds {
5201                                             type uint32 {
5202                                                 range "8..1000" {
5203                                                     tailf:info "<8-1000>;;worst-case "+
5204                                                         "milliseconds of delay";
5205                                                 }
5206                                             }
5207                                         }
5208                                     }
5209                                     leaf drop-one-in {
5210                                         tailf:info "specify QoS target loss rate";
5211                                         description "specify QoS target loss rate";
5212                                         type uint32 {
5213                                             tailf:info "<50-1000000>;;drop one packet of N";
5214                                         }
5215                                     }
5216                                 }
5217                             }
5218                         }
5219                         case forward-case {
5220                             //policy-map * / class * / forward service-path
5221                             container forward {
5222                                 //tailf:info "forward service-path action";
5223                                 tailf:cli-reset-container;
5224                                 tailf:cli-drop-node-name;
5225                                 when "../action-type = 'forward'";
5226                                 list service-path {
5227                                     tailf:info "Service Path Entries";
5228                                     description "Service Path Entries";
5229                                     tailf:cli-suppress-mode;
5230                                     key "service-path-id";
5231                                     leaf service-path-id {
5232                                         type uint32 {
5233                                             range "0..16777215";
5234                                             tailf:info "<0-16777215>;;Service Path ID";
5235                                         }
5236                                     }
5237                                     leaf service-index {
5238                                         tailf:info "Service Index";
5239                                         description "Service Index";
5240                                         type uint8 {
5241                                             range "2..255";
5242                                             tailf:info "<2-255>;;Service Index ID";
5243                                         }
5244                                     }
5245                                 }
5246                             }
5247                         }
5248                         case fair-queue-case {
5249                             // policy-map * / class * / fair-queue
5250                             // class-default: fair-queue [number-of-dynamic-queues]
5251                             // DWFQ: fair-queue
5252                             // policy-map: fair-queue [queue-limit queue-value]
5253                             // NOT SUPPORTED:
5254                             // air-queue [congestive-discard-threshold [dynamic-q [reservable-q]]]
5255                             container fair-queue {
5256                                 //tailf:info "Enable Flow-based Fair Queuing in this Class";
5257                                 tailf:cli-reset-container;
5258                                 tailf:cli-drop-node-name;
5259                                 when "../action-type = 'fair-queue'";
5260                                 leaf dynamic-queues {
5261                                     tailf:cli-drop-node-name;
5262                                     tailf:cli-full-command;
5263                                     type uint32 {
5264                                         range "16|32|64|128|256|512|1024|2048|4096" {
5265                                         tailf:info "<16-4096>;;Number Dynamic Conversation "+
5266                                             "Queues";
5267                                         }
5268                                     }
5269                                 }
5270                                 leaf queue-limit {
5271                                     tailf:info "per flow queue limit";
5272                                     description "per flow queue limit";
5273                                     tailf:cli-full-command;
5274                                     type uint16 {
5275                                         tailf:info "<1-32768>;;packets";
5276                                         range "1..32768";
5277                                     }
5278                                 }
5279                             }
5280                         }
5281                         case netflow-sampler-case {
5282                             // policy-map * / class * / netflow-sampler
5283                             leaf netflow-sampler {
5284                                 //tailf:info "NetFlow action";
5285                                 tailf:cli-drop-node-name;
5286                                 tailf:cli-full-command;
5287                                 when "../action-type = 'netflow-sampler'";
5288                                 // should be leafref to sampler
5289                                 type string {
5290                                     tailf:info "WORD;;Name of the flow sampler";
5291                                 }
5292                             }
5293                         }
5294                         case police-case {
5295                             // policy-map * / class * / police ?
5296                             choice police-choice {
5297                                 // policy-map * / class * / police aggregate
5298                                 case police-aggregate-case {
5299                                     container police-aggregate {
5300                                         tailf:cli-no-keyword;
5301                                         tailf:cli-drop-node-name;
5302                                         container police {
5303                                             //tailf:info "Police";
5304                                             tailf:cli-drop-node-name;
5305                                             when "../../action-type = 'police'" {
5306                                                 tailf:dependency "../../action-type";
5307                                             }
5308                                             leaf aggregate {
5309                                                 tailf:info "Choose aggregate policer for current class";
5310                                                 description "Choose aggregate policer for current class";
5311                                                 type string {
5312                                                     tailf:info "WORD;;enter aggregate-policer name";
5313                                                 }
5314                                             }
5315                                         }
5316                                     }
5317                                 }
5318                                 // police (policy-map)
5319                                 // police cir <bps> [[bc <burst-normal>] [be <burst-max>]]
5320                                 //        [pir <bps> [be <burst-bytes>]] ACTIONS
5321                                 // NOTE: cir, bc & be keywords are mandatory in this model.
5322                                 //       Java code will add missing cir,bc and be in show().
5323                                 case police-policy-map-case {
5324                                     container police-policy-map {
5325                                         tailf:cli-no-keyword;
5326                                         tailf:cli-drop-node-name;
5327                                         container police {
5328                                             tailf:cli-add-mode;
5329                                             tailf:cli-mode-name "config-pmap-c-police";
5330                                             tailf:cli-flatten-container;
5331                                             tailf:cli-sequence-commands {
5332                                                 tailf:cli-reset-siblings;
5333                                             }
5334                                             tailf:cli-drop-node-name;
5335                                             when "../../action-type = 'police'" {
5336                                                 tailf:dependency "../../action-type";
5337                                             }
5338                                             // cir <bps>
5339                                             leaf cir {
5340                                                 tailf:info "Committed information rate";
5341                                                 description "Committed information rate";
5342                                                 tailf:cli-hide-in-submode;
5343                                                 type police-bps-type;
5344                                             }
5345                                             // [bc <burst-normal>]
5346                                             leaf bc {
5347                                                 tailf:info "Conform burst";
5348                                                 description "Conform burst";
5349                                                 tailf:cli-optional-in-sequence;
5350                                                 tailf:cli-hide-in-submode;
5351                                                 type police-burst-type;
5352                                             }
5353                                             // [be <burst-max>]
5354                                             leaf be {
5355                                                 when "../bc";
5356                                                 tailf:info "Excess burst";
5357                                                 description "Excess burst";
5358                                                 tailf:cli-optional-in-sequence;
5359                                                 tailf:cli-hide-in-submode;
5360                                                 type police-burst-type;
5361                                             }
5362                                              // [pir <bps> [be <burst-bytes>]]
5363                                             leaf pir {
5364                                                 tailf:info "Peak Information Rate";
5365                                                 description "Peak Information Rate";
5366                                                 tailf:cli-optional-in-sequence;
5367                                                 tailf:cli-hide-in-submode;
5368                                                 type police-bps-type;
5369                                             }
5370                                             container pir-be {
5371                                                 when "../pir";
5372                                                 tailf:cli-no-keyword;
5373                                                 tailf:cli-drop-node-name;
5374                                                 tailf:cli-optional-in-sequence;
5375                                                 tailf:cli-flatten-container;
5376                                                 tailf:cli-hide-in-submode;
5377                                                 leaf be {
5378                                                     tailf:info "Excess burst";
5379                                                     description "Excess burst";
5380                                                     type police-burst-type;
5381                                                 }
5382                                             }
5383                                             // conform-action | exceed-action | violate-action
5384                                             uses police-action-grouping;
5385                                         }
5386                                     }
5387                                 }
5388                                 // police cir percent (combo of percent & policy-map versions)
5389                                 // police cir percent <percentage>
5390                                 //    [bc] <burst> ms] [be [<burst> ms]
5391                                 //    [pir percent <percentage> [be <burst> ms]] ACTIONS
5392                                 case police-cir-percent-case {
5393                                     container police-cir-percent {
5394                                         tailf:cli-no-keyword;
5395                                         tailf:cli-drop-node-name;
5396                                         container police {
5397                                             tailf:cli-drop-node-name;
5398                                             when "../../action-type = 'police'" {
5399                                                 tailf:dependency "../../action-type";
5400                                             }
5401                                             container cir {
5402                                                 tailf:info "Committed information rate";
5403                                                 description "Committed information rate";
5404                                                 container percent {
5405                                                     tailf:info "% of interface bandwidth for Committed "+
5406                                                      "information rate";
5407                                                     description "% of interface bandwidth for Committed "+
5408                                                     "information rate";
5409                                                     tailf:cli-add-mode;
5410                                                     tailf:cli-mode-name "config-pmap-c-police";
5411                                                     tailf:cli-incomplete-command;
5412                                                     tailf:cli-flatten-container;
5413                                                     tailf:cli-sequence-commands {
5414                                                         tailf:cli-reset-siblings;
5415                                                     }
5416                                                     // percent <percentage>
5417                                                     leaf percentage {
5418                                                         tailf:cli-drop-node-name;
5419                                                         tailf:cli-hide-in-submode;
5420                                                         type percentage-type;
5421                                                     }
5422                                                     // [bc <burst> ms]
5423                                                     leaf bc {
5424                                                         tailf:info "Conform burst";
5425                                                         description "Conform burst";
5426                                                         tailf:cli-optional-in-sequence;
5427                                                         tailf:cli-hide-in-submode;
5428                                                         type uint16 {
5429                                                             tailf:info "<1-2000>;;Burst ms";
5430                                                         }
5431                                                     }
5432                                                     container bc-ms {
5433                                                         when "../bc";
5434                                                         tailf:cli-no-keyword;
5435                                                         tailf:cli-drop-node-name;
5436                                                         tailf:cli-optional-in-sequence;
5437                                                         tailf:cli-hide-in-submode;
5438                                                         tailf:cli-compact-syntax;
5439                                                         tailf:cli-flatten-container;
5440                                                         leaf ms {
5441                                                             tailf:info "Milli seconds";
5442                                                             description "Milli seconds";
5443                                                             tailf:cli-no-keyword;
5444                                                             type empty;
5445                                                         }
5446                                                     }
5447                                                     // [be [<burst> ms]
5448                                                     leaf be {
5449                                                         when "../bc-ms/ms" {
5450                                                             tailf:dependency "../bc-ms/ms";
5451                                                         }
5452                                                         tailf:info "Excess burst";
5453                                                         tailf:cli-optional-in-sequence;
5454                                                         tailf:cli-hide-in-submode;
5455                                                         type uint16 {
5456                                                             tailf:info "<1-2000>;;Burst ms";
5457                                                         }
5458                                                     }
5459                                                     container be-ms {
5460                                                         when "../be";
5461                                                         tailf:cli-no-keyword;
5462                                                         tailf:cli-drop-node-name;
5463                                                         tailf:cli-hide-in-submode;
5464                                                         tailf:cli-compact-syntax;
5465                                                         tailf:cli-flatten-container;
5466                                                         leaf ms {
5467                                                             tailf:info "Milli seconds";
5468                                                             description "Milli seconds";
5469                                                             tailf:cli-no-keyword;
5470                                                             type empty;
5471                                                         }
5472                                                     }
5473                                                     // [pir percent <percentage> [be <burst> ms]]
5474                                                     container pir {
5475                                                         tailf:info "Peak Information Rate";
5476                                                         description "Peak Information Rate";
5477                                                         tailf:cli-compact-syntax;
5478                                                         tailf:cli-flatten-container;
5479                                                         tailf:cli-hide-in-submode;
5480                                                         tailf:cli-optional-in-sequence;
5481                                                         leaf percent {
5482                                                             tailf:info "% of interface bandwidth for Peak "+
5483                                                                 "Information Rate";
5484                                                             description "% of interface bandwidth for Peak "+
5485                                                                 "Information Rate";
5486                                                             type percentage-type;
5487                                                         }
5488                                                     }
5489                                                     container pir-be {
5490                                                         when "../pir";
5491                                                         tailf:cli-no-keyword;
5492                                                         tailf:cli-drop-node-name;
5493                                                         tailf:cli-optional-in-sequence;
5494                                                         tailf:cli-flatten-container;
5495                                                         tailf:cli-hide-in-submode;
5496                                                         leaf be {
5497                                                             tailf:info "Excess burst";
5498                                                             description "Excess burst";
5499                                                             type uint16 {
5500                                                                 tailf:info "<1-2000>;;Burst ms";
5501                                                             }
5502                                                         }
5503                                                     }
5504                                                     container pir-be-ms {
5505                                                         when "../pir-be/be" {
5506                                                            tailf:dependency "../pir-be/be";
5507                                                         }
5508                                                         tailf:cli-no-keyword;
5509                                                         tailf:cli-drop-node-name;
5510                                                         tailf:cli-optional-in-sequence;
5511                                                         tailf:cli-hide-in-submode;
5512                                                         tailf:cli-flatten-container;
5513                                                         leaf ms {
5514                                                             tailf:info "Milli seconds";
5515                                                             description "Milli seconds";
5516                                                             tailf:cli-no-keyword;
5517                                                             type empty;
5518                                                         }
5519                                                     }
5520                                                     // conform-action | exceed-action | violate-action
5521                                                     uses police-action-grouping;
5522                                                 }
5523                                             }
5524                                         }
5525                                     }
5526                                 }
5527                                 // police rate (control-plane)
5528                                 // police rate <units> <pps|bps> [burst <burst-in-x> <packets|bytes>]
5529                                 //   [peak-rate <peak-rate-in-xps> <pps|bps>]
5530                                 //   [peak-burst <peak-burst-in-x> <packets|bytes>]
5531                                 //   [conform-action <action>]
5532                                 case police-rate-unit-case {
5533                                     container police-rate-unit {
5534                                         tailf:cli-no-keyword;
5535                                         tailf:cli-drop-node-name;
5536                                         container police {
5537                                             tailf:cli-drop-node-name;
5538                                             when "../../action-type = 'police'" {
5539                                                 tailf:dependency "../../action-type";
5540                                             }
5541                                             container rate {
5542                                                 tailf:info "Specify police rate";
5543                                                 description "Specify police rate";
5544                                                 tailf:cli-add-mode;
5545                                                 tailf:cli-mode-name "config-pmap-c-police";
5546                                                 tailf:cli-flatten-container;
5547                                                 tailf:cli-sequence-commands {
5548                                                     tailf:cli-reset-siblings;
5549                                                 }
5550                                                 // <units>
5551                                                 leaf "units" {
5552                                                     tailf:cli-drop-node-name;
5553                                                     tailf:cli-hide-in-submode;
5554                                                     type uint64 {
5555                                                     tailf:info "<1-2000000000>;;Rate value in the range "+
5556                                                          "8000-2,000,000,000 bps or 1-2,000,000 pps";
5557                                                     }
5558                                                 }
5559                                                 // <pps|bps>
5560                                                 leaf xps {
5561                                                     tailf:cli-no-keyword;
5562                                                     tailf:cli-drop-node-name;
5563                                                     tailf:cli-hide-in-submode;
5564                                                     type police-pps-bps-type;
5565                                                 }
5566                                                 // [burst <burst-in-x> <packets|bytes>]
5567                                                 container burst {
5568                                                     tailf:info "Specify 'burst' parameter";
5569                                                     description "Specify 'burst' parameter";
5570                                                     tailf:cli-optional-in-sequence;
5571                                                     tailf:cli-compact-syntax;
5572                                                     tailf:cli-hide-in-submode;
5573                                                     tailf:cli-flatten-container;
5574                                                     tailf:cli-sequence-commands;
5575                                                     leaf burst-value {
5576                                                         tailf:cli-no-keyword;
5577                                                         tailf:cli-drop-node-name;
5578                                                         tailf:cli-incomplete-command;
5579                                                         type uint32 {
5580                                                             tailf:info "<1-512000000>;;Burst value in "+
5581                                                                 "packets/bytes";
5582                                                         }
5583                                                     }
5584                                                     leaf burst-type {
5585                                                         tailf:cli-no-keyword;
5586                                                         tailf:cli-drop-node-name;
5587                                                         tailf:cli-hide-in-submode;
5588                                                         type police-packets-bytes-type;
5589                                                     }
5590                                                 }
5591                                                 // [peak-rate <peak-rate-in-xps> <pps|bps>]
5592                                                 container peak-rate {
5593                                                     tailf:info "Specify peak rate";
5594                                                     description "Specify peak rate";
5595                                                     tailf:cli-optional-in-sequence;
5596                                                     tailf:cli-compact-syntax;
5597                                                     tailf:cli-flatten-container;
5598                                                     tailf:cli-hide-in-submode;
5599                                                     tailf:cli-sequence-commands;
5600                                                     leaf peak-rate-value {
5601                                                         tailf:cli-no-keyword;
5602                                                         tailf:cli-drop-node-name;
5603                                                         tailf:cli-incomplete-command;
5604                                                         type uint32 {
5605                                                             tailf:info "<1-512000000>;;Peak-rate value in "+
5606                                                                 "packets or bytes per second";
5607                                                             range "1..512000000";
5608                                                         }
5609                                                     }
5610                                                     leaf xps {
5611                                                         tailf:cli-no-keyword;
5612                                                         tailf:cli-drop-node-name;
5613                                                         type police-pps-bps-type;
5614                                                     }
5615                                                 }
5616                                                 // [peak-burst <peak-burst-in-x> <packets|bytes>]
5617                                                 container peak-burst {
5618                                                     tailf:info "Specify 'peak-burst' parameter for peak-rate";
5619                                                     description "Specify 'peak-burst' parameter for peak-rate";
5620                                                     tailf:cli-optional-in-sequence;
5621                                                     tailf:cli-compact-syntax;
5622                                                     tailf:cli-flatten-container;
5623                                                     tailf:cli-hide-in-submode;
5624                                                     tailf:cli-sequence-commands;
5625                                                     leaf burst-value {
5626                                                         tailf:cli-no-keyword;
5627                                                         tailf:cli-drop-node-name;
5628                                                         tailf:cli-incomplete-command;
5629                                                         type uint32 {
5630                                                             tailf:info "<1-512000000>;;Burst value in "+
5631                                                                 "packets/bytes";
5632                                                         }
5633                                                     }
5634                                                     leaf burst-type {
5635                                                         tailf:cli-no-keyword;
5636                                                         tailf:cli-drop-node-name;
5637                                                         type police-packets-bytes-type;
5638                                                     }
5639                                                 }
5640                                                 // conform-action | exceed-action | violate-action
5641                                                 uses police-action-grouping;
5642                                             }
5643                                         }
5644                                     }
5645                                 }
5646                                 // police rate percent (control-plane)
5647                                 // police rate percent <percentage> [burst <ms> ms]
5648                                 //    [peak-rate percent <percentage>] [peak-burst <ms> ms]
5649                                 case police-rate-percent-case {
5650                                     container police-rate-percent {
5651                                         tailf:cli-no-keyword;
5652                                         tailf:cli-drop-node-name;
5653                                         container police {
5654                                             tailf:cli-drop-node-name;
5655                                             when "../../action-type = 'police'" {
5656                                                 tailf:dependency "../../action-type";
5657                                             }
5658                                             container rate {
5659                                                 tailf:info "Specify police rate";
5660                                                 description "Specify police rate";
5661                                                 container percent {
5662                                                     tailf:info "% of interface bandwidth for rate";
5663                                                     description "% of interface bandwidth for rate";
5664                                                     tailf:cli-add-mode;
5665                                                     tailf:cli-mode-name "config-pmap-c-police";
5666                                                     tailf:cli-flatten-container;
5667                                                     tailf:cli-sequence-commands {
5668                                                         tailf:cli-reset-siblings;
5669                                                     }
5670                                                     // <percentage>
5671                                                     leaf percentage {
5672                                                         tailf:cli-drop-node-name;
5673                                                         tailf:cli-hide-in-submode;
5674                                                         type percentage-type;
5675                                                     }
5676                                                     // [burst <ms> ms]
5677                                                     leaf burst {
5678                                                         tailf:info "Specify 'burst' parameter";
5679                                                         description "Specify 'burst' parameter";
5680                                                         tailf:cli-optional-in-sequence;
5681                                                         tailf:cli-hide-in-submode;
5682                                                         type uint16 {
5683                                                             tailf:info "<1-2000>;;Burst value in milliseconds";
5684                                                         }
5685                                                     }
5686                                                     leaf ms {
5687                                                         when "../burst";
5688                                                         tailf:info "Treat 'burst' value in milliseconds";
5689                                                         description "Treat 'burst' value in milliseconds";
5690                                                         tailf:cli-hide-in-submode;
5691                                                         type empty;
5692                                                     }
5693                                                     // [peak-rate percent <percentage>]
5694                                                     container peak-rate {
5695                                                         tailf:info "Specify peak rate";
5696                                                         description "Specify peak rate";
5697                                                         tailf:cli-hide-in-submode;
5698                                                         tailf:cli-optional-in-sequence;
5699                                                         tailf:cli-flatten-container;
5700                                                         leaf percent {
5701                                                             tailf:info "% of interface bandwidth for peak-rate";
5702                                                             description "% of interface bandwidth for peak-rate";
5703                                                             type percentage-type;
5704                                                         }
5705                                                     }
5706                                                     // [peak-burst <ms> ms]
5707                                                     leaf peak-burst {
5708                                                         tailf:info "Specify 'peak-burst' parameter for "+
5709                                                             "'peak-rate'";
5710                                                         description "Specify 'peak-burst' parameter for "+
5711                                                             "'peak-rate'";
5712                                                         tailf:cli-hide-in-submode;
5713                                                         tailf:cli-optional-in-sequence;
5714                                                         type uint16 {
5715                                                             tailf:info "<1-2000>;;Peak burst value in "+
5716                                                                 "milliseconds";
5717                                                         }
5718                                                     }
5719                                                     container peak-burst-ms {
5720                                                         when "../peak-burst";
5721                                                         tailf:cli-no-keyword;
5722                                                         tailf:cli-drop-node-name;
5723                                                         tailf:cli-optional-in-sequence;
5724                                                         tailf:cli-hide-in-submode;
5725                                                         tailf:cli-flatten-container;
5726                                                         leaf ms {
5727                                                             tailf:info "Milli seconds";
5728                                                             description "Milli seconds";
5729                                                             tailf:cli-no-keyword;
5730                                                             type empty;
5731                                                         }
5732                                                     }
5733                                                     // conform-action | exceed-action | violate-action
5734                                                     uses police-action-grouping;
5735                                                 }
5736                                             }
5737                                         }
5738                                     }
5739                                 }
5740                                 // police rate pdp
5741                                 // police rate pdp [burst <bytes>]
5742                                 //    [peak-rate pdp [peak-burst <bytes>]] ACTIONS
5743                                 case police-rate-pdp-case {
5744                                     container police-rate-pdp {
5745                                         tailf:cli-no-keyword;
5746                                         tailf:cli-drop-node-name;
5747                                         container police {
5748                                             tailf:cli-drop-node-name;
5749                                             when "../../action-type = 'police'" {
5750                                                 tailf:dependency "../../action-type";
5751                                             }
5752                                             container rate {
5753                                                 tailf:info "Specify police rate";
5754                                                 description "Specify police rate";
5755                                                 container pdp {
5756                                                     tailf:info "% of interface bandwidth for rate";
5757                                                     description "% of interface bandwidth for rate";
5758                                                     tailf:cli-add-mode;
5759                                                     tailf:cli-mode-name "config-pmap-c-police";
5760                                                     tailf:cli-flatten-container;
5761                                                     tailf:cli-sequence-commands {
5762                                                         tailf:cli-reset-siblings;
5763                                                     }
5764                                                     // [burst <bytes>]
5765                                                     leaf burst {
5766                                                         tailf:info "Conform burst";
5767                                                         description "Conform burst";
5768                                                         tailf:cli-hide-in-submode;
5769                                                         tailf:cli-optional-in-sequence;
5770                                                         type police-burst-type;
5771                                                     }
5772                                                     // [peak-rate pdp [peak-burst <bytes>]]
5773                                                     leaf peak-rate {
5774                                                         tailf:info "Specify peak rate";
5775                                                         description "Specify peak rate";
5776                                                         tailf:cli-hide-in-submode;
5777                                                         tailf:cli-optional-in-sequence;
5778                                                         type enumeration {
5779                                                             enum "pdp" {
5780                                                             }
5781                                                         }
5782                                                     }
5783                                                     leaf peak-burst {
5784                                                         when "../peak-rate";
5785                                                         tailf:info "Specify 'peak-burst' parameter for "+
5786                                                             "'peak-rate'";
5787                                                         description "Specify 'peak-burst' parameter for "+
5788                                                             "'peak-rate'";
5789                                                         tailf:cli-hide-in-submode;
5790                                                         tailf:cli-optional-in-sequence;
5791                                                         type police-burst-type;
5792                                                     }
5793                                                     // conform-action | exceed-action | violate-action
5794                                                     uses police-action-grouping;
5795                                                 }
5796                                             }
5797                                         }
5798                                     }
5799                                 }
5800                                 // police target-bit-rate  <bits per second>
5801                                 case police-target-bitrate-case {
5802                                     container police-target-bitrate {
5803                                     tailf:cli-no-keyword;
5804                                     tailf:cli-drop-node-name;
5805                                     container police {
5806                                         tailf:cli-drop-node-name;
5807                                         when "../../action-type = 'police'" {
5808                                             tailf:dependency "../../action-type";
5809                                         }
5810                                         tailf:cli-add-mode;
5811                                         tailf:cli-mode-name "config-pmap-c-police";
5812                                         leaf bit-rate {
5813                                              tailf:info "Target bit rate (bits per second) (postfix k, m, g optional),
5814                                                  decimal point allowed";
5815                                              description "Target bit rate (bits per second) (postfix k, m, g optional),
5816                                                  decimal point allowed";
5817                                                  tailf:cli-no-keyword;
5818                                                  tailf:cli-drop-node-name;
5819                                                  tailf:cli-hide-in-submode;
5820                                                  type uint64 {
5821                                                      tailf:info "<8000-10000000000>;;Target bit rate (bits per second)";
5822                                                      range "8000..10000000000";
5823                                                  }
5824                                              }
5825                                              // conform-action | exceed-action | violate-action
5826                                              uses police-action-grouping;
5827                                         }
5828                                     }
5829                                 }
5830                                 // police flow (policy-map)
5831                                 // police flow [mask {dest-only | full-flow | src-only}]
5832                                 //    <bps> [<burst-normal>] ACTIONS
5833                                 case police-flow-case {
5834                                     container police-flow {
5835                                     tailf:cli-no-keyword;
5836                                     tailf:cli-drop-node-name;
5837                                     container police {
5838                                         tailf:cli-drop-node-name;
5839                                         when "../../action-type = 'police'" {
5840                                             tailf:dependency "../../action-type";
5841                                         }
5842                                         container flow {
5843                                             tailf:info "police each flow";
5844                                             description "police each flow";
5845                                             tailf:cli-add-mode;
5846                                             tailf:cli-mode-name "config-pmap-c-police";
5847                                             tailf:cli-flatten-container;
5848                                             tailf:cli-sequence-commands {
5849                                                 tailf:cli-reset-siblings;
5850                                             }
5851                                             // [mask {dest-only | full-flow | src-only}]
5852                                             leaf mask {
5853                                                 tailf:info "flow mask to be used for policing";
5854                                                 description "flow mask to be used for policing";
5855                                                 tailf:cli-hide-in-submode;
5856                                                 tailf:cli-optional-in-sequence;
5857                                                 type enumeration {
5858                                                     enum dest-only {
5859                                                         tailf:info "destination-address only flow mask";
5860                                                     }
5861                                                     enum full-flow {
5862                                                         tailf:info "full flow mask";
5863                                                     }
5864                                                     enum src-only {
5865                                                         tailf:info "source-address only flow mask";
5866                                                     }
5867                                                 }
5868                                             }
5869                                             // <bps>
5870                                             leaf bps {
5871                                                 tailf:cli-drop-node-name;
5872                                                 tailf:cli-hide-in-submode;
5873                                                 type police-bps-type;
5874                                             }
5875                                             // [<burst-normal>]
5876                                             leaf burst-normal {
5877                                                 when "../bps";
5878                                                 tailf:cli-drop-node-name;
5879                                                 tailf:cli-hide-in-submode;
5880                                                 tailf:cli-optional-in-sequence;
5881                                                 type police-burst-type;
5882                                             }
5883                                             // conform-action | exceed-action | violate-action
5884                                             uses police-action-grouping;
5885                                             }
5886                                         }
5887                                     }
5888                                 }
5889                                 // police (Catalyst 4500)
5890                                 // police <bps> bps <byte> byte ACTIONS
5891                                 case police-catalyst-case {
5892                                     container police-catalyst {
5893                                         tailf:cli-no-keyword;
5894                                         tailf:cli-drop-node-name;
5895                                         container police {
5896                                             tailf:cli-add-mode;
5897                                             tailf:cli-mode-name "config-pmap-c-police";
5898                                             tailf:cli-flatten-container;
5899                                             tailf:cli-drop-node-name;
5900                                             when "../../action-type = 'police'" {
5901                                                 tailf:dependency "../../action-type";
5902                                             }
5903                                             tailf:cli-sequence-commands {
5904                                                 tailf:cli-reset-siblings;
5905                                             }
5906                                             // <bps> bps
5907                                             leaf bps-value {
5908                                                 tailf:cli-no-keyword;
5909                                                 tailf:cli-drop-node-name;
5910                                                 tailf:cli-hide-in-submode;
5911                                                 tailf:cli-incomplete-command;
5912                                                 type string {
5913                                                     tailf:info "<32000-32000000000>;;Rate in bits per second "+
5914                                                         "(postfix k, m, g optional; decimal point allowed)";
5915                                                 }
5916                                             }
5917                                             leaf bps {
5918                                                 tailf:cli-hide-in-submode;
5919                                                 tailf:cli-incomplete-command;
5920                                                 type empty;
5921                                             }
5922                                             // <byte> byte
5923                                             leaf byte-value {
5924                                                 tailf:cli-no-keyword;
5925                                                 tailf:cli-drop-node-name;
5926                                                 tailf:cli-hide-in-submode;
5927                                                 tailf:cli-incomplete-command;
5928                                                 type string {
5929                                                     tailf:info "<32000-32000000000>;;(postfix k, m, g "+
5930                                                         "optional; decimal point allowed)";
5931                                                 }
5932                                             }
5933                                             leaf byte {
5934                                                 tailf:cli-hide-in-submode;
5935                                                 type empty;
5936                                             }
5937                                             // conform-action | exceed-action | violate-action
5938                                             container actions {
5939                                                 tailf:cli-no-keyword;
5940                                                 tailf:cli-break-sequence-commands;
5941                                                 tailf:cli-drop-node-name;
5942                                                 tailf:cli-flatten-container;
5943                                                 tailf:cli-hide-in-submode;
5944                                                 // policy-map * / class * / police ? / conform-action
5945                                                 uses police-conform-action-grouping;
5946                                                 // policy-map * / class * / police ? / exceed-action
5947                                                 uses police-exceed-action-grouping;
5948                                                 // policy-map * / class * / police ? / violate-action
5949                                                 uses police-violate-action-grouping;
5950                                             }
5951                                         }
5952                                     }
5953                                 }
5954                                 // police (Catalyst C3550)
5955                                 // police <bps> <burst> exceed-action {drop | policed-dscp-transmit}]
5956                                 case police-switch-case {
5957                                     container police-switch {
5958                                         tailf:cli-no-keyword;
5959                                         tailf:cli-drop-node-name;
5960                                         container police {
5961                                             tailf:cli-compact-syntax;
5962                                             tailf:cli-drop-node-name;
5963                                             when "../../action-type = 'police'" {
5964                                                 tailf:dependency "../../action-type";
5965                                             }
5966                                             tailf:cli-sequence-commands {
5967                                                 tailf:cli-reset-siblings;
5968                                             }
5969                                             // <cir>
5970                                             leaf cir {
5971                                                 tailf:cli-incomplete-command;
5972                                                 tailf:cli-drop-node-name;
5973                                                 type uint32 {
5974                                                     tailf:info "<8000-1000000000>;;Bits per second";
5975                                                     range "8000..1000000000";
5976                                                 }
5977                                             }
5978                                             // <bc>
5979                                             leaf bc {
5980                                                 tailf:cli-drop-node-name;
5981                                                 type uint32 {
5982                                                     tailf:info "<8000-2000000>;;Normal burst bytes";
5983                                                     range "8000..2000000";
5984                                                 }
5985                                             }
5986                                             // exceed-action
5987                                             leaf exceed-action {
5988                                                 tailf:info "action when rate is exceeded";
5989                                                 description "action when rate is exceeded";
5990                                                 type enumeration {
5991                                                     enum drop {
5992                                                         tailf:info "drop packet";
5993                                                     }
5994                                                     enum policed-dscp-transmit {
5995                                                         tailf:info "change dscp per policed-dscp map and send it";
5996                                                     }
5997                                                 }
5998                                             }
5999                                         }
6000                                     }
6001                                 }
6002                             }
6003                         }
6004                         case priority-case {
6005                             // policy-map * / class * / priority
6006                             container priority {
6007                                 //tailf:info "Strict Scheduling Priority for this Class";
6008                                 tailf:cli-compact-syntax;
6009                                 tailf:cli-sequence-commands;
6010                                 tailf:cli-drop-node-name;
6011                                 when "../action-type = 'priority'";
6012                                 leaf level {
6013                                     tailf:info "Multi-Level Priority Queue";
6014                                     description "Multi-Level Priority Queue";
6015                                     tailf:cli-optional-in-sequence;
6016                                     type uint8 {
6017                                         tailf:info "<1-2>;;Multi-Level Priority Queue";
6018                                         range "1..2";
6019                                     }
6020                                 }
6021                                 choice priority-type {
6022                                     leaf kilo-bits {
6023                                         tailf:cli-drop-node-name;
6024                                         type uint32 {
6025                                             range "8..2000000";
6026                                             tailf:info "<8-2000000>;;Kilo Bits per second";
6027                                         }
6028                                     }
6029                                     leaf percent {
6030                                         tailf:info "% of total bandwidth";
6031                                         description "% of total bandwidth";
6032                                         type uint16 {
6033                                             range "1..100";
6034                                             tailf:info "<1-100>;;percentage";
6035                                         }
6036                                     }
6037                                 }
6038                                 leaf burst {
6039                                     tailf:cli-drop-node-name;
6040                                     type uint32 {
6041                                         tailf:info "<32-64000000>;;Burst in bytes";
6042                                         range "32..64000000";
6043                                     }
6044                                 }
6045                             }
6046                         }
6047                         case queue-buffers-case {
6048                             // policy-map * / class * / queue-buffers
6049                             container queue-buffers {
6050                                 tailf:cli-drop-node-name;
6051                                 when "../action-type = 'queue-buffers'";
6052                                 leaf ratio {
6053                                     tailf:info "Relative buffer size for queue";
6054                                     description "Relative buffer size for queue";
6055                                     type uint8 {
6056                                         tailf:info "<0-100>;;Queue-buffers ratio limit";
6057                                         range "0..100";
6058                                     }
6059                                 }
6060                             }
6061                         }
6062                             case queue-limit-case {
6063                             // policy-map * / class * / queue-limit
6064                             container queue-limit {
6065                                 //tailf:info "Queue Max Threshold for Tail Drop";
6066                                 tailf:cli-compact-syntax;
6067                                 tailf:cli-sequence-commands {
6068                                     tailf:cli-reset-siblings;
6069                                 }
6070                                 tailf:cli-drop-node-name;
6071                                 when "../action-type = 'queue-limit'";
6072                                 leaf queue-limit-value {
6073                                     tailf:cli-drop-node-name;
6074                                     type uint32 {
6075                                         tailf:info "<1-8192000>  in bytes, <1-3400> in ms, "+
6076                                             "<1-32768> in packets by default";
6077                                         range "1..8192000";
6078                                     }
6079                                 }
6080                                 leaf queue-limit-type {
6081                                 tailf:cli-drop-node-name;
6082                                 type enumeration {
6083                                     enum bytes {
6084                                     tailf:info "in bytes";
6085                                 }
6086                                 enum ms {
6087                                     tailf:info "in milliseconds";
6088                                 }
6089                                 enum packets {
6090                                     tailf:info "in packets";
6091                                 }
6092                                 enum us {
6093                                     tailf:info "in microseconds";
6094                                 }
6095                             }
6096                         }
6097                     }
6098                     container queue-limit-dscp {
6099                         //tailf:info "Queue Max Threshold for Tail Drop";
6100                         tailf:cli-compact-syntax;
6101                         tailf:cli-drop-node-name;
6102                         when "../action-type = 'queue-limit'";
6103                         leaf dscp {
6104                             tailf:info "parameters for each dscp value";
6105                             description "parameters for each dscp value";
6106                             type empty;
6107                         }
6108                         leaf values {
6109                             tailf:info "dscp values";
6110                             description "dscp values";
6111                             type empty;
6112                         }
6113                         leaf-list sdcp-val {
6114                             tailf:cli-drop-node-name;
6115                             type dscp-type;
6116                         }
6117                         leaf percent {
6118                             tailf:info "% of threshold";
6119                             description "% of threshold";
6120                             type uint8 {
6121                                 tailf:info "<0-100>;;% of threshold";
6122                                 range "0..100";
6123                             }
6124                         }
6125                     }
6126                     }
6127                     case random-detect {
6128                     // policy-map * / class * / random-detect
6129                     container random-detect {
6130                         //tailf:info "Enable Random Early Detection as drop policy";
6131                         //presence true;
6132                         tailf:cli-drop-node-name;
6133                         when "../action-type = 'random-detect'";
6134                         container aggregate {
6135                             tailf:info "aggregate subclasses";
6136                             description "aggregate subclasses";
6137                             tailf:cli-compact-syntax;
6138                             tailf:cli-sequence-commands {
6139                                 tailf:cli-reset-siblings;
6140                             }
6141                             presence true;
6142                             leaf minimum-thresh {
6143                                 tailf:info "minimum threshold for red aggregate";
6144                                 description "minimum threshold for red aggregate";
6145                                 type uint32 {
6146                                     tailf:info "<0-1000000>;;minimum threshold (number of packets)";
6147                                     range "0..1000000";
6148                                 }
6149                             }
6150                             leaf maximum-thresh {
6151                                 tailf:info "maximum threshold for red aggregate";
6152                                 description "maximum threshold for red aggregate";
6153                                 type uint32 {
6154                                     tailf:info "<0-1000000>;;maximum threshold (number of packets)";
6155                                     range "0..1000000";
6156                                 }
6157                             }
6158                             leaf mark-probability {
6159                                 tailf:info "mark-probability for red aggregate";
6160                                 description "mark-probability for red aggregate";
6161                                 type empty;
6162                             }
6163                             leaf denominator {
6164                                 tailf:cli-drop-node-name;
6165                                 type uint32 {
6166                                     tailf:info "<0-65535>;;mark probability denominator";
6167                                     range "0..65535";
6168                                 }
6169                             }
6170                         }
6171                         container discard-class {
6172                             tailf:info "parameters for each discard-class value";
6173                             description "parameters for each discard-class value";
6174                             tailf:cli-compact-syntax;
6175                             tailf:cli-sequence-commands;
6176                             leaf dclass {
6177                                 tailf:cli-drop-node-name;
6178                                 tailf:cli-incomplete-command;
6179                                 type uint16 {
6180                                     range "0..7";
6181                                     tailf:info "<0-7>;;discard-class value";
6182                                 }
6183                             }
6184                             uses random-detect-grouping;
6185                         }
6186                         leaf discard-class-based {
6187                             tailf:info "Enable discard-class-based WRED as drop policy";
6188                             description "Enable discard-class-based WRED as drop policy";
6189                             tailf:cli-full-command;
6190                             type empty;
6191                         }
6192                         leaf dscp-based {
6193                             tailf:info "Enable dscp-based WRED as drop policy";
6194                             description "Enable dscp-based WRED as drop policy";
6195                             tailf:cli-full-command;
6196                             type empty;
6197                         }
6198                         list dscp {
6199                             tailf:info "parameters for each dscp value";
6200                             description "parameters for each dscp value";
6201                                     tailf:cli-suppress-mode;
6202                             tailf:cli-compact-syntax;
6203                             tailf:cli-sequence-commands;
6204                                     key dscp-val;
6205                             leaf dscp-val {
6206                                 type dscp-type;
6207                             }
6208                             uses random-detect-grouping;
6209                         }
6210                         leaf ecn {
6211                             tailf:info "explicit congestion notification";
6212                             description "explicit congestion notification";
6213                             tailf:cli-full-command;
6214                             type empty;
6215                         }
6216                         leaf exponential-weighting-constant {
6217                             tailf:info "weight for mean queue depth calculation";
6218                             description "weight for mean queue depth calculation";
6219                             tailf:cli-full-command;
6220                             type uint16 {
6221                                 range "1..16";
6222                                 tailf:info "<1-16>;;integer in 1..16 used in weighted "+
6223                                     "average to mean 2^number";
6224                             }
6225                         }
6226                         leaf prec-based {
6227                             tailf:info "Enable precedence-based WRED as drop policy";
6228                             description "Enable precedence-based WRED as drop policy";
6229                             tailf:cli-full-command;
6230                             type empty;
6231                         }
6232                         container precedence {
6233                             tailf:info "parameters for each precedence value";
6234                             description "parameters for each precedence value";
6235                             tailf:cli-sequence-commands;
6236                             tailf:cli-compact-syntax;
6237                             leaf prec {
6238                                 tailf:cli-drop-node-name;
6239                                 tailf:cli-incomplete-command;
6240                                 type precedence-type2;
6241                             }
6242                             uses random-detect-grouping;
6243                         }
6244                     }
6245                     }
6246                     case service-policy-case {
6247                       // policy-map * / class * / service-policy
6248                       leaf service-policy {
6249                         //tailf:info "Configure Flow Next";
6250                         tailf:cli-full-command;
6251                         tailf:cli-drop-node-name;
6252                         when "../action-type = 'service-policy'";
6253                         type string;
6254                         tailf:non-strict-leafref {
6255                             path "/ios:native/policy-map/name";
6256                         }
6257                     }
6258                     }
6259                     case set-case {
6260                     // policy-map * / class * / set
6261                     container set {
6262                         //tailf:info "Set QoS values";
6263                         tailf:cli-drop-node-name;
6264                         when "../action-type = 'set'";
6265                         // policy-map * / class * / set atm-clp
6266                         leaf atm-clp {
6267                             tailf:info "Set ATM CLP bit to 1";
6268                             description "Set ATM CLP bit to 1";
6269                             tailf:cli-full-command;
6270                             type empty;
6271                         }
6272                         // policy-map * / class * / set cos
6273                         container cos {
6274                         tailf:info "Set IEEE 802.1Q/ISL class of service/user "+
6275                             "priority";
6276                         description "Set IEEE 802.1Q/ISL class of service/user "+
6277                             "priority";
6278                         tailf:cli-compact-syntax;
6279                         tailf:cli-sequence-commands;
6280                         choice cos-type {
6281                             case a {
6282                                 leaf val {
6283                                     tailf:cli-drop-node-name;
6284                                     type uint16 {
6285                                         range "0..7";
6286                                         tailf:info "<0-7>;;cos value";
6287                                     }
6288                                 }
6289                             }
6290                             case b {
6291                                 leaf pack {
6292                                     tailf:cli-drop-node-name;
6293                                     type enumeration {
6294                                         enum dscp {
6295                                             tailf:code-name "pack_dscp";
6296                                             tailf:info "Set value from packet dscp";
6297                                         }
6298                                         enum precedence {
6299                                             tailf:code-name "pack_precedence";
6300                                             tailf:info "Set value from packet "+
6301                                                 "precedence.";
6302                                             }
6303                                         }
6304                                     }
6305                                     leaf table {
6306                                         tailf:info "Set codepoint value based on tablemap.";
6307                                         description "Set codepoint value based on tablemap.";
6308                                         type string {
6309                                             tailf:info "WORD;;table-map name";
6310                                         }
6311                                         tailf:non-strict-leafref {
6312                                         path "/ios:native/table-map/name";
6313                                     }
6314                                 }
6315                             }
6316                         }
6317                     }
6318                     // policy-map * / class * / set discard-class
6319                     leaf discard-class {
6320                         tailf:info "Discard behavior identifier";
6321                         description "Discard behavior identifier";
6322                         tailf:cli-full-command;
6323                         type uint16 {
6324                             range "0..7";
6325                             tailf:info "<0-7>;;Discard Class value";
6326                         }
6327                     }
6328                     // policy-map * / class * / set dscp
6329                     container dscp {
6330                         tailf:info "Set DSCP in IP(v4) and IPv6 packets";
6331                         description "Set DSCP in IP(v4) and IPv6 packets";
6332                         tailf:cli-compact-syntax;
6333                         leaf tunnel {
6334                             tailf:info "set tunnel packet dscp";
6335                             description "set tunnel packet dscp";
6336                             type empty;
6337                         }
6338                         leaf dscp-val {
6339                         tailf:cli-drop-node-name;
6340                         type dscp-type;
6341                     }
6342                 }
6343                 // policy-map * / class * / set fr-de
6344                 leaf fr-de {
6345                     tailf:info "Set FR DE bit to 1";
6346                     description "Set FR DE bit to 1";
6347                     tailf:cli-full-command;
6348                     type empty;
6349                 }
6350                 // policy-map * / class * / set ip
6351                 container ip {
6352                     tailf:info "Set IP specific values";
6353                     description "Set IP specific values";
6354                     choice ip-choice {
6355                         container dscp {
6356                             tailf:info "Set IP DSCP (DiffServ CodePointint)";
6357                             description "Set IP DSCP (DiffServ CodePointint)";
6358                             tailf:cli-compact-syntax;
6359                             leaf tunnel {
6360                                 tailf:info "set tunnel packet dscp";
6361                                 description "set tunnel packet dscp";
6362                                 type empty;
6363                             }
6364                             leaf dscp-val {
6365                                 tailf:cli-drop-node-name;
6366                                 type dscp-type;
6367                             }
6368                         }
6369                         container precedence {
6370                             tailf:info "Set IP precedence";
6371                             description "Set IP precedence";
6372                             presence "Set IP precedence";
6373                             leaf precedence-val {
6374                                 tailf:cli-drop-node-name;
6375                                 type precedence-type;
6376                             }
6377                         }
6378                     }
6379                 }
6380                 // policy-map * / class * / set mpls
6381                 container mpls {
6382                     tailf:info "Set MPLS specific values";
6383                     description "Set MPLS specific values";
6384                     container experimental {
6385                         tailf:info "Set Experimental value";
6386                         description "Set Experimental value";
6387                         // 0-7
6388                         container imposition {
6389                             tailf:info "Set Experimental value at tag imposition";
6390                             description "Set Experimental value at tag imposition";
6391                             leaf exp-value {
6392                                 tailf:cli-drop-node-name;
6393                                 tailf:cli-full-command;
6394                                 type uint8 {
6395                                     tailf:info "<0-7>;;Experimental value";
6396                                     range "0..7";
6397                                 }
6398                             }
6399                             // dscp
6400                             // precedence
6401                         }
6402                         // topmost
6403                         container topmost {
6404                             tailf:info "Set Experimental value  on topmost label";
6405                             description "Set Experimental value  on topmost label";
6406                             leaf exp-value {
6407                                 tailf:cli-drop-node-name;
6408                                 tailf:cli-full-command;
6409                                     type uint8 {
6410                                         tailf:info "<0-7>;;Experimental value";
6411                                         range "0..7";
6412                                     }
6413                                 }
6414                             }
6415                         }
6416                     }
6417                     // policy-map * / class * / set qos-group
6418                     container qos-group {
6419                         tailf:info "Set QoS Group";
6420                         description "Set QoS Group";
6421                         leaf qos-group-value {
6422                             tailf:cli-drop-node-name;
6423                             tailf:cli-full-command;
6424                             type uint8 {
6425                                 range "0..99";
6426                             }
6427                         }
6428                         // dscp
6429                         // mpls
6430                         // precedence
6431                     }
6432                 }
6433                 }
6434                 case shape-case {
6435                 // policy-map * / class * / shape
6436                 container shape {
6437                     //tailf:info "Traffic Shaping";
6438                     tailf:cli-drop-node-name;
6439                     when "../action-type = 'shape'";
6440                     // policy-map * / class * / shape adaptive
6441                     leaf adaptive {
6442                         tailf:info "Enable Traffic Shaping adaptation to BECN";
6443                         description "Enable Traffic Shaping adaptation to BECN";
6444                         tailf:cli-full-command;
6445                         type uint32 {
6446                             range "8000..154400000";
6447                             tailf:info "<8000-154400000>;;Lower Bound Target Bit "+
6448                                "Rate (bits per second)";
6449                         }
6450                     }
6451                     // policy-map * / class * / shape average
6452                     container average {
6453                     tailf:info "configure token bucket: CIR (bps) [Bc (bits) "+
6454                         "[Be (bits)]], send out Bc only per interval";
6455                     description "configure token bucket: CIR (bps) [Bc (bits) "+
6456                         "[Be (bits)]], send out Bc only per interval";
6457                     tailf:cli-sequence-commands;
6458                     tailf:cli-compact-syntax;
6459                     choice average-choice {
6460                         case a {
6461                             leaf bit-rate {
6462                                 tailf:cli-drop-node-name;
6463                                 type uint64 {
6464                                     //range "8000..154400000";
6465                                     //FIXME: what is range max?
6466                                     tailf:info "<8000-max>;;Target Bit "+
6467                                         "Rate (bits per second), the value "+
6468                                         "needs to be a multiple of 8000";
6469                                 }
6470                             }
6471                             leaf bits-per-interval-sustained {
6472                                 tailf:cli-drop-node-name;
6473                                 type uint32 {
6474                                     range "256..154400000";
6475                                     tailf:info "<256-154400000>;;bits per "+
6476                                         "interval, sustained. Needs to be "+
6477                                         "multiple of 128. Recommend not to "+
6478                                         "configure it, the algorithm will "+
6479                                         "find out the best value";
6480                                 }
6481                             }
6482                             leaf bits-per-interval-excess {
6483                                 tailf:cli-drop-node-name;
6484                                 type uint32 {
6485                                     range "0..154400000";
6486                                     tailf:info "<0-154400000>;;bits per "+
6487                                         "interval, excess. Needs to be "+
6488                                         "multiple of 128. Bc will be used if "+
6489                                         "you don't configure it.";
6490                                     }
6491                                 }
6492                             }
6493                             case b {
6494                                 leaf percent {
6495                                     tailf:info "% of interface bandwidth for "+
6496                                         "Committed information rate";
6497                                     description "% of interface bandwidth for "+
6498                                         "Committed information rate";
6499                                     type percentage-type;
6500                                 }
6501                                 leaf burst-size-sustained {
6502                                     tailf:cli-incomplete-command;
6503                                     tailf:cli-drop-node-name;
6504                                     type uint16 {
6505                                         range "10..2000";
6506                                         tailf:info "<10-2000>;;Sustained burst "+
6507                                             "size in msec";
6508                                         }
6509                                     }
6510                                     leaf ms {
6511                                         tailf:info "milliseconds";
6512                                         description "milliseconds";
6513                                         type empty;
6514                                     }
6515                                     container bse {
6516                                         tailf:cli-drop-node-name;
6517                                         tailf:cli-flatten-container;
6518                                         tailf:cli-sequence-commands;
6519                                         tailf:cli-compact-syntax;
6520                                         leaf burst-size-excess {
6521                                             tailf:cli-incomplete-command;
6522                                             type uint16 {
6523                                                 range "10..2000";
6524                                                 tailf:info "<10-2000>;;Excess burst "+
6525                                                     "size in msec";
6526                                             }
6527                                         }
6528                                         leaf ms {
6529                                             tailf:info "milliseconds";
6530                                             description "milliseconds";
6531                                             type empty;
6532                                         }
6533                                     }
6534                                 }
6535                             }
6536                         }
6537                         // policy-map * / class * / shape fecn-adapt
6538                         leaf fecn-adapt {
6539                             tailf:info "Enable Traffic Shaping reflection of FECN as "+
6540                                 "BECN";
6541                             description "Enable Traffic Shaping reflection of FECN as "+
6542                                 "BECN";
6543                             tailf:cli-full-command;
6544                             type empty;
6545                         }
6546                         // policy-map * / class * / shape fr-voice-adapt
6547                         container fr-voice-adapt {
6548                             tailf:info "Enable rate adjustment depending on voice "+
6549                                   "presence";
6550                             description "Enable rate adjustment depending on voice "+
6551                                 "presence";
6552                             presence "Enable rate adjustment depending on voice "+
6553                                 "presence" ;
6554                             leaf deactivation {
6555                                 type uint16 {
6556                                     range "1..10000";
6557                                     tailf:info "<1-10000>;;de-activation delay in "+
6558                                         "seconds";
6559                                     }
6560                                 }
6561                             }
6562                             // policy-map * / class * / shape max-buffers
6563                             leaf max-buffers {
6564                                 tailf:cli-full-command;
6565                                 tailf:info "Set Maximum Buffer Limit";
6566                                 description "Set Maximum Buffer Limit";
6567                                 type uint16 {
6568                                     range "1..4096";
6569                                     tailf:info "<1-4096>;;Maximum Buffer Limit";
6570                                 }
6571                             }
6572                         }
6573                         }
6574                         case trust-case {
6575                         // policy-map * / class * / trust
6576                         leaf trust {
6577                             //tailf:info "Set trust value for the class";
6578                             tailf:cli-drop-node-name;
6579                             when "../action-type = 'trust'";
6580                                 type enumeration {
6581                                     enum cos {
6582                                         tailf:info "trust value for the class";
6583                                     }
6584                                     enum dscp {
6585                                         tailf:info "trust value for the class";
6586                                     }
6587                                     enum ip-precedence {
6588                                         tailf:info "trust value for the class";
6589                                     }
6590                                 }
6591                             }
6592                         }
6593                     }
6594                 }
6595             }
6596             // policy-map * / description
6597             leaf "description" {
6598                 tailf:info "Policy-Map description";
6599                 description "Policy-Map description";
6600                 tailf:cli-multi-value;
6601                 type string {
6602                     length "1..200";
6603                     tailf:info "LINE;;Description of this policy-map (up to "
6604                     +"200 characters)";
6605                 }
6606             }
6607             // policy-map * /sequence-interval
6608             leaf sequence-interval {
6609                 tailf:info "Enable sequence number capability";
6610                 description "Enable sequence number capability";
6611                 when "../type = 'appnav'";
6612                 type uint16 {
6613                     tailf:info "<0-65535>;;Sequence Number Interval";
6614                 }
6615             }
6616         }
6617
6618 /// ========================================================================
6619 /// service-chain
6620 /// ========================================================================
6621
6622         container service-chain {
6623             tailf:info "Service Chain mode";
6624             description "Service Chain mode";
6625             list service-function {
6626                 tailf:info "Service function details";
6627                 description "Service function details";
6628                 tailf:cli-mode-name "config-service-chain-sf";
6629                 key "name";
6630                 leaf name {
6631                     tailf:info "WORD;;Service function name";
6632                     description "WORD;;Service function name";
6633                     type string;
6634                 }
6635                 container config-service-chain-sf-mode {
6636                     tailf:cli-drop-node-name;
6637                     leaf description {
6638                         tailf:info "Service function description";
6639                         description "Service function description";
6640                         tailf:cli-multi-value;
6641                         tailf:cli-full-command;
6642                         type string {
6643                             tailf:info "LINE;;Up to 256 characters describing this "
6644                              +"service function";
6645                             length "1..256";
6646                         }
6647                     }
6648                     container encapsulation {
6649                         tailf:info "Service node encapsulation";
6650                         description "Service node encapsulation";
6651                         container gre {
6652                             tailf:info "Service node encapsulation type";
6653                             description "Service node encapsulation type";
6654                             leaf enhanced {
6655                                 tailf:info "Add enhanced NSH TLV information";
6656                                 description "Add enhanced NSH TLV information";
6657                                 type enumeration {
6658                                     enum copy {
6659                                         tailf:info "Send a copy of the packet";
6660                                     }
6661                                     enum divert {
6662                                         tailf:info "Divert the packet (default)";
6663                                     }
6664                                 }
6665                             }
6666                         }
6667                         leaf none {
6668                             tailf:info "Service node encapsulation type";
6669                             description "Service node encapsulation type";
6670                             type empty;
6671                         }
6672                     }
6673                     container ip {
6674                         tailf:info "Service node";
6675                         description "Service node";
6676                         leaf address {
6677                             type inet:ipv4-address {
6678                                 tailf:info "A.B.C.D;;Service node";
6679                             }
6680                         }
6681                     }
6682                 }
6683             }
6684             container service-function-forwarder {
6685                 tailf:info "Service function forwarder details";
6686                 description "Service function forwarder details";
6687                 list service-ff-name {
6688                     tailf:cli-drop-node-name;
6689                     tailf:cli-mode-name "config-service-chain-sff";
6690                     key "name";
6691                     leaf name {
6692                         tailf:info "WORD;;Service function forwarder name";
6693                         description "WORD;;Service function forwarder name";
6694                         type string;
6695                     }
6696                     uses config-service-chain-grouping;
6697                 }
6698                 container local {
6699                     tailf:info "Local service function forwarder";
6700                     description "Local service function forwarder";
6701                     tailf:cli-add-mode;
6702                     tailf:cli-mode-name "config-service-chain-sff";
6703                     presence true;
6704                     uses config-service-chain-grouping;
6705                 }
6706             }
6707             list service-path {
6708                 tailf:info "Service Path Entries";
6709                 description "Service Path Entries";
6710                 tailf:cli-mode-name "config-service-chain-path";
6711                 key "service-path-id";
6712                 leaf service-path-id {
6713                     type uint32 {
6714                         range "0..16777215";
6715                         tailf:info "<0-16777215>;;Service Path ID";
6716                     }
6717                 }
6718                 container config-service-chain-path-mode {
6719                     tailf:cli-drop-node-name;
6720                     leaf description {
6721                         tailf:info "Path Description";
6722                         description "Path Description";
6723                         tailf:cli-multi-value;
6724                         tailf:cli-full-command;
6725                         type string {
6726                             tailf:info "LINE;;Up to 256 characters describing this "
6727                                 +"service path";
6728                             length "1..256";
6729                         }
6730                     }
6731                     container service-index {
6732                         tailf:info "Service Index";
6733                         description "Service Index";
6734                         list services {
6735                             tailf:cli-drop-node-name;
6736                             tailf:cli-suppress-mode;
6737                             key "service-index-id";
6738                             leaf service-index-id {
6739                                 type uint8 {
6740                                 range "2..255";
6741                                 tailf:info "<2-255>;;Service Index ID";
6742                             }
6743                         }
6744                         choice service-type-choice {
6745                             leaf service-function {
6746                                 tailf:info "Service Function name";
6747                                 description "Service Function name";
6748                                 type string {
6749                                     tailf:info "WORD;;Service Function name";
6750                                 }
6751                             }
6752                             leaf service-function-forwarder {
6753                                 tailf:info "Service Function Forwarder name";
6754                                 description "Service Function Forwarder name";
6755                                 type string {
6756                                     tailf:info "WORD;;Service Function Forwarder name";
6757                                 }
6758                             }
6759                             leaf terminate {
6760                                 tailf:info "Terminate(Proxy)";
6761                                 description "Terminate(Proxy)";
6762                                 type empty;
6763                                 }
6764                             }
6765                         }
6766                     }
6767                 }
6768             }
6769         }
6770     }
6771
6772 /// ========================================================================
6773 /// eof
6774 /// ========================================================================
6775
6776 }