ietf-evpn-yang
Produced: 02/03/2019 19:13:47
   
Mode:  All, With Context  
Left file: C:\Users\y00229798\Desktop\Publish\ietf-evpn@2018-03-02.yang  
Right file: C:\Users\y00229798\Desktop\Publish\ietf-evpn@2018-02-20.yang  
1 module ietf-evpn { = 1 module ietf-evpn {
2   namespace "urn:ietf:params:xml:ns:yang:ietf-evpn";   2   namespace "urn:ietf:params:xml:ns:yang:ietf-evpn";
3   prefix "evpn";   3   prefix "evpn";
4     4  
5   import ietf-inet-types {   5   import ietf-inet-types {
6     prefix "inet";   6     prefix "inet";
7   }   7   }
8     8  
9   import ietf-yang-types {   9   import ietf-yang-types {
10     prefix "yang";   10     prefix "yang";
11   }   11   }
12     12  
13   import ietf-routing-types {   13   import ietf-routing-types {
14     prefix "rt-types";   14     prefix "rt-types";
15   }   15   }
16     16  
17   import ietf-network-instance {   17   import ietf-network-instance {
18     prefix "ni";   18     prefix "ni";
19   }   19   }
20     20  
21   import ietf-l2vpn {   21   import ietf-l2vpn {
22     prefix "l2vpn";   22     prefix "l2vpn";
23   }   23   }
24     24  
25   import ietf-pseudowires {   25   import ietf-pseudowires {
26     prefix "pw";   26     prefix "pw";
27   }   27   }
28    +-    
29   import ietf-ethernet-segment {      
30           prefix "es";      
31   }      
32   = 28  
33   organization  "ietf";   29   organization  "ietf";
34   contact       "ietf";   30   contact       "ietf";
35   description   "evpn";   31   description   "evpn";
36     32  
37   revision "2018-02-20" {   33   revision "2018-02-20" {
38     description " - Incorporated ietf-network-instance model" +   34     description " - Incorporated ietf-network-instance model" +
39                 "   on which ietf-l2vpn is now based " +   35                 "   on which ietf-l2vpn is now based " +
40                 "";   36                 "";
41     reference   "";   37     reference   "";
42   }   38   }
43     39  
44   revision "2017-10-21" {   40   revision "2017-10-21" {
45     description " - Modified the operational state augment " +   41     description " - Modified the operational state augment " +
46                 " - Renamed evpn-instances-state to evpn-instances" +   42                 " - Renamed evpn-instances-state to evpn-instances" +
47                 " - Added vpws-vlan-aware to an EVPN instance " +   43                 " - Added vpws-vlan-aware to an EVPN instance " +
48                 " - Added a new augment to L2VPN to add EPVN " +   44                 " - Added a new augment to L2VPN to add EPVN " +
49                 " - pseudowire for the case of EVPN VPWS " +   45                 " - pseudowire for the case of EVPN VPWS " +
50                 " - Added state change notification " +   46                 " - Added state change notification " +
51                 "";   47                 "";
52     reference   "";   48     reference   "";
53   }   49   }
54     50  
55   revision "2017-03-13" {   51   revision "2017-03-13" {
56     description " - Added an augment to base L2VPN model to " +   52     description " - Added an augment to base L2VPN model to " +
57                 "   reference an EVPN instance " +   53                 "   reference an EVPN instance " +
58                 " - Reused ietf-routing-types.yang " +   54                 " - Reused ietf-routing-types.yang " +
59                 "   vpn-route-targets grouping instead of " +   55                 "   vpn-route-targets grouping instead of " +
60                 "   defining it in this module " +   56                 "   defining it in this module " +
61                 "";   57                 "";
62     reference   "";   58     reference   "";
63   }   59   }
64     60  
65   revision "2016-07-08" {   61   revision "2016-07-08" {
66     description " - Added operational state" +   62     description " - Added operational state" +
67                 " - Added a configuration knob to enable/disable " +   63                 " - Added a configuration knob to enable/disable " +
68                 "   underlay-multicast " +   64                 "   underlay-multicast " +
69                 " - Added a configuration knob to enable/disable " +   65                 " - Added a configuration knob to enable/disable " +
70                 "   flooding of unknonw unicast " +   66                 "   flooding of unknonw unicast " +
71                 " - Added several configuration knobs " +   67                 " - Added several configuration knobs " +
72                 "   to manage ARP and ND" +   68                 "   to manage ARP and ND" +
73                 "";   69                 "";
74     reference   "";   70     reference   "";
75   }   71   }
76     72  
77   revision "2016-06-23" {   73   revision "2016-06-23" {
78     description "WG document adoption";   74     description "WG document adoption";
79     reference   "";   75     reference   "";
80   }   76   }
81     77  
82   revision "2015-10-15" {   78   revision "2015-10-15" {
83     description "Initial revision";   79     description "Initial revision";
84     reference   "";   80     reference   "";
85   }   81   }
86     82  
87   feature evpn-bgp-params {   83   feature evpn-bgp-params {
88     description "EVPN's BGP parameters";   84     description "EVPN's BGP parameters";
89   }   85   }
90     86  
91   feature evpn-pbb-params {   87   feature evpn-pbb-params {
92     description "EVPN's PBB parameters";   88     description "EVPN's PBB parameters";
93   }   89   }
94     90  
95   /* Identities */   91   /* Identities */
96     92  
97   identity evpn-notification-state {   93   identity evpn-notification-state {
98     description "The base identity on which EVPN notification " +   94     description "The base identity on which EVPN notification " +
99                 "states are based";   95                 "states are based";
100   }   96   }
101     97  
102   identity MAC-duplication-detected {   98   identity MAC-duplication-detected {
103     base "evpn-notification-state";   99     base "evpn-notification-state";
104     description "MAC duplication is detected";   100     description "MAC duplication is detected";
105   }   101   }
106     102  
107   identity mass-withdraw-received {   103   identity mass-withdraw-received {
108     base "evpn-notification-state";   104     base "evpn-notification-state";
109     description "Mass withdraw received";   105     description "Mass withdraw received";
110   }   106   }
111     107  
112   identity static-MAC-move-detected {   108   identity static-MAC-move-detected {
113     base "evpn-notification-state";   109     base "evpn-notification-state";
114     description "Static MAC move is detected";   110     description "Static MAC move is detected";
115   }   111   }
116     112  
117   /* Typedefs */   113   /* Typedefs */
118     114  
119   typedef evpn-instance-ref {   115   typedef evpn-instance-ref {
120     type leafref {   116     type leafref {
121       path "/evpn/evpn-instances/evpn-instance/name";   117       path "/evpn/evpn-instances/evpn-instance/name";
122     }   118     }
123     description "A leafref type to an EVPN instance";   119     description "A leafref type to an EVPN instance";
124   }   120   }
125    <> 121  
126         
127   typedef evpn-label-mode {      
128     type enumeration {      
129                   enum per-vpn {      
130                     description "Allocate labels per VRF";      
131                   }      
132         enum per-es {   122   /* Groupings */
133                     description "Allocate labels per CE";   123  
134                   }      
135                   enum per-route {   124   grouping route-rd-rt-grp {
136                     description "Allocate labels per MAC-IP prefix";      
137                   }      
138     125     description "A grouping for a route's route distinguishers " +
139     }      
140     description "BGP label allocation mode";      
141   }      
142   typedef evpn-interface-service-type {      
143     type enumeration {      
144                   enum vlan-based {      
145                     description "VLAN-Based Service Interface";      
146                   }      
147         enum vlan-bundle {      
148                     description "VLAN Bundle Service Interface";      
149                   }      
150         enum port-based {   126                 "and route targets";
151                     description "Port-Based Service Interface";      
152                   }      
153         enum vlan-aware-bundle {      
154                     description "VLAN-Aware Bundle Service Interface";      
155                   }      
156         enum port-based-vlan-aware-bundle {      
157                     description "Port-Based VLAN-Aware Service Interface";      
158                   }      
159     127     list rd-rt {
160     }      
161     description "EVPN interface service type";   128       key "route-distinguisher";
162   }      
163   //RD      
164   grouping route-distinguisher-params {   129       leaf route-distinguisher {
165     description "Route distinguisher value as per RFC4364";      
166     leaf rd {      
167       type rt-types:route-distinguisher;   130         type rt-types:route-distinguisher;
168       description "Route distinguisher value as per RFC4364";   131         description "Route distinguisher";
169     }   132       }
      133       list vpn-target {
      134         key "route-target";
170     leaf auto-rd {   135         leaf route-target {
171       type rt-types:route-distinguisher;   136           type rt-types:route-target;
172       config false;      
173       description   137           description "BGP route target";
174         "Automatically assigned RD value when rd AUTO is configured";      
175     }   138         }
      139         description "A list of route targets";
176   }   140       }
177         
178   grouping route-target-params {      
179     description "Grouping to specify rules for route import and export";   141       description "A list of route distinguishers and " +
180     container vpn-targets {   142                   "corresponding VPN route targets";
181       description      
182         "Set of route-targets to match for import and export routes      
183          to/from VRF";      
184       uses rt-types:vpn-route-targets;      
185        }   143     }
186     }   144   }
187        
188        
189   = 145  
190   grouping next-hop-label-grp {   146   grouping next-hop-label-grp {
191     description "next-hop-label-grp";   147     description "next-hop-label-grp";
192     leaf next-hop {   148     leaf next-hop {
193       type inet:ip-address;   149       type inet:ip-address;
194       description "next-hop";   150       description "next-hop";
195     }   151     }
196     leaf label {   152     leaf label {
197       type rt-types:mpls-label;   153       type rt-types:mpls-label;
198       description "label";   154       description "label";
199     }   155     }
200   }   156   }
201     157  
202   grouping next-hop-label2-grp {   158   grouping next-hop-label2-grp {
203     description "next-hop-label2-grp";   159     description "next-hop-label2-grp";
204     leaf label2 {   160     leaf label2 {
205       type rt-types:mpls-label;   161       type rt-types:mpls-label;
206       description "label2";   162       description "label2";
207     }   163     }
208   }   164   }
209     165  
210   grouping path-detail-grp {   166   grouping path-detail-grp {
211     description "path-detail-grp";   167     description "path-detail-grp";
212     container detail {   168     container detail {
213       config false;   169       config false;
214       description "path details";   170       description "path details";
215       container attributes {   171       container attributes {
216         leaf-list extended-community {   172         leaf-list extended-community {
217           type string;   173           type string;
218           description "extended-community";   174           description "extended-community";
219         }   175         }
220         description "attributes";   176         description "attributes";
221       }   177       }
222       leaf bestpath {   178       leaf bestpath {
223         type empty;   179         type empty;
224         description "Indicate this path is the best path";   180         description "Indicate this path is the best path";
225       } <>    
226     }      
227   }      
228         
229   grouping evpn-stat-group {      
230           description "EVPN statistics group";      
231       leaf total-tx-count {      
232         type yang:counter64;      
233       }      
234           leaf total-rx-count{      
235                 type yang:counter64;      
236           }      
237           container detail {      
238           description "Detailed statistics";      
239           leaf unicast-tx-count {      
240             type yang:counter64;      
241           }      
242           leaf unicast-rx-count {      
243             type yang:counter64;      
244           }      
245           container bum-counter{      
246                   leaf bum-tx-count{      
247                     description "";      
248                           type yang:counter64;       
249                   }      
250                   leaf bum-rx-count{      
251                           type yang:counter64;      
252                   }      
253                   container bum-detail {      
254                     description "";      
255                   leaf broadcast-tx-count {      
256                       type yang:counter64;      
257                       description "broadcast transmission count";      
258                     }      
259                     leaf broadcast-rx-count {      
260                       type yang:counter64;      
261                       description "broadcast receive count";      
262                     }      
263                     leaf multicast-tx-count {      
264                       type yang:counter64;      
265                       description "multicast transmission count";      
266                     }      
267                     leaf multicast-rx-count {      
268                       type yang:counter64;      
269                       description "multicast receive count";      
270                     }      
271                     leaf unknown-unicast-tx-count {      
272                       type yang:counter64;      
273                       description "unknown unicast transmission count";      
274                     }      
275                     leaf unknown-unicast-rx-count {      
276                       type yang:counter64;      
277                       description "unknown-unicast receive count";      
278                     }      
279                   }      
280           }   181       }
281         }   182     }
282   } = 183   }
283     184  
284   /* EVPN YANG Model */   185   /* EVPN YANG Model */
285     186  
286   container evpn {   187   container evpn {
287     description "evpn";   188     description "evpn";
288     container common {   189     container common {
289       description "common epn attributes";   190       description "common epn attributes";
290       choice replication-type {   191       choice replication-type {
291         description "A choice of replication type";   192         description "A choice of replication type";
292         case ingress-replication {   193         case ingress-replication {
293           leaf ingress-replication {   194           leaf ingress-replication {
294             type boolean;   195             type boolean;
295             description "ingress-replication";   196             description "ingress-replication";
296           }   197           }
297         }   198         }
298         case p2mp-replication {   199         case p2mp-replication {
299           leaf p2mp-replication {   200           leaf p2mp-replication {
300             type boolean;   201             type boolean;
301             description "p2mp-replication";   202             description "p2mp-replication";
302           }   203           }
303         }   204         }
304       }   205       }
305     }   206     }
306     container evpn-instances {   207     container evpn-instances {
307       description "evpn-instances";   208       description "evpn-instances";
308       list evpn-instance {   209       list evpn-instance {
309         key "name";   210         key "name";
310         description "An EVPN instance";   211         description "An EVPN instance";
311         leaf name {   212         leaf name {
312           type string;   213           type string;
313           description "Name of EVPN instance";   214           description "Name of EVPN instance";
314         }   215         }
315         leaf evi {   216         leaf evi {
316           type uint32;   217           type uint32;
317           description "evi";   218           description "evi";
318         }   219         }
319         list ethernet-segment-list { +-    
320           leaf ethernet-segment-idendifier {      
321                 type es:ethernet-segment-ref;      
322             description "Ethernet Segments contained in the EVPN Instance";      
323           }      
324         }      
325         container pbb-parameters { = 220         container pbb-parameters {
326           if-feature "evpn-pbb-params";   221           if-feature "evpn-pbb-params";
327           description "PBB parameters";   222           description "PBB parameters";
328           leaf source-bmac {   223           leaf source-bmac {
329             type yang:hex-string;   224             type yang:hex-string;
330             description "source-bmac";   225             description "source-bmac";
331           }   226           }
332         }   227         }
    <> 228         container bgp-parameters {
      229           description "BGP parameters";
      230           container common {
      231             description "BGP parameters common to all pseudowires";
      232             list rd-rt {
      233               if-feature evpn-bgp-params;
      234               key "route-distinguisher";
333         uses route-distinguisher-params;   235               leaf route-distinguisher {
334         uses rt-types:vpn-route-targets;   236                 type rt-types:route-distinguisher;
335         leaf label-mode {      
336                 type evpn-label-mode;      
337                 description "Label Allocation Method of EVPN";   237                 description "Route distinguisher";
338         }   238               }
339         leaf interface-service-type{      
340                 type evpn-interface-service-type;   239               uses rt-types:vpn-route-targets;
341                 config false;   240               description "A list of route distinguishers and " +
342                 description "EVPN interface service type";   241                           "corresponding VPN route targets";
343         }   242             }
344         leaf control-word {      
345                 type boolean;      
346                 description "Enable (TRUE) or Diable (FALSE) Control Word of the EVPN.";      
347         }   243           }
348         leaf MTU {      
349                 type uint16 {      
350                         range "64..max";      
351                 }      
352                 units octets;      
353                 description "MTU of the EVPN.";      
354         } = 244         }
355         leaf arp-proxy {   245         leaf arp-proxy {
356           type boolean;   246           type boolean;
357           default false;   247           default false;
358           description "Enable (TRUE) or disable (FALSE) ARP proxy";   248           description "Enable (TRUE) or disable (FALSE) ARP proxy";
359         }   249         }
360         leaf arp-suppression {   250         leaf arp-suppression {
361           type boolean;   251           type boolean;
362           default false;   252           default false;
363           description "Enable (TRUE) or disable (FALSE) " +   253           description "Enable (TRUE) or disable (FALSE) " +
364                       "ARP suppression";   254                       "ARP suppression";
365         }   255         }
366         leaf nd-proxy {   256         leaf nd-proxy {
367           type boolean;   257           type boolean;
368           default false;   258           default false;
369           description "Enable (TRUE) or disable (FALSE) ND proxy";   259           description "Enable (TRUE) or disable (FALSE) ND proxy";
370         }   260         }
371         leaf nd-suppression {   261         leaf nd-suppression {
372           type boolean;   262           type boolean;
373           default false;   263           default false;
374           description "Enable (TRUE) or disable (FALSE) " +   264           description "Enable (TRUE) or disable (FALSE) " +
375                       "ND suppression";   265                       "ND suppression";
376         }   266         }
377         leaf underlay-multicast {   267         leaf underlay-multicast {
378           type boolean;   268           type boolean;
379           default false;   269           default false;
380           description "Enable (TRUE) or disable (FALSE) " +   270           description "Enable (TRUE) or disable (FALSE) " +
381                       "underlay multicast";   271                       "underlay multicast";
382         }   272         }
383         leaf flood-unknown-unicast-supression {   273         leaf flood-unknown-unicast-supression {
384           type boolean;   274           type boolean;
385           default false;   275           default false;
386           description "Enable (TRUE) or disable (FALSE) " +   276           description "Enable (TRUE) or disable (FALSE) " +
387                       "flood unknown unicast suppression";   277                       "flood unknown unicast suppression";
388         }   278         }
    -+ 279         leaf vpws-vlan-aware {
      280           type boolean;
      281           default false;
      282           description "Enable (TRUE) or disable (FALSE) " +
      283                       "VPWS VLAN aware";
      284         }
389         container routes { = 285         container routes {
390           config false;   286           config false;
391           description "routes";   287           description "routes";
392           list ethernet-auto-discovery-route {   288           list ethernet-auto-discovery-route {
393             uses route-rd-rt-grp;   289             uses route-rd-rt-grp;
394             leaf ethernet-segment-identifier {   290             leaf ethernet-segment-identifier {
395               type es:esid-type; <> 291               type uint32;
396               description "Ethernet segment identifier (esi)"; = 292               description "Ethernet segment identifier (esi)";
397             }   293             }
398             leaf ethernet-tag {   294             leaf ethernet-tag {
399               type uint32;   295               type uint32;
400               description "An ethernet tag (etag) indentifying a " +   296               description "An ethernet tag (etag) indentifying a " +
401                           "broadcast domain";   297                           "broadcast domain";
402             }   298             }
403             list path {   299             list path {
404               uses next-hop-label-grp;   300               uses next-hop-label-grp;
405               uses path-detail-grp;   301               uses path-detail-grp;
406               description "path";   302               description "path";
407             }   303             }
408             description "ethernet-auto-discovery-route";   304             description "ethernet-auto-discovery-route";
409           }   305           }
410           list mac-ip-advertisement-route {   306           list mac-ip-advertisement-route {
411             uses route-rd-rt-grp;   307             uses route-rd-rt-grp;
412             leaf ethernet-segment-identifier {   308             leaf ethernet-segment-identifier {
413               type uint32;   309               type uint32;
414               description "Ethernet segment identifier (esi)";   310               description "Ethernet segment identifier (esi)";
415             }   311             }
416             leaf ethernet-tag {   312             leaf ethernet-tag {
417               type uint32;   313               type uint32;
418               description "An ethernet tag (etag) indentifying a " +   314               description "An ethernet tag (etag) indentifying a " +
419                           "broadcast domain";   315                           "broadcast domain";
420             }   316             }
421             leaf mac-address {   317             leaf mac-address {
422               type yang:hex-string;   318               type yang:hex-string;
423               description "Route mac address";   319               description "Route mac address";
424             }   320             }
425             leaf mac-address-length {   321             leaf mac-address-length {
426               type uint8 {   322               type uint8 {
427                 range "0..48";   323                 range "0..48";
428               }   324               }
429               description "mac address length";   325               description "mac address length";
430             }   326             }
431             leaf ip-prefix {   327             leaf ip-prefix {
432               type inet:ip-prefix;   328               type inet:ip-prefix;
433               description "ip-prefix";   329               description "ip-prefix";
434             }   330             }
435             list path {   331             list path {
436               uses next-hop-label-grp;   332               uses next-hop-label-grp;
437               uses next-hop-label2-grp;   333               uses next-hop-label2-grp;
438               uses path-detail-grp;   334               uses path-detail-grp;
439               description "path";   335               description "path";
440             }   336             }
441             description "mac-ip-advertisement-route";   337             description "mac-ip-advertisement-route";
442           }   338           }
443           list inclusive-multicast-ethernet-tag-route {   339           list inclusive-multicast-ethernet-tag-route {
444             uses route-rd-rt-grp;   340             uses route-rd-rt-grp;
445             leaf ethernet-segment-identifier {   341             leaf ethernet-segment-identifier {
446               type uint32;   342               type uint32;
447               description "Ethernet segment identifier (esi)";   343               description "Ethernet segment identifier (esi)";
448             }   344             }
449             leaf originator-ip-prefix {   345             leaf originator-ip-prefix {
450               type inet:ip-prefix;   346               type inet:ip-prefix;
451               description "originator-ip-prefix";   347               description "originator-ip-prefix";
452             }   348             }
453             list path {   349             list path {
454               uses next-hop-label-grp;   350               uses next-hop-label-grp;
455               uses path-detail-grp;   351               uses path-detail-grp;
456               description "path";   352               description "path";
457             }   353             }
458             description "inclusive-multicast-ethernet-tag-route";   354             description "inclusive-multicast-ethernet-tag-route";
459           }   355           }
460           list ethernet-segment-route {   356           list ethernet-segment-route {
461             uses route-rd-rt-grp;   357             uses route-rd-rt-grp;
462             leaf ethernet-segment-identifier {   358             leaf ethernet-segment-identifier {
463               type uint32;   359               type uint32;
464               description "Ethernet segment identifier (esi)";   360               description "Ethernet segment identifier (esi)";
465             }   361             }
466             leaf originator-ip-prefix {   362             leaf originator-ip-prefix {
467               type inet:ip-prefix;   363               type inet:ip-prefix;
468               description "originator ip-prefix";   364               description "originator ip-prefix";
469             }   365             }
470             list path {   366             list path {
471               leaf next-hop {   367               leaf next-hop {
472                 type inet:ip-address;   368                 type inet:ip-address;
473                 description "next-hop";   369                 description "next-hop";
474               }   370               }
475               uses path-detail-grp;   371               uses path-detail-grp;
476               description "path";   372               description "path";
477             }   373             }
478             description "ethernet-segment-route";   374             description "ethernet-segment-route";
479           }   375           }
480           list ip-prefix-route {   376           list ip-prefix-route {
481             uses route-rd-rt-grp;   377             uses route-rd-rt-grp;
482             leaf ethernet-segment-identifier {   378             leaf ethernet-segment-identifier {
483               type uint32;   379               type uint32;
484               description "Ethernet segment identifier (esi)";   380               description "Ethernet segment identifier (esi)";
485             }   381             }
486             leaf ip-prefix {   382             leaf ip-prefix {
487               type inet:ip-prefix;   383               type inet:ip-prefix;
488               description "ip-prefix";   384               description "ip-prefix";
489             }   385             }
490             list path {   386             list path {
491               uses next-hop-label-grp;   387               uses next-hop-label-grp;
492               uses path-detail-grp;   388               uses path-detail-grp;
493               description "path";   389               description "path";
494             }   390             }
495             description "ip-prefix route";   391             description "ip-prefix route";
496           }   392           }
497         }   393         }
498         container statistics {   394         container statistics {
499           config false;   395           config false;
500           description "Statistics";   396           description "Statistics";
    <> 397           leaf tx-count {
      398             type uint32;
      399             description "transmission count";
      400           }
      401           leaf rx-count {
      402             type uint32;
      403             description "receive count";
      404           }
      405           container detail {
501           list ethernet-segment-statistics {   406            description "Detailed statistics";
502                   leaf ethernet-segment-idendifier {   407             leaf broadcast-tx-count {
503                 type es:ethernet-segment-ref;   408               type uint32;
504                   description "Ethernet Segments contained in the EVPN Instance";   409               description "broadcast transmission count";
505                 }    410             }
506                   uses evpn-stat-group;   411             leaf broadcast-rx-count {
      412               type uint32;
      413               description "broadcast receive count";
507           }   414             }
      415             leaf multicast-tx-count {
      416               type uint32;
508                   container total-statistics{   417               description "multicast transmission count";
      418             }
509                           uses evpn-stat-group;   419             leaf multicast-rx-count {
      420               type uint32;
510                           description "Total statistics for all Ethernet Segmenents";   421               description "multicast receive count";
      422             }
      423             leaf unknown-unicast-tx-count {
      424               type uint32;
      425               description "unknown unicast transmission count";
      426             }
      427             leaf unknown-unicast-rx-count {
      428               type uint32;
      429               description "unknown-unicast receive count";
      430             }
511                   }   431           }
512         } = 432         }
513       }   433       }
514     }   434     }
515   }   435   }
516     436  
517   /* augments */   437   /* augments */
518     438  
519   augment "/pw:pseudowires/pw:pseudowire/pw:pw-type" {   439   augment "/pw:pseudowires/pw:pseudowire/pw:pw-type" {
520     description "Augment for an L2VPN instance to add EVPN VPWS " +   440     description "Augment for an L2VPN instance to add EVPN VPWS " +
521                 "pseudowire";   441                 "pseudowire";
522     case evpn-pw {   442     case evpn-pw {
523       container evpn-pw {   443       container evpn-pw {
524         description "EVPN pseudowire";   444         description "EVPN pseudowire";
525         leaf remote-id {   445         leaf remote-id {
526           type uint32;   446           type uint32;
527           description "Remote pseudowire ID";   447           description "Remote pseudowire ID";
528         }   448         }
529         leaf local-id {   449         leaf local-id {
530           type uint32;   450           type uint32;
531           description "Local pseudowire ID";   451           description "Local pseudowire ID";
532         }   452         }
533       }   453       }
534     }   454     }
535   }   455   }
536     456  
537   augment "/ni:network-instances/ni:network-instance/ni:ni-type" +   457   augment "/ni:network-instances/ni:network-instance/ni:ni-type" +
538           "/l2vpn:l2vpn" {   458           "/l2vpn:l2vpn" {
539     description "Augment for an L2VPN instance and EVPN association";   459     description "Augment for an L2VPN instance and EVPN association";
540     leaf evpn-instance {   460     leaf evpn-instance {
541       type evpn-instance-ref;   461       type evpn-instance-ref;
542       description "Reference to an EVPN instance";   462       description "Reference to an EVPN instance";
543     }   463     }
544   }   464   }
545     465  
546   augment "/ni:network-instances/ni:network-instance/ni:ni-type" +   466   augment "/ni:network-instances/ni:network-instance/ni:ni-type" +
547           "/l2vpn:l2vpn" {   467           "/l2vpn:l2vpn" {
548     when "l2vpn:type = 'l2vpn:vpls-instance-type'" {   468     when "l2vpn:type = 'l2vpn:vpls-instance-type'" {
549       description "Constraints only for VPLS pseudowires";   469       description "Constraints only for VPLS pseudowires";
550     }   470     }
551     description "Augment for VPLS instance";   471     description "Augment for VPLS instance";
552     container vpls-contstraints {   472     container vpls-contstraints {
553       must "not(boolean(/pw:pseudowires/pw:pseudowire" +   473       must "not(boolean(/pw:pseudowires/pw:pseudowire" +
554            "                [pw:name = current()/../l2vpn:endpoint" +   474            "                [pw:name = current()/../l2vpn:endpoint" +
555            "            /l2vpn:pw/l2vpn:name]" +   475            "            /l2vpn:pw/l2vpn:name]" +
556            "            /evpn-pw/remote-id)) and " +   476            "            /evpn-pw/remote-id)) and " +
557            "not(boolean(/pw:pseudowires/pw:pseudowire" +   477            "not(boolean(/pw:pseudowires/pw:pseudowire" +
558            "                [pw:name = current()/../l2vpn:endpoint" +   478            "                [pw:name = current()/../l2vpn:endpoint" +
559            "            /l2vpn:pw/l2vpn:name]" +   479            "            /l2vpn:pw/l2vpn:name]" +
560            "            /evpn-pw/local-id)) and " +   480            "            /evpn-pw/local-id)) and " +
561            "not(boolean(/pw:pseudowires/pw:pseudowire" +   481            "not(boolean(/pw:pseudowires/pw:pseudowire" +
562            "                [pw:name = current()/../l2vpn:endpoint" +   482            "                [pw:name = current()/../l2vpn:endpoint" +
563            "            /l2vpn:primary-pw/l2vpn:name]" +   483            "            /l2vpn:primary-pw/l2vpn:name]" +
564            "            /evpn-pw/remote-id)) and " +   484            "            /evpn-pw/remote-id)) and " +
565            "not(boolean(/pw:pseudowires/pw:pseudowire" +   485            "not(boolean(/pw:pseudowires/pw:pseudowire" +
566            "                [pw:name = current()/../l2vpn:endpoint" +   486            "                [pw:name = current()/../l2vpn:endpoint" +
567            "            /l2vpn:primary-pw/l2vpn:name]" +   487            "            /l2vpn:primary-pw/l2vpn:name]" +
568            "            /evpn-pw/local-id)) and " +   488            "            /evpn-pw/local-id)) and " +
569            "not(boolean(/pw:pseudowires/pw:pseudowire" +   489            "not(boolean(/pw:pseudowires/pw:pseudowire" +
570            "                [pw:name = current()/../l2vpn:endpoint" +   490            "                [pw:name = current()/../l2vpn:endpoint" +
571            "            /l2vpn:backup-pw/l2vpn:name]" +   491            "            /l2vpn:backup-pw/l2vpn:name]" +
572            "            /evpn-pw/remote-id)) and " +   492            "            /evpn-pw/remote-id)) and " +
573            "not(boolean(/pw:pseudowires/pw:pseudowire" +   493            "not(boolean(/pw:pseudowires/pw:pseudowire" +
574            "                [pw:name = current()/../l2vpn:endpoint" +   494            "                [pw:name = current()/../l2vpn:endpoint" +
575            "            /l2vpn:backup-pw/l2vpn:name]" +   495            "            /l2vpn:backup-pw/l2vpn:name]" +
576            "            /evpn-pw/local-id))" {   496            "            /evpn-pw/local-id))" {
577         description "A VPLS pseudowire must not be EVPN PW";   497         description "A VPLS pseudowire must not be EVPN PW";
578       }   498       }
579       description "VPLS constraints";   499       description "VPLS constraints";
580     }   500     }
581   }   501   }
582     502  
583   /* Notifications */   503   /* Notifications */
584     504  
585   notification evpn-state-change-notification {   505   notification evpn-state-change-notification {
586     description "EVPN state change notification";   506     description "EVPN state change notification";
587     leaf evpn-instance {   507     leaf evpn-instance {
588       type evpn-instance-ref;   508       type evpn-instance-ref;
589       description "Related EVPN instance";   509       description "Related EVPN instance";
590     }   510     }
591     leaf state {   511     leaf state {
592       type identityref {   512       type identityref {
593         base evpn-notification-state;   513         base evpn-notification-state;
594       }   514       }
595       description "State change notification";   515       description "State change notification";
596     }   516     }
597   }   517   }
598 }   518 }
    -+ 519