ietf-evpn-yang
Produced: 02/03/2019 19:15:56
   
Mode:  All  
Left file: C:\Users\y00229798\Desktop\Publish\ietf-ethernet-segment@2018-03-02.yang  
Right file: C:\Users\y00229798\Desktop\Publish\ietf-ethernet-segment@2018-02-20.yang  
1 module ietf-ethernet-segment { = 1 module ietf-ethernet-segment {
2   namespace "urn:ietf:params:xml:ns:yang:ietf-ethernet-segment";   2   namespace "urn:ietf:params:xml:ns:yang:ietf-ethernet-segment";
3   prefix "es";   3   prefix "es";
4     4  
5   import ietf-yang-types {   5   import ietf-yang-types {
6     prefix "yang";   6     prefix "yang";
7   }   7   }
8     8  
9   import ietf-inet-types {   9   import ietf-inet-types {
10     prefix "inet";   10     prefix "inet";
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-interfaces {   17   import ietf-interfaces {
18     prefix "if";   18     prefix "if";
19   }   19   }
20     20  
21   import ietf-pseudowires {   21   import ietf-pseudowires {
22     prefix "pw";   22     prefix "pw";
23   }   23   }
24     24  
25   organization  "ietf";   25   organization  "ietf";
26   contact       "ietf";   26   contact       "ietf";
27   description   "ethernet segment";   27   description   "ethernet segment";
28     28  
29   revision "2018-02-20" {   29   revision "2018-02-20" {
30     description " - Change the type of attachment circuit to " +   30     description " - Change the type of attachment circuit to " +
31                 "   if:interface-ref " +   31                 "   if:interface-ref " +
32                 "";   32                 "";
33     reference   "";   33     reference   "";
34   }   34   }
35     35  
36   revision "2017-10-21" {   36   revision "2017-10-21" {
37     description " - Updated ethernet segment's AC/PW members to " +   37     description " - Updated ethernet segment's AC/PW members to " +
38                 "   accommodate more than one AC or more than one " +   38                 "   accommodate more than one AC or more than one " +
39                 "   PW " +   39                 "   PW " +
40                 " - Added the new preference based DF election " +   40                 " - Added the new preference based DF election " +
41                 "   method " +   41                 "   method " +
42                 " - Referenced pseudowires in the new " +   42                 " - Referenced pseudowires in the new " +
43                 "   ietf-pseudowires.yang model " +   43                 "   ietf-pseudowires.yang model " +
44                 " - Moved model to NMDA style specified in " +   44                 " - Moved model to NMDA style specified in " +
45                 "   draft-dsdt-nmda-guidelines-01.txt " +   45                 "   draft-dsdt-nmda-guidelines-01.txt " +
46                 "";   46                 "";
47     reference   "";   47     reference   "";
48   }   48   }
49     49  
50   revision "2017-03-08" {   50   revision "2017-03-08" {
51     description " - Updated to use BGP parameters from " +   51     description " - Updated to use BGP parameters from " +
52                 "   ietf-routing-types.yang instead of from " +   52                 "   ietf-routing-types.yang instead of from " +
53                 "   ietf-evpn.yang " +   53                 "   ietf-evpn.yang " +
54                 " - Updated ethernet segment's AC/PW members to " +   54                 " - Updated ethernet segment's AC/PW members to " +
55                 "   accommodate more than one AC or more than one " +   55                 "   accommodate more than one AC or more than one " +
56                 "   PW " +   56                 "   PW " +
57                 " - Added the new preference based DF election " +   57                 " - Added the new preference based DF election " +
58                 "   method " +   58                 "   method " +
59                 "";   59                 "";
60     reference   "";   60     reference   "";
61   }   61   }
62     62  
63   revision "2016-07-08" {   63   revision "2016-07-08" {
64     description "   - Added the configuration option to enable or " +   64     description "   - Added the configuration option to enable or " +
65                 "     disable per-EVI/EAD route " +   65                 "     disable per-EVI/EAD route " +
66                 "   - Added PBB parameter backbone-src-mac " +   66                 "   - Added PBB parameter backbone-src-mac " +
67                 "   - Added operational state branch, initially " +   67                 "   - Added operational state branch, initially " +
68                 "     to match the configuration branch" +   68                 "     to match the configuration branch" +
69                 "";   69                 "";
70     reference   "";   70     reference   "";
71   }   71   }
72     72  
73   revision "2016-06-23" {   73   revision "2016-06-23" {
74     description "WG document adoption";   74     description "WG document adoption";
75     reference   "";   75     reference   "";
76   }   76   }
77     77  
78   revision "2015-10-15" {   78   revision "2015-10-15" {
79     description "Initial revision";   79     description "Initial revision";
80     reference   "";   80     reference   "";
81   }   81   }
82     82  
83   /* Features */   83   /* Features */
84     84  
85   feature ethernet-segment-bgp-params {   85   feature ethernet-segment-bgp-params {
86     description "Ethernet segment's BGP parameters";   86     description "Ethernet segment's BGP parameters";
87   }   87   }
88     88  
89   feature ethernet-segment-pbb-params {   89   feature ethernet-segment-pbb-params {
90     description "Ethernet segment's PBB parameters";   90     description "Ethernet segment's PBB parameters";
91   }   91   }
92     92  
93   /* Typedefs */   93   /* Typedefs */
94   typedef esid-type{ +-    
95           type string {      
96                   length "0..24";      
97                   pattern '( *(00([0-9a-fA-F]){2}\.(([0-9a-fA-F]){4}\.){3}(([0-9a-fA-F]){4}))? *)';      
98           }      
99   }      
100         
101   typedef status-type { = 94   typedef status-type {
102     type enumeration {   95     type enumeration {
103       enum up {   96       enum up {
104         description "Status is up";   97         description "Status is up";
105       }   98       }
106       enum down {   99       enum down {
107         description "Status is down";   100         description "Status is down";
108       }   101       }
109     }   102     }
110     description "status type";   103     description "status type";
111   }   104   }
112     105  
113   typedef df-election-method-type {   106   typedef df-election-method-type {
114     type enumeration {   107     type enumeration {
115       enum default {   108       enum default {
116         value 0;   109         value 0;
117         description "The default DF election method";   110         description "The default DF election method";
118       }   111       }
119       enum highest-random-weight {   112       enum highest-random-weight {
120         value 1;   113         value 1;
121         description "The highest random weight (HRW) method";   114         description "The highest random weight (HRW) method";
122         reference "draft-mohanty-bess-evpn-df-election";   115         reference "draft-mohanty-bess-evpn-df-election";
123       }   116       }
124       enum preference {   117       enum preference {
125         value 2;   118         value 2;
126         description "The preference based method";   119         description "The preference based method";
127         reference "draft-rabadan-bess-evpn-pref-df";   120         reference "draft-rabadan-bess-evpn-pref-df";
128       }   121       }
129     }   122     }
130     description "The DF election method type";   123     description "The DF election method type";
131   }   124   }
132    +-    
133   typedef ethernet-segment-ref {      
134             type leafref {      
135               path "/ethernet-segments/ethernet-segment-identifier";      
136             }      
137             description "A leafref type to an Ethernet Segment";      
138           }      
139   = 125  
140   /* EVPN Ethernet Segment YANG Model */   126   /* EVPN Ethernet Segment YANG Model */
141     127  
142   container ethernet-segments {   128   container ethernet-segments {
143     description "ethernet-segment";   129     description "ethernet-segment";
144     list ethernet-segment {   130     list ethernet-segment {
145       key "ethernet-segment-identifier"; <> 131       key "name";
146       leaf description {   132       leaf name {
147         type string; = 133         type string;
148         description "Description of the ethernet segment"; <> 134         description "Name of the ethernet segment";
149       } = 135       }
150       leaf service-type {   136       leaf service-type {
151         type string;   137         type string;
152         config false;   138         config false;
153         description "service-type";   139         description "service-type";
154       }   140       }
    <> 141       leaf status {
      142         type status-type;
      143         config false;
      144         description "Ethernet segment status";
      145       }
      146       choice ac-or-pw {
      147         description "ac-or-pw";
      148         case ac {
155       leaf interface {   149           leaf-list ac {
156         mandatory true;      
157         type if:interface-ref;   150             type if:interface-ref;
      151             description "Name of attachment circuit";
      152           }
      153         }
      154         case pw {
158         config false;   155           leaf-list pw {
      156             type pw:pseudowire-ref;
159         description "The Interface that Ethernet segment bound";   157             description "Reference to a pseudowire";
      158           }
      159         }
160       } = 160       }
161       leaf status { <> 161       leaf interface-status {
162         type status-type; = 162         type status-type;
163         config false;   163         config false;
164         description "Ethernet segment status"; <> 164         description "interface status";
165       } = 165       }
166       leaf ethernet-segment-identifier {   166       leaf ethernet-segment-identifier {
167             mandatory true; <> 167         type uint32;
168             type esid-type;      
169         description "Ethernet segment identifier (esi)"; = 168         description "Ethernet segment identifier (esi)";
170       }   169       }
171       choice active-mode {   170       choice active-mode {
172         mandatory true;   171         mandatory true;
173         description "Choice of active mode";   172         description "Choice of active mode";
174         case single-active {   173         case single-active {
175           leaf single-active-mode {   174           leaf single-active-mode {
176             type empty;   175             type empty;
177             description "single-active-mode";   176             description "single-active-mode";
178           }   177           }
179         }   178         }
180         case all-active {   179         case all-active {
181           leaf all-active-mode {   180           leaf all-active-mode {
182             type empty;   181             type empty;
183             description "all-active-mode";   182             description "all-active-mode";
184           }   183           }
185         }   184         }
186       }   185       }
187       container pbb-parameters {   186       container pbb-parameters {
188         if-feature ethernet-segment-pbb-params;   187         if-feature ethernet-segment-pbb-params;
189         description "PBB configuration";   188         description "PBB configuration";
190         leaf backbone-src-mac {   189         leaf backbone-src-mac {
191           type yang:mac-address;   190           type yang:mac-address;
192           description "backbone-src-mac, only if this is a PBB";   191           description "backbone-src-mac, only if this is a PBB";
193         }   192         }
194       }   193       }
195   <> 194       container bgp-parameters {
      195         description "BGP parameters";
      196         container common {
      197           description "BGP parameters common to all pseudowires";
      198           list rd-rt {
      199             if-feature ethernet-segment-bgp-params;
      200             key "route-distinguisher";
      201             leaf route-distinguisher {
      202               type rt-types:route-distinguisher;
      203               description "Route distinguisher";
      204             }
      205             uses rt-types:vpn-route-targets;
      206             description "A list of route distinguishers and " +
      207                         "corresponding VPN route targets";
      208           }
      209         }
      210       }
196       container df-election { = 211       container df-election {
197         description "df-election";   212         description "df-election";
198         leaf df-election-method {   213         leaf df-election-method {
199           type df-election-method-type;   214           type df-election-method-type;
200           description "The DF election method";   215           description "The DF election method";
201         }   216         }
202         leaf preference {   217         leaf preference {
203           when "../df-election-method = 'preference'" {   218           when "../df-election-method = 'preference'" {
204             description "The preference value is only applicable " +   219             description "The preference value is only applicable " +
205                         "to the preference based method";   220                         "to the preference based method";
206           }   221           }
207           type uint16;   222           type uint16;
208           description "The DF preference";   223           description "The DF preference";
209         }   224         }
210         leaf revertive {   225         leaf revertive {
211           when "../df-election-method = 'preference'" {   226           when "../df-election-method = 'preference'" {
212             description "The revertive value is only applicable " +   227             description "The revertive value is only applicable " +
213                         "to the preference method";   228                         "to the preference method";
214           }   229           }
215           type boolean;   230           type boolean;
216           default true;   231           default true;
217           description "The 'preempt' or 'revertive' behavior";   232           description "The 'preempt' or 'revertive' behavior";
218         }   233         }
219         leaf election-wait-time {   234         leaf election-wait-time {
220           type uint32;   235           type uint32;
221           description "election-wait-time";   236           description "election-wait-time";
222         }   237         }
223       }   238       }
224       leaf ead-evi-route {   239       leaf ead-evi-route {
225         type boolean;   240         type boolean;
226         default false;   241         default false;
227         description "Enable (true) or disable (false) ead-evi-route";   242         description "Enable (true) or disable (false) ead-evi-route";
228       }   243       }
229       leaf esi-label {   244       leaf esi-label {
230         type string;   245         type string;
231         config false;   246         config false;
232         description "esi-label";   247         description "esi-label";
233       }   248       }
234       list member {   249       list member {
235         config false;   250         config false;
236         leaf ip-address {   251         leaf ip-address {
237           type inet:ip-address;   252           type inet:ip-address;
238           description "ip-address";   253           description "ip-address";
239         }   254         }
240         description "member of the ethernet segment";   255         description "member of the ethernet segment";
241       }   256       }
242       list df {   257       list df {
243         config false;   258         config false;
244         leaf service-identifier {   259         leaf service-identifier {
245           type uint32;   260           type uint32;
246           description "service-identifier";   261           description "service-identifier";
247         }   262         }
248         leaf vlan {   263         leaf vlan {
249           type uint16 { <> 264           type uint32;
250            range "1..4094";      
251           }      
252           description "vlan"; = 265           description "vlan";
253         }   266         }
254         leaf ip-address {   267         leaf ip-address {
255           type inet:ip-address;   268           type inet:ip-address;
256           description "ip-address";   269           description "ip-address";
257         }   270         }
258         description "df of an evpn instance's vlan";   271         description "df of an evpn instance's vlan";
259       }   272       }
260       description "An ethernet segment";   273       description "An ethernet segment";
261     }   274     }
262   }   275   }
263 }   276 }
264     277