ios-xe-renderer policy-manager update
[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 interface-atm-grouping {
1739         // Removed body
1740     }
1741
1742     grouping interface-cellular-grouping {
1743         //interface * / dialer
1744         container dialer {
1745             leaf in-band {
1746                 type empty;
1747             }
1748             leaf idle-timeout {
1749                 type uint32;
1750             }
1751             leaf string {
1752                 type string;
1753             }
1754             leaf watch-group {
1755                 type uint32;
1756             }
1757         }
1758         //interface * / async
1759         container async {
1760             leaf mode {
1761                 type enumeration {
1762                     enum interactive;
1763                 }
1764             }
1765         }
1766     }
1767
1768     grouping interface-common-grouping {
1769         // interface * / service-policy
1770         container service-policy {
1771             tailf:info "Configure QoS Service Policy";
1772             description "Configure QoS Service Policy";
1773             leaf history {
1774                 tailf:cli-full-command;
1775                 tailf:info "Keep history of QoS metrics";
1776                     description "Keep history of QoS metrics";
1777                 type empty;
1778             }
1779             leaf "input" {
1780                 tailf:cli-full-command;
1781                 tailf:info "Assign policy-map to the input of an interface";
1782                 description "Assign policy-map to the input of an interface";
1783                 type string {
1784                     tailf:info "WORD;;policy-map name";
1785                 }
1786                 tailf:non-strict-leafref {
1787                     path "/ios:native/policy-map/name";
1788                 }
1789             }
1790             leaf "output" {
1791                 tailf:cli-full-command;
1792                 tailf:info "Assign policy-map to the output of an interface";
1793                 description "Assign policy-map to the output of an interface";
1794                 type string {
1795                     tailf:info "WORD;;policy-map name";
1796                 }
1797                 tailf:non-strict-leafref {
1798                     path "/ios:native/policy-map/name";
1799                 }
1800             }
1801             container "type" {
1802                 tailf:info "Configure CPL Service Policy";
1803                 description "Configure CPL Service Policy";
1804                 container performance-monitor {
1805                     tailf:info "Configure media monitor service-policy type";
1806                     description "Configure media monitor service-policy type";
1807                     tailf:cli-sequence-commands;
1808                     tailf:cli-compact-syntax;
1809                     leaf direction {
1810                         tailf:cli-drop-node-name;
1811                         type enumeration {
1812                             enum "input" {
1813                                 tailf:info "Assign policy-map to the input of an interfcae";
1814                             }
1815                             enum "output" {
1816                                 tailf:info "Assign policy-map to the output of an interfcae";
1817                             }
1818                         }
1819                     }
1820                     leaf name {
1821                         tailf:cli-drop-node-name;
1822                         type string {
1823                             tailf:info "WORD;;policy-map name";
1824                         }
1825                         tailf:non-strict-leafref {
1826                             path "/ios:native/policy-map/name";
1827                         }
1828                     }
1829                 }
1830                 // interface * / service-policy type * / service-chain
1831                 container service-chain {
1832                     tailf:info "Configure Service-chain Service Policy";
1833                     description "Configure Service-chain Service Policy";
1834                     tailf:cli-sequence-commands;
1835                     tailf:cli-compact-syntax;
1836                     leaf direction {
1837                         tailf:cli-drop-node-name;
1838                         type enumeration {
1839                             enum "input" {
1840                                 tailf:info "Assign policy-map to the input of an interfcae";
1841                             }
1842                             enum "output" {
1843                                 tailf:info "Assign policy-map to the output of an interfcae";
1844                             }
1845                         }
1846                     }
1847                     leaf name {
1848                         tailf:cli-drop-node-name;
1849                         type string {
1850                             tailf:info "WORD;;policy-map name";
1851                         }
1852                         tailf:non-strict-leafref {
1853                             path "/ios:native/policy-map/name";
1854                         }
1855                     }
1856                 }
1857             }
1858         }
1859     }
1860
1861     grouping interface-ethernet-grouping {
1862         // Removed body
1863     }
1864
1865     grouping interface-grouping {
1866         // Removed body
1867     }
1868
1869     grouping interface-overlay-grouping {
1870         // Removed body
1871     }
1872
1873     grouping interface-pointtopoint-grouping {
1874         // Removed body
1875     }
1876
1877     grouping interface-pseudowire-grouping {
1878         // Removed body
1879     }
1880
1881     grouping interface-switch-grouping {
1882         // Removed body
1883     }
1884
1885     grouping interface-tunnel-grouping {
1886         // Removed body
1887     }
1888
1889     grouping interface-zone-member-grouping {
1890         // interface * / zone-member
1891         container zone-member {
1892             tailf:info "Apply zone name";
1893             description "Apply zone name";
1894             leaf security {
1895                 tailf:info "Security zone";
1896                 description "Security zone";
1897                 type string;
1898                 tailf:non-strict-leafref {
1899                     path "/ios:native/zone/security/id";
1900                 }
1901             }
1902         }
1903     }
1904
1905     grouping police-action-drop-grouping {
1906         leaf drop {
1907             tailf:info "drop packet";
1908             description "drop packet";
1909             type empty;
1910         }
1911     }
1912
1913     grouping police-action-grouping {
1914         container actions {
1915             tailf:cli-break-sequence-commands;
1916             tailf:cli-no-keyword;
1917             tailf:cli-drop-node-name;
1918             tailf:cli-flatten-container;
1919             // policy-map * / class * / police ? / conform-action
1920             uses police-conform-action-grouping;
1921             // policy-map * / class * / police ? / exceed-action
1922             uses police-exceed-action-grouping;
1923             // policy-map * / class * / police ? / violate-action
1924             uses police-violate-action-grouping;
1925         }
1926     }
1927
1928     grouping police-conform-action-grouping {
1929         container conform-set-clp-transmit {
1930             tailf:cli-no-keyword;
1931             tailf:cli-drop-node-name;
1932             tailf:cli-flatten-container;
1933             container conform-action {
1934                 tailf:info "action when rate is less than conform burst";
1935                 description "action when rate is less than conform burst";
1936                 tailf:cli-flatten-container;
1937                 leaf set-clp-transmit {
1938                     tailf:info "set atm clp and send it";
1939                     description "set atm clp and send it";
1940                     type empty;
1941                 }
1942             }
1943         }
1944         container conform-set-cos-transmit {
1945             tailf:cli-no-keyword;
1946             tailf:cli-drop-node-name;
1947             tailf:cli-flatten-container;
1948             container conform-action {
1949                 tailf:info "action when rate is less than conform burst";
1950                 description "action when rate is less than conform burst";
1951                 tailf:cli-flatten-container;
1952                 leaf set-cos-transmit {
1953                     tailf:info "rewrite packet cos and send it";
1954                     description "rewrite packet cos and send it";
1955                     type cos_value-type;
1956                 }
1957             }
1958         }
1959         container conform-set-cos-transmit-table {
1960             tailf:cli-no-keyword;
1961             tailf:cli-drop-node-name;
1962             tailf:cli-flatten-container;
1963             container conform-action {
1964                 tailf:info "action when rate is less than conform burst";
1965                 description "action when rate is less than conform burst";
1966                 tailf:cli-compact-syntax;
1967                 tailf:cli-flatten-container;
1968                 tailf:cli-sequence-commands;
1969                 leaf set-cos-transmit {
1970                     tailf:info "rewrite packet cos and send it";
1971                     description "rewrite packet cos and send it";
1972                     type cos_value-type;
1973                 }
1974                 leaf table {
1975                     tailf:info "Specify table-map";
1976                     description "Specify table-map";
1977                     type leafref {
1978                         path "/ios:native/table-map/name";
1979                     }
1980                 }
1981             }
1982         }
1983         container conform-set-discard-class-transmit {
1984             tailf:cli-no-keyword;
1985             tailf:cli-drop-node-name;
1986             tailf:cli-flatten-container;
1987             container conform-action {
1988                 tailf:info "action when rate is less than conform burst";
1989                 description "action when rate is less than conform burst";
1990                 tailf:cli-flatten-container;
1991                 leaf set-discard-class-transmit {
1992                     tailf:info "set discard-class and send it";
1993                     description "set discard-class and send it";
1994                     type uint8 {
1995                         tailf:info "<0-7>;;new discard-class";
1996                         range "0..7";
1997                     }
1998                 }
1999             }
2000         }
2001         container conform-set-dscp-transmit {
2002             tailf:cli-no-keyword;
2003             tailf:cli-drop-node-name;
2004             tailf:cli-flatten-container;
2005             container conform-action {
2006                 tailf:info "action when rate is less than conform burst";
2007                 description "action when rate is less than conform burst";
2008                 tailf:cli-flatten-container;
2009                 leaf set-dscp-transmit {
2010                     tailf:info "set dscp and send it";
2011                     description "set dscp and send it";
2012                     type dscp-type;
2013                 }
2014             }
2015         }
2016         container conform-set-dscp-transmit-table {
2017             tailf:cli-no-keyword;
2018             tailf:cli-drop-node-name;
2019             tailf:cli-flatten-container;
2020             container conform-action {
2021                 tailf:info "action when rate is less than conform burst";
2022                 description "action when rate is less than conform burst";
2023                 tailf:cli-compact-syntax;
2024                 tailf:cli-flatten-container;
2025                 tailf:cli-sequence-commands;
2026                 leaf set-dscp-transmit {
2027                     tailf:info "set dscp and send it";
2028                     description "set dscp and send it";
2029                     type dscp-type;
2030                 }
2031                 leaf table {
2032                     tailf:info "Specify table-map";
2033                     description "Specify table-map";
2034                     type leafref {
2035                         path "/ios:native/table-map/name";
2036                     }
2037                 }
2038             }
2039         }
2040         container conform-set-frde-transmit {
2041             tailf:cli-no-keyword;
2042             tailf:cli-drop-node-name;
2043             tailf:cli-flatten-container;
2044             container conform-action {
2045                 tailf:info "action when rate is less than conform burst";
2046                 description "action when rate is less than conform burst";
2047                 tailf:cli-flatten-container;
2048                 leaf set-frde-transmit {
2049                     tailf:info "set FR DE and send it";
2050                     description "set FR DE and send it";
2051                     type empty;
2052                 }
2053             }
2054         }
2055         container conform-set-mpls-exp-imposition-transmit {
2056             tailf:cli-no-keyword;
2057             tailf:cli-drop-node-name;
2058             tailf:cli-flatten-container;
2059             container conform-action {
2060                 tailf:info "action when rate is less than conform burst";
2061                 description "action when rate is less than conform burst";
2062                 tailf:cli-flatten-container;
2063                 leaf set-mpls-exp-imposition-transmit {
2064                     tailf:info "set exp at tag imposition and send it";
2065                     description "set exp at tag imposition and send it";
2066                     type exp_value-type;
2067                 }
2068             }
2069         }
2070         container conform-set-mpls-exp-imposition-transmit-table {
2071             tailf:cli-no-keyword;
2072             tailf:cli-drop-node-name;
2073             tailf:cli-flatten-container;
2074             container conform-action {
2075                 tailf:info "action when rate is less than conform burst";
2076                 description "action when rate is less than conform burst";
2077                 tailf:cli-compact-syntax;
2078                 tailf:cli-flatten-container;
2079                 tailf:cli-sequence-commands;
2080                 leaf set-mpls-exp-imposition-transmit {
2081                     tailf:info "set exp at tag imposition and send it";
2082                         description "set exp at tag imposition and send it";
2083                         type exp_value-type;
2084                     }
2085                 leaf table {
2086                     tailf:info "Specify table-map";
2087                     description "Specify table-map";
2088                     type leafref {
2089                         path "/ios:native/table-map/name";
2090                     }
2091                 }
2092             }
2093         }
2094         container conform-set-mpls-exp-topmost-transmit {
2095             tailf:cli-no-keyword;
2096             tailf:cli-drop-node-name;
2097             tailf:cli-flatten-container;
2098             container conform-action {
2099                 tailf:info "action when rate is less than conform burst";
2100                 description "action when rate is less than conform burst";
2101                 tailf:cli-flatten-container;
2102                 leaf set-mpls-exp-topmost-transmit {
2103                     tailf:info "set exp on topmost label and send it";
2104                     description "set exp on topmost label and send it";
2105                     type exp_value-type;
2106                 }
2107             }
2108         }
2109         container conform-set-mpls-exp-topmost-transmit-table {
2110             tailf:cli-no-keyword;
2111             tailf:cli-drop-node-name;
2112             tailf:cli-flatten-container;
2113             container conform-action {
2114                 tailf:info "action when rate is less than conform burst";
2115                 description "action when rate is less than conform burst";
2116                 tailf:cli-compact-syntax;
2117                 tailf:cli-flatten-container;
2118                 tailf:cli-sequence-commands;
2119                 leaf set-mpls-exp-topmost-transmit {
2120                     tailf:info "set exp on topmost label and send it";
2121                     description "set exp on topmost label and send it";
2122                     type exp_value-type;
2123                 }
2124                 leaf table {
2125                     tailf:info "Specify table-map";
2126                     description "Specify table-map";
2127                     type leafref {
2128                         path "/ios:native/table-map/name";
2129                     }
2130                 }
2131             }
2132         }
2133         container conform-set-prec-transmit {
2134             tailf:cli-no-keyword;
2135             tailf:cli-drop-node-name;
2136             tailf:cli-flatten-container;
2137             container conform-action {
2138                 tailf:info "action when rate is less than conform burst";
2139                 description "action when rate is less than conform burst";
2140                 tailf:cli-flatten-container;
2141                 leaf set-prec-transmit {
2142                     tailf:info "rewrite packet precedence and send it";
2143                     description "rewrite packet precedence and send it";
2144                     type prec_value-type;
2145                 }
2146             }
2147         }
2148         container conform-set-prec-transmit-table {
2149             tailf:cli-no-keyword;
2150             tailf:cli-drop-node-name;
2151             tailf:cli-flatten-container;
2152             container conform-action {
2153                 tailf:info "action when rate is less than conform burst";
2154                 description "action when rate is less than conform burst";
2155                 tailf:cli-compact-syntax;
2156                 tailf:cli-flatten-container;
2157                 tailf:cli-sequence-commands;
2158                 leaf set-prec-transmit {
2159                     tailf:info "rewrite packet precedence and send it";
2160                     description "rewrite packet precedence and send it";
2161                     type prec_value-type;
2162                 }
2163                 leaf table {
2164                     tailf:info "Specify table-map";
2165                     description "Specify table-map";
2166                     type leafref {
2167                         path "/ios:native/table-map/name";
2168                     }
2169                 }
2170             }
2171         }
2172         container conform-set-qos-transmit {
2173             tailf:cli-no-keyword;
2174             tailf:cli-drop-node-name;
2175             tailf:cli-flatten-container;
2176             container conform-action {
2177                 tailf:info "action when rate is less than conform burst";
2178                 description "action when rate is less than conform burst";
2179                 tailf:cli-flatten-container;
2180                 leaf set-qos-transmit {
2181                     tailf:info "set qos-group and send it";
2182                     description "set qos-group and send it";
2183                     type qos_value-type;
2184                 }
2185             }
2186         }
2187         container conform-set-qos-transmit-table {
2188         tailf:cli-no-keyword;
2189         tailf:cli-drop-node-name;
2190         tailf:cli-flatten-container;
2191             container conform-action {
2192                 tailf:info "action when rate is less than conform burst";
2193                 description "action when rate is less than conform burst";
2194                 tailf:cli-compact-syntax;
2195                 tailf:cli-flatten-container;
2196                 tailf:cli-sequence-commands;
2197                 leaf set-qos-transmit {
2198                     tailf:info "set qos-group and send it";
2199                     description "set qos-group and send it";
2200                     type qos_value-type;
2201                 }
2202                 leaf table {
2203                     tailf:info "Specify table-map";
2204                     description "Specify table-map";
2205                     type leafref {
2206                         path "/ios:native/table-map/name";
2207                     }
2208                 }
2209             }
2210         }
2211         container conform-transmit {
2212             tailf:cli-no-keyword;
2213             tailf:cli-drop-node-name;
2214             tailf:cli-flatten-container;
2215             container conform-action {
2216                 tailf:info "action when rate is less than conform burst";
2217                 description "action when rate is less than conform burst";
2218                 tailf:cli-flatten-container;
2219                 uses police-action-transmit-grouping;
2220             }
2221         }
2222         container conform-drop {
2223             tailf:cli-no-keyword;
2224             tailf:cli-drop-node-name;
2225             tailf:cli-flatten-container;
2226             container conform-action {
2227                 tailf:info "action when rate is less than conform burst";
2228                 description "action when rate is less than conform burst";
2229                 tailf:cli-flatten-container;
2230                 uses police-action-drop-grouping;
2231             }
2232         }
2233     }
2234
2235     grouping police-action-transmit-grouping {
2236         leaf transmit {
2237             tailf:info "transmit packet";
2238             description "transmit packet";
2239             type empty;
2240         }
2241     }
2242
2243     grouping police-exceed-action-grouping {
2244         container exceed-dscp {
2245             tailf:cli-no-keyword;
2246             tailf:cli-drop-node-name;
2247             tailf:cli-flatten-container;
2248             container exceed-action {
2249                 tailf:info "action when rate is within conform and "+
2250                 "conform + exceed burst";
2251                 description "action when rate is within conform and "+
2252                     "conform + exceed burst";
2253                 tailf:cli-flatten-container;
2254                 leaf dscp {
2255                     //tailf:info
2256                     type dscp-type;
2257                 }
2258             }
2259         }
2260         container exceed-set-clp-transmit {
2261             tailf:cli-no-keyword;
2262             tailf:cli-drop-node-name;
2263             tailf:cli-flatten-container;
2264             container exceed-action {
2265                 tailf:info "action when rate is within conform and "+
2266                 "conform + exceed burst";
2267                 description "action when rate is within conform and "+
2268                     "conform + exceed burst";
2269                 tailf:cli-flatten-container;
2270                     leaf set-clp-transmit {
2271                     tailf:info "set atm clp and send it";
2272                     description "set atm clp and send it";
2273                     type empty;
2274                 }
2275             }
2276         }
2277         container exceed-set-cos-transmit {
2278             tailf:cli-no-keyword;
2279             tailf:cli-drop-node-name;
2280             tailf:cli-flatten-container;
2281             container exceed-action {
2282                 tailf:info "action when rate is within conform and "+
2283                 "conform + exceed burst";
2284                 description "action when rate is within conform and "+
2285                     "conform + exceed burst";
2286                 tailf:cli-flatten-container;
2287                 leaf set-cos-transmit {
2288                     tailf:info "rewrite packet cos and send it";
2289                     description "rewrite packet cos and send it";
2290                     type cos_value-type;
2291                 }
2292             }
2293         }
2294         container exceed-set-discard-class-transmit {
2295             tailf:cli-no-keyword;
2296             tailf:cli-drop-node-name;
2297             tailf:cli-flatten-container;
2298             container exceed-action {
2299                 tailf:info "action when rate is within conform and "+
2300                 "conform + exceed burst";
2301                 description "action when rate is within conform and "+
2302                     "conform + exceed burst";
2303                 tailf:cli-flatten-container;
2304                 leaf set-discard-class-transmit {
2305                     tailf:info "set discard-class and send it";
2306                     description "set discard-class and send it";
2307                     type uint8 {
2308                         tailf:info "<0-7>;;new discard-class";
2309                         range "0..7";
2310                     }
2311                 }
2312             }
2313         }
2314         container exceed-set-dscp-transmit {
2315             tailf:cli-no-keyword;
2316             tailf:cli-drop-node-name;
2317             tailf:cli-flatten-container;
2318             container exceed-action {
2319                 tailf:info "action when rate is within conform and "+
2320                 "conform + exceed burst";
2321                 description "action when rate is within conform and "+
2322                     "conform + exceed burst";
2323                 tailf:cli-flatten-container;
2324                 leaf set-dscp-transmit {
2325                     tailf:info "set dscp and send it";
2326                     description "set dscp and send it";
2327                     type dscp-type;
2328                 }
2329                 container set-dscp-transmit-c {
2330                     tailf:alt-name "set-dscp-transmit";
2331                     container dscp {
2332                         leaf table {
2333                             type enumeration {
2334                                 enum policed-dscp;
2335                             }
2336                         }
2337                     }
2338                 }
2339             }
2340         }
2341         container exceed-set-frde-transmit {
2342             tailf:cli-no-keyword;
2343             tailf:cli-drop-node-name;
2344             tailf:cli-flatten-container;
2345             container exceed-action {
2346                 tailf:info "action when rate is within conform and "+
2347                 "conform + exceed burst";
2348                 description "action when rate is within conform and "+
2349                 "conform + exceed burst";
2350                 tailf:cli-flatten-container;
2351                 leaf set-frde-transmit {
2352                     tailf:info "set FR DE and send it";
2353                     description "set FR DE and send it";
2354                     type empty;
2355                 }
2356             }
2357         }
2358         container exceed-set-mpls-exp-imposition-transmit {
2359             tailf:cli-no-keyword;
2360             tailf:cli-drop-node-name;
2361             tailf:cli-flatten-container;
2362             container exceed-action {
2363                 tailf:info "action when rate is within conform and "+
2364                     "conform + exceed burst";
2365                 description "action when rate is within conform and "+
2366                     "conform + exceed burst";
2367                 tailf:cli-flatten-container;
2368                 leaf set-mpls-exp-imposition-transmit {
2369                     tailf:info "set exp at tag imposition and send it";
2370                     description "set exp at tag imposition and send it";
2371                     type exp_value-type;
2372                 }
2373             }
2374         }
2375         container exceed-set-mpls-exp-topmost-transmit {
2376             tailf:cli-no-keyword;
2377             tailf:cli-drop-node-name;
2378             tailf:cli-flatten-container;
2379             container exceed-action {
2380                 tailf:info "action when rate is within conform and "+
2381                     "conform + exceed burst";
2382                 description "action when rate is within conform and "+
2383                 "conform + exceed burst";
2384                 tailf:cli-flatten-container;
2385                 leaf set-mpls-exp-topmost-transmit {
2386                     tailf:info "set exp on topmost label and send it";
2387                     description "set exp on topmost label and send it";
2388                     type exp_value-type;
2389                 }
2390             }
2391         }
2392         container exceed-set-prec-transmit {
2393             tailf:cli-no-keyword;
2394             tailf:cli-drop-node-name;
2395             tailf:cli-flatten-container;
2396             container exceed-action {
2397                 tailf:info "action when rate is within conform and "+
2398                     "conform + exceed burst";
2399                 description "action when rate is within conform and "+
2400                     "conform + exceed burst";
2401                 tailf:cli-flatten-container;
2402                 leaf set-prec-transmit {
2403                     tailf:info "rewrite packet precedence and send it";
2404                     description "rewrite packet precedence and send it";
2405                     type prec_value-type;
2406                 }
2407             }
2408         }
2409         container exceed-set-qos-transmit {
2410             tailf:cli-no-keyword;
2411             tailf:cli-drop-node-name;
2412             tailf:cli-flatten-container;
2413             container exceed-action {
2414                 tailf:info "action when rate is within conform and "+
2415                         "conform + exceed burst";
2416                 description "action when rate is within conform and "+
2417                         "conform + exceed burst";
2418                 tailf:cli-flatten-container;
2419                 leaf set-qos-transmit {
2420                     tailf:info "set qos-group and send it";
2421                     description "set qos-group and send it";
2422                     type qos_value-type;
2423                 }
2424             }
2425         }
2426         container exceed-transmit {
2427             tailf:cli-no-keyword;
2428             tailf:cli-drop-node-name;
2429             tailf:cli-flatten-container;
2430             container exceed-action {
2431                 tailf:info "action when rate is within conform and "+
2432                         "conform + exceed burst";
2433                 description "action when rate is within conform and "+
2434                         "conform + exceed burst";
2435                 tailf:cli-flatten-container;
2436                 uses police-action-transmit-grouping;
2437             }
2438         }
2439         container exceed-drop {
2440             tailf:cli-no-keyword;
2441             tailf:cli-drop-node-name;
2442             tailf:cli-flatten-container;
2443             container exceed-action {
2444                 tailf:info "action when rate is within conform and "+
2445                         "conform + exceed burst";
2446                 description "action when rate is within conform and "+
2447                         "conform + exceed burst";
2448                 tailf:cli-flatten-container;
2449                 uses police-action-drop-grouping;
2450             }
2451         }
2452     }
2453
2454     grouping police-violate-action-grouping {
2455         container violate-set-clp-transmit {
2456             tailf:cli-no-keyword;
2457             tailf:cli-drop-node-name;
2458             tailf:cli-flatten-container;
2459             container violate-action {
2460                 tailf:info "action when rate is greater than conform + "+
2461                         "exceed burst";
2462                 description "action when rate is greater than conform + "+
2463                         "exceed burst";
2464                 tailf:cli-flatten-container;
2465                 leaf set-clp-transmit {
2466                   tailf:info "set atm clp and send it";
2467                   description "set atm clp and send it";
2468                   type empty;
2469                 }
2470             }
2471         }
2472         container violate-set-cos-transmit {
2473             tailf:cli-no-keyword;
2474             tailf:cli-drop-node-name;
2475             tailf:cli-flatten-container;
2476             container violate-action {
2477                 tailf:info "action when rate is greater than conform + "+
2478                         "exceed burst";
2479                 description "action when rate is greater than conform + "+
2480                         "exceed burst";
2481                 tailf:cli-flatten-container;
2482                 leaf set-cos-transmit {
2483                   tailf:info "rewrite packet cos and send it";
2484                   description "rewrite packet cos and send it";
2485                   type cos_value-type;
2486                 }
2487             }
2488         }
2489         container violate-set-discard-class-transmit {
2490             tailf:cli-no-keyword;
2491             tailf:cli-drop-node-name;
2492             tailf:cli-flatten-container;
2493             container violate-action {
2494                 tailf:info "action when rate is greater than conform + "+
2495                         "exceed burst";
2496                 description "action when rate is greater than conform + "+
2497                         "exceed burst";
2498                 tailf:cli-flatten-container;
2499                 leaf set-discard-class-transmit {
2500                     tailf:info "set discard-class and send it";
2501                     description "set discard-class and send it";
2502                     type uint8 {
2503                         tailf:info "<0-7>;;new discard-class";
2504                         range "0..7";
2505                     }
2506                 }
2507             }
2508         }
2509         container violate-set-dscp-transmit {
2510             tailf:cli-no-keyword;
2511             tailf:cli-drop-node-name;
2512             tailf:cli-flatten-container;
2513             container violate-action {
2514                 tailf:info "action when rate is greater than conform + "+
2515                         "exceed burst";
2516                 description "action when rate is greater than conform + "+
2517                         "exceed burst";
2518                 tailf:cli-flatten-container;
2519                 leaf set-dscp-transmit {
2520                     tailf:info "set dscp and send it";
2521                     description "set dscp and send it";
2522                     type dscp-type;
2523                 }
2524             }
2525         }
2526         container violate-set-frde-transmit {
2527             tailf:cli-no-keyword;
2528             tailf:cli-drop-node-name;
2529             tailf:cli-flatten-container;
2530             container violate-action {
2531                 tailf:info "action when rate is greater than conform + "+
2532                         "exceed burst";
2533                 description "action when rate is greater than conform + "+
2534                         "exceed burst";
2535                 tailf:cli-flatten-container;
2536                 leaf set-frde-transmit {
2537                     tailf:info "set FR DE and send it";
2538                     description "set FR DE and send it";
2539                     type empty;
2540                 }
2541             }
2542         }
2543         container violate-set-mpls-exp-imposition-transmit {
2544             tailf:cli-no-keyword;
2545             tailf:cli-drop-node-name;
2546             tailf:cli-flatten-container;
2547             container violate-action {
2548                 tailf:info "action when rate is greater than conform + "+
2549                         "exceed burst";
2550                 description "action when rate is greater than conform + "+
2551                         "exceed burst";
2552                 tailf:cli-flatten-container;
2553                 leaf set-mpls-exp-imposition-transmit {
2554                     tailf:info "set exp at tag imposition and send it";
2555                     description "set exp at tag imposition and send it";
2556                     type exp_value-type;
2557                 }
2558             }
2559         }
2560         container violate-set-mpls-exp-topmost-transmit {
2561             tailf:cli-no-keyword;
2562             tailf:cli-drop-node-name;
2563             tailf:cli-flatten-container;
2564             container violate-action {
2565                 tailf:info "action when rate is greater than conform + "+
2566                         "exceed burst";
2567                 description "action when rate is greater than conform + "+
2568                         "exceed burst";
2569                 tailf:cli-flatten-container;
2570                 leaf set-mpls-exp-topmost-transmit {
2571                     tailf:info "set exp on topmost label and send it";
2572                     description "set exp on topmost label and send it";
2573                     type exp_value-type;
2574                 }
2575             }
2576         }
2577         container violate-set-prec-transmit {
2578             tailf:cli-no-keyword;
2579             tailf:cli-drop-node-name;
2580             tailf:cli-flatten-container;
2581             container violate-action {
2582                 tailf:info "action when rate is greater than conform + "+
2583                         "exceed burst";
2584                 description "action when rate is greater than conform + "+
2585                         "exceed burst";
2586                 tailf:cli-flatten-container;
2587                 leaf set-prec-transmit {
2588                     tailf:info "rewrite packet precedence and send it";
2589                     description "rewrite packet precedence and send it";
2590                     type prec_value-type;
2591                 }
2592             }
2593         }
2594         container violate-set-qos-transmit {
2595             tailf:cli-no-keyword;
2596             tailf:cli-drop-node-name;
2597             tailf:cli-flatten-container;
2598             container violate-action {
2599                 tailf:info "action when rate is greater than conform + "+
2600                         "exceed burst";
2601                 description "action when rate is greater than conform + "+
2602                         "exceed burst";
2603                 tailf:cli-flatten-container;
2604                 leaf set-qos-transmit {
2605                     tailf:info "set qos-group and send it";
2606                     description "set qos-group and send it";
2607                     type qos_value-type;
2608                 }
2609             }
2610         }
2611         container violate-transmit {
2612             tailf:cli-no-keyword;
2613             tailf:cli-drop-node-name;
2614             tailf:cli-flatten-container;
2615             container violate-action {
2616                 tailf:info "action when rate is greater than conform + "+
2617                         "exceed burst";
2618                 description "action when rate is greater than conform + "+
2619                         "exceed burst";
2620                 tailf:cli-flatten-container;
2621                 uses police-action-transmit-grouping;
2622             }
2623         }
2624             container violate-drop {
2625             tailf:cli-no-keyword;
2626             tailf:cli-drop-node-name;
2627             tailf:cli-flatten-container;
2628             container violate-action {
2629                 tailf:info "action when rate is greater than conform + "+
2630                         "exceed burst";
2631                 description "action when rate is greater than conform + "+
2632                         "exceed burst";
2633                 tailf:cli-flatten-container;
2634                 uses police-action-drop-grouping;
2635             }
2636         }
2637     }
2638
2639     grouping pseudowire-grouping {
2640         // Removed body
2641     }
2642
2643     grouping random-detect-grouping {
2644         leaf min-threshold {
2645             tailf:cli-drop-node-name;
2646             tailf:cli-incomplete-command;
2647             type uint16 {
2648                 range "1..4096";
2649                 tailf:info "<1-4096>;;minimum threshold (number of packets)";
2650             }
2651         }
2652         leaf max-threshold {
2653             tailf:cli-drop-node-name;
2654             tailf:cli-incomplete-command;
2655             type uint16 {
2656                 range "1..4096";
2657                 tailf:info "<1-4096>;;maximum threshold (number of packets)";
2658             }
2659         }
2660         leaf denominator {
2661             tailf:cli-drop-node-name;
2662             type uint32 {
2663                 range "1..65535";
2664                 tailf:info "<1-65535>;;mark probability denominator";
2665             }
2666         }
2667     }
2668
2669
2670 /// ========================================================================
2671 /// native
2672 /// ========================================================================
2673
2674     container native {
2675         tailf:cli-drop-node-name;
2676         container table-map {
2677             tailf:info "Map external entry attributes into routing table";
2678             tailf:cli-full-command;
2679             description "Map external entry attributes into routing table";
2680             tailf:display-when "ipv4 or ../../ipv4 or ../ipv4 " +
2681                 " or ipv6 or ../../ipv6 or ../ipv6 ";
2682             leaf name {
2683                 description "route-map name";
2684                 tailf:cli-drop-node-name;
2685                 type string {
2686                     tailf:info "WORD;;route-map name";
2687                 }
2688             }
2689             leaf filter {
2690                 tailf:info "Selective route download";
2691                 type empty;
2692             }
2693         }
2694
2695 /// ========================================================================
2696 /// interface
2697 /// ========================================================================
2698
2699     container interface {
2700         tailf:info "Configure interfaces";
2701         description "Configure interfaces";
2702         tailf:cli-diff-dependency "/ios:native/vrf";
2703         tailf:cli-explicit-exit;
2704
2705         // interface AppNav-Compress
2706         list AppNav-Compress {
2707             tailf:info "Service-Context Virtual Interface Compress";
2708             description "Service-Context Virtual Interface Compress";
2709             tailf:cli-allow-join-with-key {
2710                 tailf:cli-display-joined;
2711             }
2712             tailf:cli-mode-name "config-if";
2713             tailf:cli-suppress-key-abbreviation;
2714             key name;
2715             leaf name {
2716                 type uint16 {
2717                     tailf:info "<1-1000>;;AppNav-Compress interface number";
2718                     range "1..1000";
2719                 }
2720             }
2721             uses interface-common-grouping;
2722         }
2723         // interface AppNav-UnCompress
2724         list AppNav-UnCompress {
2725             tailf:info "Service-Context Virtual Interface UnCompress";
2726             description "Service-Context Virtual Interface UnCompress";
2727             tailf:cli-allow-join-with-key {
2728                 tailf:cli-display-joined;
2729             }
2730             tailf:cli-mode-name "config-if";
2731             tailf:cli-suppress-key-abbreviation;
2732             key name;
2733             leaf name {
2734                 type uint16 {
2735                     tailf:info "<1-1000>;;AppNav-UnCompress interface number";
2736                     range "1..1000";
2737                 }
2738             }
2739             uses interface-common-grouping;
2740         }
2741
2742         // interface ATM #
2743         list ATM {
2744             tailf:info "ATM interface";
2745             description "ATM interface";
2746             tailf:cli-allow-join-with-key {
2747                 tailf:cli-display-joined;
2748             }
2749             tailf:cli-mode-name "config-if";
2750             tailf:cli-suppress-key-abbreviation;
2751             key name;
2752             leaf name {
2753                 type string {
2754                     tailf:info "<slot>/<subslot>/<port>;;ATM interface number";
2755                     pattern "([0-9]/){2}([0-9]|(ima[0-9]))(:[0-9])?";
2756                 }
2757             }
2758             uses interface-atm-grouping;
2759         }
2760
2761         // subinterface ATM #.#
2762         container ATM-subinterface {
2763             tailf:cli-drop-node-name;
2764             list ATM {
2765                 tailf:cli-allow-join-with-key {
2766                     tailf:cli-display-joined;
2767                 }
2768                 tailf:cli-mode-name "config-subif";
2769                 tailf:cli-suppress-key-abbreviation;
2770                 key name;
2771                 leaf name {
2772                     type string {
2773                         pattern "([0-9]/){2}[0-9]\.([0-9]/){3}[0-9]";
2774                     }
2775                 }
2776                 uses interface-atm-grouping;
2777             }
2778         }
2779
2780         // interface ATM-ACR #
2781         list ATM-ACR {
2782             tailf:info "ATM-ACR interface";
2783             description "ATM-ACR interface";
2784             tailf:cli-allow-join-with-key {
2785                 tailf:cli-display-joined;
2786             }
2787             tailf:cli-mode-name "config-if";
2788             tailf:cli-suppress-key-abbreviation;
2789             key name;
2790             leaf name {
2791                 type string {
2792                     tailf:info "<slot>/<subslot>/<port>;;ATM-ACR interface number";
2793                     pattern "[0-9]";
2794                 }
2795             }
2796             uses interface-atm-grouping;
2797         }
2798
2799         // subinterface ATM-ACR #.#
2800         container ATM-ACRsubinterface {
2801             tailf:cli-drop-node-name;
2802             list ATM-ACR {
2803                 tailf:cli-allow-join-with-key {
2804                     tailf:cli-display-joined;
2805                 }
2806                 tailf:cli-mode-name "config-subif";
2807                 tailf:cli-suppress-key-abbreviation;
2808                 key name;
2809                 leaf name {
2810                     type string {
2811                         pattern "[0-9]\.([0-9]/){3}[0-9]";
2812                     }
2813                 }
2814                 uses interface-atm-grouping;
2815             }
2816         }
2817         // interface BDI
2818         list BDI {
2819             tailf:info "Bridge-Domain interface";
2820             description "Bridge-Domain interface";
2821             tailf:cli-allow-join-with-key {
2822                 tailf:cli-display-joined;
2823             }
2824             tailf:cli-mode-name "config-if";
2825             key name;
2826             leaf name {
2827                 type string {
2828                     // pattern "([0-9])+/([0-9])+(/([0-9])+)?";
2829                     tailf:info "<1-16000>;;BDI interface number";
2830                 }
2831             }
2832             uses interface-common-grouping;
2833         }
2834
2835         // interface CEM #
2836         list CEM {
2837             tailf:info "Circuit Emulation interface";
2838             description "Circuit Emulation interface";
2839             tailf:cli-allow-join-with-key {
2840                 tailf:cli-display-joined;
2841             }
2842             tailf:cli-mode-name "config-if";
2843             tailf:cli-suppress-key-abbreviation;
2844             key name;
2845             leaf name {
2846                 type string {
2847                     tailf:info "<slot>/<port>;;CEM interface number";
2848                     pattern "([0-9]/){2}[0-9]";
2849                 }
2850             }
2851             uses interface-atm-grouping;
2852         }
2853
2854         // interface CEM-ACR #
2855         list CEM-ACR {
2856             tailf:info "Circuit Emulation interface";
2857             description "Circuit Emulation interface";
2858             tailf:cli-allow-join-with-key {
2859                 tailf:cli-display-joined;
2860             }
2861             tailf:cli-mode-name "config-if";
2862             tailf:cli-suppress-key-abbreviation;
2863             key name;
2864             leaf name {
2865                 type uint8 {
2866                     tailf:info "<0-255>;;CEM-ACR interface number";
2867                     range "0..255";
2868                 }
2869             }
2870             uses interface-atm-grouping;
2871         }
2872
2873         // interface Embedded-Service-Engine
2874         list Embedded-Service-Engine {
2875             tailf:info "cisco embedded service engine module";
2876             description "cisco embedded service engine module";
2877             tailf:cli-allow-join-with-key {
2878                 tailf:cli-display-joined;
2879             }
2880             tailf:cli-mode-name "config-if";
2881             // tailf:cli-full-command;
2882             key name;
2883             leaf name {
2884                 type string {
2885                     tailf:info "<0-2>/<0-0>;;Embedded-Service-Engine interface number";
2886                 }
2887             }
2888             uses interface-common-grouping;
2889         }
2890
2891         // interface FastEthernet
2892         list FastEthernet {
2893             tailf:info "FastEthernet IEEE 802.3";
2894             description "FastEthernet IEEE 802.3";
2895             tailf:cli-allow-join-with-key {
2896                 tailf:cli-display-joined;
2897             }
2898             tailf:cli-mode-name "config-if";
2899                 // tailf:cli-full-command;
2900             key name;
2901             leaf name {
2902                 type string {
2903                     //pattern "([0-9])+(/([0-9])+)*";
2904                     tailf:info "<0-66>/<0-128>;;FastEthernet interface number";
2905                 }
2906             }
2907             uses interface-ethernet-grouping;
2908             uses interface-common-grouping;
2909             uses interface-zone-member-grouping;
2910             uses interface-switch-grouping; //CATALYST
2911         }
2912
2913         // interface GigabitEthernet
2914         list GigabitEthernet {
2915             tailf:info "GigabitEthernet IEEE 802.3z";
2916             description "GigabitEthernet IEEE 802.3z";
2917             tailf:cli-allow-join-with-key {
2918                 tailf:cli-display-joined;
2919             }
2920             tailf:cli-mode-name "config-if";
2921                 // tailf:cli-full-command;
2922             key name;
2923             leaf name {
2924                 type string {
2925                     //pattern "([0-9])+(/([0-9])+)*";
2926                     tailf:info "<0-66>/<0-128>;;"+
2927                         "GigabitEthernet interface number";
2928                 }
2929             }
2930             leaf media-type {
2931                 tailf:info "Media type";
2932                 description "Media type";
2933                 type enumeration {
2934                     enum auto-select {
2935                         tailf:info "Use whichever connector is attached";
2936                     }
2937                     enum rj45 {
2938                         tailf:info "Copper";
2939                     }
2940                     enum sfp {
2941                         tailf:info "Fiber";
2942                     }
2943                 }
2944             }
2945             leaf port-type {
2946                 //FIXME: tailf:info
2947                 //FIXME: 3600 only?
2948                 type enumeration {
2949                     enum nni;
2950                 }
2951             }
2952             uses interface-ethernet-grouping;
2953             uses interface-common-grouping;
2954             uses interface-zone-member-grouping;
2955             uses interface-switch-grouping; //CATALYST
2956         }
2957
2958         // interface TenGigabitEthernet
2959         list TenGigabitEthernet {
2960             tailf:info "Ten Gigabit Ethernet";
2961             description "Ten Gigabit Ethernet";
2962             tailf:cli-allow-join-with-key {
2963                 tailf:cli-display-joined;
2964             }
2965             tailf:cli-mode-name "config-if";
2966                 // tailf:cli-full-command;
2967             key name;
2968             leaf name {
2969                 type string {
2970                     //pattern "([0-9])+(/([0-9])+)*";
2971                     tailf:info "<0-66>/<0-128>;;"+
2972                         "TenGigabitEthernet interface number";
2973                 }
2974             }
2975             leaf media-type {
2976                 tailf:info "Media type";
2977                 description "Media type";
2978                 type enumeration {
2979                     enum auto-select {
2980                         tailf:info "Use whichever connector is attached";
2981                     }
2982                     enum rj45 {
2983                         tailf:info "Copper";
2984                     }
2985                         enum sfp {
2986                         tailf:info "Fiber";
2987                     }
2988                 }
2989             }
2990             leaf port-type {
2991                 //FIXME: tailf:info
2992                 //FIXME: 3600 only?
2993                 type enumeration {
2994                     enum nni;
2995                 }
2996             }
2997             uses interface-ethernet-grouping;
2998             uses interface-common-grouping;
2999             uses interface-zone-member-grouping;
3000             uses interface-switch-grouping; //CATALYST
3001         }
3002
3003         // interface Loopback
3004         list Loopback {
3005             // pvh hide Loopback interfaces
3006             //    tailf:hidden full;
3007             tailf:info "Loopback interface";
3008             description "Loopback interface";
3009             tailf:cli-allow-join-with-key {
3010                 tailf:cli-display-joined;
3011             }
3012             tailf:cli-mode-name "config-if";
3013                 // tailf:cli-full-command;
3014             key name;
3015             leaf name {
3016                 type string {
3017                     // pattern "([0-9])+/([0-9])+(/([0-9])+)?";
3018                     tailf:info "<0-2147483647>;;Loopback interface number";
3019                 }
3020             }
3021             uses interface-common-grouping;
3022         }
3023
3024         list nve {
3025             tailf:info "Network virtualization endpoint interface";
3026             description "Network virtualization endpoint interface";
3027             tailf:cli-allow-join-with-key {
3028                 tailf:cli-display-joined;
3029             }
3030             tailf:cli-mode-name "config-if";
3031             key name;
3032             leaf name {
3033                 type uint16 {
3034                     tailf:info "<1-4096>;;nve interface number";
3035                     range "1..4096";
3036                 }
3037             }
3038
3039             container source-interface {
3040                 tailf:info "Specify source interface for NVE";
3041                 description "Specify source interface for NVE";
3042                 // FIXME: tailf:cli-diff-dependency "/ios:native/interface";
3043                 uses interface-grouping;
3044             }
3045             container member {
3046                 tailf:cli-incomplete-command;
3047                 tailf:cli-sequence-commands;
3048                 list vni {
3049                     tailf:info "Configure VNI information";
3050                     description "Configure VNI information";
3051                     tailf:cli-sequence-commands;
3052                     tailf:cli-compact-syntax;
3053
3054                     key vni-range;
3055                     leaf vni-range {
3056                         type string {
3057                             tailf:info "WORD;;VNI range or instance between 4096-16777215 example: 6010-6030 or 7115";
3058                         }
3059                     }
3060                     container mcast-group {
3061                         tailf:cli-incomplete-command;
3062                         tailf:cli-sequence-commands;
3063                         leaf multicast-group-min {
3064                             tailf:cli-drop-node-name;
3065                             tailf:info "Starting Multicast Group IPv4 Address";
3066                             description "Starting Multicast Group IPv4 Address";
3067                             type inet:ipv4-address {
3068                                 tailf:info "A.B.C.D;;IP address";
3069                             }
3070                         }
3071                         leaf multicast-group-max {
3072                             tailf:cli-drop-node-name;
3073                             tailf:info "Ending Multicast Group IPv4 Address";
3074                             description "Ending Multicast Group IPv4 Address";
3075                             type inet:ipv4-address {
3076                                 tailf:info "A.B.C.D;;IP address";
3077                             }
3078                         }
3079                     }
3080                 }
3081             }
3082         }
3083
3084         // interface overlay
3085         list overlay {
3086             tailf:info "Overlay interface";
3087             description "Overlay interface";
3088             tailf:cli-allow-join-with-key {
3089                 tailf:cli-display-joined;
3090             }
3091             tailf:cli-mode-name "config-if";
3092             key name;
3093             leaf name {
3094                 type uint16 {
3095                     tailf:info "<0-512>;;Overlay interface number";
3096                     range "0..512";
3097                 }
3098             }
3099             uses interface-common-grouping;
3100             uses interface-ethernet-grouping;
3101             uses interface-overlay-grouping;
3102         }
3103
3104         // interface Port-channel
3105         list Port-channel {
3106             tailf:info "Ethernet Channel of interfaces";
3107             description "Ethernet Channel of interfaces";
3108             tailf:cli-allow-join-with-key {
3109                 tailf:cli-display-joined;
3110             }
3111             tailf:cli-mode-name "config-if";
3112                 // tailf:cli-full-command;
3113             key name;
3114             leaf name {
3115                 type uint32 {
3116                     tailf:info "<1-512>;;Port-channel interface number";
3117                     range "1..512";
3118                 }
3119             }
3120             leaf pc-speed {
3121                 tailf:alt-name "speed";
3122                 tailf:info "Configure speed operation.";
3123                 description "Configure speed operation.";
3124                 type enumeration {
3125                     enum "10" {
3126                         tailf:info "Force 10 Mbps operation";
3127                     }
3128                     enum "100" {
3129                         tailf:info "Force 100 Mbps operation";
3130                     }
3131                     enum "1000" {
3132                         tailf:info "Enable AUTO speed configuration";
3133                     }
3134                     enum "nonegotiate" {
3135                         //FIXME
3136                     }
3137                     enum "auto" {
3138                         tailf:info "Enable AUTO speed configuration";
3139                     }
3140                 }
3141             }
3142             uses interface-common-grouping;
3143             uses interface-switch-grouping; //CATALYST
3144             uses interface-ethernet-grouping;
3145         }
3146
3147         // subinterface Port-channel #.#
3148         container Port-channel-subinterface {
3149             tailf:cli-drop-node-name;
3150             list Port-channel {
3151                 tailf:cli-allow-join-with-key {
3152                     tailf:cli-display-joined;
3153                 }
3154                 tailf:cli-mode-name "config-subif";
3155                 tailf:cli-suppress-key-abbreviation;
3156                 key name;
3157                 leaf name {
3158                     type string;
3159                 }
3160                 uses interface-common-grouping;
3161                 uses interface-switch-grouping; //CATALYST
3162                 uses interface-ethernet-grouping;
3163             }
3164         }
3165
3166         //interface pseudowire
3167         list pseudowire {
3168             tailf:info "Pseudowire Interface";
3169             description "Pseudowire Interface";
3170             tailf:cli-mode-name "config-if";
3171             tailf:cli-allow-join-with-key {
3172                 tailf:cli-display-joined;
3173             }
3174             key name;
3175             leaf name {
3176                 type uint32 {
3177                     tailf:info "<1-231072>;;pseudowire interface number";
3178                     range "1..231072";
3179                 }
3180             }
3181             uses pseudowire-grouping;
3182         }
3183         //interface SM
3184         list "SM" {
3185             tailf:info "SM Interface";
3186             description "SM Interface";
3187             tailf:cli-mode-name "config-if";
3188             tailf:cli-allow-join-with-key {
3189                 tailf:cli-display-joined;
3190             }
3191             key name;
3192             leaf name {
3193                 type string {
3194                     pattern "([0-9])+(/([0-9])+)?";
3195                 }
3196             }
3197             uses interface-common-grouping;
3198         }
3199         //interface Cellular
3200         list Cellular {
3201             tailf:info "Cellular Interface";
3202             description "Cellular Interface";
3203             tailf:cli-mode-name "config-if";
3204             tailf:cli-allow-join-with-key {
3205                 tailf:cli-display-joined;
3206             }
3207             key name;
3208             leaf name {
3209                 type string {
3210                     pattern "([0-9])+(/([0-9])+)?";
3211                 }
3212             }
3213             uses interface-common-grouping;
3214             uses interface-cellular-grouping;
3215         }
3216
3217         // interface Vlan
3218         list Vlan {
3219             tailf:info "Catalyst Vlans";
3220             description "Catalyst Vlans";
3221             tailf:cli-allow-join-with-key {
3222                 tailf:cli-display-joined;
3223             }
3224             key name;
3225             leaf name {
3226                 type uint16 {
3227                     tailf:info "<1-4094>;;Vlan interface number";
3228                     range "1..4094";
3229                 }
3230             }
3231             uses interface-common-grouping;
3232             uses interface-zone-member-grouping;
3233         }
3234
3235         // interface Group-Async
3236         list Group-Async {
3237             tailf:info "Async Group interface";
3238             description "Async Group interface";
3239             tailf:cli-allow-join-with-key {
3240                 tailf:cli-display-joined;
3241             }
3242             key name;
3243             leaf name {
3244                 type uint16 {
3245                     tailf:info "<0-64>;;Group-Async interface number";
3246                     range "0..64";
3247                 }
3248             }
3249             leaf physical-layer {
3250                 tailf:info "Configure sync or async physical layer on serial "+
3251                     "interface";
3252                 description "Configure sync or async physical layer on serial "+
3253                     "interface";
3254                 type enumeration {
3255                     enum async {
3256                         tailf:info "Configure asynchronous physical layer on serial "
3257                         +"interface";
3258                     }
3259                     enum sync {
3260                     tailf:info "Configure synchronous physical layer on serial "+
3261                         "interface";
3262                     }
3263                 }
3264             }
3265             uses interface-common-grouping;
3266         }
3267
3268         // interface Multilink
3269         list Multilink {
3270             tailf:info "Multilink-group interface";
3271             description "Multilink-group interface";
3272             tailf:cli-allow-join-with-key {
3273                 tailf:cli-display-joined;
3274             }
3275             tailf:cli-mode-name "config-if";
3276             tailf:cli-full-command;
3277             key name;
3278             leaf name {
3279                 type uint16 {
3280                     tailf:info "<1-65535>;;Multilink interface number";
3281                     range "1..65535";
3282                 }
3283             }
3284             uses interface-common-grouping;
3285             uses interface-pointtopoint-grouping;
3286         }
3287
3288         // interface Serial
3289         list Serial {
3290             tailf:info "Serial interface";
3291             description "Serial interface";
3292             tailf:cli-allow-join-with-key {
3293                 tailf:cli-display-joined;
3294             }
3295             tailf:cli-mode-name "config-if";
3296             tailf:cli-full-command;
3297             key name;
3298             leaf name {
3299                 type string {
3300                     pattern "([0-9])+/([0-9])+/([0-9])+\.([0-9])+/([0-9])+/([0-9])+/([0-9])+:([0-9])";
3301                     //FIXME: info + syntax
3302                 }
3303             }
3304             uses interface-common-grouping;
3305             uses interface-pointtopoint-grouping;
3306         }
3307
3308         // interface Tunnel #
3309         list Tunnel {
3310             tailf:info "Tunnel interface";
3311             description "Tunnel interface";
3312             tailf:cli-allow-join-with-key {
3313                 tailf:cli-display-joined;
3314             }
3315             tailf:cli-mode-name "config-if";
3316             tailf:cli-suppress-key-abbreviation;
3317             key name;
3318             leaf name {
3319                 type uint32 {
3320                     tailf:info "<0-2147483647>;;Tunnel interface number";
3321                 }
3322             }
3323             uses interface-common-grouping;
3324
3325             // interface Tunnel* / qos
3326             container qos {
3327                 tailf:info "Quality of Service related commands";
3328                 description "Quality of Service related commands";
3329                 leaf pre-classify {
3330                     tailf:info "Enable QOS classification before packets are tunnel "+
3331                         "encapsulated";
3332                     description "Enable QOS classification before packets are tunnel "+
3333                         "encapsulated";
3334                     type empty;
3335                 }
3336             }
3337
3338             // interface Tunnel* / tunnel
3339             uses interface-tunnel-grouping;
3340         }
3341
3342         // interface Virtual-Template
3343         list Virtual-Template {
3344             tailf:info "Virtual Template interface";
3345             description "Virtual Template interface";
3346             tailf:cli-allow-join-with-key {
3347                 tailf:cli-display-joined;
3348             }
3349             tailf:cli-mode-name "config-if";
3350             tailf:cli-full-command;
3351             tailf:cli-explicit-exit;
3352             key name;
3353             leaf name {
3354                 type uint16 {
3355                     tailf:info "<1-4095>;;Virtual-Template interface number";
3356                     range "1..4095";
3357                 }
3358             }
3359             leaf type {
3360                 tailf:info "type of the virtual-template";
3361                 description "type of the virtual-template";
3362                 tailf:cli-hide-in-submode;
3363                 type enumeration {
3364                     enum ethernet {
3365                       tailf:info "Set VT type as ethernet";
3366                     }
3367                     enum serial {
3368                       tailf:info "Set VT type as serial";
3369                     }
3370                     enum tunnel {
3371                       tailf:info "Set VT type as tunnel";
3372                     }
3373                     enum vpn {
3374                       tailf:info "Set VT type as vpn";
3375                     }
3376                 }
3377             }
3378
3379             uses interface-ethernet-grouping;
3380             uses interface-common-grouping;
3381             uses interface-zone-member-grouping;
3382             uses interface-switch-grouping; //CATALYST
3383             uses interface-pointtopoint-grouping;
3384             // interface Tunnel* / tunnel
3385             uses interface-tunnel-grouping;
3386         }
3387
3388         // interface VirtualPortGroup
3389         list VirtualPortGroup {
3390             tailf:info "Virtual Port Group";
3391             description "Virtual Port Group";
3392             tailf:cli-allow-join-with-key {
3393                 tailf:cli-display-joined;
3394             }
3395             tailf:cli-mode-name "config-if";
3396             tailf:cli-full-command;
3397             tailf:cli-explicit-exit;
3398             key name;
3399             leaf name {
3400                 type uint16 {
3401                     tailf:info " <0-31>;;VirtualPortGroup interface number";
3402                     range "0..31";
3403                 }
3404             }
3405             uses interface-switch-grouping; //CATALYST
3406             uses interface-ethernet-grouping;
3407             uses interface-common-grouping;
3408         }
3409         // interface vasileft
3410         list vasileft {
3411             tailf:info "vasileft";
3412             description "vasileft";
3413             tailf:cli-allow-join-with-key {
3414                 tailf:cli-display-joined;
3415             }
3416             tailf:cli-mode-name "config-if";
3417             tailf:cli-full-command;
3418             tailf:cli-explicit-exit;
3419             key name;
3420             leaf name {
3421                 type uint16 {
3422                     tailf:info "<1-2000>;;vasileft interface number";
3423                     range "1..2000";
3424                 }
3425             }
3426             uses interface-switch-grouping; //CATALYST
3427             uses interface-ethernet-grouping;
3428             uses interface-common-grouping;
3429         }
3430
3431         // interface vasiright
3432         list vasiright {
3433             tailf:info "vasiright";
3434             description "vasiright";
3435             tailf:cli-allow-join-with-key {
3436                 tailf:cli-display-joined;
3437             }
3438             tailf:cli-mode-name "config-if";
3439             tailf:cli-full-command;
3440             tailf:cli-explicit-exit;
3441             key name;
3442             leaf name {
3443                 type uint16 {
3444                     tailf:info "<1-2000>;;vasiright interface number";
3445                     range "1..2000";
3446                  }
3447             }
3448             uses interface-switch-grouping; //CATALYST
3449             uses interface-ethernet-grouping;
3450             uses interface-common-grouping;
3451         }
3452     }
3453
3454
3455 /// ========================================================================
3456 /// mls
3457 /// ========================================================================
3458 /// Note: must come before class-map and policy-map.
3459
3460         container mls {
3461             tailf:info "mls global commands";
3462             description "mls global commands";
3463             tailf:cli-incomplete-no;
3464
3465             // mls acl
3466             container acl {
3467                 tailf:info "MLS ACL operation";
3468                 description "MLS ACL operation";
3469                 // mls acl tcam
3470                 container tcam {
3471                     tailf:info "ACL TCAM";
3472                     description "ACL TCAM";
3473                     leaf default-result {
3474                         tailf:info "Default result to be used during tcam programming";
3475                         description "Default result to be used during tcam programming";
3476                         type enumeration {
3477                             enum bridge {
3478                                 tailf:info "Bridge result";
3479                             }
3480                             enum deny {
3481                                 tailf:info "Deny result";
3482                             }
3483                             enum permit {
3484                                 tailf:info "Permit result";
3485                             }
3486                         }
3487                     }
3488                     container log-update {
3489                         tailf:info "Log TCAM updates";
3490                         description "Log TCAM updates";
3491                         presence true;
3492                         leaf rate-limit-msg {
3493                             tailf:info "Enable/Disable syslog ratelimiting";
3494                             description "Enable/Disable syslog ratelimiting";
3495                             type enumeration {
3496                                 enum disable {
3497                                     tailf:info "Disable ratelimiting syslog";
3498                                 }
3499                                 enum enable {
3500                                     tailf:info "Enable syslog ratelimiting at 1 per second";
3501                                 }
3502                             }
3503                         }
3504                     }
3505                     leaf share-global {
3506                         tailf:info "share global deny or permit any entries";
3507                         description "share global deny or permit any entries";
3508                         tailf:cli-boolean-no;
3509                         tailf:cli-trim-default;
3510                         type boolean;
3511                         default true;
3512                     }
3513                 }
3514             }
3515
3516             //  aging L3 aging
3517             // mls cef
3518             container cef {
3519                 tailf:info "cef keyword";
3520                 description "cef keyword";
3521                 container error {
3522                     leaf action {
3523                         type enumeration {
3524                             enum reset;
3525                         }
3526                     }
3527                 }
3528                //  maximum-routes  Configure route allocation for protocols
3529                //  tunnel          Allow tunnel fragmentation
3530             }
3531             //  erm         FIB Exception Recovery Manager
3532             //  exclude     exclude keyword
3533             // mls flow
3534             container flow {
3535                 tailf:info "flowmask keyword";
3536                 description "flowmask keyword";
3537                 leaf ip {
3538                     tailf:info "flowmask ip keyword";
3539                     description "flowmask ip keyword";
3540                     type enumeration {
3541                         enum interface-destination {
3542                             tailf:info "interface-destination flow keyword";
3543                         }
3544                         enum interface-destination-source {
3545                             tailf:info "interface-destination-source flow keyword";
3546                         }
3547                         enum interface-full {
3548                             tailf:info "interface-full flow keyword";
3549                         }
3550                         enum interface-source {
3551                             tailf:info "interface-source only flow keyword";
3552                         }
3553                     }
3554                 }
3555             }
3556             // mls ip
3557             container ip {
3558                 tailf:info "ip keyword";
3559                 description "ip keyword";
3560                 //  cef        cef keyword
3561                 //  inspect    inspect
3562                 // mls ip multicast
3563                 container multicast {
3564                     tailf:info "multicast keyword";
3565                     description "multicast keyword";
3566                     tailf:cli-display-separated;
3567                     presence true;
3568                     //  bidir              Bidir commands
3569                     //  connected          Enable download of interface/mask entry
3570                     container consistency-check {
3571                         tailf:info "Set consistency checking characteristics";
3572                         description "Set consistency checking characteristics";
3573                         presence true;
3574                         leaf settle-time {
3575                             tailf:info "Settle time for entry/oif for consistancy-checker";
3576                             description "Settle time for entry/oif for consistancy-checker";
3577                             type uint16 {
3578                                 tailf:info "<2-3600>;;Settle time for entry/oif in seconds";
3579                                 range "2..3600";
3580                             }
3581                         }
3582                         //  type         Set consistency checker type
3583                     }
3584                     //  egress             Set egress replication options
3585                     leaf flow-stat-timer {
3586                         tailf:info "timer for flow statistic used by mls-msc and mlsm";
3587                         description "timer for flow statistic used by mls-msc and mlsm";
3588                         type uint8 {
3589                             tailf:info "<1-100>;;#seconds between one batch and another";
3590                             range "1..100";
3591                         }
3592                     }
3593                     //  met-optimization   Enable or disable met optimisation
3594                     //  non-rpf            Enable rate-limiting of non-RPF traffic
3595                     //  replication-mode   Disable auto-detection mode for egress
3596                     //  sso                Stateful switchover parameters
3597                     //  threshold          Threshold rate for installing h/w shortcuts
3598                 }
3599                 //  nat        nat keyword
3600                 //  slb        Server Load Balancing
3601             }
3602             //  nde         netflow data export (nde) keyword
3603             //  netflow     netflow keyword
3604             // mls qos
3605             container mls-qos-conf {
3606                 tailf:cli-no-keyword;
3607                 tailf:cli-drop-node-name;
3608                 leaf qos {
3609                     type empty;
3610                 }
3611             }
3612             // mls qos
3613             container qos {
3614                 tailf:info "QoS parameters";
3615                 description "QoS parameters";
3616                 tailf:cli-incomplete-command;
3617                 tailf:cli-incomplete-no;
3618                 // mls qos aggregate-policer *
3619                 list aggregate-policer {
3620                     tailf:info "Assign aggregate policer";
3621                     description "Assign aggregate policer";
3622                     tailf:cli-suppress-mode;
3623                     tailf:cli-delete-when-empty;
3624                     tailf:cli-compact-syntax;
3625                     tailf:cli-sequence-commands {
3626                         tailf:cli-reset-all-siblings;
3627                     }
3628                     key name;
3629                     leaf name {
3630                         type string {
3631                            tailf:info "WORD;;aggregate policer name";
3632                         }
3633                     }
3634                     leaf target-bit-rate {
3635                         tailf:cli-drop-node-name;
3636                         type uint64 {
3637                             tailf:info "<32000-60000000000>;;Target Bit Rate (bits per "
3638                              +"second) (postfix k, m, g optional; decimal point allowed)";
3639                             range "32000..60000000000";
3640                         }
3641                     }
3642                     leaf burst-normal {
3643                         tailf:cli-drop-node-name;
3644                         tailf:cli-optional-in-sequence;
3645                         type uint32 {
3646                          tailf:info "<1000-31250000>;;Normal burst bytes";
3647                          range "1000..31250000";
3648                        }
3649                     }
3650                     leaf burst-max {
3651                         tailf:cli-drop-node-name;
3652                         tailf:cli-optional-in-sequence;
3653                         when "../burst-normal" {
3654                             tailf:dependency "../burst-normal";
3655                         }
3656                         type uint32 {
3657                             tailf:info "<1000-31250000>;;Maximum burst bytes";
3658                             range "1000..31250000";
3659                         }
3660                     }
3661                     leaf pir {
3662                         tailf:info "PIR";
3663                         description "PIR";
3664                         tailf:cli-optional-in-sequence;
3665                         type uint64 {
3666                             tailf:info "<32000-60000000000>;;Target Bit Rate (bits per "
3667                             +"second) (postfix k, m, g optional; decimal point allowed)";
3668                             range "32000..60000000000";
3669                         }
3670                     }
3671                     container conform-action {
3672                         tailf:info "action when rate is not exceeded";
3673                         description "action when rate is not exceeded";
3674                         tailf:cli-optional-in-sequence;
3675                         tailf:cli-compact-syntax;
3676                         tailf:cli-flatten-container;
3677                         choice action-choice {
3678                             leaf drop {
3679                                 tailf:info "drop packet";
3680                                 description "drop packet";
3681                                 type empty;
3682                             }
3683                             leaf set-dscp-transmit {
3684                                 tailf:info "set dscp and send it";
3685                                 description "set dscp and send it";
3686                                 type dscp-type;
3687                             }
3688                             leaf set-mpls-exp-imposition-transmit {
3689                                 tailf:info "set exp at tag imposition and send it";
3690                                 description "set exp at tag imposition and send it";
3691                                 type uint8 {
3692                                     tailf:info "<0-7>;;new exp";
3693                                     range "0..7";
3694                                 }
3695                             }
3696                             leaf set-prec-transmit {
3697                                 tailf:info "rewrite packet precedence and send it";
3698                                 description "rewrite packet precedence and send it";
3699                                 type uint8 {
3700                                     tailf:info "<0-7>;;new precedence";
3701                                     range "0..7";
3702                                 }
3703                             }
3704                             leaf transmit {
3705                                 tailf:info "transmit packet";
3706                                 description "transmit packet";
3707                                 type empty;
3708                             }
3709                         }
3710                     }
3711                     leaf exceed-action {
3712                         tailf:info "action when rate is exceeded";
3713                         description "action when rate is exceeded";
3714                         tailf:cli-optional-in-sequence;
3715                         type enumeration {
3716                             enum drop {
3717                                 tailf:info "drop packet";
3718                             }
3719                             enum policed-dscp-transmit {
3720                                 tailf:info "change dscp per policed-dscp map and send it";
3721                             }
3722                             enum transmit {
3723                                 tailf:info "transmit packet";
3724                             }
3725                         }
3726                     }
3727                     leaf violate-action {
3728                         tailf:info "action when rate violated";
3729                         description "action when rate violated";
3730                         type enumeration {
3731                             enum drop {
3732                                 tailf:info "drop packet";
3733                             }
3734                             enum policed-dscp-transmit {
3735                                 tailf:info "change dscp per policed-dscp map and send it";
3736                             }
3737                             enum transmit {
3738                                 tailf:info "transmit packet";
3739                             }
3740                         }
3741                     }
3742                 }
3743                 //  map                Define QoS mapping
3744                 //  mls qos map
3745                 container map {
3746                     tailf:info "qos map keyword";
3747                     description "qos map keyword";
3748                     leaf-list cos-dscp {
3749                         tailf:info "cos-dscp map: eight dscp values for cos 0-7";
3750                         description "cos-dscp map: eight dscp values for cos 0-7";
3751                         tailf:cli-flat-list-syntax;
3752                         //max-elements 8;
3753                         type uint8 {
3754                             tailf:info "<0-63>;;CoS values separated by spaces (up to 8 values total)";
3755                             range "0..63";
3756                         }
3757                     }
3758                     leaf-list policed-dscp {
3759                         tailf:info "policed-dscp map keyword";
3760                         description  "policed-dscp map keyword";
3761                         ordered-by user;
3762                         tailf:cli-flat-list-syntax;
3763                         type union {
3764                             type uint8 {
3765                                 tailf:info "<0-63>;;DSCP values separated by spaces (up to 8 values total)";
3766                                 range "0..63";
3767                             }
3768                             type enumeration {
3769                                 enum to {
3770                                     tailf:info "to keyword";
3771                                 }
3772                             }
3773                         }
3774                     }
3775                 }
3776                 //  marking            marking keyword
3777                 //  police             police keyword
3778                 //  protocol           protocol keyword
3779                 //  queueing-only      queueing-only (no QoS rewrite,  no policing)
3780                 //  recirc             recirculate path
3781                 //  mls qos rewrite
3782                 container rewrite {
3783                     tailf:info "packet qos rewrite enable/disable";
3784                     description "packet qos rewrite enable/disable";
3785                     container ip {
3786                         tailf:info "ip packet qos rewrite enable/disable";
3787                         description "ip packet qos rewrite enable/disable";
3788                         container dscp {
3789                             tailf:info "packet ip dscp rewrite enable/disable";
3790                             description "packet ip dscp rewrite enable/disable";
3791                             presence true;
3792                             leaf slot {
3793                                 tailf:info "slot number";
3794                                 description "slot number";
3795                                 type string {
3796                                     tailf:info "WORD;;Slots seperated by commas. Valid slots: 1,2,"
3797                                     +"3,4,5,6,7,8,9";
3798                                 }
3799                             }
3800                         }
3801                     }
3802                 }
3803                 // mls qos queue-set
3804                 container queue-set {
3805                     tailf:info "Choose a queue set for this queue";
3806                     description "Choose a queue set for this queue";
3807                     container output {
3808                         tailf:info "Direction the command applies for this command";
3809                         description "Direction the command applies for this command";
3810                         tailf:cli-sequence-commands;
3811                         tailf:cli-compact-syntax;
3812                         leaf queue-set-id {
3813                             tailf:cli-drop-node-name;
3814                             type uint8 {
3815                                 tailf:info "<1-2>;;queue-set id";
3816                                 range "1..2";
3817                             }
3818                         }
3819                         list threshold {
3820                             tailf:info "Assign threshold values to a queue";
3821                             description "Assign threshold values to a queue";
3822                             tailf:cli-suppress-mode;
3823                             tailf:cli-break-sequence-commands;
3824                             tailf:cli-compact-syntax;
3825                             tailf:cli-sequence-commands;
3826                             key queue-id;
3827                             leaf queue-id {
3828                                 type uint8 {
3829                                     tailf:info "<1-4>;;enter queue id in this queue set";
3830                                     range "1..4";
3831                                 }
3832                             }
3833                             leaf drop1 {
3834                                 tailf:cli-drop-node-name;
3835                                 description "drop threshold1 1-3200";
3836                                 type uint32 {
3837                                     tailf:info "<1-3200>;;enter drop threshold1 1-3200";
3838                                     range "1..3200";
3839                                 }
3840                             }
3841                             leaf drop2 {
3842                                 tailf:cli-drop-node-name;
3843                                 description "drop threshold2 1-3200";
3844                                 type uint32 {
3845                                     tailf:info "<1-3200>;;enter drop threshold2 1-3200";
3846                                     range "1..3200";
3847                                 }
3848                             }
3849                             leaf reserved {
3850                                 tailf:cli-drop-node-name;
3851                                 description "reserved threshold 1-100";
3852                                 type uint32 {
3853                                     tailf:info "<1-3200>;;enter drop threshold2 1-3200";
3854                                     range "1..3200";
3855                                 }
3856                             }
3857                             leaf maximum {
3858                                 tailf:cli-drop-node-name;
3859                                 description "maximum threshold1 1-3200";
3860                                 type uint32 {
3861                                     tailf:info "<1-3200>;;enter maximum threshold1 1-3200";
3862                                     range "1..3200";
3863                                 }
3864                             }
3865                         }
3866                         leaf-list buffers {
3867                             tailf:info "assign buffers to each egress queue";
3868                             description "assign buffers to each egress queue";
3869                             tailf:cli-flat-list-syntax;
3870                             type uint16 {
3871                                 tailf:info "<0-99>/<1-100>;;enter buffer percentage for queue x 0-99/2 1-100";
3872                                 range "0..100";
3873                             }
3874                         }
3875                     }
3876                 }
3877                 // mls qos srr-queue
3878                 container srr-queue {
3879                     tailf:info "Configure SRR receive queues";
3880                     description "Configure SRR receive queues";
3881                     container input {
3882                         tailf:info "input keyword";
3883                         description "input keyword";
3884                         leaf-list bandwidth {
3885                             tailf:info "Configure SRR bandwidth";
3886                             description "Configure SRR bandwidth";
3887                             tailf:cli-flat-list-syntax;
3888                             type uint8 {
3889                                 tailf:info "<1-100>;;enter bandwidth weight for queue id x";
3890                                 range "1..100";
3891                             }
3892                         }
3893                         list threshold {
3894                             tailf:info "Configure queue tail-drop thresholds";
3895                             description "Configure queue tail-drop thresholds";
3896                             tailf:cli-suppress-mode;
3897                             key queue-id;
3898                             leaf queue-id {
3899                                 type uint8 {
3900                                     tailf:info "<1-2>;;enter threshold queue id (1-2)";
3901                                     range "1..2";
3902                                 }
3903                             }
3904                             leaf-list queue-size-percent {
3905                                 tailf:cli-drop-node-name;
3906                                 tailf:cli-flat-list-syntax;
3907                                 type uint8 {
3908                                     tailf:info "<1-100>;;enter percent of queue size for threshold x";
3909                                     range "1..100";
3910                                 }
3911                             }
3912                         }
3913                         list priority-queue {
3914                             tailf:info "Configure priority scheduling";
3915                             description "Configure priority scheduling";
3916                             tailf:cli-suppress-mode;
3917                             key queue-number;
3918                             leaf queue-number {
3919                                 type uint8 {
3920                                     tailf:info "<1-2>;;enter priority queue number [1-2]";
3921                                 }
3922                             }
3923                             leaf bandwidth {
3924                                 tailf:info "ingress priority queue bandwidth % of stack ring";
3925                                 description "ingress priority queue bandwidth % of stack ring";
3926                                 type uint8 {
3927                                     tailf:info "<0-40>;;enter bandwidth number [0-40]";
3928                                     range "0..40";
3929                                 }
3930                             }
3931                         }
3932                         list cos-map {
3933                             tailf:info "Configure cos-map for a queue id";
3934                             description "Configure cos-map for a queue id";
3935                             tailf:cli-suppress-mode;
3936                             key "queue threshold";
3937                             leaf queue {
3938                                 tailf:info "Assign COS values to a queue";
3939                                 description "Assign COS values to a queue";
3940                                 tailf:cli-expose-key-name;
3941                                 type uint8 {
3942                                     tailf:info "<1-4>;;enter cos-map output queue id";
3943                                     range "1..4";
3944                                 }
3945                             }
3946                             leaf threshold {
3947                                 tailf:info "Assign COS values to a queue threshold";
3948                                 description "Assign COS values to a queue threshold";
3949                                 tailf:cli-expose-key-name;
3950                                 type uint8 {
3951                                     tailf:info "<1-3>;;enter cos-map threshold id";
3952                                     range "1..3";
3953                                 }
3954                             }
3955                             leaf-list cos {
3956                                 tailf:cli-drop-node-name;
3957                                 tailf:cli-flat-list-syntax;
3958                                 max-elements 8;
3959                                 type uint8 {
3960                                     tailf:info "<0-7>;;8 cos values separated by spaces";
3961                                     range "0..7";
3962                                 }
3963                             }
3964                         }
3965                         list dscp-map {
3966                             tailf:info "Configure dscp-map for a queue id";
3967                             description "Configure dscp-map for a queue id";
3968                             tailf:cli-suppress-mode;
3969                             key "queue threshold";
3970                             leaf queue {
3971                                 tailf:info "Assign DSCP values to a queue";
3972                                 description "Assign DSCP values to a queue";
3973                                 tailf:cli-expose-key-name;
3974                                 type uint8 {
3975                                     tailf:info "<1-4>;;enter dscp-map output queue id";
3976                                     range "1..4";
3977                                 }
3978                             }
3979                             leaf threshold {
3980                                 tailf:info "Assign DSCP values to a queue threshold";
3981                                 description "Assign DSCP values to a queue threshold";
3982                                 tailf:cli-expose-key-name;
3983                                 type uint8 {
3984                                     tailf:info "<1-3>;;enter dscp-map threshold id";
3985                                     range "1..3";
3986                                 }
3987                             }
3988                             leaf-list dscp {
3989                                 tailf:cli-drop-node-name;
3990                                 tailf:cli-flat-list-syntax;
3991                                 max-elements 8;
3992                                 type uint8 {
3993                                     tailf:info "<0-63>;;dscp values separated by spaces (up to 8 values total)";
3994                                     range "0..63";
3995                                 }
3996                             }
3997                         }
3998                     }
3999                     container output {
4000                         tailf:info "output keyword";
4001                         description "output keyword";
4002                         list cos-map {
4003                             tailf:info "Configure cos-map for a queue id";
4004                             description "Configure cos-map for a queue id";
4005                             tailf:cli-suppress-mode;
4006                             key "queue threshold";
4007                             leaf queue {
4008                                 tailf:info "Assign COS values to a queue";
4009                                 description "Assign COS values to a queue";
4010                                 tailf:cli-expose-key-name;
4011                                 type uint8 {
4012                                     tailf:info "<1-4>;;enter cos-map output queue id";
4013                                     range "1..4";
4014                                 }
4015                             }
4016                             leaf threshold {
4017                                 tailf:info "Assign COS values to a queue threshold";
4018                                 description "Assign COS values to a queue threshold";
4019                                 tailf:cli-expose-key-name;
4020                                 type uint8 {
4021                                     tailf:info "<1-3>;;enter cos-map threshold id";
4022                                     range "1..3";
4023                                 }
4024                             }
4025                             leaf-list cos {
4026                                 tailf:cli-drop-node-name;
4027                                 tailf:cli-flat-list-syntax;
4028                                 max-elements 8;
4029                                 type uint8 {
4030                                     tailf:info "<0-7>;;8 cos values separated by spaces";
4031                                     range "0..7";
4032                                 }
4033                             }
4034                         }
4035                         list dscp-map {
4036                             tailf:info "Configure dscp-map for a queue id";
4037                             description "Configure dscp-map for a queue id";
4038                             tailf:cli-suppress-mode;
4039                             key "queue threshold";
4040                             leaf queue {
4041                                 tailf:info "Assign DSCP values to a queue";
4042                                 description "Assign DSCP values to a queue";
4043                                 tailf:cli-expose-key-name;
4044                                 type uint8 {
4045                                     tailf:info "<1-4>;;enter dscp-map output queue id";
4046                                     range "1..4";
4047                                 }
4048                             }
4049                             leaf threshold {
4050                                 tailf:info "Assign DSCP values to a queue threshold";
4051                                 description "Assign DSCP values to a queue threshold";
4052                                 tailf:cli-expose-key-name;
4053                                 type uint8 {
4054                                     tailf:info "<1-3>;;enter dscp-map threshold id";
4055                                     range "1..3";
4056                                 }
4057                             }
4058                             leaf-list dscp {
4059                                 tailf:cli-drop-node-name;
4060                                 tailf:cli-flat-list-syntax;
4061                                 max-elements 8;
4062                                 type uint8 {
4063                                     tailf:info "<0-63>;;dscp values separated by spaces (up to 8 values total)";
4064                                     range "0..63";
4065                                 }
4066                             }
4067                         }
4068                     }
4069                 }
4070             }
4071             //  statistics-export  qos statistics data export
4072             // mls rate-limit
4073             container rate-limit {
4074                 tailf:info "Rate limit different behaviors";
4075                 description "Rate limit different behaviors";
4076                 //  all        Rate Limiting for both Unicast and Multicast packets
4077                 container layer2 {
4078                     tailf:info "layer2 protocol cases";
4079                     description "layer2 protocol cases";
4080                     //  ip-admission   IP admission on Layer2 ports
4081                     container l2pt {
4082                         tailf:cli-compact-syntax;
4083                         tailf:cli-sequence-commands {
4084                             tailf:cli-reset-siblings;
4085                         }
4086                         tailf:info "layer2 protocol tunnelling packets";
4087                         leaf packets-per-second {
4088                             description "layer2 protocol tunnelling packets";
4089                             tailf:cli-drop-node-name;
4090                             type uint32 {
4091                                  tailf:info "<10-1000000>;;packets per second";
4092                                  range "10..1000000";
4093                             }
4094                         }
4095                         leaf packets-in-burst {
4096                             tailf:cli-drop-node-name;
4097                             type uint32 {
4098                                 tailf:info "<1-255>;;packets in burst";
4099                                 range "1..255";
4100                             }
4101                         }
4102                     }
4103                     //  mac-security   Mac security traffics
4104                     container pdu {
4105                         tailf:info "layer2 protocol data unit packets";
4106                         description "layer2 protocol data unit packets";
4107                         tailf:cli-compact-syntax;
4108                         tailf:cli-sequence-commands {
4109                             tailf:cli-reset-siblings;
4110                         }
4111                         leaf packets-per-second {
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                     //  port-security  Port security traffics
4127                 }
4128                 //  multicast  Rate limiting for Multicast packets
4129                 //  unicast    Rate limiting for Unicast packets
4130             }
4131             //  rp          rp
4132             //  sampling    sampling keyword
4133             // mls verify
4134             container verify {
4135                 tailf:info "enable hardware packet parsing error checks";
4136                 description "enable hardware packet parsing error checks";
4137                 container ip {
4138                     tailf:info "check on IP packets";
4139                     description "check on IP packets";
4140                     leaf checksum {
4141                         tailf:info "check for packet checksum errors";
4142                         description "check for packet checksum errors";
4143                         tailf:cli-boolean-no;
4144                         tailf:cli-trim-default;
4145                         type boolean;
4146                         default true;
4147                     }
4148                     container "length" {
4149                        tailf:info "check for packet length errors";
4150                         description "check for packet length errors";
4151                         leaf consistent {
4152                             tailf:info "check length in header against physical frame length";
4153                             description "check length in header against physical frame length";
4154                             tailf:cli-boolean-no;
4155                             tailf:cli-trim-default;
4156                             type boolean;
4157                             default true;
4158                         }
4159                         leaf minimum {
4160                             tailf:info "check for minimum packet length";
4161                             description "check for minimum packet length";
4162                             tailf:cli-boolean-no;
4163                             tailf:cli-trim-default;
4164                             type boolean;
4165                             default true;
4166                         }
4167                     }
4168                     leaf same-address {
4169                         tailf:info "check for packet having equal source and destination IP "
4170                         +"addresses";
4171                         description "check for packet having equal source and destination IP "
4172                         +"addresses";
4173                         type empty;
4174                     }
4175                     leaf syslog {
4176                         tailf:info "syslog packet parse errors";
4177                         description "syslog packet parse errors";
4178                         type empty;
4179                     }
4180                 }
4181             }
4182         }
4183
4184 /// ========================================================================
4185 /// policer
4186 /// ========================================================================
4187 // Note: must come before class-map and policy-map.
4188
4189         container policer {
4190             tailf:info "Switch policer";
4191             description "Switch policer";
4192             // policer aggregate *
4193             list aggregate {
4194                 tailf:info "Named aggregate policer";
4195                 description "Named aggregate policer";
4196                 tailf:cli-suppress-mode;
4197                 tailf:cli-delete-when-empty;
4198                 tailf:cli-compact-syntax;
4199                 tailf:cli-reset-container;
4200                 tailf:cli-sequence-commands {
4201                     tailf:cli-reset-siblings;
4202                 }
4203                 key name;
4204                 leaf name {
4205                     type string {
4206                         tailf:info "WORD;;aggregate policer Name";
4207                     }
4208                 }
4209                 // cir <cir-bps>
4210                 leaf cir {
4211                     tailf:info "Committed information rate";
4212                     description "Committed information rate";
4213                     type uint32 {
4214                         tailf:info "<8000-1000000000>;;Bits per second";
4215                         range "8000..1000000000";
4216                     }
4217                 }
4218                 // bc <burst>
4219                 leaf bc {
4220                     tailf:info "Conform burst";
4221                     description "Conform burst";
4222                     tailf:cli-optional-in-sequence;
4223                     type uint32 {
4224                         tailf:info "<8000-1000000000>;;Burst bytes";
4225                         range "8000..1000000000";
4226                     }
4227                 }
4228                 // conform-action
4229                 leaf conform-action {
4230                     tailf:info "action when rate is within conform and conform + "+
4231                         "exceed burst";
4232                     description "action when rate is within conform and conform + "+
4233                         "exceed burst";
4234                     tailf:cli-optional-in-sequence;
4235                     type empty;
4236                 }
4237                 leaf set-qos-transmit {
4238                     tailf:info "set qos-group and send it";
4239                     description "set qos-group and send it";
4240                     when "../conform-action";
4241                     tailf:cli-optional-in-sequence;
4242                     type uint8 {
4243                         tailf:info "<0-99>;;new qos-group";
4244                         range "0..99";
4245                     }
4246                 }
4247                 leaf set-dot1ad-dei-transmit {
4248                     tailf:info "set dei and send it";
4249                     description "set dei and send it";
4250                     when "../conform-action";
4251                     tailf:cli-optional-in-sequence;
4252                     type uint8 {
4253                         tailf:info "<0-1>;;new dei value";
4254                         range "0..1";
4255                     }
4256                 }
4257                 leaf set-prec-transmit {
4258                     tailf:info "rewrite packet precedence and send it";
4259                     description "rewrite packet precedence and send it";
4260                     when "../conform-action";
4261                     tailf:cli-optional-in-sequence;
4262                     type prec_value-type;
4263                 }
4264                 container set-prec-transmit-table {
4265                     when "../set-prec-transmit";
4266                     tailf:cli-no-keyword;
4267                     tailf:cli-drop-node-name;
4268                     tailf:cli-optional-in-sequence;
4269                     tailf:cli-flatten-container;
4270                     leaf table {
4271                         tailf:info "Set packet cos from cos based on table map";
4272                         description "Set packet cos from cos based on table map";
4273                         tailf:cli-optional-in-sequence;
4274                         type string;
4275                         tailf:non-strict-leafref {
4276                             path "/ios:native/table-map/name";
4277                         }
4278                     }
4279                 }
4280                 leaf set-dscp-transmit {
4281                     tailf:info "set dscp and send it";
4282                     description "set dscp and send it";
4283                     when "../conform-action";
4284                     tailf:cli-optional-in-sequence;
4285                     type dscp-type;
4286                 }
4287                 container set-dscp-transmit-table {
4288                     when "../set-dscp-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-cos-transmit {
4304                     tailf:info "set cos and send it";
4305                     description "set cos and send it";
4306                     when "../conform-action";
4307                     tailf:cli-optional-in-sequence;
4308                     type cos_value-type;
4309                 }
4310                 container set-cos-transmit-table {
4311                     when "../set-cos-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 transmit {
4327                     tailf:info "transmit packet";
4328                     description "transmit packet";
4329                     when "../conform-action";
4330                     tailf:cli-optional-in-sequence;
4331                     type empty;
4332                 }
4333                 // exceed-action
4334                 leaf exceed-action {
4335                     tailf:info "action when rate is within conform and conform + "+
4336                         "exceed burst";
4337                     description "action when rate is within conform and conform + "+
4338                         "exceed burst";
4339                     type empty;
4340                 }
4341                 leaf drop {
4342                     tailf:info "drop packet";
4343                     description "drop packet";
4344                     when "../exceed-action";
4345                     tailf:cli-optional-in-sequence;
4346                     tailf:cli-full-command;
4347                     type empty;
4348                 }
4349                 container exceed-transmit {
4350                     tailf:cli-no-keyword;
4351                     tailf:cli-drop-node-name;
4352                     tailf:cli-optional-in-sequence;
4353                     tailf:cli-flatten-container;
4354                     leaf transmit {
4355                         tailf:info "transmit packet";
4356                         description "transmit packet";
4357                         when "../../exceed-action";
4358                         tailf:cli-optional-in-sequence;
4359                         type empty;
4360                     }
4361                 }
4362             }
4363         }
4364
4365 /// ========================================================================
4366 /// class-map
4367 /// ========================================================================
4368
4369         list class-map {
4370             tailf:info "Configure QoS Class Map";
4371             description "Configure QoS Class Map";
4372             tailf:cli-mode-name "config-cmap";
4373             tailf:cli-suppress-list-no;
4374             tailf:cli-delete-when-empty;
4375             tailf:cli-no-key-completion;
4376             // class-map *
4377             key name;
4378             leaf name {
4379                 type string {
4380                     tailf:info "WORD;;class-map name";
4381                 }
4382                 tailf:cli-disallow-value "type";
4383             }
4384             // class-map * type inspect
4385             leaf "type" {
4386                 tailf:info "type of the class-map";
4387                 description "type of the class-map";
4388                 tailf:cli-prefix-key;
4389                 type enumeration {
4390                     enum access-control {
4391                             tailf:info "access-control specific class-map";
4392                         }
4393                     enum appnav {
4394                         tailf:info "Configure a APPNAV Class Map";
4395                     }
4396                     enum control {
4397                         tailf:info "Configure a control policy class-map";
4398                     }
4399                     enum inspect {
4400                         tailf:info "Configure Firewall Class Map";
4401                     }
4402                     enum multicast-flows {
4403                         tailf:info "multicast class-maps";
4404                     }
4405                     enum stack {
4406                         tailf:info "class-map for protocol header stack specification";
4407                     }
4408                     enum traffic {
4409                         tailf:info "Configure a subscriber policy traffic classmap";
4410                     }
4411                 }
4412             }
4413             // class-map * <protocol>
4414             leaf protocol {
4415                 when "../type = 'inspect'";
4416                 tailf:cli-drop-node-name;
4417                 tailf:cli-prefix-key;
4418                 type enumeration {
4419                     enum aol {
4420                         tailf:info "Configure CBAC class-map for IM-AOL protocol";
4421                     }
4422                     enum edonkey {
4423                         tailf:info "eDonkey";
4424                     }
4425                     enum fasttrack {
4426                         tailf:info "FastTrack Traffic - KaZaA, Morpheus, Grokster...";
4427                     }
4428                     enum gnutella {
4429                         tailf:info "Gnutella Version2 Traffic - BearShare, Shareeza, "
4430                         +"Morpheus ...";
4431                     }
4432                     enum http {
4433                         tailf:info "Configure CBAC class-map for HTTP protocol";
4434                     }
4435                     enum imap {
4436                         tailf:info "Configure CBAC class-map for IMAP protocol";
4437                     }
4438                     enum kazaa2 {
4439                         tailf:info "Kazaa Version 2";
4440                     }
4441                     enum msnmsgr {
4442                         tailf:info "Configure CBAC class-map for IM-MSN protocol";
4443                     }
4444                     enum pop3 {
4445                         tailf:info "Configure CBAC class-map for POP3 protocol";
4446                     }
4447                     enum smtp {
4448                         tailf:info "Configure CBAC class-map for SMTP protocol";
4449                     }
4450                     enum sunrpc {
4451                         tailf:info "Configure CBAC class-map for RPC protocol";
4452                     }
4453                     enum ymsgr {
4454                         tailf:info "Configure CBAC class-map for IM-YAHOO protocol";
4455                     }
4456                 }
4457             }
4458             // class-map * <match-any|match-all>
4459             leaf prematch {
4460                 tailf:cli-no-keyword;
4461                 tailf:cli-prefix-key;
4462                 tailf:cli-drop-node-name;
4463                 type enumeration {
4464                     enum match-all {
4465                         tailf:info "Logical-AND all matching statements under "+
4466                             "this classmap";
4467                     }
4468                     enum match-any {
4469                         tailf:info "Logical-OR all matching statements under this "+
4470                         "classmap";
4471                     }
4472                 }
4473                 mandatory true;
4474             }
4475             // class-map * / description
4476             leaf "description" {
4477                 tailf:info "Class-Map description";
4478                 description "Class-Map description";
4479                 tailf:cli-multi-value;
4480                 type string {
4481                     tailf:info "LINE;;Description of this class-map (up to 200 "+
4482                           "characters)";
4483                 }
4484             }
4485             // class-map * / match
4486             container match {
4487                 tailf:info "classification criteria";
4488                 description "classification criteria";
4489                 uses class-map-match-grouping;
4490                 uses class-map-appnav-match-grouping;
4491                 container not {
4492                     tailf:info "Negate this match result";
4493                     description "Negate this match result";
4494                     uses class-map-match-grouping;
4495                     uses class-map-appnav-not-match-grouping;
4496                 }
4497             }
4498         }
4499
4500 /// ========================================================================
4501 /// policy-map
4502 /// ========================================================================
4503
4504         list policy-map {
4505             tailf:info "Configure QoS Policy Map";
4506             description "Configure QoS Policy Map";
4507             tailf:cli-mode-name "config-pmap";
4508             tailf:cli-diff-dependency "/ios:native/class-map";
4509             tailf:cli-diff-dependency "/ios:native/table-map";
4510             tailf:cli-diff-dependency "/ios:native/mls/qos/aggregate-policer";
4511             tailf:cli-diff-dependency "/ios:native/policer/aggregate";
4512             key name;
4513             leaf name {
4514                 type string {
4515                     tailf:info "WORD;;policy-map name";
4516                 }
4517                 tailf:cli-disallow-value
4518                 "(type)|(http)|(im)|(imap)|(p2p)|(pop3)|(smtp)|(sunrpc)";
4519             }
4520             leaf "type" {
4521                 tailf:info "type of the policy-map";
4522                 description "type of the policy-map";
4523                 tailf:cli-prefix-key;
4524                 type enumeration {
4525                     enum access-control {
4526                         tailf:info "access-control specific policy-map";
4527                     }
4528                     enum appnav {
4529                         tailf:info "Configure a APPNAV Policy Map";
4530                     }
4531                     enum inspect {
4532                          tailf:info "Configure Firewall Policy Map";
4533                     }
4534                     enum packet-service {
4535                         tailf:info "Configure Packet Service Policy Map";
4536                     }
4537                     enum performance-monitor {
4538                         tailf:info "Performance monitoring policy-map type";
4539                     }
4540                     enum service {
4541                         tailf:info "policymap service configuration";
4542                     }
4543                     enum service-chain {
4544                         tailf:info "Configure Service Chain Policy Map";
4545                     }
4546                 }
4547             }
4548             leaf protocol {
4549                 when "../type = 'inspect'";
4550                 tailf:cli-drop-node-name;
4551                 tailf:cli-prefix-key;
4552                 type enumeration {
4553                     enum http {
4554                         tailf:info "Configure CBAC policy-map for HTTP protocol";
4555                     }
4556                     enum im {
4557                         tailf:info "Configure CBAC policy-map for IM protocol";
4558                     }
4559                     enum imap {
4560                         tailf:info "Configure CBAC policy-map for IMAP protocol";
4561                     }
4562                     enum p2p {
4563                         tailf:info "Configure CBAC policy-map for P2P protocols";
4564                     }
4565                     enum pop3 {
4566                         tailf:info "Configure CBAC policy-map for POP3 protocol";
4567                     }
4568                     enum smtp {
4569                         tailf:info "Configure CBAC policy-map for SMTP protocol";
4570                     }
4571                     enum sunrpc {
4572                         tailf:info "Configure CBAC policy-map for RPC protocol";
4573                     }
4574                 }
4575             }
4576             // policy-map * / class *
4577             list class {
4578                 tailf:info "policy criteria";
4579                 description "policy criteria";
4580                 tailf:cli-mode-name "config-pmap-c";
4581                 key name;
4582                 leaf name {
4583                     tailf:cli-disallow-value "type";
4584                     type class-name-type;
4585                 }
4586                 // policy-map * / class * / type
4587                 leaf "type" {
4588                     tailf:info "type of the class-map";
4589                     description "type of the class-map";
4590                     tailf:cli-prefix-key;
4591                     type enumeration {
4592                         enum inspect {
4593                             tailf:info "Configure CBAC Class Map";
4594                         }
4595                     }
4596                 }
4597                 leaf insert-before {
4598                     tailf:info "Insert the class before a specified class";
4599                     description "Insert the class before a specified class";
4600                     tailf:cli-hide-in-submode;
4601                     when "../../type = 'appnav'";
4602                     type string {
4603                         tailf:info "WORD;;Insert the class before a specified class";
4604                     }
4605                 }
4606                 // policy-map * / class * / appnav policy
4607                 container appnav-policy {
4608                     when "../../type = 'appnav'";
4609                     tailf:cli-drop-node-name;
4610                     list distribute {
4611                         tailf:info "Distribute action";
4612                         description "Distribute action";
4613                         tailf:cli-suppress-mode;
4614                         key service-node-group;
4615                         leaf service-node-group {
4616                             tailf:info "Distribute to service-node-group";
4617                             description "Distribute to service-node-group";
4618                             tailf:cli-expose-key-name;
4619                             type string {
4620                                 tailf:info "WORD;;service-node-group name";
4621                             }
4622                         }
4623                         leaf insert-before {
4624                             tailf:info "Insert before specific node";
4625                             description "Insert before specific node";
4626                             tailf:cli-optional-in-sequence;
4627                             type string {
4628                                 tailf:info "WORD;;service-node-group name";
4629                             }
4630                         }
4631                     }
4632                     leaf monitor-load {
4633                         tailf:info "Monitor AO";
4634                         description "Monitor AO";
4635                         when "../distribute";
4636                         type enumeration {
4637                             enum MS-port-mapper {
4638                                 tailf:info "Monitor Microsoft Endpoint Port Mapper load";
4639                             }
4640                             enum cifs {
4641                                 tailf:info "Monitor CIFS Accelerator load";
4642                             }
4643                             enum http {
4644                                 tailf:info "Monitor HTTP Accelerator load";
4645                             }
4646                             enum ica {
4647                                 tailf:info "Monitor ICA Accelerator load";
4648                             }
4649                             enum mapi {
4650                                 tailf:info "Monitor MAPI Accelerator load";
4651                             }
4652                             enum nfs {
4653                                 tailf:info "Monitor NFS Accelerator load";
4654                             }
4655                             enum ssl {
4656                                 tailf:info "Monitor SSL accelerator load";
4657                             }
4658                             enum video {
4659                                 tailf:info "Monitor Video Accelerator load";
4660                             }
4661                         }
4662                     }
4663                     leaf pass-through {
4664                         tailf:info "pass-through action";
4665                         description "pass-through action";
4666                         type empty;
4667                     }
4668                 }
4669                 // policy-map * / class * / inspect policy
4670                 container policy {
4671                     when "../../type = 'inspect'";
4672                     tailf:cli-drop-node-name;
4673                     tailf:cli-sequence-commands {
4674                         tailf:cli-reset-siblings;
4675                     }
4676                     leaf action {
4677                         tailf:cli-drop-node-name;
4678                         tailf:cli-remove-before-change;
4679                         type enumeration {
4680                             enum cxsc {
4681                                 tailf:info "CXSC Inspection";
4682                             }
4683                             enum drop {
4684                                 tailf:info "Drop the packet";
4685                             }
4686                             enum inspect {
4687                                 tailf:info "Context-based Access Control Engine";
4688                             }
4689                             enum pass {
4690                                 tailf:info "Pass the packet";
4691                             }
4692                             enum service-policy {
4693                                 tailf:info "Deep Packet Inspection Engine";
4694                             }
4695                         }
4696                     }
4697                     leaf log {
4698                         tailf:info "Send logging message for drop or pass";
4699                         description "Send logging message for drop or pass";
4700                         when "../action = 'drop'or ../action = 'pass'";
4701                         type empty;
4702                     }
4703                     leaf parameter-map {
4704                         tailf:cli-drop-node-name;
4705                         when "../action = 'inspect' or ../action = 'cxsc'";
4706                         type string;
4707                         tailf:non-strict-leafref {
4708                             path "/ios:native/parameter-map/name";
4709                         }
4710                     }
4711                     container dpi {
4712                         tailf:cli-drop-node-name;
4713                         when "../action = 'service-policy'";
4714                         tailf:cli-sequence-commands;
4715                         tailf:cli-compact-syntax;
4716                         leaf type {
4717                             tailf:cli-drop-node-name;
4718                             type enumeration {
4719                                 enum gtpv0 {
4720                                     tailf:info "GTPv0 DPI";
4721                                 }
4722                                 enum gtpv1 {
4723                                     tailf:info "GTPv1 DPI";
4724                                 }
4725                                 enum imap {
4726                                     tailf:info "IMAP DPI";
4727                                 }
4728                                 enum pop3 {
4729                                     tailf:info "POP3 DPI";
4730                                 }
4731                                 enum smtp {
4732                                     tailf:info "SMTP DPI";
4733                                 }
4734                                 enum sunrpc {
4735                                     tailf:info "RPC DPI";
4736                                 }
4737                             }
4738                         }
4739                         leaf policy-map {
4740                             tailf:cli-drop-node-name;
4741                             type string {
4742                                 tailf:info "WORD;;DPI policy-map name";
4743                             }
4744                         }
4745                     }
4746                 }
4747                 // policy-map * / class * / performance-monitor policy
4748                 container pm-policy {
4749                     when "../../type = 'performance-monitor'";
4750                         tailf:cli-drop-node-name;
4751                     container flow {
4752                         tailf:info "Flow subcommands";
4753                         description "Flow subcommands";
4754                         leaf monitor {
4755                             tailf:info "Apply a Flow Monitor";
4756                             description "Apply a Flow Monitor";
4757                             type string {
4758                                 tailf:info "WORD;;Flow monitor name";
4759                             }
4760                         }
4761                     }
4762                     container monitor {
4763                         tailf:info "Monitor related parameters";
4764                         description "Monitor related parameters";
4765                         container metric {
4766                             tailf:info "Monitor metric";
4767                             description "Monitor metric";
4768                             container rtp {
4769                                 tailf:info "RTP metrics parameters";
4770                                 description "RTP metrics parameters";
4771                                 tailf:cli-add-mode;
4772                                 tailf:cli-mode-name "config-pmap-c-mrtp";
4773                                 list clock-rate {
4774                                     tailf:info "RTP timestamp field's sampling frequency";
4775                                     description "RTP timestamp field's sampling frequency";
4776                                     tailf:cli-suppress-mode;
4777                                     tailf:cli-sequence-commands;
4778                                     tailf:cli-compact-syntax;
4779                                     key number;
4780                                     leaf number {
4781                                         type union {
4782                                             type uint8 {
4783                                                 tailf:info "<0-127>;;payload type number";
4784                                                 range "0..127";
4785                                             }
4786                                             type enumeration {
4787                                                 enum celb {
4788                                                     tailf:info "CELB(25)";
4789                                                 }
4790                                                 enum cn {
4791                                                     tailf:info "CN(13)";
4792                                                 }
4793                                                 enum default {
4794                                                     tailf:info "Change the default clock rate for all the dynamic payload type";
4795                                                 }
4796                                                 enum dvi4 {
4797                                                     tailf:info "DVI4 RFC-3551 8000Hz(5)";
4798                                                 }
4799                                                 enum dvi4-2 {
4800                                                     tailf:info "DVI4 RFC-3551 16000Hz(6)";
4801                                                 }
4802                                                 enum dvi4-3 {
4803                                                     tailf:info "DVI4 Dipol 11025Hz(16)";
4804                                                 }
4805                                                 enum dvi4-4 {
4806                                                     tailf:info "DVI4 Dipol 22050Hz(17)";
4807                                                 }
4808                                                 enum g722 {
4809                                                     tailf:info "G722(9)";
4810                                                 }
4811                                                 enum g723 {
4812                                                     tailf:info "G723(4)";
4813                                                 }
4814                                                 enum g728 {
4815                                                     tailf:info "G728(15)";
4816                                                 }
4817                                                 enum g729 {
4818                                                     tailf:info "G729(18)";
4819                                                 }
4820                                                 enum gsm {
4821                                                     tailf:info "GSM(3)";
4822                                                 }
4823                                                 enum h261 {
4824                                                     tailf:info "H261(31)";
4825                                                 }
4826                                                 enum h263 {
4827                                                     tailf:info "H263(34)";
4828                                                 }
4829                                                 enum jpeg {
4830                                                     tailf:info "JPEG(26)";
4831                                                 }
4832                                                 enum l16 {
4833                                                     tailf:info "L16 channel 1(11)";
4834                                                 }
4835                                                 enum l16-2 {
4836                                                     tailf:info "L16 channel 2(10)";
4837                                                 }
4838                                                 enum lpc {
4839                                                     tailf:info "LPC(7)";
4840                                                 }
4841                                                 enum mp2t {
4842                                                     tailf:info "MP2T(33)";
4843                                                 }
4844                                                 enum mpa {
4845                                                     tailf:info "MPA(14)";
4846                                                 }
4847                                                 enum mpv {
4848                                                     tailf:info "MPV(32)";
4849                                                 }
4850                                                 enum nv {
4851                                                     tailf:info "NV(28)";
4852                                                 }
4853                                                 enum pcma {
4854                                                     tailf:info "PCMA(8)";
4855                                                 }
4856                                                 enum pcmu {
4857                                                     tailf:info "PCMU(0)";
4858                                                 }
4859                                                 enum qcelp {
4860                                                     tailf:info "QCELP(12)";
4861                                                 }
4862                                             }
4863                                         }
4864                                     }
4865                                     leaf frequency {
4866                                         tailf:cli-drop-node-name;
4867                                         type uint32 {
4868                                             tailf:info "<1000-192000>;;frequency in Hz";
4869                                             range "1000..192000";
4870                                         }
4871                                     }
4872                                 }
4873                             }
4874                         }
4875                     }
4876                     list react {
4877                         tailf:info "Configure threshold crossing actions";
4878                         description "Configure threshold crossing actions";
4879                         tailf:cli-mode-name "config-pmap-c-react";
4880                         key id;
4881                         leaf id {
4882                             type uint16 {
4883                                 tailf:info "<1-65535>  React instance id";
4884                             }
4885                         }
4886                         leaf mode {
4887                             tailf:cli-drop-node-name;
4888                             tailf:cli-hide-in-submode;
4889                             type enumeration {
4890                                 enum media-stop {
4891                                     tailf:info "Media stream stopped";
4892                                 }
4893                                 enum  mrv {
4894                                     tailf:info "Variation in packet rate from configured expected rate";
4895                                 }
4896                                 enum rtp-jitter-average {
4897                                     tailf:info "Mean jitter for the RTP stream";
4898                                 }
4899                                 enum transport-packets-lost-rate {
4900                                     tailf:info "Ratio of lost packets to total reaceived packets";
4901                                 }
4902                             }
4903                         }
4904                         leaf description {
4905                             tailf:info "Description for threshold crossing action instance";
4906                             description "Description for the instance";
4907                             tailf:cli-multi-value;
4908                             type string;
4909                         }
4910                         container action {
4911                             tailf:info "Config react action";
4912                             description "Config react action";
4913                             leaf snmp {
4914                                 tailf:info "SNMP is notified of the event";
4915                                 description "SNMP is notified of the event";
4916                                 tailf:cli-full-command;
4917                                 type empty;
4918                             }
4919                             leaf syslog {
4920                                 tailf:info "The threshold-crossing event is logged to syslog";
4921                                 description "The threshold-crossing event is logged to syslog";
4922                                 tailf:cli-full-command;
4923                                 type empty;
4924                              }
4925                         }
4926                         container alarm {
4927                             tailf:info "Config react alarm";
4928                             description "Config react alarm";
4929                             leaf severity {
4930                                 tailf:info "Alarm severity - default level none";
4931                                 description "Alarm severity - default level none";
4932                                 type enumeration {
4933                                     enum alert {
4934                                         tailf:info "TCA severity level critical (severity = 2)";
4935                                     }
4936                                     enum critical {
4937                                         tailf:info "TCA severity level major (severity = 3)";
4938                                     }
4939                                     enum emergency {
4940                                         tailf:info "TCA severity level critical (severity = 1)";
4941                                     }
4942                                     enum error {
4943                                         tailf:info "TCA severity level minor (severity = 4)";
4944                                     }
4945                                     enum info {
4946                                         tailf:info "TCA severity level default (severity = 5)";
4947                                     }
4948                                 }
4949                             }
4950                             container type {
4951                                 tailf:info "Alarm raised type - for each flow or a group";
4952                                 description "Alarm raised type - for each flow or a group";
4953                                 leaf discrete {
4954                                     tailf:info "Alert for each flow within the class";
4955                                     description "Alert for each flow within the class";
4956                                     tailf:cli-full-command;
4957                                     type empty;
4958                                 }
4959                                 container grouped {
4960                                     tailf:info "Alert if more than one flow cross the threshold";
4961                                     description "Alert if more than one flow cross the threshold";
4962                                     leaf count {
4963                                         tailf:info "Number of flows in the group cross the threshold";
4964                                         description "Number of flows in the group cross the threshold";
4965                                         tailf:cli-full-command;
4966                                         type uint16 {
4967                                             tailf:info "<1-65535>;;Number of flows";
4968                                         }
4969                                     }
4970                                    leaf percent {
4971                                         tailf:info "Percent of flows in the group cross the threshold";
4972                                         description "Percent of flows in the group cross the threshold";
4973                                         tailf:cli-full-command;
4974                                         type uint8 {
4975                                             tailf:info "<1-100>;;Percent of flows";
4976                                             range "1..100";
4977                                         }
4978                                     }
4979                                 }
4980                             }
4981                         }
4982                         container threshold {
4983                             tailf:info "Config react threshold";
4984                             description "Config react threshold";
4985                             container value {
4986                                 tailf:info "Range of percentage loss that would trigger the alarm";
4987                                 description "Range of percentage loss that would trigger the alarm";
4988                                 leaf ge {
4989                                     tailf:info "greater and equal to";
4990                                     description "greater and equal to";
4991                                     tailf:cli-full-command;
4992                                     type string {
4993                                         tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)";
4994                                     }
4995                                 }
4996                                 leaf gt {
4997                                     tailf:info "greater than";
4998                                     description "greater than";
4999                                     tailf:cli-full-command;
5000                                     type string {
5001                                         tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)";
5002                                     }
5003                                 }
5004                                 leaf le {
5005                                     tailf:info "less and equal to";
5006                                     description "less and equal to";
5007                                     tailf:cli-full-command;
5008                                     type string {
5009                                         tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)";
5010                                     }
5011                                 }
5012                                 leaf lt {
5013                                     tailf:info "less than";
5014                                     description "less than";
5015                                     tailf:cli-full-command;
5016                                     type string {
5017                                         tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)";
5018                                     }
5019                                 }
5020                                 container range {
5021                                     tailf:info "threshold within the range of";
5022                                     description "threshold within the range of";
5023                                     tailf:cli-sequence-commands;
5024                                     tailf:cli-compact-syntax;
5025                                     leaf low {
5026                                         tailf:cli-drop-node-name;
5027                                         type string {
5028                                             tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)";
5029                                         }
5030                                     }
5031                                     leaf high {
5032                                         tailf:cli-drop-node-name;
5033                                         type string {
5034                                             tailf:info "WORD;;rtp lost fraction threshold 0.05 - 100 (% in precision of 0.01)";
5035                                         }
5036                                     }
5037                                 }
5038                             }
5039                         }
5040                     }
5041                 }
5042                 // policy-map * / class * / inspect-police
5043                 container inspect-police {
5044                     when "../policy/action = 'inspect'";
5045                     tailf:cli-drop-node-name;
5046                     container police {
5047                         tailf:info "Police";
5048                         description "Police";
5049                         tailf:cli-sequence-commands {
5050                             tailf:cli-reset-siblings;
5051                         }
5052                         tailf:cli-compact-syntax;
5053                         leaf rate {
5054                             tailf:info "Specify police rate";
5055                             description "Specify police rate";
5056                             type uint32 {
5057                                 tailf:info "<8000-2000000000>;;Rate value in bps";
5058                                 range "8000..2000000000";
5059                             }
5060                         }
5061                         leaf burst {
5062                             tailf:info "Specify 'burst' parameter";
5063                             description "Specify 'burst' parameter";
5064                             type uint32 {
5065                                 tailf:info "<1000-512000000>;;Burst value in bytes";
5066                                 range "1000..512000000";
5067                             }
5068                         }
5069                     }
5070                 }
5071                 list action-list {
5072                     tailf:cli-drop-node-name;
5073                     tailf:cli-suppress-mode;
5074                     key action-type;
5075                     ordered-by user;
5076                     leaf action-type {
5077                         type policy-action-type;
5078                     }
5079                     choice action-param {
5080                         case bandwidth-case {
5081                             // policy-map * / class * / bandwidth
5082                             container bandwidth {
5083                                 //tailf:info "Bandwidth";
5084                                 tailf:cli-drop-node-name;
5085                                 when "../action-type = 'bandwidth'";
5086                                 leaf bits {
5087                                     tailf:cli-drop-node-name;
5088                                     type uint32 {
5089                                         range "8..2000000";
5090                                         tailf:info "<8-2000000>;;Kilo Bits per second";
5091                                     }
5092                                 }
5093                                 leaf percent {
5094                                     tailf:info "% of total Bandwidth";
5095                                     description "% of total Bandwidth";
5096                                     type percentage-type;
5097                                 }
5098                                 container remaining {
5099                                     tailf:info "% of the remaining bandwidth";
5100                                     description "% of the remaining bandwidth";
5101                                     leaf percent {
5102                                         tailf:info "% of the remaining bandwidth";
5103                                         description "% of the remaining bandwidth";
5104                                         type percentage-type;
5105                                     }
5106                                     leaf ratio {
5107                                         tailf:info "ratio for sharing excess bandwidth";
5108                                         description "ratio for sharing excess bandwidth";
5109                                         type uint16 {
5110                                             tailf:info "<1-65536>;;Ratio";
5111                                         }
5112                                     }
5113                                 }
5114                             }
5115                         }
5116                         case compression-case {
5117                             // policy-map * / class * / compression
5118                             container compression {
5119                                 //tailf:info "Activate Compression";
5120                                 tailf:cli-drop-node-name;
5121                                 //presence "Activate Compression";
5122                                 when "../action-type = 'compression'";
5123                                 container header {
5124                                     tailf:info "configure header compression";
5125                                     description "configure header compression";
5126                                     presence "configure header compression";
5127                                     leaf ip {
5128                                         tailf:info "configure ip header compression";
5129                                         description "configure ip header compression";
5130                                         type enumeration {
5131                                             enum rtp {
5132                                                 tailf:code-name "header_rtp";
5133                                                 tailf:info "configure rtp header compression";
5134                                             }
5135                                             enum tcp {
5136                                                 tailf:info "configure tcp header compression";
5137                                             }
5138                                         }
5139                                     }
5140                                 }
5141                             }
5142                         }
5143                         //case drop-case {
5144                             // policy-map * / class * / drop
5145                             //leaf drop {
5146                                 //tailf:info "Drop all packets";
5147                                 // tailf:cli-full-command;
5148                                 //type empty;
5149                             //}
5150                         //}
5151                         case estimate-case {
5152                             // policy-map * / class * / estimate
5153                             container estimate {
5154                                 //tailf:info "estimate resources required for this class";
5155                                 tailf:cli-drop-node-name;
5156                                 when "../action-type = 'estimate'";
5157                                 container bandwidth {
5158                                     presence "bandwidth required to service this class";
5159                                     tailf:info "bandwidth required to service this class";
5160                                     description "bandwidth required to service this class";
5161                                     tailf:cli-sequence-commands;
5162                                     tailf:cli-compact-syntax;
5163                                     container delay-one-in {
5164                                         tailf:info "specify QoS target delay";
5165                                         description "specify QoS target delay";
5166                                         tailf:cli-compact-syntax;
5167                                         tailf:cli-sequence-commands;
5168                                         leaf doi {
5169                                             tailf:cli-drop-node-name;
5170                                             tailf:cli-incomplete-command;
5171                                             type uint32 {
5172                                                 range "50..1000000";
5173                                                 tailf:info "<50-1000000>;;delay one packet "+
5174                                                     "of N";
5175                                             }
5176                                         }
5177                                         leaf milliseconds {
5178                                             type uint32 {
5179                                                 range "8..1000" {
5180                                                     tailf:info "<8-1000>;;worst-case "+
5181                                                         "milliseconds of delay";
5182                                                 }
5183                                             }
5184                                         }
5185                                     }
5186                                     leaf drop-one-in {
5187                                         tailf:info "specify QoS target loss rate";
5188                                         description "specify QoS target loss rate";
5189                                         type uint32 {
5190                                             tailf:info "<50-1000000>;;drop one packet of N";
5191                                         }
5192                                     }
5193                                 }
5194                             }
5195                         }
5196                         case forward-case {
5197                             //policy-map * / class * / forward service-path
5198                             container forward {
5199                                 //tailf:info "forward service-path action";
5200                                 tailf:cli-reset-container;
5201                                 tailf:cli-drop-node-name;
5202                                 when "../action-type = 'forward'";
5203                                 list service-path {
5204                                     tailf:info "Service Path Entries";
5205                                     description "Service Path Entries";
5206                                     tailf:cli-suppress-mode;
5207                                     key "service-path-id";
5208                                     leaf service-path-id {
5209                                         type uint32 {
5210                                             range "0..16777215";
5211                                             tailf:info "<0-16777215>;;Service Path ID";
5212                                         }
5213                                     }
5214                                     leaf service-index {
5215                                         tailf:info "Service Index";
5216                                         description "Service Index";
5217                                         type uint8 {
5218                                             range "2..255";
5219                                             tailf:info "<2-255>;;Service Index ID";
5220                                         }
5221                                     }
5222                                 }
5223                             }
5224                         }
5225                         case fair-queue-case {
5226                             // policy-map * / class * / fair-queue
5227                             // class-default: fair-queue [number-of-dynamic-queues]
5228                             // DWFQ: fair-queue
5229                             // policy-map: fair-queue [queue-limit queue-value]
5230                             // NOT SUPPORTED:
5231                             // air-queue [congestive-discard-threshold [dynamic-q [reservable-q]]]
5232                             container fair-queue {
5233                                 //tailf:info "Enable Flow-based Fair Queuing in this Class";
5234                                 tailf:cli-reset-container;
5235                                 tailf:cli-drop-node-name;
5236                                 when "../action-type = 'fair-queue'";
5237                                 leaf dynamic-queues {
5238                                     tailf:cli-drop-node-name;
5239                                     tailf:cli-full-command;
5240                                     type uint32 {
5241                                         range "16|32|64|128|256|512|1024|2048|4096" {
5242                                         tailf:info "<16-4096>;;Number Dynamic Conversation "+
5243                                             "Queues";
5244                                         }
5245                                     }
5246                                 }
5247                                 leaf queue-limit {
5248                                     tailf:info "per flow queue limit";
5249                                     description "per flow queue limit";
5250                                     tailf:cli-full-command;
5251                                     type uint16 {
5252                                         tailf:info "<1-32768>;;packets";
5253                                         range "1..32768";
5254                                     }
5255                                 }
5256                             }
5257                         }
5258                         case netflow-sampler-case {
5259                             // policy-map * / class * / netflow-sampler
5260                             leaf netflow-sampler {
5261                                 //tailf:info "NetFlow action";
5262                                 tailf:cli-drop-node-name;
5263                                 tailf:cli-full-command;
5264                                 when "../action-type = 'netflow-sampler'";
5265                                 // should be leafref to sampler
5266                                 type string {
5267                                     tailf:info "WORD;;Name of the flow sampler";
5268                                 }
5269                             }
5270                         }
5271                         case police-case {
5272                             // policy-map * / class * / police ?
5273                             choice police-choice {
5274                                 // policy-map * / class * / police aggregate
5275                                 case police-aggregate-case {
5276                                     container police-aggregate {
5277                                         tailf:cli-no-keyword;
5278                                         tailf:cli-drop-node-name;
5279                                         container police {
5280                                             //tailf:info "Police";
5281                                             tailf:cli-drop-node-name;
5282                                             when "../../action-type = 'police'" {
5283                                                 tailf:dependency "../../action-type";
5284                                             }
5285                                             leaf aggregate {
5286                                                 tailf:info "Choose aggregate policer for current class";
5287                                                 description "Choose aggregate policer for current class";
5288                                                 type string {
5289                                                     tailf:info "WORD;;enter aggregate-policer name";
5290                                                 }
5291                                             }
5292                                         }
5293                                     }
5294                                 }
5295                                 // police (policy-map)
5296                                 // police cir <bps> [[bc <burst-normal>] [be <burst-max>]]
5297                                 //        [pir <bps> [be <burst-bytes>]] ACTIONS
5298                                 // NOTE: cir, bc & be keywords are mandatory in this model.
5299                                 //       Java code will add missing cir,bc and be in show().
5300                                 case police-policy-map-case {
5301                                     container police-policy-map {
5302                                         tailf:cli-no-keyword;
5303                                         tailf:cli-drop-node-name;
5304                                         container police {
5305                                             tailf:cli-add-mode;
5306                                             tailf:cli-mode-name "config-pmap-c-police";
5307                                             tailf:cli-flatten-container;
5308                                             tailf:cli-sequence-commands {
5309                                                 tailf:cli-reset-siblings;
5310                                             }
5311                                             tailf:cli-drop-node-name;
5312                                             when "../../action-type = 'police'" {
5313                                                 tailf:dependency "../../action-type";
5314                                             }
5315                                             // cir <bps>
5316                                             leaf cir {
5317                                                 tailf:info "Committed information rate";
5318                                                 description "Committed information rate";
5319                                                 tailf:cli-hide-in-submode;
5320                                                 type police-bps-type;
5321                                             }
5322                                             // [bc <burst-normal>]
5323                                             leaf bc {
5324                                                 tailf:info "Conform burst";
5325                                                 description "Conform burst";
5326                                                 tailf:cli-optional-in-sequence;
5327                                                 tailf:cli-hide-in-submode;
5328                                                 type police-burst-type;
5329                                             }
5330                                             // [be <burst-max>]
5331                                             leaf be {
5332                                                 when "../bc";
5333                                                 tailf:info "Excess burst";
5334                                                 description "Excess burst";
5335                                                 tailf:cli-optional-in-sequence;
5336                                                 tailf:cli-hide-in-submode;
5337                                                 type police-burst-type;
5338                                             }
5339                                              // [pir <bps> [be <burst-bytes>]]
5340                                             leaf pir {
5341                                                 tailf:info "Peak Information Rate";
5342                                                 description "Peak Information Rate";
5343                                                 tailf:cli-optional-in-sequence;
5344                                                 tailf:cli-hide-in-submode;
5345                                                 type police-bps-type;
5346                                             }
5347                                             container pir-be {
5348                                                 when "../pir";
5349                                                 tailf:cli-no-keyword;
5350                                                 tailf:cli-drop-node-name;
5351                                                 tailf:cli-optional-in-sequence;
5352                                                 tailf:cli-flatten-container;
5353                                                 tailf:cli-hide-in-submode;
5354                                                 leaf be {
5355                                                     tailf:info "Excess burst";
5356                                                     description "Excess burst";
5357                                                     type police-burst-type;
5358                                                 }
5359                                             }
5360                                             // conform-action | exceed-action | violate-action
5361                                             uses police-action-grouping;
5362                                         }
5363                                     }
5364                                 }
5365                                 // police cir percent (combo of percent & policy-map versions)
5366                                 // police cir percent <percentage>
5367                                 //    [bc] <burst> ms] [be [<burst> ms]
5368                                 //    [pir percent <percentage> [be <burst> ms]] ACTIONS
5369                                 case police-cir-percent-case {
5370                                     container police-cir-percent {
5371                                         tailf:cli-no-keyword;
5372                                         tailf:cli-drop-node-name;
5373                                         container police {
5374                                             tailf:cli-drop-node-name;
5375                                             when "../../action-type = 'police'" {
5376                                                 tailf:dependency "../../action-type";
5377                                             }
5378                                             container cir {
5379                                                 tailf:info "Committed information rate";
5380                                                 description "Committed information rate";
5381                                                 container percent {
5382                                                     tailf:info "% of interface bandwidth for Committed "+
5383                                                      "information rate";
5384                                                     description "% of interface bandwidth for Committed "+
5385                                                     "information rate";
5386                                                     tailf:cli-add-mode;
5387                                                     tailf:cli-mode-name "config-pmap-c-police";
5388                                                     tailf:cli-incomplete-command;
5389                                                     tailf:cli-flatten-container;
5390                                                     tailf:cli-sequence-commands {
5391                                                         tailf:cli-reset-siblings;
5392                                                     }
5393                                                     // percent <percentage>
5394                                                     leaf percentage {
5395                                                         tailf:cli-drop-node-name;
5396                                                         tailf:cli-hide-in-submode;
5397                                                         type percentage-type;
5398                                                     }
5399                                                     // [bc <burst> ms]
5400                                                     leaf bc {
5401                                                         tailf:info "Conform burst";
5402                                                         description "Conform burst";
5403                                                         tailf:cli-optional-in-sequence;
5404                                                         tailf:cli-hide-in-submode;
5405                                                         type uint16 {
5406                                                             tailf:info "<1-2000>;;Burst ms";
5407                                                         }
5408                                                     }
5409                                                     container bc-ms {
5410                                                         when "../bc";
5411                                                         tailf:cli-no-keyword;
5412                                                         tailf:cli-drop-node-name;
5413                                                         tailf:cli-optional-in-sequence;
5414                                                         tailf:cli-hide-in-submode;
5415                                                         tailf:cli-compact-syntax;
5416                                                         tailf:cli-flatten-container;
5417                                                         leaf ms {
5418                                                             tailf:info "Milli seconds";
5419                                                             description "Milli seconds";
5420                                                             tailf:cli-no-keyword;
5421                                                             type empty;
5422                                                         }
5423                                                     }
5424                                                     // [be [<burst> ms]
5425                                                     leaf be {
5426                                                         when "../bc-ms/ms" {
5427                                                             tailf:dependency "../bc-ms/ms";
5428                                                         }
5429                                                         tailf:info "Excess burst";
5430                                                         tailf:cli-optional-in-sequence;
5431                                                         tailf:cli-hide-in-submode;
5432                                                         type uint16 {
5433                                                             tailf:info "<1-2000>;;Burst ms";
5434                                                         }
5435                                                     }
5436                                                     container be-ms {
5437                                                         when "../be";
5438                                                         tailf:cli-no-keyword;
5439                                                         tailf:cli-drop-node-name;
5440                                                         tailf:cli-hide-in-submode;
5441                                                         tailf:cli-compact-syntax;
5442                                                         tailf:cli-flatten-container;
5443                                                         leaf ms {
5444                                                             tailf:info "Milli seconds";
5445                                                             description "Milli seconds";
5446                                                             tailf:cli-no-keyword;
5447                                                             type empty;
5448                                                         }
5449                                                     }
5450                                                     // [pir percent <percentage> [be <burst> ms]]
5451                                                     container pir {
5452                                                         tailf:info "Peak Information Rate";
5453                                                         description "Peak Information Rate";
5454                                                         tailf:cli-compact-syntax;
5455                                                         tailf:cli-flatten-container;
5456                                                         tailf:cli-hide-in-submode;
5457                                                         tailf:cli-optional-in-sequence;
5458                                                         leaf percent {
5459                                                             tailf:info "% of interface bandwidth for Peak "+
5460                                                                 "Information Rate";
5461                                                             description "% of interface bandwidth for Peak "+
5462                                                                 "Information Rate";
5463                                                             type percentage-type;
5464                                                         }
5465                                                     }
5466                                                     container pir-be {
5467                                                         when "../pir";
5468                                                         tailf:cli-no-keyword;
5469                                                         tailf:cli-drop-node-name;
5470                                                         tailf:cli-optional-in-sequence;
5471                                                         tailf:cli-flatten-container;
5472                                                         tailf:cli-hide-in-submode;
5473                                                         leaf be {
5474                                                             tailf:info "Excess burst";
5475                                                             description "Excess burst";
5476                                                             type uint16 {
5477                                                                 tailf:info "<1-2000>;;Burst ms";
5478                                                             }
5479                                                         }
5480                                                     }
5481                                                     container pir-be-ms {
5482                                                         when "../pir-be/be" {
5483                                                            tailf:dependency "../pir-be/be";
5484                                                         }
5485                                                         tailf:cli-no-keyword;
5486                                                         tailf:cli-drop-node-name;
5487                                                         tailf:cli-optional-in-sequence;
5488                                                         tailf:cli-hide-in-submode;
5489                                                         tailf:cli-flatten-container;
5490                                                         leaf ms {
5491                                                             tailf:info "Milli seconds";
5492                                                             description "Milli seconds";
5493                                                             tailf:cli-no-keyword;
5494                                                             type empty;
5495                                                         }
5496                                                     }
5497                                                     // conform-action | exceed-action | violate-action
5498                                                     uses police-action-grouping;
5499                                                 }
5500                                             }
5501                                         }
5502                                     }
5503                                 }
5504                                 // police rate (control-plane)
5505                                 // police rate <units> <pps|bps> [burst <burst-in-x> <packets|bytes>]
5506                                 //   [peak-rate <peak-rate-in-xps> <pps|bps>]
5507                                 //   [peak-burst <peak-burst-in-x> <packets|bytes>]
5508                                 //   [conform-action <action>]
5509                                 case police-rate-unit-case {
5510                                     container police-rate-unit {
5511                                         tailf:cli-no-keyword;
5512                                         tailf:cli-drop-node-name;
5513                                         container police {
5514                                             tailf:cli-drop-node-name;
5515                                             when "../../action-type = 'police'" {
5516                                                 tailf:dependency "../../action-type";
5517                                             }
5518                                             container rate {
5519                                                 tailf:info "Specify police rate";
5520                                                 description "Specify police rate";
5521                                                 tailf:cli-add-mode;
5522                                                 tailf:cli-mode-name "config-pmap-c-police";
5523                                                 tailf:cli-flatten-container;
5524                                                 tailf:cli-sequence-commands {
5525                                                     tailf:cli-reset-siblings;
5526                                                 }
5527                                                 // <units>
5528                                                 leaf "units" {
5529                                                     tailf:cli-drop-node-name;
5530                                                     tailf:cli-hide-in-submode;
5531                                                     type uint64 {
5532                                                     tailf:info "<1-2000000000>;;Rate value in the range "+
5533                                                          "8000-2,000,000,000 bps or 1-2,000,000 pps";
5534                                                     }
5535                                                 }
5536                                                 // <pps|bps>
5537                                                 leaf xps {
5538                                                     tailf:cli-no-keyword;
5539                                                     tailf:cli-drop-node-name;
5540                                                     tailf:cli-hide-in-submode;
5541                                                     type police-pps-bps-type;
5542                                                 }
5543                                                 // [burst <burst-in-x> <packets|bytes>]
5544                                                 container burst {
5545                                                     tailf:info "Specify 'burst' parameter";
5546                                                     description "Specify 'burst' parameter";
5547                                                     tailf:cli-optional-in-sequence;
5548                                                     tailf:cli-compact-syntax;
5549                                                     tailf:cli-hide-in-submode;
5550                                                     tailf:cli-flatten-container;
5551                                                     tailf:cli-sequence-commands;
5552                                                     leaf burst-value {
5553                                                         tailf:cli-no-keyword;
5554                                                         tailf:cli-drop-node-name;
5555                                                         tailf:cli-incomplete-command;
5556                                                         type uint32 {
5557                                                             tailf:info "<1-512000000>;;Burst value in "+
5558                                                                 "packets/bytes";
5559                                                         }
5560                                                     }
5561                                                     leaf burst-type {
5562                                                         tailf:cli-no-keyword;
5563                                                         tailf:cli-drop-node-name;
5564                                                         tailf:cli-hide-in-submode;
5565                                                         type police-packets-bytes-type;
5566                                                     }
5567                                                 }
5568                                                 // [peak-rate <peak-rate-in-xps> <pps|bps>]
5569                                                 container peak-rate {
5570                                                     tailf:info "Specify peak rate";
5571                                                     description "Specify peak rate";
5572                                                     tailf:cli-optional-in-sequence;
5573                                                     tailf:cli-compact-syntax;
5574                                                     tailf:cli-flatten-container;
5575                                                     tailf:cli-hide-in-submode;
5576                                                     tailf:cli-sequence-commands;
5577                                                     leaf peak-rate-value {
5578                                                         tailf:cli-no-keyword;
5579                                                         tailf:cli-drop-node-name;
5580                                                         tailf:cli-incomplete-command;
5581                                                         type uint32 {
5582                                                             tailf:info "<1-512000000>;;Peak-rate value in "+
5583                                                                 "packets or bytes per second";
5584                                                             range "1..512000000";
5585                                                         }
5586                                                     }
5587                                                     leaf xps {
5588                                                         tailf:cli-no-keyword;
5589                                                         tailf:cli-drop-node-name;
5590                                                         type police-pps-bps-type;
5591                                                     }
5592                                                 }
5593                                                 // [peak-burst <peak-burst-in-x> <packets|bytes>]
5594                                                 container peak-burst {
5595                                                     tailf:info "Specify 'peak-burst' parameter for peak-rate";
5596                                                     description "Specify 'peak-burst' parameter for peak-rate";
5597                                                     tailf:cli-optional-in-sequence;
5598                                                     tailf:cli-compact-syntax;
5599                                                     tailf:cli-flatten-container;
5600                                                     tailf:cli-hide-in-submode;
5601                                                     tailf:cli-sequence-commands;
5602                                                     leaf burst-value {
5603                                                         tailf:cli-no-keyword;
5604                                                         tailf:cli-drop-node-name;
5605                                                         tailf:cli-incomplete-command;
5606                                                         type uint32 {
5607                                                             tailf:info "<1-512000000>;;Burst value in "+
5608                                                                 "packets/bytes";
5609                                                         }
5610                                                     }
5611                                                     leaf burst-type {
5612                                                         tailf:cli-no-keyword;
5613                                                         tailf:cli-drop-node-name;
5614                                                         type police-packets-bytes-type;
5615                                                     }
5616                                                 }
5617                                                 // conform-action | exceed-action | violate-action
5618                                                 uses police-action-grouping;
5619                                             }
5620                                         }
5621                                     }
5622                                 }
5623                                 // police rate percent (control-plane)
5624                                 // police rate percent <percentage> [burst <ms> ms]
5625                                 //    [peak-rate percent <percentage>] [peak-burst <ms> ms]
5626                                 case police-rate-percent-case {
5627                                     container police-rate-percent {
5628                                         tailf:cli-no-keyword;
5629                                         tailf:cli-drop-node-name;
5630                                         container police {
5631                                             tailf:cli-drop-node-name;
5632                                             when "../../action-type = 'police'" {
5633                                                 tailf:dependency "../../action-type";
5634                                             }
5635                                             container rate {
5636                                                 tailf:info "Specify police rate";
5637                                                 description "Specify police rate";
5638                                                 container percent {
5639                                                     tailf:info "% of interface bandwidth for rate";
5640                                                     description "% of interface bandwidth for rate";
5641                                                     tailf:cli-add-mode;
5642                                                     tailf:cli-mode-name "config-pmap-c-police";
5643                                                     tailf:cli-flatten-container;
5644                                                     tailf:cli-sequence-commands {
5645                                                         tailf:cli-reset-siblings;
5646                                                     }
5647                                                     // <percentage>
5648                                                     leaf percentage {
5649                                                         tailf:cli-drop-node-name;
5650                                                         tailf:cli-hide-in-submode;
5651                                                         type percentage-type;
5652                                                     }
5653                                                     // [burst <ms> ms]
5654                                                     leaf burst {
5655                                                         tailf:info "Specify 'burst' parameter";
5656                                                         description "Specify 'burst' parameter";
5657                                                         tailf:cli-optional-in-sequence;
5658                                                         tailf:cli-hide-in-submode;
5659                                                         type uint16 {
5660                                                             tailf:info "<1-2000>;;Burst value in milliseconds";
5661                                                         }
5662                                                     }
5663                                                     leaf ms {
5664                                                         when "../burst";
5665                                                         tailf:info "Treat 'burst' value in milliseconds";
5666                                                         description "Treat 'burst' value in milliseconds";
5667                                                         tailf:cli-hide-in-submode;
5668                                                         type empty;
5669                                                     }
5670                                                     // [peak-rate percent <percentage>]
5671                                                     container peak-rate {
5672                                                         tailf:info "Specify peak rate";
5673                                                         description "Specify peak rate";
5674                                                         tailf:cli-hide-in-submode;
5675                                                         tailf:cli-optional-in-sequence;
5676                                                         tailf:cli-flatten-container;
5677                                                         leaf percent {
5678                                                             tailf:info "% of interface bandwidth for peak-rate";
5679                                                             description "% of interface bandwidth for peak-rate";
5680                                                             type percentage-type;
5681                                                         }
5682                                                     }
5683                                                     // [peak-burst <ms> ms]
5684                                                     leaf peak-burst {
5685                                                         tailf:info "Specify 'peak-burst' parameter for "+
5686                                                             "'peak-rate'";
5687                                                         description "Specify 'peak-burst' parameter for "+
5688                                                             "'peak-rate'";
5689                                                         tailf:cli-hide-in-submode;
5690                                                         tailf:cli-optional-in-sequence;
5691                                                         type uint16 {
5692                                                             tailf:info "<1-2000>;;Peak burst value in "+
5693                                                                 "milliseconds";
5694                                                         }
5695                                                     }
5696                                                     container peak-burst-ms {
5697                                                         when "../peak-burst";
5698                                                         tailf:cli-no-keyword;
5699                                                         tailf:cli-drop-node-name;
5700                                                         tailf:cli-optional-in-sequence;
5701                                                         tailf:cli-hide-in-submode;
5702                                                         tailf:cli-flatten-container;
5703                                                         leaf ms {
5704                                                             tailf:info "Milli seconds";
5705                                                             description "Milli seconds";
5706                                                             tailf:cli-no-keyword;
5707                                                             type empty;
5708                                                         }
5709                                                     }
5710                                                     // conform-action | exceed-action | violate-action
5711                                                     uses police-action-grouping;
5712                                                 }
5713                                             }
5714                                         }
5715                                     }
5716                                 }
5717                                 // police rate pdp
5718                                 // police rate pdp [burst <bytes>]
5719                                 //    [peak-rate pdp [peak-burst <bytes>]] ACTIONS
5720                                 case police-rate-pdp-case {
5721                                     container police-rate-pdp {
5722                                         tailf:cli-no-keyword;
5723                                         tailf:cli-drop-node-name;
5724                                         container police {
5725                                             tailf:cli-drop-node-name;
5726                                             when "../../action-type = 'police'" {
5727                                                 tailf:dependency "../../action-type";
5728                                             }
5729                                             container rate {
5730                                                 tailf:info "Specify police rate";
5731                                                 description "Specify police rate";
5732                                                 container pdp {
5733                                                     tailf:info "% of interface bandwidth for rate";
5734                                                     description "% of interface bandwidth for rate";
5735                                                     tailf:cli-add-mode;
5736                                                     tailf:cli-mode-name "config-pmap-c-police";
5737                                                     tailf:cli-flatten-container;
5738                                                     tailf:cli-sequence-commands {
5739                                                         tailf:cli-reset-siblings;
5740                                                     }
5741                                                     // [burst <bytes>]
5742                                                     leaf burst {
5743                                                         tailf:info "Conform burst";
5744                                                         description "Conform burst";
5745                                                         tailf:cli-hide-in-submode;
5746                                                         tailf:cli-optional-in-sequence;
5747                                                         type police-burst-type;
5748                                                     }
5749                                                     // [peak-rate pdp [peak-burst <bytes>]]
5750                                                     leaf peak-rate {
5751                                                         tailf:info "Specify peak rate";
5752                                                         description "Specify peak rate";
5753                                                         tailf:cli-hide-in-submode;
5754                                                         tailf:cli-optional-in-sequence;
5755                                                         type enumeration {
5756                                                             enum "pdp" {
5757                                                             }
5758                                                         }
5759                                                     }
5760                                                     leaf peak-burst {
5761                                                         when "../peak-rate";
5762                                                         tailf:info "Specify 'peak-burst' parameter for "+
5763                                                             "'peak-rate'";
5764                                                         description "Specify 'peak-burst' parameter for "+
5765                                                             "'peak-rate'";
5766                                                         tailf:cli-hide-in-submode;
5767                                                         tailf:cli-optional-in-sequence;
5768                                                         type police-burst-type;
5769                                                     }
5770                                                     // conform-action | exceed-action | violate-action
5771                                                     uses police-action-grouping;
5772                                                 }
5773                                             }
5774                                         }
5775                                     }
5776                                 }
5777                                 // police target-bit-rate  <bits per second>
5778                                 case police-target-bitrate-case {
5779                                     container police-target-bitrate {
5780                                     tailf:cli-no-keyword;
5781                                     tailf:cli-drop-node-name;
5782                                     container police {
5783                                         tailf:cli-drop-node-name;
5784                                         when "../../action-type = 'police'" {
5785                                             tailf:dependency "../../action-type";
5786                                         }
5787                                         tailf:cli-add-mode;
5788                                         tailf:cli-mode-name "config-pmap-c-police";
5789                                         leaf bit-rate {
5790                                              tailf:info "Target bit rate (bits per second) (postfix k, m, g optional),
5791                                                  decimal point allowed";
5792                                              description "Target bit rate (bits per second) (postfix k, m, g optional),
5793                                                  decimal point allowed";
5794                                                  tailf:cli-no-keyword;
5795                                                  tailf:cli-drop-node-name;
5796                                                  tailf:cli-hide-in-submode;
5797                                                  type uint64 {
5798                                                      tailf:info "<8000-10000000000>;;Target bit rate (bits per second)";
5799                                                      range "8000..10000000000";
5800                                                  }
5801                                              }
5802                                              // conform-action | exceed-action | violate-action
5803                                              uses police-action-grouping;
5804                                         }
5805                                     }
5806                                 }
5807                                 // police flow (policy-map)
5808                                 // police flow [mask {dest-only | full-flow | src-only}]
5809                                 //    <bps> [<burst-normal>] ACTIONS
5810                                 case police-flow-case {
5811                                     container police-flow {
5812                                     tailf:cli-no-keyword;
5813                                     tailf:cli-drop-node-name;
5814                                     container police {
5815                                         tailf:cli-drop-node-name;
5816                                         when "../../action-type = 'police'" {
5817                                             tailf:dependency "../../action-type";
5818                                         }
5819                                         container flow {
5820                                             tailf:info "police each flow";
5821                                             description "police each flow";
5822                                             tailf:cli-add-mode;
5823                                             tailf:cli-mode-name "config-pmap-c-police";
5824                                             tailf:cli-flatten-container;
5825                                             tailf:cli-sequence-commands {
5826                                                 tailf:cli-reset-siblings;
5827                                             }
5828                                             // [mask {dest-only | full-flow | src-only}]
5829                                             leaf mask {
5830                                                 tailf:info "flow mask to be used for policing";
5831                                                 description "flow mask to be used for policing";
5832                                                 tailf:cli-hide-in-submode;
5833                                                 tailf:cli-optional-in-sequence;
5834                                                 type enumeration {
5835                                                     enum dest-only {
5836                                                         tailf:info "destination-address only flow mask";
5837                                                     }
5838                                                     enum full-flow {
5839                                                         tailf:info "full flow mask";
5840                                                     }
5841                                                     enum src-only {
5842                                                         tailf:info "source-address only flow mask";
5843                                                     }
5844                                                 }
5845                                             }
5846                                             // <bps>
5847                                             leaf bps {
5848                                                 tailf:cli-drop-node-name;
5849                                                 tailf:cli-hide-in-submode;
5850                                                 type police-bps-type;
5851                                             }
5852                                             // [<burst-normal>]
5853                                             leaf burst-normal {
5854                                                 when "../bps";
5855                                                 tailf:cli-drop-node-name;
5856                                                 tailf:cli-hide-in-submode;
5857                                                 tailf:cli-optional-in-sequence;
5858                                                 type police-burst-type;
5859                                             }
5860                                             // conform-action | exceed-action | violate-action
5861                                             uses police-action-grouping;
5862                                             }
5863                                         }
5864                                     }
5865                                 }
5866                                 // police (Catalyst 4500)
5867                                 // police <bps> bps <byte> byte ACTIONS
5868                                 case police-catalyst-case {
5869                                     container police-catalyst {
5870                                         tailf:cli-no-keyword;
5871                                         tailf:cli-drop-node-name;
5872                                         container police {
5873                                             tailf:cli-add-mode;
5874                                             tailf:cli-mode-name "config-pmap-c-police";
5875                                             tailf:cli-flatten-container;
5876                                             tailf:cli-drop-node-name;
5877                                             when "../../action-type = 'police'" {
5878                                                 tailf:dependency "../../action-type";
5879                                             }
5880                                             tailf:cli-sequence-commands {
5881                                                 tailf:cli-reset-siblings;
5882                                             }
5883                                             // <bps> bps
5884                                             leaf bps-value {
5885                                                 tailf:cli-no-keyword;
5886                                                 tailf:cli-drop-node-name;
5887                                                 tailf:cli-hide-in-submode;
5888                                                 tailf:cli-incomplete-command;
5889                                                 type string {
5890                                                     tailf:info "<32000-32000000000>;;Rate in bits per second "+
5891                                                         "(postfix k, m, g optional; decimal point allowed)";
5892                                                 }
5893                                             }
5894                                             leaf bps {
5895                                                 tailf:cli-hide-in-submode;
5896                                                 tailf:cli-incomplete-command;
5897                                                 type empty;
5898                                             }
5899                                             // <byte> byte
5900                                             leaf byte-value {
5901                                                 tailf:cli-no-keyword;
5902                                                 tailf:cli-drop-node-name;
5903                                                 tailf:cli-hide-in-submode;
5904                                                 tailf:cli-incomplete-command;
5905                                                 type string {
5906                                                     tailf:info "<32000-32000000000>;;(postfix k, m, g "+
5907                                                         "optional; decimal point allowed)";
5908                                                 }
5909                                             }
5910                                             leaf byte {
5911                                                 tailf:cli-hide-in-submode;
5912                                                 type empty;
5913                                             }
5914                                             // conform-action | exceed-action | violate-action
5915                                             container actions {
5916                                                 tailf:cli-no-keyword;
5917                                                 tailf:cli-break-sequence-commands;
5918                                                 tailf:cli-drop-node-name;
5919                                                 tailf:cli-flatten-container;
5920                                                 tailf:cli-hide-in-submode;
5921                                                 // policy-map * / class * / police ? / conform-action
5922                                                 uses police-conform-action-grouping;
5923                                                 // policy-map * / class * / police ? / exceed-action
5924                                                 uses police-exceed-action-grouping;
5925                                                 // policy-map * / class * / police ? / violate-action
5926                                                 uses police-violate-action-grouping;
5927                                             }
5928                                         }
5929                                     }
5930                                 }
5931                                 // police (Catalyst C3550)
5932                                 // police <bps> <burst> exceed-action {drop | policed-dscp-transmit}]
5933                                 case police-switch-case {
5934                                     container police-switch {
5935                                         tailf:cli-no-keyword;
5936                                         tailf:cli-drop-node-name;
5937                                         container police {
5938                                             tailf:cli-compact-syntax;
5939                                             tailf:cli-drop-node-name;
5940                                             when "../../action-type = 'police'" {
5941                                                 tailf:dependency "../../action-type";
5942                                             }
5943                                             tailf:cli-sequence-commands {
5944                                                 tailf:cli-reset-siblings;
5945                                             }
5946                                             // <cir>
5947                                             leaf cir {
5948                                                 tailf:cli-incomplete-command;
5949                                                 tailf:cli-drop-node-name;
5950                                                 type uint32 {
5951                                                     tailf:info "<8000-1000000000>;;Bits per second";
5952                                                     range "8000..1000000000";
5953                                                 }
5954                                             }
5955                                             // <bc>
5956                                             leaf bc {
5957                                                 tailf:cli-drop-node-name;
5958                                                 type uint32 {
5959                                                     tailf:info "<8000-2000000>;;Normal burst bytes";
5960                                                     range "8000..2000000";
5961                                                 }
5962                                             }
5963                                             // exceed-action
5964                                             leaf exceed-action {
5965                                                 tailf:info "action when rate is exceeded";
5966                                                 description "action when rate is exceeded";
5967                                                 type enumeration {
5968                                                     enum drop {
5969                                                         tailf:info "drop packet";
5970                                                     }
5971                                                     enum policed-dscp-transmit {
5972                                                         tailf:info "change dscp per policed-dscp map and send it";
5973                                                     }
5974                                                 }
5975                                             }
5976                                         }
5977                                     }
5978                                 }
5979                             }
5980                         }
5981                         case priority-case {
5982                             // policy-map * / class * / priority
5983                             container priority {
5984                                 //tailf:info "Strict Scheduling Priority for this Class";
5985                                 tailf:cli-compact-syntax;
5986                                 tailf:cli-sequence-commands;
5987                                 tailf:cli-drop-node-name;
5988                                 when "../action-type = 'priority'";
5989                                 leaf level {
5990                                     tailf:info "Multi-Level Priority Queue";
5991                                     description "Multi-Level Priority Queue";
5992                                     tailf:cli-optional-in-sequence;
5993                                     type uint8 {
5994                                         tailf:info "<1-2>;;Multi-Level Priority Queue";
5995                                         range "1..2";
5996                                     }
5997                                 }
5998                                 choice priority-type {
5999                                     leaf kilo-bits {
6000                                         tailf:cli-drop-node-name;
6001                                         type uint32 {
6002                                             range "8..2000000";
6003                                             tailf:info "<8-2000000>;;Kilo Bits per second";
6004                                         }
6005                                     }
6006                                     leaf percent {
6007                                         tailf:info "% of total bandwidth";
6008                                         description "% of total bandwidth";
6009                                         type uint16 {
6010                                             range "1..100";
6011                                             tailf:info "<1-100>;;percentage";
6012                                         }
6013                                     }
6014                                 }
6015                                 leaf burst {
6016                                     tailf:cli-drop-node-name;
6017                                     type uint32 {
6018                                         tailf:info "<32-64000000>;;Burst in bytes";
6019                                         range "32..64000000";
6020                                     }
6021                                 }
6022                             }
6023                         }
6024                         case queue-buffers-case {
6025                             // policy-map * / class * / queue-buffers
6026                             container queue-buffers {
6027                                 tailf:cli-drop-node-name;
6028                                 when "../action-type = 'queue-buffers'";
6029                                 leaf ratio {
6030                                     tailf:info "Relative buffer size for queue";
6031                                     description "Relative buffer size for queue";
6032                                     type uint8 {
6033                                         tailf:info "<0-100>;;Queue-buffers ratio limit";
6034                                         range "0..100";
6035                                     }
6036                                 }
6037                             }
6038                         }
6039                             case queue-limit-case {
6040                             // policy-map * / class * / queue-limit
6041                             container queue-limit {
6042                                 //tailf:info "Queue Max Threshold for Tail Drop";
6043                                 tailf:cli-compact-syntax;
6044                                 tailf:cli-sequence-commands {
6045                                     tailf:cli-reset-siblings;
6046                                 }
6047                                 tailf:cli-drop-node-name;
6048                                 when "../action-type = 'queue-limit'";
6049                                 leaf queue-limit-value {
6050                                     tailf:cli-drop-node-name;
6051                                     type uint32 {
6052                                         tailf:info "<1-8192000>  in bytes, <1-3400> in ms, "+
6053                                             "<1-32768> in packets by default";
6054                                         range "1..8192000";
6055                                     }
6056                                 }
6057                                 leaf queue-limit-type {
6058                                 tailf:cli-drop-node-name;
6059                                 type enumeration {
6060                                     enum bytes {
6061                                     tailf:info "in bytes";
6062                                 }
6063                                 enum ms {
6064                                     tailf:info "in milliseconds";
6065                                 }
6066                                 enum packets {
6067                                     tailf:info "in packets";
6068                                 }
6069                                 enum us {
6070                                     tailf:info "in microseconds";
6071                                 }
6072                             }
6073                         }
6074                     }
6075                     container queue-limit-dscp {
6076                         //tailf:info "Queue Max Threshold for Tail Drop";
6077                         tailf:cli-compact-syntax;
6078                         tailf:cli-drop-node-name;
6079                         when "../action-type = 'queue-limit'";
6080                         leaf dscp {
6081                             tailf:info "parameters for each dscp value";
6082                             description "parameters for each dscp value";
6083                             type empty;
6084                         }
6085                         leaf values {
6086                             tailf:info "dscp values";
6087                             description "dscp values";
6088                             type empty;
6089                         }
6090                         leaf-list sdcp-val {
6091                             tailf:cli-drop-node-name;
6092                             type dscp-type;
6093                         }
6094                         leaf percent {
6095                             tailf:info "% of threshold";
6096                             description "% of threshold";
6097                             type uint8 {
6098                                 tailf:info "<0-100>;;% of threshold";
6099                                 range "0..100";
6100                             }
6101                         }
6102                     }
6103                     }
6104                     case random-detect {
6105                     // policy-map * / class * / random-detect
6106                     container random-detect {
6107                         //tailf:info "Enable Random Early Detection as drop policy";
6108                         //presence true;
6109                         tailf:cli-drop-node-name;
6110                         when "../action-type = 'random-detect'";
6111                         container aggregate {
6112                             tailf:info "aggregate subclasses";
6113                             description "aggregate subclasses";
6114                             tailf:cli-compact-syntax;
6115                             tailf:cli-sequence-commands {
6116                                 tailf:cli-reset-siblings;
6117                             }
6118                             presence true;
6119                             leaf minimum-thresh {
6120                                 tailf:info "minimum threshold for red aggregate";
6121                                 description "minimum threshold for red aggregate";
6122                                 type uint32 {
6123                                     tailf:info "<0-1000000>;;minimum threshold (number of packets)";
6124                                     range "0..1000000";
6125                                 }
6126                             }
6127                             leaf maximum-thresh {
6128                                 tailf:info "maximum threshold for red aggregate";
6129                                 description "maximum threshold for red aggregate";
6130                                 type uint32 {
6131                                     tailf:info "<0-1000000>;;maximum threshold (number of packets)";
6132                                     range "0..1000000";
6133                                 }
6134                             }
6135                             leaf mark-probability {
6136                                 tailf:info "mark-probability for red aggregate";
6137                                 description "mark-probability for red aggregate";
6138                                 type empty;
6139                             }
6140                             leaf denominator {
6141                                 tailf:cli-drop-node-name;
6142                                 type uint32 {
6143                                     tailf:info "<0-65535>;;mark probability denominator";
6144                                     range "0..65535";
6145                                 }
6146                             }
6147                         }
6148                         container discard-class {
6149                             tailf:info "parameters for each discard-class value";
6150                             description "parameters for each discard-class value";
6151                             tailf:cli-compact-syntax;
6152                             tailf:cli-sequence-commands;
6153                             leaf dclass {
6154                                 tailf:cli-drop-node-name;
6155                                 tailf:cli-incomplete-command;
6156                                 type uint16 {
6157                                     range "0..7";
6158                                     tailf:info "<0-7>;;discard-class value";
6159                                 }
6160                             }
6161                             uses random-detect-grouping;
6162                         }
6163                         leaf discard-class-based {
6164                             tailf:info "Enable discard-class-based WRED as drop policy";
6165                             description "Enable discard-class-based WRED as drop policy";
6166                             tailf:cli-full-command;
6167                             type empty;
6168                         }
6169                         leaf dscp-based {
6170                             tailf:info "Enable dscp-based WRED as drop policy";
6171                             description "Enable dscp-based WRED as drop policy";
6172                             tailf:cli-full-command;
6173                             type empty;
6174                         }
6175                         list dscp {
6176                             tailf:info "parameters for each dscp value";
6177                             description "parameters for each dscp value";
6178                                     tailf:cli-suppress-mode;
6179                             tailf:cli-compact-syntax;
6180                             tailf:cli-sequence-commands;
6181                                     key dscp-val;
6182                             leaf dscp-val {
6183                                 type dscp-type;
6184                             }
6185                             uses random-detect-grouping;
6186                         }
6187                         leaf ecn {
6188                             tailf:info "explicit congestion notification";
6189                             description "explicit congestion notification";
6190                             tailf:cli-full-command;
6191                             type empty;
6192                         }
6193                         leaf exponential-weighting-constant {
6194                             tailf:info "weight for mean queue depth calculation";
6195                             description "weight for mean queue depth calculation";
6196                             tailf:cli-full-command;
6197                             type uint16 {
6198                                 range "1..16";
6199                                 tailf:info "<1-16>;;integer in 1..16 used in weighted "+
6200                                     "average to mean 2^number";
6201                             }
6202                         }
6203                         leaf prec-based {
6204                             tailf:info "Enable precedence-based WRED as drop policy";
6205                             description "Enable precedence-based WRED as drop policy";
6206                             tailf:cli-full-command;
6207                             type empty;
6208                         }
6209                         container precedence {
6210                             tailf:info "parameters for each precedence value";
6211                             description "parameters for each precedence value";
6212                             tailf:cli-sequence-commands;
6213                             tailf:cli-compact-syntax;
6214                             leaf prec {
6215                                 tailf:cli-drop-node-name;
6216                                 tailf:cli-incomplete-command;
6217                                 type precedence-type2;
6218                             }
6219                             uses random-detect-grouping;
6220                         }
6221                     }
6222                     }
6223                     case service-policy-case {
6224                       // policy-map * / class * / service-policy
6225                       leaf service-policy {
6226                         //tailf:info "Configure Flow Next";
6227                         tailf:cli-full-command;
6228                         tailf:cli-drop-node-name;
6229                         when "../action-type = 'service-policy'";
6230                         type string;
6231                         tailf:non-strict-leafref {
6232                             path "/ios:native/policy-map/name";
6233                         }
6234                     }
6235                     }
6236                     case set-case {
6237                     // policy-map * / class * / set
6238                     container set {
6239                         //tailf:info "Set QoS values";
6240                         tailf:cli-drop-node-name;
6241                         when "../action-type = 'set'";
6242                         // policy-map * / class * / set atm-clp
6243                         leaf atm-clp {
6244                             tailf:info "Set ATM CLP bit to 1";
6245                             description "Set ATM CLP bit to 1";
6246                             tailf:cli-full-command;
6247                             type empty;
6248                         }
6249                         // policy-map * / class * / set cos
6250                         container cos {
6251                         tailf:info "Set IEEE 802.1Q/ISL class of service/user "+
6252                             "priority";
6253                         description "Set IEEE 802.1Q/ISL class of service/user "+
6254                             "priority";
6255                         tailf:cli-compact-syntax;
6256                         tailf:cli-sequence-commands;
6257                         choice cos-type {
6258                             case a {
6259                                 leaf val {
6260                                     tailf:cli-drop-node-name;
6261                                     type uint16 {
6262                                         range "0..7";
6263                                         tailf:info "<0-7>;;cos value";
6264                                     }
6265                                 }
6266                             }
6267                             case b {
6268                                 leaf pack {
6269                                     tailf:cli-drop-node-name;
6270                                     type enumeration {
6271                                         enum dscp {
6272                                             tailf:code-name "pack_dscp";
6273                                             tailf:info "Set value from packet dscp";
6274                                         }
6275                                         enum precedence {
6276                                             tailf:code-name "pack_precedence";
6277                                             tailf:info "Set value from packet "+
6278                                                 "precedence.";
6279                                             }
6280                                         }
6281                                     }
6282                                     leaf table {
6283                                         tailf:info "Set codepoint value based on tablemap.";
6284                                         description "Set codepoint value based on tablemap.";
6285                                         type string {
6286                                             tailf:info "WORD;;table-map name";
6287                                         }
6288                                         tailf:non-strict-leafref {
6289                                         path "/ios:native/table-map/name";
6290                                     }
6291                                 }
6292                             }
6293                         }
6294                     }
6295                     // policy-map * / class * / set discard-class
6296                     leaf discard-class {
6297                         tailf:info "Discard behavior identifier";
6298                         description "Discard behavior identifier";
6299                         tailf:cli-full-command;
6300                         type uint16 {
6301                             range "0..7";
6302                             tailf:info "<0-7>;;Discard Class value";
6303                         }
6304                     }
6305                     // policy-map * / class * / set dscp
6306                     container dscp {
6307                         tailf:info "Set DSCP in IP(v4) and IPv6 packets";
6308                         description "Set DSCP in IP(v4) and IPv6 packets";
6309                         tailf:cli-compact-syntax;
6310                         leaf tunnel {
6311                             tailf:info "set tunnel packet dscp";
6312                             description "set tunnel packet dscp";
6313                             type empty;
6314                         }
6315                         leaf dscp-val {
6316                         tailf:cli-drop-node-name;
6317                         type dscp-type;
6318                     }
6319                 }
6320                 // policy-map * / class * / set fr-de
6321                 leaf fr-de {
6322                     tailf:info "Set FR DE bit to 1";
6323                     description "Set FR DE bit to 1";
6324                     tailf:cli-full-command;
6325                     type empty;
6326                 }
6327                 // policy-map * / class * / set ip
6328                 container ip {
6329                     tailf:info "Set IP specific values";
6330                     description "Set IP specific values";
6331                     choice ip-choice {
6332                         container dscp {
6333                             tailf:info "Set IP DSCP (DiffServ CodePointint)";
6334                             description "Set IP DSCP (DiffServ CodePointint)";
6335                             tailf:cli-compact-syntax;
6336                             leaf tunnel {
6337                                 tailf:info "set tunnel packet dscp";
6338                                 description "set tunnel packet dscp";
6339                                 type empty;
6340                             }
6341                             leaf dscp-val {
6342                                 tailf:cli-drop-node-name;
6343                                 type dscp-type;
6344                             }
6345                         }
6346                         container precedence {
6347                             tailf:info "Set IP precedence";
6348                             description "Set IP precedence";
6349                             presence "Set IP precedence";
6350                             leaf precedence-val {
6351                                 tailf:cli-drop-node-name;
6352                                 type precedence-type;
6353                             }
6354                         }
6355                     }
6356                 }
6357                 // policy-map * / class * / set mpls
6358                 container mpls {
6359                     tailf:info "Set MPLS specific values";
6360                     description "Set MPLS specific values";
6361                     container experimental {
6362                         tailf:info "Set Experimental value";
6363                         description "Set Experimental value";
6364                         // 0-7
6365                         container imposition {
6366                             tailf:info "Set Experimental value at tag imposition";
6367                             description "Set Experimental value at tag imposition";
6368                             leaf exp-value {
6369                                 tailf:cli-drop-node-name;
6370                                 tailf:cli-full-command;
6371                                 type uint8 {
6372                                     tailf:info "<0-7>;;Experimental value";
6373                                     range "0..7";
6374                                 }
6375                             }
6376                             // dscp
6377                             // precedence
6378                         }
6379                         // topmost
6380                         container topmost {
6381                             tailf:info "Set Experimental value  on topmost label";
6382                             description "Set Experimental value  on topmost label";
6383                             leaf exp-value {
6384                                 tailf:cli-drop-node-name;
6385                                 tailf:cli-full-command;
6386                                     type uint8 {
6387                                         tailf:info "<0-7>;;Experimental value";
6388                                         range "0..7";
6389                                     }
6390                                 }
6391                             }
6392                         }
6393                     }
6394                     // policy-map * / class * / set qos-group
6395                     container qos-group {
6396                         tailf:info "Set QoS Group";
6397                         description "Set QoS Group";
6398                         leaf qos-group-value {
6399                             tailf:cli-drop-node-name;
6400                             tailf:cli-full-command;
6401                             type uint8 {
6402                                 range "0..99";
6403                             }
6404                         }
6405                         // dscp
6406                         // mpls
6407                         // precedence
6408                     }
6409                 }
6410                 }
6411                 case shape-case {
6412                 // policy-map * / class * / shape
6413                 container shape {
6414                     //tailf:info "Traffic Shaping";
6415                     tailf:cli-drop-node-name;
6416                     when "../action-type = 'shape'";
6417                     // policy-map * / class * / shape adaptive
6418                     leaf adaptive {
6419                         tailf:info "Enable Traffic Shaping adaptation to BECN";
6420                         description "Enable Traffic Shaping adaptation to BECN";
6421                         tailf:cli-full-command;
6422                         type uint32 {
6423                             range "8000..154400000";
6424                             tailf:info "<8000-154400000>;;Lower Bound Target Bit "+
6425                                "Rate (bits per second)";
6426                         }
6427                     }
6428                     // policy-map * / class * / shape average
6429                     container average {
6430                     tailf:info "configure token bucket: CIR (bps) [Bc (bits) "+
6431                         "[Be (bits)]], send out Bc only per interval";
6432                     description "configure token bucket: CIR (bps) [Bc (bits) "+
6433                         "[Be (bits)]], send out Bc only per interval";
6434                     tailf:cli-sequence-commands;
6435                     tailf:cli-compact-syntax;
6436                     choice average-choice {
6437                         case a {
6438                             leaf bit-rate {
6439                                 tailf:cli-drop-node-name;
6440                                 type uint64 {
6441                                     //range "8000..154400000";
6442                                     //FIXME: what is range max?
6443                                     tailf:info "<8000-max>;;Target Bit "+
6444                                         "Rate (bits per second), the value "+
6445                                         "needs to be a multiple of 8000";
6446                                 }
6447                             }
6448                             leaf bits-per-interval-sustained {
6449                                 tailf:cli-drop-node-name;
6450                                 type uint32 {
6451                                     range "256..154400000";
6452                                     tailf:info "<256-154400000>;;bits per "+
6453                                         "interval, sustained. Needs to be "+
6454                                         "multiple of 128. Recommend not to "+
6455                                         "configure it, the algorithm will "+
6456                                         "find out the best value";
6457                                 }
6458                             }
6459                             leaf bits-per-interval-excess {
6460                                 tailf:cli-drop-node-name;
6461                                 type uint32 {
6462                                     range "0..154400000";
6463                                     tailf:info "<0-154400000>;;bits per "+
6464                                         "interval, excess. Needs to be "+
6465                                         "multiple of 128. Bc will be used if "+
6466                                         "you don't configure it.";
6467                                     }
6468                                 }
6469                             }
6470                             case b {
6471                                 leaf percent {
6472                                     tailf:info "% of interface bandwidth for "+
6473                                         "Committed information rate";
6474                                     description "% of interface bandwidth for "+
6475                                         "Committed information rate";
6476                                     type percentage-type;
6477                                 }
6478                                 leaf burst-size-sustained {
6479                                     tailf:cli-incomplete-command;
6480                                     tailf:cli-drop-node-name;
6481                                     type uint16 {
6482                                         range "10..2000";
6483                                         tailf:info "<10-2000>;;Sustained burst "+
6484                                             "size in msec";
6485                                         }
6486                                     }
6487                                     leaf ms {
6488                                         tailf:info "milliseconds";
6489                                         description "milliseconds";
6490                                         type empty;
6491                                     }
6492                                     container bse {
6493                                         tailf:cli-drop-node-name;
6494                                         tailf:cli-flatten-container;
6495                                         tailf:cli-sequence-commands;
6496                                         tailf:cli-compact-syntax;
6497                                         leaf burst-size-excess {
6498                                             tailf:cli-incomplete-command;
6499                                             type uint16 {
6500                                                 range "10..2000";
6501                                                 tailf:info "<10-2000>;;Excess burst "+
6502                                                     "size in msec";
6503                                             }
6504                                         }
6505                                         leaf ms {
6506                                             tailf:info "milliseconds";
6507                                             description "milliseconds";
6508                                             type empty;
6509                                         }
6510                                     }
6511                                 }
6512                             }
6513                         }
6514                         // policy-map * / class * / shape fecn-adapt
6515                         leaf fecn-adapt {
6516                             tailf:info "Enable Traffic Shaping reflection of FECN as "+
6517                                 "BECN";
6518                             description "Enable Traffic Shaping reflection of FECN as "+
6519                                 "BECN";
6520                             tailf:cli-full-command;
6521                             type empty;
6522                         }
6523                         // policy-map * / class * / shape fr-voice-adapt
6524                         container fr-voice-adapt {
6525                             tailf:info "Enable rate adjustment depending on voice "+
6526                                   "presence";
6527                             description "Enable rate adjustment depending on voice "+
6528                                 "presence";
6529                             presence "Enable rate adjustment depending on voice "+
6530                                 "presence" ;
6531                             leaf deactivation {
6532                                 type uint16 {
6533                                     range "1..10000";
6534                                     tailf:info "<1-10000>;;de-activation delay in "+
6535                                         "seconds";
6536                                     }
6537                                 }
6538                             }
6539                             // policy-map * / class * / shape max-buffers
6540                             leaf max-buffers {
6541                                 tailf:cli-full-command;
6542                                 tailf:info "Set Maximum Buffer Limit";
6543                                 description "Set Maximum Buffer Limit";
6544                                 type uint16 {
6545                                     range "1..4096";
6546                                     tailf:info "<1-4096>;;Maximum Buffer Limit";
6547                                 }
6548                             }
6549                         }
6550                         }
6551                         case trust-case {
6552                         // policy-map * / class * / trust
6553                         leaf trust {
6554                             //tailf:info "Set trust value for the class";
6555                             tailf:cli-drop-node-name;
6556                             when "../action-type = 'trust'";
6557                                 type enumeration {
6558                                     enum cos {
6559                                         tailf:info "trust value for the class";
6560                                     }
6561                                     enum dscp {
6562                                         tailf:info "trust value for the class";
6563                                     }
6564                                     enum ip-precedence {
6565                                         tailf:info "trust value for the class";
6566                                     }
6567                                 }
6568                             }
6569                         }
6570                     }
6571                 }
6572             }
6573             // policy-map * / description
6574             leaf "description" {
6575                 tailf:info "Policy-Map description";
6576                 description "Policy-Map description";
6577                 tailf:cli-multi-value;
6578                 type string {
6579                     length "1..200";
6580                     tailf:info "LINE;;Description of this policy-map (up to "
6581                     +"200 characters)";
6582                 }
6583             }
6584             // policy-map * /sequence-interval
6585             leaf sequence-interval {
6586                 tailf:info "Enable sequence number capability";
6587                 description "Enable sequence number capability";
6588                 when "../type = 'appnav'";
6589                 type uint16 {
6590                     tailf:info "<0-65535>;;Sequence Number Interval";
6591                 }
6592             }
6593         }
6594
6595 /// ========================================================================
6596 /// service-chain
6597 /// ========================================================================
6598
6599         grouping config-service-chain-grouping {
6600             leaf description {
6601                 tailf:info "Service function forwarder description";
6602                 description "Service function forwarder description";
6603                 tailf:cli-multi-value;
6604                 type string {
6605                     tailf:info "LINE;;Up to 256 characters describing this " + "service function forwarder";
6606                     length "1..256";
6607                 }
6608             }
6609             container ip {
6610                 tailf:info "IP address for Service Function Forwarder";
6611                 description "IP address for Service Function Forwarder";
6612                 leaf address {
6613                     tailf:info "Set IPv4 address";
6614                     description "Set IPv4 address";
6615                     type inet:ipv4-address {
6616                         tailf:info "A.B.C.D;;IP address of Service Function Forwarder";
6617                     }
6618                 }
6619             }
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 }