adding mac timeout as a configurable parameter to EVC
[unimgr.git] / legato-api / src / main / yang / mef-services.yang
1 module mef-services {
2   namespace "http://metroethernetforum.org/ns/yang/mef-services";
3   prefix mef-services;
4   import ietf-yang-types { prefix yang; }
5   import ietf-inet-types { prefix inet; }
6   import mef-types { prefix mef-types; }
7   import mef-global { prefix mef-global; }
8   import mef-interfaces { prefix mef-interfaces; }
9   import yang-ext {prefix ext; revision-date "2013-07-09";}
10
11   organization "Metro Ethernet Forum";
12   contact
13     "Web URL: http://metroethernetforum.org/ E-mail: mibs@metroethernetforum.org
14     Postal: Metro Ethernet Forum 6033 W. Century Boulevard, Suite
15     1107 Los Angeles, CA 90045 U.S.A. Phone: +1 310-642-2800 Fax:
16     +1 310-642-2808";
17   description
18     "This module implements the Carrier Ethernet Services as defined
19     in MEF 10.3, MEF 6.2, and MEF 7.2. Reference Overview: A number
20     of base documents have been used to create the MEF Services YANG
21     Module. The following are the abbreviations for the baseline documents:
22     [RFC 6991] refers to IETF RFC 6991 'Common YANG Data Types', 2013-07-15
23     [RFC 6643] refers to IETF RFC 6643 'Translation of Structure of
24     Management Information Version 2 (SMIv2) MIB Modules to YANG Modules',
25     2011-11-25 [802.1AB] refers to 'Station and Media Access Control
26     Connectivity Discovery', IEEE 802.1AB-2009, September 2009 [802.1q]
27     refers to IEEE 802.1Q-2011 'IEEE Standard for Local and metropolitan
28     area networks --Media Access Control (MAC) Bridges and Virtual
29     Bridged Local Area Networks, August 2011 [802-2001] refers to
30     'IEEE Standard for Local and Metropolitan Area Networks: Overview
31     and Architecture', IEEE 802-2001, February 2002 [MEF10.3] refers
32     to MEF 10.3 'Ethernet Services Attributes Phase 3', October 2013
33     [MEF6.2] refers to MEF 6.2 'EVC Ethernet Services Defintions Phase
34     3', August 2014 [MEF40] refers to MEF 40 'UNI and EVC Definition
35     of Managed Objects', April 2013 [MEF45] refers to MEF 45 'Multi-CEN
36     L2CP', August 2014 [MEF7.2] refers to MEF 7.2 'Carrier Ethernet
37     Management Information Model', April 2013 [MEF7.3] refers to MEF
38     7.3 'Carrier Ethernet Management Information Model', Working Draft
39     #1 2015 [RFC 2737] refers to IETF RFC 2737 'Entity MIB (Version
40     2)', December 1999 [RFC 2863] refers to IETF RFC 2863 'The Interfaces
41     Group MIB', June 2000 [RFC 3419] refers to IETF RFC 3419 'Textual
42     Conventions for Transport Addresses', December 2002 [Y.1731] refers
43     to ITU-T Y.1731 'OAM functions and mechanisms for Ethernet based
44     networks', July 2011 [Q.840.1] refers to ITU-T Q.840.1 'Requirements
45     and analysis for NMS-EMS management interface of Ethernet over
46     Transport and Metro Ethernet Network(EoT/MEN)' March 2007";
47   revision 2015-05-26 {
48     description
49         "Formal Project Review Draft 1.";
50     reference "EVC Ethernet Services Definitions YANG Modules " +
51         "(MEF XX), TBD";
52   }
53
54   container mef-services {
55     description
56         "MEF Services";
57     list mef-service {
58       must "(not(/mef-global:mef-global/mef-global:svc-providers)" +
59             " and " +
60             "not(./sp-id)) or " +
61             "(/mef-global:mef-global/mef-global:svc-providers and " +
62             "./sp-id)" {
63         error-message "If the Service Providers list has been " +
64                 "populated, a Service Provider ID must be " +
65                 "configured for a Service.";
66         description
67                 "A Service sees a single Service Provider. This must " +
68                 "statement is effectively a 'mandatory true' when " +
69                 "the Global Service Providers list is being used.";
70       }
71       key "svc-id";
72       unique "evc/evc-id";
73       unique "ipvc/ipvc-id";
74       description
75             "Metro Ethernet Forum's Ethernet Services.";
76       choice mef-service-choice {
77         case ipvc-choice {
78           container ipvc {
79             container unis {
80               list uni {
81                 key "uni-id ip-uni-id";
82                 leaf uni-id {
83                   type leafref {
84                     path "/mef-interfaces:mef-interfaces/" +
85                                         "mef-interfaces:unis/mef-interfaces:uni/" +
86                                         "mef-interfaces:uni-id";
87                   }
88                 }
89                 leaf ip-uni-id {
90                   type mef-types:identifier45;
91                 }
92                 leaf ingress-bw-profile {
93                     type mef-types:identifier45;
94                 }
95
96                 container evc-uni-ce-vlans {
97                   description
98                                     "EVC Per UNI CE-VLAN IDs.";
99                   list evc-uni-ce-vlan {
100                     key "vid";
101                     description
102                                         "A list of the CE-VLAN IDs mapped to this UNI " +
103                                         "for this EVC.";
104                     reference "[MEF10.3] Section 8.6.1, [R24] " +
105                                         "[R25], Section 9.10.2, Section 9.12, " +
106                                         "[R76], [R81].";
107                     leaf vid {
108                       type leafref {
109                         path "/mef-interfaces:mef-interfaces/" +
110                                                 "mef-interfaces:unis/" +
111                                                 "mef-interfaces:uni" +
112                                                 "[mef-interfaces:uni-id = " +
113                                                 "current()/../../../uni-id]" +
114                                                 "/mef-interfaces:ce-vlans/" +
115                                                 "mef-interfaces:ce-vlan/" +
116                                                 "mef-interfaces:vid";
117                       }
118                       description
119                                             "VLAN Identifier.";
120                     }
121                   }
122                 }
123               }
124             }
125
126             leaf ipvc-id {
127               type mef-types:evc-id-type;
128               mandatory true;
129             }
130             leaf ipvc-type {
131               type mef-types:ipvc-type;
132
133               mandatory true;
134               description
135                             "This IPVC attribute describes the IPVC as either " +
136                             "Cloud-access, Multipoint, or " +
137                             "Rooted-Multipoint.";
138             }
139           }
140         }
141         case evc-choice {
142           container evc {
143
144             must "not(sls-uni-inclusions) or " +
145                         "(sls-uni-inclusions and not(sls-uni-exclusions))" {
146               error-message "The EVC Performance SLS Exclusions and " +
147                             "Inclusions List cannot both be configured for " +
148                             "an EVC.";
149               description
150                             "The EVC Performance SLS Exclusions and Inclusions " +
151                             "List cannot both be configured for an EVC.";
152             }
153             must "(evc-type != 'rooted-multipoint') or " +
154                         "((evc-type = 'rooted-multipoint') and " +
155                         "not(sls-uni-exclusions) )" {
156               error-message "If EVC Type is Rooted-Multipoint, " +
157                             "sls-uni-inclusions must be used instead of " +
158                             "sls-uni-exclusions.";
159               description
160                             "If EVC Type is Rooted-Multipoint, " +
161                             "sls-uni-inclusions must be used instead of " +
162                             "sls-uni-exclusions.";
163             }
164             description
165                         "Ethernet Virtual Circuit(EVC) Configuration and Status.";
166             container unis {
167               description
168                             "EVC Per Universal Network Interface(UNI) " +
169                             "Configuration and Status.";
170               list uni {
171                 must "not(evc-uni-ce-vlans/evc-uni-ce-vlan[2]) or " +
172                                 "../../preserve-ce-vlan-id = 'true'" {
173                   error-message "When more than one CE-VLAN-ID is " +
174                                     "mapped to an EVC at a UNI, the EVC must have " +
175                                     "CE-VLAN ID Preservation Enabled.";
176                   description
177                                     "When more than one CE-VLAN-ID is mapped to " +
178                                     "an EVC at a UNI, the EVC must have CE-VLAN ID " +
179                                     "Preservation Enabled.";
180                 }
181                 must "/mef-interfaces:mef-interfaces/mef-interfaces:" +
182                                 "unis/mef-interfaces:uni" +
183                                 "[mef-interfaces:uni-id = current()/" +
184                                 "mef-services:uni-id]" +
185                                 "[mef-interfaces:uni-id/../mef-interfaces:" +
186                                 "max-svc-frame-size >= current()/../../" +
187                                 "mef-services:max-svc-frame-size]" {
188                   error-message "The value of the EVC Maximum " +
189                                     "Service Frame Size must be less than " +
190                                     "or equal to all the UNI Maximum Service " +
191                                     "Frame Sizes.";
192                   description
193                                     "The value of the EVC Maximum Service Frame " +
194                                     "Size must be less than or equal to all the " +
195                                     "UNI Maximum Service Frame Sizes.";
196                 }
197                 must "(/mef-interfaces:mef-interfaces/mef-interfaces:" +
198                                 "unis/mef-interfaces:uni" +
199                                 "[mef-interfaces:uni-id = current()/" +
200                                 "mef-services:uni-id]" +
201                                 "[mef-interfaces:uni-id/../mef-interfaces:" +
202                                 "bundling-enabled = 'true']) or " +
203                                 "(/mef-interfaces:mef-interfaces/" +
204                                 "mef-interfaces:unis/mef-interfaces:uni" +
205                                 "[mef-interfaces:uni-id = current()/" +
206                                 "mef-services:uni-id]" +
207                                 "[mef-interfaces:uni-id/../mef-interfaces:" +
208                                 "all-to-one-bundling-enabled = 'true']) or " +
209                                 "not(evc-uni-ce-vlans/evc-uni-ce-vlan[2])" {
210                   error-message "If both Bundling and All-to-One " +
211                                     "Bundling are disabled for a UNI, only one " +
212                                     "CE VLAN ID can be configured for a specific " +
213                                     "EVC on that UNI.";
214                   description
215                                     "If both Bundling and All-to-One Bundling are " +
216                                     "disabled for a UNI, only one CE VLAN ID can be " +
217                                     "configured for a specific EVC on that UNI.";
218                 }
219                 must "(/mef-interfaces:mef-interfaces/mef-interfaces:" +
220                                 "unis/mef-interfaces:uni" +
221                                 "[mef-interfaces:uni-id = current()/" +
222                                 "mef-services:uni-id]" +
223                                 "[mef-interfaces:uni-id/../mef-interfaces:" +
224                                 "all-to-one-bundling-enabled = 'false']) or " +
225                                 "(count(/mef-services:mef-services/" +
226                                 "mef-service/evc/unis/uni[uni-id = " +
227                                 "current()/uni-id]) = 1)" {
228                   error-message "If All-to-One Bundling is enabled " +
229                                     "for any UNI in an EVC, all CE-VLAN IDs " +
230                                     "mapped to any EVC for that UNI must map " +
231                                     "to the same EVC ID.";
232                   description
233                                     "If All-to-One Bundling is enabled for any UNI " +
234                                     "in an EVC, all CE-VLAN IDs mapped to any EVC " +
235                                     "for that UNI must map to the same EVC ID.";
236                 }
237                 must "((/mef-interfaces:mef-interfaces/" +
238                                 "mef-interfaces:unis/mef-interfaces:uni" +
239                                 "[mef-interfaces:uni-id = current()/" +
240                                 "mef-services:uni-id]" +
241                                 "[mef-interfaces:uni-id/../mef-interfaces:" +
242                                 "ingress-bw-profile-per-uni]) or " +
243                                 "(/mef-services:mef-services/mef-service/" +
244                                 "evc/unis/uni" +
245                                 "[uni-id = current()/mef-services:uni-id]" +
246                                 "/ingress-bwp-flows-per-cos) or " +
247                                 "(/mef-services:mef-services/mef-service/" +
248                                 "evc/unis/uni" +
249                                 "[uni-id = current()/mef-services:uni-id]" +
250                                 "/ingress-bw-profile-per-evc)) or " +
251                                 "not(/mef-interfaces:mef-interfaces/" +
252                                 "mef-interfaces:unis/mef-interfaces:uni" +
253                                 "[mef-interfaces:uni-id = current()/" +
254                                 "mef-services:uni-id]" +
255                                 "/mef-interfaces:ingress-envelopes)" {
256                   error-message "If no Ingress Bandwidth Profiles " +
257                                     "are specied for this UNI (BW Profile " +
258                                     "Per UNI, BWP Flows Per CoS, nor BW Profile " +
259                                     "Per EVC), then the UNI Ingress Envelopes " +
260                                     "list must be empty.";
261                   description
262                                     "If no Ingress Bandwidth Profiles are specied " +
263                                     "for this UNI (BW Profile Per UNI, BWP Flows " +
264                                     "Per CoS, nor BW Profile Per EVC), then the " +
265                                     "UNI Ingress Envelopes list must be empty.";
266                 }
267                 must "((/mef-interfaces:mef-interfaces/" +
268                                 "mef-interfaces:unis/mef-interfaces:uni" +
269                                 "[mef-interfaces:uni-id = current()/" +
270                                 "mef-services:uni-id]" +
271                                 "[mef-interfaces:uni-id/../mef-interfaces:" +
272                                 "egress-bw-profile-per-uni]) or " +
273                                 "(/mef-services:mef-services/mef-service/" +
274                                 "evc/unis/uni" +
275                                 "[uni-id = current()/mef-services:uni-id]" +
276                                 "/egress-bwp-flows-per-eec) or " +
277                                 "(/mef-services:mef-services/mef-service/" +
278                                 "evc/unis/uni" +
279                                 "[uni-id = current()/mef-services:uni-id]" +
280                                 "/egress-bw-profile-per-evc)) or " +
281                                 "not(/mef-interfaces:mef-interfaces/" +
282                                 "mef-interfaces:unis/mef-interfaces:uni" +
283                                 "[mef-interfaces:uni-id = current()/" +
284                                 "mef-services:uni-id]" +
285                                 "/mef-interfaces:egress-envelopes)" {
286                   error-message "If no Egress Bandwidth Profiles are " +
287                                     "specied for this UNI (BW Profile Per UNI, " +
288                                     "BWP Flows Per EEC, nor BW Profile Per EVC), " +
289                                     "then the UNI Egress Envelopes list must be " +
290                                     "empty.";
291                   description
292                                     "If no Egress Bandwidth Profiles are specied " +
293                                     "for this UNI (BW Profile Per UNI, BWP Flows " +
294                                     "Per EEC, nor BW Profile Per EVC), then the UNI " +
295                                     "Egress Envelopes list must be empty.";
296                 }
297                 must "not(./ingress-bw-profile-per-evc) or " +
298                                 "((./ingress-bw-profile-per-evc) and " +
299                                 "not(./ingress-bwp-flows-per-cos))" {
300                   error-message "If there is a per EVC Ingress " +
301                                     "Bandwidth Profile on an EVC, then there " +
302                                     "cannot be any per Class of Service Ingress " +
303                                     "Bandwidth Profiles on that EVC.";
304                   description
305                                     "If there is a per EVC Ingress Bandwidth Profile " +
306                                     "on an EVC, then there cannot be any per " +
307                                     "Class of Service Ingress Bandwidth Profiles " +
308                                     "on that EVC.";
309                 }
310                 must "not(./egress-bw-profile-per-evc) or " +
311                                 "((./egress-bw-profile-per-evc) and " +
312                                 "not(./egress-bwp-flows-per-eec))" {
313                   error-message "If there is a per EVC Egress " +
314                                     "Bandwidth Profile on an EVC, then there " +
315                                     "cannot be any per Egress Equivalence " +
316                                     "Class Identifier Bandwidth Profiles on " +
317                                     "that EVC.";
318                   description
319                                     "If there is a per EVC Egress Bandwidth " +
320                                     "Profile on an EVC, then there cannot be " +
321                                     "any per Egress Equivalence Class Identifier " +
322                                     "Bandwidth Profiles on that EVC.";
323                 }
324                 must "not(/mef-interfaces:mef-interfaces/" +
325                                 "mef-interfaces:unis/mef-interfaces:uni" +
326                                 "[mef-interfaces:uni-id = current()/" +
327                                 "mef-services:uni-id]" +
328                                 "/mef-interfaces:ingress-bw-profile-" +
329                                 "per-uni) or " +
330                                 "(/mef-global:mef-global/mef-global:" +
331                                 "profiles/mef-global:ingress-bwp-flows/" +
332                                 "mef-global:bwp-flow" +
333                                 "[mef-global:bw-profile = /mef-interfaces:" +
334                                 "mef-interfaces/mef-interfaces:unis/" +
335                                 "mef-interfaces:uni" +
336                                 "[mef-interfaces:uni-id = current()/" +
337                                 "mef-services:uni-id]" +
338                                 "/mef-interfaces:ingress-bw-profile-per-uni]" +
339                                 "[mef-global:cir = 0]) or " +
340                                 "(/mef-global:mef-global/mef-global:" +
341                                 "profiles/mef-global:ingress-bwp-flows/" +
342                                 "mef-global:bwp-flow" +
343                                 "[mef-global:bw-profile = /mef-interfaces:" +
344                                 "mef-interfaces/mef-interfaces:unis/" +
345                                 "mef-interfaces:uni" +
346                                 "[mef-interfaces:uni-id = current()/" +
347                                 "mef-services:uni-id]" +
348                                 "/mef-interfaces:ingress-bw-profile-per-uni]" +
349                                 "[mef-global:cbs >= current()/../../" +
350                                 "max-svc-frame-size])" {
351                   error-message "Ingress Bandwidth Profile Per UNI: " +
352                                     "If CIR > 0, CBS must be greater than or " +
353                                     "equal to the EVC Max Service Frame Size " +
354                                     "for the EVC.";
355                   description
356                                     "Ingress Bandwidth Profile Per UNI: If CIR > 0, " +
357                                     "CBS must be greater than or equal to the " +
358                                     "EVC Max Service Frame Size for the EVC.";
359                 }
360                 must "not(/mef-interfaces:mef-interfaces/" +
361                                 "mef-interfaces:unis/mef-interfaces:uni" +
362                                 "[mef-interfaces:uni-id = current()/" +
363                                 "mef-services:uni-id]" +
364                                 "/mef-interfaces:egress-bw-profile-per-uni) " +
365                                 "or " +
366                                 "(/mef-global:mef-global/mef-global:profiles/" +
367                                 "mef-global:egress-bwp-flows/mef-global:" +
368                                 "bwp-flow" +
369                                 "[mef-global:bw-profile = /mef-interfaces:" +
370                                 "mef-interfaces/mef-interfaces:unis/" +
371                                 "mef-interfaces:uni" +
372                                 "[mef-interfaces:uni-id = current()/" +
373                                 "mef-services:uni-id]" +
374                                 "/mef-interfaces:egress-bw-profile-per-uni]" +
375                                 "[mef-global:cir = 0]) or " +
376                                 "(/mef-global:mef-global/mef-global:profiles/" +
377                                 "mef-global:ingress-bwp-flows/mef-global:" +
378                                 "bwp-flow" +
379                                 "[mef-global:bw-profile = /mef-interfaces:" +
380                                 "mef-interfaces/mef-interfaces:unis/" +
381                                 "mef-interfaces:uni" +
382                                 "[mef-interfaces:uni-id = current()/" +
383                                 "mef-services:uni-id]" +
384                                 "/mef-interfaces:egress-bw-profile-per-uni]" +
385                                 "[mef-global:cbs >= current()/../../" +
386                                 "max-svc-frame-size])" {
387                   error-message "Egress Bandwidth Profile Per UNI: " +
388                                     "If CIR > 0, CBS must be greater than or " +
389                                     "equal to the EVC Max Service Frame Size " +
390                                     "for the EVC.";
391                   description
392                                     "Egress Bandwidth Profile Per UNI: If CIR > 0, " +
393                                     "CBS must be greater than or equal to the " +
394                                     "EVC Max Service Frame Size for the EVC.";
395                 }
396                 must "not(/mef-interfaces:mef-interfaces/" +
397                                 "mef-interfaces:unis/mef-interfaces:uni" +
398                                 "[mef-interfaces:uni-id = current()/" +
399                                 "mef-services:uni-id]" +
400                                 "/mef-interfaces:ingress-envelopes) or " +
401                                 "(/mef-global:mef-global/mef-global:" +
402                                 "profiles/mef-global:ingress-bwp-flows/" +
403                                 "mef-global:bwp-flow" +
404                                 "[mef-global:bw-profile = /mef-interfaces:" +
405                                 "mef-interfaces/mef-interfaces:unis/" +
406                                 "mef-interfaces:uni" +
407                                 "[mef-interfaces:uni-id = current()/" +
408                                 "mef-services:uni-id]" +
409                                 "/mef-interfaces:ingress-envelopes/" +
410                                 "mef-interfaces:envelope/mef-interfaces:" +
411                                 "bwp-flows/mef-interfaces:bwp-flow/" +
412                                 "mef-interfaces:bw-profile]" +
413                                 "[mef-global:cir = 0]) or " +
414                                 "(/mef-global:mef-global/mef-global:" +
415                                 "profiles/mef-global:ingress-bwp-flows/" +
416                                 "mef-global:bwp-flow" +
417                                 "[mef-global:bw-profile = /mef-interfaces:" +
418                                 "mef-interfaces/mef-interfaces:unis/" +
419                                 "mef-interfaces:uni" +
420                                 "[mef-interfaces:uni-id = current()/" +
421                                 "mef-services:uni-id]" +
422                                 "/mef-interfaces:ingress-envelopes/" +
423                                 "mef-interfaces:envelope/mef-interfaces:" +
424                                 "bwp-flows/mef-interfaces:bwp-flow/" +
425                                 "mef-interfaces:bw-profile]" +
426                                 "[mef-global:cbs >= current()/../../" +
427                                 "max-svc-frame-size])" {
428                   error-message "Ingress Bandwidth Profile Envelope: " +
429                                     "If CIR > 0, CBS must be greater than or " +
430                                     "equal to the EVC Max Service Frame Size " +
431                                     "for the EVC.";
432                   description
433                                     "Ingress Bandwidth Profile Envelope: " +
434                                     "If CIR > 0, CBS must be greater than " +
435                                     "or equal to the EVC Max Service Frame " +
436                                     "Size for the EVC.";
437                 }
438                 must "not(/mef-interfaces:mef-interfaces/" +
439                                 "mef-interfaces:unis/mef-interfaces:uni" +
440                                 "[mef-interfaces:uni-id = current()/" +
441                                 "mef-services:uni-id]" +
442                                 "/mef-interfaces:egress-envelopes) or " +
443                                 "(/mef-global:mef-global/mef-global:" +
444                                 "profiles/mef-global:egress-bwp-flows/" +
445                                 "mef-global:bwp-flow" +
446                                 "[mef-global:bw-profile = " +
447                                 "/mef-interfaces:mef-interfaces/" +
448                                 "mef-interfaces:unis/mef-interfaces:uni" +
449                                 "[mef-interfaces:uni-id = current()/" +
450                                 "mef-services:uni-id]" +
451                                 "/mef-interfaces:egress-envelopes/" +
452                                 "mef-interfaces:envelope/mef-interfaces:" +
453                                 "bwp-flows/mef-interfaces:bwp-flow/" +
454                                 "mef-interfaces:bw-profile]" +
455                                 "[mef-global:cir = 0]) or " +
456                                 "(/mef-global:mef-global/mef-global:" +
457                                 "profiles/mef-global:egress-bwp-flows/" +
458                                 "mef-global:bwp-flow" +
459                                 "[mef-global:bw-profile = /mef-interfaces:" +
460                                 "mef-interfaces/mef-interfaces:unis/" +
461                                 "mef-interfaces:uni" +
462                                 "[mef-interfaces:uni-id = current()/" +
463                                 "mef-services:uni-id]" +
464                                 "/mef-interfaces:egress-envelopes/" +
465                                 "mef-interfaces:envelope/mef-interfaces:" +
466                                 "bwp-flows/mef-interfaces:bwp-flow/" +
467                                 "mef-interfaces:bw-profile]" +
468                                 "[mef-global:cbs >= current()/../../" +
469                                 "max-svc-frame-size])" {
470                   error-message "Egress Bandwidth Profile " +
471                                     "Envelope: If CIR > 0, CBS must be greater " +
472                                     "than or equal to the EVC Max Service Frame " +
473                                     "Size for the EVC.";
474                   description
475                                     "Egress Bandwidth Profile Envelope: If CIR > 0, " +
476                                     "CBS must be greater than or equal to the " +
477                                     "EVC Max Service Frame Size for the EVC.";
478                 }
479                 must "not(/mef-interfaces:mef-interfaces/" +
480                                 "mef-interfaces:unis/mef-interfaces:uni" +
481                                 "[mef-interfaces:uni-id = current()/" +
482                                 "mef-services:uni-id]" +
483                                 "/mef-interfaces:ingress-bw-profile-per-uni) " +
484                                 "or " +
485                                 "(/mef-global:mef-global/mef-global:profiles/" +
486                                 "mef-global:ingress-bwp-flows/mef-global:" +
487                                 "bwp-flow" +
488                                 "[mef-global:bw-profile = /mef-interfaces:" +
489                                 "mef-interfaces/mef-interfaces:unis/" +
490                                 "mef-interfaces:uni" +
491                                 "[mef-interfaces:uni-id = current()/" +
492                                 "mef-services:uni-id]/mef-interfaces:" +
493                                 "ingress-bw-profile-per-uni]" +
494                                 "[mef-global:eir = 0]) or " +
495                                 "(/mef-global:mef-global/mef-global:profiles/" +
496                                 "mef-global:ingress-bwp-flows/" +
497                                 "mef-global:bwp-flow" +
498                                 "[mef-global:bw-profile = /mef-interfaces:" +
499                                 "mef-interfaces/mef-interfaces:unis/" +
500                                 "mef-interfaces:uni" +
501                                 "[mef-interfaces:uni-id = current()/" +
502                                 "mef-services:uni-id]" +
503                                 "/mef-interfaces:ingress-bw-profile-per-uni]" +
504                                 "[mef-global:ebs >= current()/../../" +
505                                 "max-svc-frame-size])" {
506                   error-message "Ingress Bandwidth Profile Per UNI: " +
507                                     "If EIR > 0, EBS must be greater than or " +
508                                     "equal to the EVC Max Service Frame Size " +
509                                     "for the EVC.";
510                   description
511                                     "Ingress Bandwidth Profile Per UNI: If EIR > 0, " +
512                                     "EBS must be greater than or equal to the " +
513                                     "EVC Max Service Frame Size for the EVC.";
514                 }
515                 must "not(/mef-interfaces:mef-interfaces/" +
516                                 "mef-interfaces:unis/mef-interfaces:uni" +
517                                 "[mef-interfaces:uni-id = current()/" +
518                                 "mef-services:uni-id]" +
519                                 "/mef-interfaces:egress-bw-profile-" +
520                                 "per-uni) or " +
521                                 "(/mef-global:mef-global/mef-global:" +
522                                 "profiles/mef-global:egress-bwp-flows/" +
523                                 "mef-global:bwp-flow" +
524                                 "[mef-global:bw-profile = /mef-interfaces:" +
525                                 "mef-interfaces/mef-interfaces:unis/" +
526                                 "mef-interfaces:uni" +
527                                 "[mef-interfaces:uni-id = current()/" +
528                                 "mef-services:uni-id]/mef-interfaces:" +
529                                 "egress-bw-profile-per-uni]" +
530                                 "[mef-global:eir = 0]) or " +
531                                 "(/mef-global:mef-global/mef-global:" +
532                                 "profiles/mef-global:ingress-bwp-flows/" +
533                                 "mef-global:bwp-flow" +
534                                 "[mef-global:bw-profile = /mef-interfaces:" +
535                                 "mef-interfaces/mef-interfaces:unis/" +
536                                 "mef-interfaces:uni" +
537                                 "[mef-interfaces:uni-id = current()/" +
538                                 "mef-services:uni-id]/mef-interfaces:" +
539                                 "egress-bw-profile-per-uni]" +
540                                 "[mef-global:ebs >= current()/../../" +
541                                 "max-svc-frame-size])" {
542                   error-message "Egress Bandwidth Profile Per UNI: " +
543                                     "If EIR > 0, EBS must be greater than or " +
544                                     "equal to the EVC Max Service Frame Size " +
545                                     "for the EVC.";
546                   description
547                                     "Egress Bandwidth Profile Per UNI: If EIR > 0, " +
548                                     "EBS must be greater than or equal to the " +
549                                     "EVC Max Service Frame Size for the EVC.";
550                 }
551                 must "not(/mef-interfaces:mef-interfaces/" +
552                                 "mef-interfaces:" +
553                                 "unis/mef-interfaces:uni" +
554                                 "[mef-interfaces:uni-id = current()/" +
555                                 "mef-services:uni-id]" +
556                                 "/mef-interfaces:ingress-envelopes) or " +
557                                 "(/mef-global:mef-global/mef-global:profiles/" +
558                                 "mef-global:ingress-bwp-flows/mef-global:" +
559                                 "bwp-flow" +
560                                 "[mef-global:bw-profile = /mef-interfaces:" +
561                                 "mef-interfaces/mef-interfaces:unis/" +
562                                 "mef-interfaces:uni" +
563                                 "[mef-interfaces:uni-id = current()/" +
564                                 "mef-services:uni-id]" +
565                                 "/mef-interfaces:ingress-envelopes/" +
566                                 "mef-interfaces:envelope/mef-interfaces:" +
567                                 "bwp-flows/mef-interfaces:bwp-flow/" +
568                                 "mef-interfaces:bw-profile]" +
569                                 "[mef-global:eir = 0]) or " +
570                                 "(/mef-global:mef-global/mef-global:profiles/" +
571                                 "mef-global:ingress-bwp-flows/mef-global:" +
572                                 "bwp-flow" +
573                                 "[mef-global:bw-profile = /mef-interfaces:" +
574                                 "mef-interfaces/mef-interfaces:unis/" +
575                                 "mef-interfaces:uni" +
576                                 "[mef-interfaces:uni-id = current()/" +
577                                 "mef-services:uni-id]" +
578                                 "/mef-interfaces:ingress-envelopes/" +
579                                 "mef-interfaces:envelope/mef-interfaces:" +
580                                 "bwp-flows/mef-interfaces:bwp-flow/" +
581                                 "mef-interfaces:bw-profile]" +
582                                 "[mef-global:ebs >= current()/../../" +
583                                 "max-svc-frame-size])" {
584                   error-message "Ingress Bandwidth Profile Envelope: " +
585                                     "If EIR > 0, EBS must be greater than or " +
586                                     "equal to the EVC Max Service Frame Size " +
587                                     "for the EVC.";
588                   description
589                                     "Ingress Bandwidth Profile Envelope: " +
590                                     "If EIR > 0, EBS must be greater than or equal " +
591                                     "to the EVC Max Service Frame Size for the EVC.";
592                 }
593                 must "not(/mef-interfaces:mef-interfaces/" +
594                                 "mef-interfaces:unis/mef-interfaces:uni" +
595                                 "[mef-interfaces:uni-id = current()/" +
596                                 "mef-services:uni-id]" +
597                                 "/mef-interfaces:egress-envelopes) or " +
598                                 "(/mef-global:mef-global/mef-global:" +
599                                 "profiles/mef-global:egress-bwp-flows/" +
600                                 "mef-global:bwp-flow" +
601                                 "[mef-global:bw-profile = /mef-interfaces:" +
602                                 "mef-interfaces/mef-interfaces:unis/" +
603                                 "mef-interfaces:uni" +
604                                 "[mef-interfaces:uni-id = current()/" +
605                                 "mef-services:uni-id]" +
606                                 "/mef-interfaces:egress-envelopes/" +
607                                 "mef-interfaces:envelope/mef-interfaces:" +
608                                 "bwp-flows/mef-interfaces:bwp-flow/" +
609                                 "mef-interfaces:bw-profile]" +
610                                 "[mef-global:eir = 0]) or " +
611                                 "(/mef-global:mef-global/mef-global:profiles/" +
612                                 "mef-global:egress-bwp-flows/mef-global:" +
613                                 "bwp-flow" +
614                                 "[mef-global:bw-profile = /mef-interfaces:" +
615                                 "mef-interfaces/mef-interfaces:unis/" +
616                                 "mef-interfaces:uni" +
617                                 "[mef-interfaces:uni-id = current()/" +
618                                 "mef-services:uni-id]" +
619                                 "/mef-interfaces:egress-envelopes/" +
620                                 "mef-interfaces:envelope/mef-interfaces:" +
621                                 "bwp-flows/mef-interfaces:bwp-flow/" +
622                                 "mef-interfaces:bw-profile]" +
623                                 "[mef-global:ebs >= current()/../../" +
624                                 "max-svc-frame-size])" {
625                   error-message "Egress Bandwidth Profile Envelope: " +
626                                     "If EIR > 0, EBS must be greater than or " +
627                                     "equal to the EVC Max Service Frame Size " +
628                                     "for the EVC.";
629                   description
630                                     "Egress Bandwidth Profile Envelope: " +
631                                     "If EIR > 0, EBS must be greater than or " +
632                                     "equal to the EVC Max Service Frame Size " +
633                                     "for the EVC.";
634                 }
635                 key "uni-id";
636                 description
637                                 "EVC Flow Points and EVC-UNI List defines the " +
638                                 "roles of each UNI in the Service. One UNI can " +
639                                 "be used by 0 or more EVCs.";
640                 reference "[MEF10.3] Section 8.3. " +
641                                 "[MEF7.3] Section 12.2.2.";
642                 container evc-uni-ce-vlans {
643                   description
644                                     "EVC Per UNI CE-VLAN IDs.";
645                   list evc-uni-ce-vlan {
646                     key "vid";
647                     description
648                                         "A list of the CE-VLAN IDs mapped to this UNI " +
649                                         "for this EVC.";
650                     reference "[MEF10.3] Section 8.6.1, [R24] " +
651                                         "[R25], Section 9.10.2, Section 9.12, " +
652                                         "[R76], [R81].";
653                     leaf vid {
654                       type leafref {
655                         path "/mef-interfaces:mef-interfaces/" +
656                                                 "mef-interfaces:unis/" +
657                                                 "mef-interfaces:uni" +
658                                                 "[mef-interfaces:uni-id = " +
659                                                 "current()/../../../uni-id]" +
660                                                 "/mef-interfaces:ce-vlans/" +
661                                                 "mef-interfaces:ce-vlan/" +
662                                                 "mef-interfaces:vid";
663                       }
664                       must "not(current()/../../" +
665                                             "evc-uni-ce-vlan[2]) or " +
666                                             "(count(../../../../uni/evc-uni-ce-vlans/" +
667                                             "evc-uni-ce-vlan" +
668                                             "[vid = current()]) = " +
669                                             "count(../../../../uni))" {
670                         error-message "If more than one CE-VLAN ID " +
671                                                 "is configured for a UNI as part of " +
672                                                 "an EVC, every CE VLAN-ID mapped to " +
673                                                 "that EVC must be configured for all " +
674                                                 "UNIs within that EVC.";
675                         description
676                                                 "If more than one CE-VLAN ID is configured " +
677                                                 "for a UNI as part of an EVC, every " +
678                                                 "CE VLAN-ID mapped to that EVC must be " +
679                                                 "configured for all UNIs within that EVC.";
680                       }
681                       description
682                                             "VLAN Identifier.";
683                     }
684                   }
685                 }
686                 leaf ingress-bw-profile {
687                     type mef-types:identifier45;
688                 }
689                 container ingress-bwp-flows-per-cos {
690                   presence "Use Ingress Bandwidth Profiles Per CoS";
691                   description
692                                     "EVC Per UNI Class of Service Identifiers " +
693                                     "corresponding to this EVC's Ingress Bandwidth " +
694                                     "Profile Flows.";
695                   leaf coupling-enabled {
696                     type boolean;
697                     default "false";
698                     description
699                                         "EVC Per UNI Envelope Coupling Flag (CF) " +
700                                         "attribute.";
701                     reference "[MEF10.3] Section 12.1.";
702                   }
703                   list bwp-flow-per-cos {
704                     key "cos-name";
705                     description
706                                         "EVC Per UNI: The list of Class of Service " +
707                                         "Identifiers corresponding to this UNI's " +
708                                         "Ingress Bandwidth Profile Flow.";
709                     leaf cos-name {
710                       type leafref {
711                         path "/mef-global:mef-global/mef-global:" +
712                                                 "profiles/mef-global:cos-names/" +
713                                                 "mef-global:cos-name/mef-global:name";
714                       }
715                       description
716                                             "EVC Per UNI: Class of Service Identifier " +
717                                             "for this Bandwidth Profile Flow.";
718                       reference "[MEF7.3] Section 12.1.2.";
719                     }
720                     leaf bw-profile {
721                       type leafref {
722                         path "/mef-interfaces:mef-interfaces/" +
723                                                 "mef-interfaces:unis/" +
724                                                 "mef-interfaces:uni" +
725                                                 "[mef-interfaces:uni-id = " +
726                                                 "current()/../../../uni-id]" +
727                                                 "/mef-interfaces:ingress-envelopes/" +
728                                                 "mef-interfaces:envelope/" +
729                                                 "mef-interfaces:env-id";
730                       }
731                       mandatory true;
732                       description
733                                             "EVC Per UNI: Ingress Bandwidth Profile " +
734                                             "Envelope Per CoS ID. If this parameter " +
735                                             "is not configured (ie. 'No') this " +
736                                             "setting is configured else at the " +
737                                             "UNI Level.";
738                       reference "[MEF10.3] Section 10.6, Table 28. " +
739                                             "[MEF7.3] Section 12.1.2.";
740                     }
741                   }
742                 }
743                 container egress-bwp-flows-per-eec {
744                   presence "Using Egress Bandwidth Profiles Per " +
745                                     "Egress Equivalence Class";
746                   description
747                                     "EVC Per UNI: The Egress Equivalence Class " +
748                                     "Identifiers corresponding to this EVC's Egress " +
749                                     "Bandwidth Profile Flows.";
750                   leaf coupling-enabled {
751                     type boolean;
752                     default "false";
753                     description
754                                         "EVC Per UNI: The Envelope Coupling Flag (CF) " +
755                                         "attribute.";
756                     reference "[MEF10.3] Section 12.1.";
757                   }
758                   list bwp-flow-per-eec {
759                     key "eec-name";
760                     description
761                                         "EVC Per UNI: The list of Egress Equivalence " +
762                                         "Class Identifiers corresponding to this " +
763                                         "EVC's Egress Bandwidth Profile Flow.";
764                     leaf eec-name {
765                       type leafref {
766                         path "/mef-global:mef-global/mef-global:" +
767                                                 "profiles/mef-global:eec-names/" +
768                                                 "mef-global:eec-name/mef-global:name";
769                       }
770                       description
771                                             "EVC Per UNI: Egress Equivalence Class " +
772                                             "Identifier for this Bandwidth Profile Flow.";
773                       reference "[MEF7.3] Section 12.1.2.";
774                     }
775                     leaf bw-profile {
776                       type leafref {
777                         path "/mef-interfaces:mef-interfaces/" +
778                                                 "mef-interfaces:unis/" +
779                                                 "mef-interfaces:uni" +
780                                                 "[mef-interfaces:uni-id = " +
781                                                 "current()/../../../uni-id]" +
782                                                 "/mef-interfaces:egress-envelopes/" +
783                                                 "mef-interfaces:envelope/" +
784                                                 "mef-interfaces:env-id";
785                       }
786                       mandatory true;
787                       description
788                                             "EVC Per UNI: Egress Bandwidth Profile " +
789                                             "Envelope Per Equivance Class. If this " +
790                                             "parameter is not configured (ie. 'No') " +
791                                             "this setting is configured else at the " +
792                                             "UNI Level.";
793                       reference "[MEF10.3] Section 10.6, Table 28. " +
794                                             "[MEF7.3] Section 12.1.2.";
795                     }
796                   }
797                 }
798                 container status {
799                   description
800                                     "EVC Per UNI: This status group is related to " +
801                                     "the MEF 7.3 Service Endpoint";
802                   leaf oper-state-enabled {
803                     type boolean;
804                     default "false";
805                     config false;
806                     description
807                                         "EVC Per UNI: Operational Status of the " +
808                                         "Virtual Connection as Enabled/Disabled.";
809                     reference "[MEF15]. [MEF7.3] Section 11.2.1.";
810                   }
811                   leaf available-status {
812                     type mef-types:svc-endpoint-availability-type;
813                     default "not-installed";
814                     config false;
815                     description
816                                         "EVC Per UNI: Availability Status of the " +
817                                         "Virtual Connection.";
818                     reference "[MEF15]. [MEF7.3] Section 11.2.1.";
819                   }
820                 }
821                 leaf uni-id {
822                   type leafref {
823                     path "/mef-interfaces:mef-interfaces/" +
824                                         "mef-interfaces:unis/mef-interfaces:uni/" +
825                                         "mef-interfaces:uni-id";
826                   }
827                   description
828                                     "EVC Per UNI: The UNI ID paired with the EVC ID " +
829                                     "in the containing list.";
830                   reference "[MEF10.3] Section 8.3, Section 10.1.  " +
831                                     "[MEF7.3] Section 12.1.2.";
832                 }
833                 leaf role {
834                   type mef-types:evc-uni-role-type;
835                   mandatory true;
836                   description
837                                     "EVC Per UNI: The UNI Role MUST have the value " +
838                                     "of either 'root' or 'leaf'.";
839                   reference "[MEF10.3] [R4], [R5], [R10], [R11], " +
840                                     "[R12]. [MEF7.3] Section 12.2.2.";
841                 }
842                 leaf admin-state-enabled {
843                   type boolean;
844                   default "true";
845                   description
846                                     "EVC Per UNI: Locked/Unlocked is inconsistent " +
847                                     "with Oper Status and will be confusing.";
848                   reference "[MEF15]. [MEF7.3] Section 11.2.1.";
849                 }
850                 leaf color-id {
851                   type mef-types:cos-color-identifier-type;
852                   description
853                                     "EVC Per UNI: The Color Identifier for " +
854                                     "Service Frames.";
855                   reference "[MEF10.3] Section 10.3. " +
856                                     "[MEF7.3] Section 12.1.2.";
857                 }
858                 leaf data-svc-frm-cos {
859                   type leafref {
860                     path "/mef-global:mef-global/mef-global:profiles/" +
861                                         "mef-global:cos/mef-global:cos-profile/" +
862                                         "mef-global:id";
863                   }
864                   must "not(/mef-global:mef-global/mef-global:" +
865                                     "profiles/mef-global:cos/" +
866                                     "mef-global:cos-profile" +
867                                     "[mef-global:id = current()]" +
868                                     "/mef-global:cos-pcp) or " +
869                                     "((/mef-global:mef-global/mef-global:" +
870                                     "profiles/mef-global:cos/" +
871                                     "mef-global:cos-profile" +
872                                     "[mef-global:id = current()]" +
873                                     "/mef-global:cos-pcp) and " +
874                                     "((../color-id = 'pcp') or " +
875                                     "(../color-id = 'dei')) )" {
876                     error-message "When the Class of Service " +
877                                         "Identifier is based on PCP for a " +
878                                         "given EVC at a given UNI, the Color " +
879                                         "Identifier must be based on either " +
880                                         "DEI or PCP.";
881                     description
882                                         "When the Class of Service Identifier is " +
883                                         "based on PCP for a given EVC at a given UNI, " +
884                                         "the Color Identifier must be based on either " +
885                                         "DEI or PCP.";
886                   }
887                   must "not(/mef-global:mef-global/mef-global:" +
888                                     "profiles/mef-global:cos/mef-global:" +
889                                     "cos-profile" +
890                                     "[mef-global:id = current()]/mef-global:" +
891                                     "cos-dscp) or " +
892                                     "((/mef-global:mef-global/mef-global:" +
893                                     "profiles/mef-global:cos/mef-global:" +
894                                     "cos-profile" +
895                                     "[mef-global:id = current()]/mef-global:" +
896                                     "cos-dscp) and " +
897                                     "(../color-id = 'dscp'))" {
898                     error-message "When the Class of Service " +
899                                         "Identifier is based on DSCP for a " +
900                                         "given EVC at a given UNI, the Color " +
901                                         "Identifier must be based DSCP.";
902                     description
903                                         "When the Class of Service Identifier is based " +
904                                         "on DSCP for a given EVC at a given UNI, the " +
905                                         "Color Identifier must be based DSCP.";
906                   }
907                   description
908                                     "EVC Per UNI: Ingress Data Service Frame " +
909                                     "CoS Profile.";
910                   reference "[MEF10.3] Section 8.8, Section 10.2. " +
911                                     "[MEF7.3] Section 12.1.2.";
912                 }
913                 leaf l2cp-svc-frm-cos {
914                   type leafref {
915                     path "/mef-global:mef-global/mef-global:" +
916                                         "profiles/mef-global:l2cp-cos/mef-global:" +
917                                         "l2cp-profile/mef-global:id";
918                   }
919                   description
920                                     "EVC Per UNI: Ingress Layer 2 Control Protocol " +
921                                     "Processing.";
922                   reference "[MEF10.3] Section 8.8, Section 10.2. " +
923                                     "[MEF7.3] Section 12.1.2.";
924                 }
925                 leaf soam-svc-frm-cos {
926                   type leafref {
927                     path "/mef-global:mef-global/mef-global:profiles/" +
928                                         "mef-global:cos/mef-global:cos-profile/" +
929                                         "mef-global:id";
930                   }
931                   must "(not(.) and not(../data-svc-frm-cos)) or " +
932                                     "(. = ../data-svc-frm-cos)" {
933                     error-message "For a given EVC at a given UNI, " +
934                                         "the basis for the Class of Service " +
935                                         "Identifier for ingress SOAM Service " +
936                                         "Frames must be the same as that for " +
937                                         "ingress Data Service Frames.";
938                     description
939                                         "For a given EVC at a given UNI, the basis " +
940                                         "for the Class of Service Identifier for " +
941                                         "ingress SOAM Service Frames must be the " +
942                                         "same as that for ingress Data Service Frames.";
943                   }
944                   description
945                                     "EVC Per UNI: Ingress SOAM Service Frames.";
946                   reference "[MEF7.3] Section 12.1.2.";
947                 }
948                 leaf data-svc-frm-eec {
949                   type leafref {
950                     path "/mef-global:mef-global/mef-global:profiles/" +
951                                         "mef-global:eec/mef-global:eec-profile/" +
952                                         "mef-global:id";
953                   }
954                   must "not(/mef-global:mef-global/mef-global:" +
955                                     "profiles/mef-global:eec/mef-global:" +
956                                     "eec-profile" +
957                                     "[mef-global:id = current()]" +
958                                     "/mef-global:eec-pcp) or " +
959                                     "((/mef-global:mef-global/mef-global:" +
960                                     "profiles/mef-global:eec/mef-global:" +
961                                     "eec-profile" +
962                                     "[mef-global:id = current()]" +
963                                     "/mef-global:eec-pcp) and " +
964                                     "((../color-id = 'pcp') or " +
965                                     "(../color-id = 'dei')) )" {
966                     error-message "When the Egress Equivalence " +
967                                         "Class Identifier is based on PCP " +
968                                         "for a given EVC at a given UNI, " +
969                                         "the Color Identifier must be based " +
970                                         "on either DEI or PCP.";
971                     description
972                                         "When the Egress Equivalence Class Identifier " +
973                                         "is based on PCP for a given EVC at a " +
974                                         "given UNI, the Color Identifier must " +
975                                         "be based on either DEI or PCP.";
976                   }
977                   must "not(/mef-global:mef-global/mef-global:" +
978                                     "profiles/mef-global:eec/mef-global:" +
979                                     "eec-profile" +
980                                     "[mef-global:id = current()]" +
981                                     "/mef-global:eec-dscp) or " +
982                                     "((/mef-global:mef-global/mef-global:" +
983                                     "profiles/mef-global:eec/mef-global:" +
984                                     "eec-profile" +
985                                     "[mef-global:id = current()]" +
986                                     "/mef-global:eec-dscp) and " +
987                                     "(../color-id = 'dscp'))" {
988                     error-message "When the Egress Equivalence " +
989                                         "Class Identifier is based on DSCP for " +
990                                         "a given EVC at a given UNI, the Color " +
991                                         "Identifier must be based DSCP.";
992                     description
993                                         "When the Egress Equivalence Class Identifier " +
994                                         "is based on DSCP for a given EVC at a given " +
995                                         "UNI, the Color Identifier must be based DSCP.";
996                   }
997                   description
998                                     "EVC Per UNI: Egress Data Service Frame Processing.";
999                   reference "[MEF10.3] Section 10.4. " +
1000                                     "[MEF7.3] Section 12.1.2.";
1001                 }
1002                 leaf l2cp-svc-frm-eec {
1003                   type leafref {
1004                     path "/mef-global:mef-global/mef-global:profiles/" +
1005                                         "mef-global:l2cp-eec/mef-global:" +
1006                                         "l2cp-profile/mef-global:id";
1007                   }
1008                   description
1009                                     "EVC Per UNI: Egress Layer 2 Control Protocol " +
1010                                     "Processing.";
1011                   reference "[MEF10.3] Section 10.4. " +
1012                                     "[MEF7.3] Section 12.1.2.";
1013                 }
1014                 leaf soam-svc-frm-eec {
1015                   type leafref {
1016                     path "/mef-global:mef-global/mef-global:" +
1017                                         "profiles/mef-global:eec/mef-global:" +
1018                                         "eec-profile/mef-global:id";
1019                   }
1020                   must "(not(.) and not(../data-svc-frm-eec)) or " +
1021                                     "(. = ../data-svc-frm-eec)" {
1022                     error-message "For a given EVC at a given UNI, " +
1023                                         "the basis for the Egress Equivalence " +
1024                                         "Class Identifier for egress SOAM " +
1025                                         "Service Frames must be the same as " +
1026                                         "that for egress Data Service Frames.";
1027                     description
1028                                         "For a given EVC at a given UNI, the basis " +
1029                                         "for the Egress Equivalence Class Identifier " +
1030                                         "for egress SOAM Service Frames must be " +
1031                                         "the same as that for egress Data " +
1032                                         "Service Frames.";
1033                   }
1034                   description
1035                                     "EVC Per UNI: Egress SOAM Service Frames.";
1036                   reference "[MEF10.3] Section 10.4. " +
1037                                     "[MEF7.3] Section 12.1.2.";
1038                 }
1039                 leaf ingress-bw-profile-per-evc {
1040                   type leafref {
1041                     path "/mef-interfaces:mef-interfaces/" +
1042                                         "mef-interfaces:unis/" +
1043                                         "mef-interfaces:uni" +
1044                                         "[mef-interfaces:uni-id = " +
1045                                         "current()/../uni-id]" +
1046                                         "/mef-interfaces:ingress-envelopes/" +
1047                                         "mef-interfaces:envelope/" +
1048                                         "mef-interfaces:env-id";
1049                   }
1050                   description
1051                                     "EVC Per UNI: Ingress Bandwidth Profile " +
1052                                     "Envelope Per EVC. If this parameter is " +
1053                                     "not configured (ie. 'No') this setting " +
1054                                     "is configured else at the UNI Level.";
1055                   reference "[MEF10.3] Section 10.5. " +
1056                                     "[MEF7.3] Section 12.1.2.";
1057                 }
1058                 leaf egress-bw-profile-per-evc {
1059                   type leafref {
1060                     path "/mef-interfaces:mef-interfaces/" +
1061                                         "mef-interfaces:unis/" +
1062                                         "mef-interfaces:uni" +
1063                                         "[mef-interfaces:uni-id = " +
1064                                         "current()/../uni-id]" +
1065                                         "/mef-interfaces:egress-envelopes/" +
1066                                         "mef-interfaces:envelope/mef-interfaces:" +
1067                                         "env-id";
1068                   }
1069                   description
1070                                     "EVC Per UNI: Egress Bandwidth Profile Envelope " +
1071                                     "Per EVC. If this parameter is not configured " +
1072                                     "(ie. 'No') this setting is configured else at " +
1073                                     "the UNI Level.";
1074                   reference "[MEF10.3] Section 10.7. " +
1075                                     "[MEF7.3] Section 12.1.2.";
1076                 }
1077                 leaf src-mac-addr-limit-enabled {
1078                   type boolean;
1079                   default "false";
1080                   description
1081                                     "EVC Per UNI: Source MAC Address Limit " +
1082                                     "Enable / Disable. If Enabled, the values " +
1083                                     "for the Source MAC Address Limit and Source " +
1084                                     "MAC Address Interval must be set.";
1085                   reference "[MEF10.3] Section 10.9. " +
1086                                     "[MEF7.3] Section 12.1.2.";
1087                 }
1088                 leaf src-mac-addr-limit {
1089                   type uint32 {
1090                     range "1..max";
1091                   }
1092                   description
1093                                     "EVC Per UNI: Source MAC Address Limit. " +
1094                                     "This value is used when the Source MAC Address " +
1095                                     "Limit Enabled is true.";
1096                   reference "[MEF10.3] Section 10.9.";
1097                 }
1098                 leaf src-mac-addr-limit-interval {
1099                   type yang:timeticks;
1100                   default "0";
1101                   description
1102                                     "EVC Per UNI: Source MAC Address Limit " +
1103                                     "Interval. This value is used when the " +
1104                                     "Source MAC Address Limit Enabled is true.";
1105                   reference "[MEF10.3] Section 10.9.";
1106                 }
1107                 leaf test-meg-enabled {
1108                   type boolean;
1109                   default "false";
1110                   description
1111                                     "EVC Per UNI: Test MEG Enabled / Disabled.";
1112                   reference "[MEF10.3] Section 10.10. " +
1113                                     "[MEF7.3] Section 12.1.2.";
1114                 }
1115                 leaf test-meg {
1116                   type mef-types:identifier45;
1117                   description
1118                                     "EVC Per UNI: Test MEG Identifier.";
1119                   reference "[MEF7.3] Section 12.1.2.";
1120                 }
1121                 leaf subscriber-meg-mip-enabled {
1122                   type boolean;
1123                   default "false";
1124                   description
1125                                     "EVC Per UNI: Subscriber MEG MIP " +
1126                                     "Enabled / Disabled.";
1127                   reference "[MEF10.3] Section 10.11. " +
1128                                     "[MEF7.3] Section 12.1.2.";
1129                 }
1130                 leaf subscriber-meg-mip {
1131                   type mef-types:identifier45;
1132                   description
1133                                     "EVC Per UNI: Subscriber MEG MIP Identifier.";
1134                   reference "[MEF7.3] Section 12.1.2.";
1135                 }
1136               }
1137             }
1138             container status {
1139               description
1140                             "This status group is related to the MEF 7.3 Virtual " +
1141                             "Connection";
1142               leaf oper-state-enabled {
1143                 type boolean;
1144                 default "false";
1145                 config false;
1146                 description
1147                                 "EVC Operational Status of the Virtual Connection " +
1148                                 "as Enabled/Disabled.";
1149                 reference "[MEF7.3] Section 11.1.1.";
1150               }
1151               leaf available-status {
1152                 type mef-types:virt-cx-availability-type;
1153                 default "not-installed";
1154                 config false;
1155                 description
1156                                 "EVC Availability Status of the Virtual Connection.";
1157                 reference "[MEF7.3] Section 11.1.1.";
1158               }
1159             }
1160             container sls-inclusions-by-cos {
1161               description
1162                             "SLS Inclusions by CoS: For this EVC, the following " +
1163                             "CoS Names/Labels are applicable.";
1164               list sls-inclusion-by-cos {
1165                 key "cos-name";
1166                 description
1167                                 "CoS Name.";
1168                 leaf cos-name {
1169                   type leafref {
1170                     path "/mef-global:mef-global/mef-global:profiles/" +
1171                                         "mef-global:cos-names/mef-global:" +
1172                                         "cos-name/mef-global:name";
1173                   }
1174                   description
1175                                     "EVC: This attribute identifies the name of " +
1176                                     "a class of service (CoS) instance to be used " +
1177                                     "for EVC Performance.";
1178                 }
1179               }
1180             }
1181             container sls-uni-inclusions {
1182               presence "EVC: Defines the EVC Flow Points (UNI) Pairs " +
1183                             "that must conform to the EVC's SLS Performance " +
1184                             "Metrics.";
1185               description
1186                             "SLS UNI Inclusions List. The following pairs of UNI " +
1187                             "Interconnections are to required to meet the " +
1188                             "SLS Performance Objectives. Configing both SLS " +
1189                             "UNI Inclusions and SLS UNI Exclusions is not " +
1190                             "permitted.";
1191               list sls-uni-inclusion-set {
1192                 must "uni-id1 != uni-id2" {
1193                   error-message "The two UNI IDs for a given " +
1194                                     "inclusion cannot be the same.";
1195                   description
1196                                     "The two UNI IDs for a given inclusion " +
1197                                     "cannot be the same.";
1198                 }
1199                 must "(../../evc-type != 'rooted-multipoint') or " +
1200                                 "((../../evc-type = 'rooted-multipoint') " +
1201                                 "and " +
1202                                 "not((../../unis/uni[uni-id = " +
1203                                 "current()/uni-id1]/role = 'leaf') and " +
1204                                 "(../../unis/uni[uni-id = current()/uni-id2]" +
1205                                 "/role = 'leaf')))" {
1206                   error-message "If EVC Type is Rooted-Multipoint, " +
1207                                     "sls-uni-inclusion UNI Pairs cannot both " +
1208                                     "be role 'leaf'.";
1209                   description
1210                                     "If EVC Type is Rooted-Multipoint, " +
1211                                     "sls-uni-inclusion UNI Pairs cannot " +
1212                                     "both be role 'leaf'.";
1213                 }
1214                 key "pm-type pm-id uni-id1 uni-id2";
1215                 description
1216                                 "EVC: Defines the EVC Flow Points (UNI) Pairs that " +
1217                                 "must conform to the EVC's SLS Performance " +
1218                                 "Metrics. Use of this list indicates that a " +
1219                                 "complete set of UNI Pairs has been specified " +
1220                                 "for the Performance Metrics defined in the " +
1221                                 "selected SLS.";
1222                 leaf pm-type {
1223                   type leafref {
1224                     path "/mef-global:mef-global/mef-global:slss/" +
1225                                         "mef-global:sls" +
1226                                         "[mef-global:sls-id = current()/../../../" +
1227                                         "evc-performance-sls]" +
1228                                         "/mef-global:perf-objs/mef-global:" +
1229                                         "perf-obj/mef-global:pm-type";
1230                   }
1231                   description
1232                                     "EVC: Performance Metric.";
1233                   reference "[MEF10.3] Section 8.8.";
1234                 }
1235                 leaf pm-id {
1236                   type leafref {
1237                     path "/mef-global:mef-global/mef-global:slss/" +
1238                                         "mef-global:sls" +
1239                                         "[mef-global:sls-id = current()/../../../" +
1240                                         "evc-performance-sls]" +
1241                                         "/mef-global:perf-objs/mef-global:perf-obj" +
1242                                         "[mef-global:pm-type = current()/../" +
1243                                         "pm-type]" +
1244                                         "/mef-global:pm-id";
1245                   }
1246                   description
1247                                     "EVC: This is a friendly name for specific " +
1248                                     "performance profile.";
1249                 }
1250                 leaf uni-id1 {
1251                   type leafref {
1252                     path "../../../unis/uni/uni-id";
1253                   }
1254                   description
1255                                     "EVC: The UNI ID paired with the EVC ID in the " +
1256                                     "containing list.";
1257                   reference "[MEF10.3] Section 8.3, Section 10.1.  " +
1258                                     "[MEF7.3] Section 12.1.2.";
1259                 }
1260                 leaf uni-id2 {
1261                   type leafref {
1262                     path "../../../unis/uni/uni-id";
1263                   }
1264                   description
1265                                     "EVC: The UNI ID paired with the EVC ID in the " +
1266                                     "containing list.";
1267                   reference "[MEF10.3] Section 8.3, Section 10.1.  " +
1268                                     "[MEF7.3] Section 12.1.2.";
1269                 }
1270               }
1271             }
1272             container sls-uni-exclusions {
1273               presence "Not all EVC Flow Points (UNI) must conform " +
1274                             "to the EVC SLS Performance Metrics.";
1275               description
1276                             "EVC: Not all EVC Flow Points (UNI) must conform to " +
1277                             "the EVC SLS Performance Metrics. Use of this " +
1278                             "list indicates that all UNI Pairs EXCEPT for " +
1279                             "the ones indicated (per Performance Metric) must " +
1280                             "conform to the SLS.";
1281               list sls-uni-exclusion-set {
1282                 must "uni-id1 != uni-id2" {
1283                   error-message "The two UNI IDs for a given " +
1284                                     "exclusion cannot be the same.";
1285                   description
1286                                     "The two UNI IDs for a given exclusion cannot " +
1287                                     "be the same as these pairs are invalid as " +
1288                                     "defined in MEF 10.3.";
1289                 }
1290                 key "pm-type pm-id uni-id1 uni-id2";
1291                 description
1292                                 "SLS UNI Exclusions List. The following pairs " +
1293                                 "of UNI Interconnections are not required " +
1294                                 "meet the SLS Performance Objectives. " +
1295                                 "Configing both SLS UNI Inclusions and SLS " +
1296                                 "UNI Exclusions is not permitted.";
1297                 leaf pm-type {
1298                   type leafref {
1299                     path "/mef-global:mef-global/mef-global:" +
1300                                         "slss/mef-global:sls" +
1301                                         "[mef-global:sls-id = current()/../../../" +
1302                                         "evc-performance-sls]" +
1303                                         "/mef-global:perf-objs/mef-global:" +
1304                                         "perf-obj/mef-global:pm-type";
1305                   }
1306                   description
1307                                     "EVC: Performance Metric.";
1308                   reference "[MEF10.3] Section 8.8.";
1309                 }
1310                 leaf pm-id {
1311                   type leafref {
1312                     path "/mef-global:mef-global/mef-global:slss/" +
1313                                         "mef-global:sls" +
1314                                         "[mef-global:sls-id = current()/../../../" +
1315                                         "evc-performance-sls]" +
1316                                         "/mef-global:perf-objs/mef-global:perf-obj" +
1317                                         "[mef-global:pm-type = current()/../" +
1318                                         "pm-type]" +
1319                                         "/mef-global:pm-id";
1320                   }
1321                   description
1322                                     "EVC: This is a friendly name for specific " +
1323                                     "performance profile.";
1324                 }
1325                 leaf uni-id1 {
1326                   type leafref {
1327                     path "../../../unis/uni/uni-id";
1328                   }
1329                   description
1330                                     "EVC: The UNI ID paired with the EVC ID in the " +
1331                                     "containing list.";
1332                   reference "[MEF10.3] Section 8.3, Section 10.1.  " +
1333                                     "[MEF7.3] Section 12.1.2.";
1334                 }
1335                 leaf uni-id2 {
1336                   type leafref {
1337                     path "../../../unis/uni/uni-id";
1338                   }
1339                   description
1340                                     "EVC: The UNI ID paired with the EVC ID in the " +
1341                                     "containing list.";
1342                   reference "[MEF10.3] Section 8.3, Section 10.1.  " +
1343                                     "[MEF7.3] Section 12.1.2.";
1344                 }
1345               }
1346             }
1347             leaf evc-id {
1348               type mef-types:evc-id-type;
1349               mandatory true;
1350               description
1351                             "The EVC ID must be unique across all EVCs in the CEN." +
1352                             " The EVC ID must be non-NULL.";
1353               reference "[MEF10.3] Section 8.2 [R7]. " +
1354                             "[MEF7.3] Section 11.1.1, Section 12.2.2.";
1355             }
1356             leaf evc-status {
1357               type mef-types:evc-status-type;
1358               config false;
1359               description
1360                             "EVC Operational Status.";
1361               reference "[MEF16] Section 5.3.";
1362             }
1363             leaf evc-type {
1364               type mef-types:evc-type;
1365               must "(. != 'point-to-point') or " +
1366                             "((. = 'point-to-point') and " +
1367                             "(count(../unis/uni[role = 'leaf']) = 0))" {
1368                 error-message "If EVC Type is Point-to-Point, all " +
1369                                 "UNI Roles must be root.";
1370                 description
1371                                 "If EVC Type is Point-to-Point, all UNI Roles must " +
1372                                 "be root.";
1373               }
1374               must "(. != 'multipoint-to-multipoint') or " +
1375                             "((. = 'multipoint-to-multipoint') and " +
1376                             "(count(../unis/uni[role = 'leaf']) = 0))" {
1377                 error-message "If EVC Type is " +
1378                                 "Multipoint-to-Multipoint, all UNI Roles " +
1379                                 "must be root.";
1380                 description
1381                                 "If EVC Type is Multipoint-to-Multipoint, all UNI " +
1382                                 "Roles must be root.";
1383               }
1384               must "(. != 'rooted-multipoint') or " +
1385                             "((. = 'rooted-multipoint') and " +
1386                             "(count(../unis/uni[role = 'root']) > 0) )" {
1387                 error-message "If EVC Type is Rooted-Multipoint, one " +
1388                                 "or more UNI Roles must be root.";
1389                 description
1390                                 "If EVC Type is Rooted-Multipoint, one or more " +
1391                                 "UNI Roles must be root.";
1392               }
1393               must "(. != 'point-to-point') or " +
1394                             "((. = 'point-to-point') and " +
1395                             "(count(../unis/uni) = 2))" {
1396                 error-message "If EVC Type is Point-to-Point, there " +
1397                                 "must be exactly 2 UNI configured for the EVC.";
1398                 description
1399                                 "If EVC Type is Point-to-Point, there must be " +
1400                                 "exactly 2 UNI configured for the EVC.";
1401               }
1402               must "(. != 'multipoint-to-multipoint') or " +
1403                             "((. = 'multipoint-to-multipoint') and " +
1404                             "(count(../unis/uni) > 1) and " +
1405                             "(count(../unis/uni) <= ../max-uni-count))" {
1406                 error-message "If EVC Type is " +
1407                                 "Multipoint-to-Multipoint, " +
1408                                 "there must be 2 or more UNI configured " +
1409                                 "for the EVC.";
1410                 description
1411                                 "If EVC Type is Multipoint-to-Multipoint, " +
1412                                 "there must be 2 or more UNI configured for " +
1413                                 "the EVC.";
1414               }
1415               must "(. != 'rooted-multipoint') or " +
1416                             "((. = 'rooted-multipoint') and " +
1417                             "(count(../unis/uni) > 1) and " +
1418                             "(count(../unis/uni) <= ../max-uni-count))" {
1419                 error-message "If EVC Type is Rooted-Multipoint, " +
1420                                 "there must be 2 or more UNI configured for the EVC.";
1421                 description
1422                                 "If EVC Type is Rooted-Multipoint, there must " +
1423                                 "be 2 or more UNI configured for the EVC.";
1424               }
1425               must "(. != 'point-to-point') or " +
1426                             "((. = 'point-to-point') and " +
1427                             "(../max-uni-count = 2))" {
1428                 error-message "If EVC Type is Point-to-Point, " +
1429                                 "the value of max-uni-count must be 2.";
1430                 description
1431                                 "If EVC Type is Point-to-Point, the value of " +
1432                                 "max-uni-count must be 2.";
1433               }
1434               must "(. != 'multipoint-to-multipoint') or " +
1435                             "((. = 'multipoint-to-multipoint') and " +
1436                             "(../max-uni-count > 2))" {
1437                 error-message "If EVC Type is " +
1438                                 "Multipoint-to-Multipoint, the value of " +
1439                                 "max-uni-count must be at least 3.";
1440                 description
1441                                 "If EVC Type is Multipoint-to-Multipoint, the " +
1442                                 "value of max-uni-count must be at least 3.";
1443               }
1444               must "(. != 'rooted-multipoint') or " +
1445                             "((. = 'rooted-multipoint') and " +
1446                             "(../max-uni-count > 2))" {
1447                 error-message "If EVC Type is Rooted-Multipoint, " +
1448                                 "the value of max-uni-count must be at " +
1449                                 "least 3.";
1450                 description
1451                                 "If EVC Type is Rooted-Multipoint, the value " +
1452                                 "of max-uni-count must be at least 3.";
1453               }
1454               // mandatory true;
1455               description
1456                             "This EVC attribute describes the EVC as either " +
1457                             "Multipoint-To-Multipoint, Point-To-Point, or " +
1458                             "Rooted-Multipoint.";
1459               reference "[MEF10.3] Section 8.1, [R4], [R5], " +
1460                             "[R10], [R11], [R12], [R13] and [R14]. " +
1461                             "[MEF7.3] Section 12.2.2.";
1462             }
1463             leaf admin-state-enabled {
1464               type boolean;
1465               default "true";
1466               description
1467                             "EVC: Locked/Unlocked is inconsistent with " +
1468                             "Oper Status and will be confusing.";
1469               reference "[MEF15]. [MEF7.3] Section 11.1.1.";
1470             }
1471             leaf elastic-enabled {
1472               type boolean;
1473               default "true";
1474               description
1475                             "EVC: Elastic Enabled/Disabled.";
1476               reference "[MEF7.3] Section 11.1.1.";
1477             }
1478             leaf elastic-service {
1479               type mef-types:identifier45;
1480               description
1481                             "EVC: Related to CE4Cloud Information Model.";
1482               reference "[MEF7.3] Section 11.1.1.";
1483             }
1484             leaf max-uni-count {
1485               type uint32 {
1486                 range "2..max";
1487               }
1488               must "(. > 2) or ((. = 2) and " +
1489                             "(../evc-type = 'point-to-point'))" {
1490                 error-message "If EVC Type is Point-to-Point, the " +
1491                                 "max-uni-count value must be 2.";
1492                 description
1493                                 "If EVC Type is Point-to-Point, the max-uni-count " +
1494                                 "value must be 2.";
1495               }
1496               must "(. = 2) or ((. > 2) and " +
1497                             "((../evc-type = 'multipoint-to-multipoint') or " +
1498                             "(../evc-type = 'rooted-multipoint')))" {
1499                 error-message "If EVC Type is " +
1500                                 "Multipoint-to-Multipoint or " +
1501                                 "Rooted-Multipoint, the max-uni-count value " +
1502                                 "must be at least 3.";
1503                 description
1504                                 "If EVC Type is Multipoint-to-Multipoint or " +
1505                                 "Rooted-Multipoint, the max-uni-count value " +
1506                                 "must be at least 3.";
1507               }
1508               default "2";
1509               description
1510                             "EVC:The Maximum Number of UNIs this EVC can be " +
1511                             "configured for (Default 2).If EVC Type is " +
1512                             "Multipoint-to-Multipoint or Rooted-Multipoint, " +
1513                             "the max-uni-count value must be at least 3. " +
1514                             "This value must be 2 for point-to-point mode.";
1515               reference "[MEF10.3] [R14]. [MEF7.3] Section 12.2.2.";
1516             }
1517             leaf subnet {
1518               type inet:ip-prefix;
1519             }
1520             leaf segmentation-id {
1521               type uint32;
1522             }
1523             leaf preserved-vlan {
1524               type uint32;
1525             }
1526             leaf preserve-ce-vlan-id {
1527               type boolean;
1528               default "false";
1529               description
1530                             "EVC:An EVC with more than one CE-VLAN ID mapping " +
1531                             "to it must have the same list of CE-VLAN IDs " +
1532                             "mapping to the EVC at each UNI in the EVC.";
1533               reference "[MEF10.3] Section 8.6.1, [R24] [R25], " +
1534                             "Section 9.10.2, Section 9.12, [R81], Figure 20. " +
1535                             "[MEF7.3] Section 12.2.2.";
1536             }
1537             leaf cos-preserve-ce-vlan-id {
1538               type boolean;
1539               default "false";
1540               description
1541                             "EVC: Preserve CE-VLAN ID for CoS.";
1542               reference "[MEF10.3] Section 8.6.2, [R26]. " +
1543                             "[MEF7.3] Section 12.2.2.";
1544             }
1545             leaf evc-performance-sls {
1546               type leafref {
1547                 path "/mef-global:mef-global/mef-global:slss/" +
1548                                 "mef-global:sls/mef-global:sls-id";
1549               }
1550               description
1551                             "EVC: EVC-specific performance objectives and " +
1552                             "parameters. Note that an SLS can also specify " +
1553                             "performance objectives spanning more than one EVC. " +
1554                             "By default, all the UNI associated with the EVC " +
1555                             "have this SLS applied for them.";
1556               reference "[MEF10.3] Section 8.8, Section 10. " +
1557                             "[MEF7.3] Section 12.2.2.";
1558             }
1559             leaf unicast-svc-frm-delivery {
1560               type mef-types:data-svc-frame-delivery-type;
1561               default "unconditional";
1562               description
1563                             "EVC: Unicast Data Service Frame Delivery Mode " +
1564                             "(unconditional[default], conditional, or discard).";
1565               reference "[MEF10.3] Section 8.5.2,[R16], [R17], " +
1566                             "Section 8.8, Section 11. [MEF7.3] Section 12.2.2.";
1567             }
1568             leaf multicast-svc-frm-delivery {
1569               type mef-types:data-svc-frame-delivery-type;
1570               default "unconditional";
1571               description
1572                             "EVC: Multicast Data Service Frame Delivery Mode " +
1573                             "(unconditional[default], conditional, or discard).";
1574               reference "[MEF10.3] Section 8.5.2, [R16], [R18], " +
1575                             "Section 8.8, Section 11. [MEF7.3] Section 12.2.2.";
1576             }
1577             leaf broadcast-svc-frm-delivery {
1578               type mef-types:data-svc-frame-delivery-type;
1579               default "unconditional";
1580               description
1581                             "EVC: Broadcast Data Service Frame Delivery Mode " +
1582                             "(unconditional[default], conditional, or discard).";
1583               reference "[MEF10.3] Section 8.5.2, [R16], [R19], " +
1584                             "Section 8.8, Section 11. [MEF7.3] Section 12.2.2.";
1585             }
1586             leaf evc-meg-id {
1587               type mef-types:identifier45;
1588               description
1589                             "EVC: Identifies the Maintenance Entity Group (MEG) " +
1590                             "for this EVC.";
1591               reference "[MEF7.3] Section 12.2.2. MEF 35.1.";
1592             }
1593             leaf max-svc-frame-size {
1594               type mef-types:max-svc-frame-size-type;
1595               default "1600";
1596               description
1597                             "EVC: This attribute describes the maximum service " +
1598                             "frame size for the EVC.";
1599               reference "[MEF10.3] Section 8.9, Section 9.7, [R71], " +
1600                             "[MEF6.2] Section 8.2.2 and MEF 22.1: [D2]. " +
1601                             "[MEF7.3] Section 12.2.2.";
1602             }
1603             leaf mac-timeout {
1604                 type uint32;
1605                 description
1606                             "EVC: Expiration time (in seconds) of a learned MAC address";
1607             }
1608           }
1609         }
1610       }
1611       leaf svc-id {
1612         type mef-types:retail-svc-id-type;
1613         description
1614                 "The MEF Service ID is a simple key used to " +
1615                 "distinguish MEF Service Configuration Groups.";
1616         reference "[MEF10.3] Section 7.";
1617       }
1618       leaf sp-id {
1619         when "/mef-global:mef-global/mef-global:svc-providers" {
1620           description
1621                     "Only configure when the Global Service Providers " +
1622                     "list has been populated.";
1623         }
1624         type leafref {
1625           path "/mef-global:mef-global/mef-global:svc-providers/" +
1626                     "mef-global:svc-provider/mef-global:sp-id";
1627         }
1628         description
1629                 "The MEF Service Provider ID must be globally unique " +
1630                 "as all CENs and Subscribers must be supported by a " +
1631                 "specific Service Provider(SP). A SP can support " +
1632                 "multiple CENs.";
1633         reference "[MEF10.3] Section 7.";
1634       }
1635       leaf svc-type {
1636         type mef-types:mef-service-type;
1637         must "(. != 'epl') or ((. = 'epl') and " +
1638                 "(count(/mef-interfaces:mef-interfaces/" +
1639                 "mef-interfaces:unis/mef-interfaces:uni" +
1640                 "[mef-interfaces:uni-id = current()/../" +
1641                 "mef-services:evc/mef-services:unis/mef-services:" +
1642                 "uni/mef-services:uni-id]" +
1643                 "[mef-interfaces:uni-id/../mef-interfaces:" +
1644                 "svc-mux-enabled = 'true']) = 0))" {
1645           error-message "For EPL, Service Multiplexing must be " +
1646                     "disabled for all UNIs in the EVC UNI List.";
1647           description
1648                     "For EPL, Service Multiplexing must be disabled for " +
1649                     "all UNIs in the EVC UNI List.";
1650         }
1651         must "(. != 'epl') or ((. = 'epl') and " +
1652                 "(count(/mef-interfaces:mef-interfaces/" +
1653                 "mef-interfaces:unis/mef-interfaces:uni" +
1654                 "[mef-interfaces:uni-id = current()/../" +
1655                 "mef-services:evc/mef-services:unis/mef-services:" +
1656                 "uni/mef-services:uni-id]" +
1657                 "[mef-interfaces:uni-id/../mef-interfaces:" +
1658                 "bundling-enabled = 'true']) = 0))" {
1659           error-message "For EPL, Bundling must be disabled for " +
1660                     "all UNIs in the EVC UNI List.";
1661           description
1662                     "For EPL, Bundling must be disabled for all UNIs in " +
1663                     "the EVC UNI List.";
1664         }
1665         must "(. != 'epl') or ((. = 'epl') and " +
1666                 "(count(/mef-interfaces:mef-interfaces/" +
1667                 "mef-interfaces:unis/mef-interfaces:uni" +
1668                 "[mef-interfaces:uni-id = current()/../" +
1669                 "mef-services:evc/mef-services:unis/" +
1670                 "mef-services:uni/mef-services:uni-id]" +
1671                 "[mef-interfaces:uni-id/../mef-interfaces:" +
1672                 "all-to-one-bundling-enabled = 'false']) = 0))" {
1673           error-message "For EPL, All-to-One Bundling must be " +
1674                     "enabled for all UNIs in the EVC UNI List.";
1675           description
1676                     "For EPL, All-to-One Bundling must be enabled for " +
1677                     "all UNIs in the EVC UNI List.";
1678         }
1679         must "(. != 'epl') or ((. = 'epl') and " +
1680                 "(count(/mef-interfaces:mef-interfaces/" +
1681                 "mef-interfaces:unis/mef-interfaces:uni" +
1682                 "[mef-interfaces:uni-id = current()/../" +
1683                 "mef-services:evc/mef-services:unis/mef-services:" +
1684                 "uni/mef-services:uni-id]" +
1685                 "[mef-interfaces:uni-id/../mef-interfaces:" +
1686                 "max-evc-count != 1]) = 0))" {
1687           error-message "For EPL, Max EVC Count must be 1 for " +
1688                     "all UNIs in the EVC UNI List.";
1689           description
1690                     "For EPL, Max EVC Count must be 1 for all UNIs " +
1691                     "in the EVC UNI List.";
1692         }
1693         must "(. != 'epl') or ((. = 'epl') and " +
1694                 "(count(../evc/unis/uni/egress-bwp-flows-per-eec/" +
1695                 "bwp-flow-per-eec) = 0))" {
1696           error-message "For EPL, Egress Bandwidth Profile per " +
1697                     "Egress Equivalence Class cannot be set for " +
1698                     "all UNIs in the EVC per UNI List.";
1699           description
1700                     "For EPL, Egress Bandwidth Profile per Egress " +
1701                     "Equivalence Class cannot be set for all UNIs in the " +
1702                     "EVC per UNI List.";
1703         }
1704         must "(. != 'epl') or ((. = 'epl') and " +
1705                 "(count(../evc/unis/uni" +
1706                 "[src-mac-addr-limit-enabled = 'true']) = 0) )" {
1707           error-message "For EPL, Source MAC Address Limit must " +
1708                     "be disabled.";
1709           description
1710                     "For EPL, Source MAC Address Limit must be disabled.";
1711         }
1712         must "(. != 'epl') or ((. = 'epl') and " +
1713                 "(../evc/evc-type = 'point-to-point'))" {
1714           error-message "For EPL, EVC Type must be Point-to-Point.";
1715           description
1716                     "For EPL, EVC Type must be Point-to-Point.";
1717         }
1718         must "(. != 'epl') or ((. = 'epl') and " +
1719                 "(../evc/unicast-svc-frm-delivery = " +
1720                 "'unconditional'))" {
1721           error-message "For EPL, unicast-svc-frm-delivery " +
1722                     "must be unconditional.";
1723           description
1724                     "For EPL, unicast-svc-frm-delivery must be " +
1725                     "unconditional.";
1726         }
1727         must "(. != 'epl') or ((. = 'epl') and " +
1728                 "(../evc/multicast-svc-frm-delivery = " +
1729                 "'unconditional'))" {
1730           error-message "For EPL, multicast-svc-frm-delivery " +
1731                     "must be unconditional.";
1732           description
1733                     "For EPL, multicast-svc-frm-delivery must be " +
1734                     "unconditional.";
1735         }
1736         must "(. != 'epl') or ((. = 'epl') and " +
1737                 "(../evc/broadcast-svc-frm-delivery = " +
1738                 "'unconditional'))" {
1739           error-message "For EPL, broadcast-svc-frm-delivery " +
1740                     "must be unconditional.";
1741           description
1742                     "For EPL, broadcast-svc-frm-delivery must be " +
1743                     "unconditional.";
1744         }
1745         must "(. != 'epl') or ((. = 'epl') and " +
1746                 "(../evc/preserve-ce-vlan-id = 'true'))" {
1747           error-message "For EPL, CE-VLAN ID Preservation " +
1748                     "must be enabled.";
1749           description
1750                     "For EPL, CE-VLAN ID Preservation must be enabled.";
1751         }
1752         must "(. != 'epl') or ((. = 'epl') and " +
1753                 "(../evc/cos-preserve-ce-vlan-id = 'true'))" {
1754           error-message "For EPL, CE-VLAN ID CoS Preservation " +
1755                     "must be enabled.";
1756           description
1757                     "For EPL, CE-VLAN ID CoS Preservation must be enabled.";
1758         }
1759         must "(. != 'evpl') or ((. = 'evpl') and " +
1760                 "(count(/mef-interfaces:mef-interfaces/" +
1761                 "mef-interfaces:unis/mef-interfaces:uni" +
1762                 "[mef-interfaces:uni-id = current()/../" +
1763                 "mef-services:evc/mef-services:unis/mef-services:" +
1764                 "uni/mef-services:uni-id]" +
1765                 "[mef-interfaces:uni-id/../mef-interfaces:" +
1766                 "all-to-one-bundling-enabled = 'true']) = 0))" {
1767           error-message "For EVPL, All-to-One Bundling must be " +
1768                     "disabled for all UNIs in the EVC UNI List.";
1769           description
1770                     "For EVPL, All-to-One Bundling must be disabled for " +
1771                     "all UNIs in the EVC UNI List.";
1772         }
1773         must "(. != 'evpl') or ((. = 'evpl') and " +
1774                 "((../evc/unicast-svc-frm-delivery != " +
1775                 "'unconditional') or " +
1776                 "(../evc/multicast-svc-frm-delivery != " +
1777                 "'unconditional') or " +
1778                 "(../evc/broadcast-svc-frm-delivery != " +
1779                 "'unconditional') or " +
1780                 "count(../evc/unis/uni" +
1781                 "[src-mac-addr-limit-enabled = 'true']) = 0))" {
1782           error-message "For EVPL, Source MAC Address Limit must " +
1783                     "be disabled for all UNIs in the EVC per " +
1784                     "UNI List if all 3 -svc-frm-delivery values " +
1785                     "are unconditional.";
1786           description
1787                     "For EVPL, Source MAC Address Limit must be disabled " +
1788                     "for all UNIs in the EVC per UNI List if all " +
1789                     "3 -svc-frm-delivery values are unconditional.";
1790         }
1791         must "(. != 'evpl') or ((. = 'evpl') and " +
1792                 "(../evc/evc-type = 'point-to-point'))" {
1793           error-message "For EVPL, EVC Type must be Point-to-Point.";
1794           description
1795                     "For EVPL, EVC Type must be Point-to-Point.";
1796         }
1797         must "(. != 'eplan') or ((. = 'eplan') and " +
1798                 "(count(/mef-interfaces:mef-interfaces/" +
1799                 "mef-interfaces:unis/mef-interfaces:uni" +
1800                 "[mef-interfaces:uni-id = current()/../" +
1801                 "mef-services:evc/mef-services:unis/mef-services:" +
1802                 "uni/mef-services:uni-id]" +
1803                 "[mef-interfaces:uni-id/../mef-interfaces:" +
1804                 "svc-mux-enabled = 'true']) = 0))" {
1805           error-message "For EP-LAN, Service Multiplexing must " +
1806                     "be disabled for all UNIs in the EVC UNI List.";
1807           description
1808                     "For EP-LAN, Service Multiplexing must be disabled " +
1809                     "for all UNIs in the EVC UNI List.";
1810         }
1811         must "(. != 'eplan') or ((. = 'eplan') and " +
1812                 "(count(/mef-interfaces:mef-interfaces/" +
1813                 "mef-interfaces:unis/mef-interfaces:uni" +
1814                 "[mef-interfaces:uni-id = current()/../" +
1815                 "mef-services:evc/mef-services:unis/mef-services:" +
1816                 "uni/mef-services:uni-id]" +
1817                 "[mef-interfaces:uni-id/../mef-interfaces:" +
1818                 "bundling-enabled = 'true']) = 0))" {
1819           error-message "For EP-LAN, Bundling must be disabled " +
1820                     "for all UNIs in the EVC UNI List.";
1821           description
1822                     "For EP-LAN, Bundling must be disabled for all UNIs " +
1823                     "in the EVC UNI List.";
1824         }
1825         must "(. != 'eplan') or ((. = 'eplan') and " +
1826                 "(count(/mef-interfaces:mef-interfaces/" +
1827                 "mef-interfaces:unis/mef-interfaces:uni" +
1828                 "[mef-interfaces:uni-id = current()/../" +
1829                 "mef-services:evc/mef-services:unis/" +
1830                 "mef-services:uni/mef-services:uni-id]" +
1831                 "[mef-interfaces:uni-id/../mef-interfaces:" +
1832                 "all-to-one-bundling-enabled = 'false']) = 0))" {
1833           error-message "For EP-LAN, All-to-One Bundling " +
1834                     "must be enabled for all UNIs in the " +
1835                     "EVC UNI List.";
1836           description
1837                     "For EP-LAN, All-to-One Bundling must be enabled " +
1838                     "for all UNIs in the EVC UNI List.";
1839         }
1840         must "(. != 'eplan') or ((. = 'eplan') and " +
1841                 "(count(/mef-interfaces:mef-interfaces/" +
1842                 "mef-interfaces:unis/mef-interfaces:uni" +
1843                 "[mef-interfaces:uni-id = current()/../" +
1844                 "mef-services:evc/mef-services:unis/" +
1845                 "mef-services:uni/mef-services:uni-id]" +
1846                 "[mef-interfaces:uni-id/../mef-interfaces:" +
1847                 "max-evc-count != 1]) = 0))" {
1848           error-message "For EP-LAN, Max EVC Count must be 1 " +
1849                     "for all UNIs in the EVC UNI List.";
1850           description
1851                     "For EP-LAN, Max EVC Count must be 1 for all UNIs in " +
1852                     "the EVC UNI List.";
1853         }
1854         must "(. != 'eplan') or ((. = 'eplan') and " +
1855                 "(../evc/evc-type = 'multipoint-to-multipoint'))" {
1856           error-message "For EP-LAN, EVC Type must be " +
1857                     "Multipoint-to-Multipoint.";
1858           description
1859                     "For EP-LAN, EVC Type must be " +
1860                     "Multipoint-to-Multipoint.";
1861         }
1862         must "(. != 'eplan') or ((. = 'eplan') and " +
1863                 "(../evc/preserve-ce-vlan-id = 'true'))" {
1864           error-message "For EP-LAN, CE-VLAN ID Preservation " +
1865                     "must be enabled.";
1866           description
1867                     "For EP-LAN, CE-VLAN ID Preservation must be enabled.";
1868         }
1869         must "(. != 'eplan') or ((. = 'eplan') and " +
1870                 "(../evc/cos-preserve-ce-vlan-id = 'true'))" {
1871           error-message "For EP-LAN, CE-VLAN ID CoS Preservation " +
1872                     "must be enabled.";
1873           description
1874                     "For EP-LAN, CE-VLAN ID CoS Preservation must be " +
1875                     "enabled.";
1876         }
1877         must "(. != 'evplan') or ((. = 'evplan') and " +
1878                 "(../evc/evc-type = 'multipoint-to-multipoint'))" {
1879           error-message "For EVP-LAN, EVC Type must be " +
1880                     "Multipoint-to-Multipoint.";
1881           description
1882                     "For EVP-LAN, EVC Type must be " +
1883                     "Multipoint-to-Multipoint.";
1884         }
1885         must "(. != 'evplan') or ((. = 'evplan') and " +
1886                 "(count(/mef-interfaces:mef-interfaces/" +
1887                 "mef-interfaces:unis/mef-interfaces:uni" +
1888                 "[mef-interfaces:uni-id = current()/../" +
1889                 "mef-services:evc/mef-services:unis/mef-services:" +
1890                 "uni/mef-services:uni-id]" +
1891                 "[mef-interfaces:uni-id/../mef-interfaces:" +
1892                 "all-to-one-bundling-enabled = 'true']) = 0))" {
1893           error-message "For EVP-LAN, All-to-One Bundling must " +
1894                     "be disabled for all UNIs in the EVC UNI List.";
1895           description
1896                     "For EVP-LAN, All-to-One Bundling must be disabled " +
1897                     "for all UNIs in the EVC UNI List.";
1898         }
1899         must "(. != 'eptree') or ((. = 'eptree') and " +
1900                 "(count(/mef-interfaces:mef-interfaces/" +
1901                 "mef-interfaces:unis/mef-interfaces:uni" +
1902                 "[mef-interfaces:uni-id = current()/../" +
1903                 "mef-services:evc/mef-services:unis/mef-services:" +
1904                 "uni/mef-services:uni-id]" +
1905                 "[mef-interfaces:uni-id/../mef-interfaces:" +
1906                 "svc-mux-enabled = 'true']) = 0))" {
1907           error-message "For EP-TREE, Service Multiplexing " +
1908                     "must be disabled for all UNIs in the " +
1909                     "EVC UNI List.";
1910           description
1911                     "For EP-TREE, Service Multiplexing must be disabled " +
1912                     "for all UNIs in the EVC UNI List.";
1913         }
1914         must "(. != 'eptree') or ((. = 'eptree') and " +
1915                 "(count(/mef-interfaces:mef-interfaces/" +
1916                 "mef-interfaces:unis/mef-interfaces:uni" +
1917                 "[mef-interfaces:uni-id = current()/../" +
1918                 "mef-services:evc/mef-services:unis/mef-services:" +
1919                 "uni/mef-services:uni-id]" +
1920                 "[mef-interfaces:uni-id/../mef-interfaces:" +
1921                 "bundling-enabled = 'true']) = 0))" {
1922           error-message "For EP-TREE, Bundling must be disabled " +
1923                     "for all UNIs in the EVC UNI List.";
1924           description
1925                     "For EP-TREE, Bundling must be disabled for all UNIs " +
1926                     "in the EVC UNI List.";
1927         }
1928         must "(. != 'eptree') or ((. = 'eptree') and " +
1929                 "(count(/mef-interfaces:mef-interfaces/" +
1930                 "mef-interfaces:unis/mef-interfaces:uni" +
1931                 "[mef-interfaces:uni-id = current()/../" +
1932                 "mef-services:evc/mef-services:unis/" +
1933                 "mef-services:uni/mef-services:uni-id]" +
1934                 "[mef-interfaces:uni-id/../mef-interfaces:" +
1935                 "all-to-one-bundling-enabled = 'false']) = 0))" {
1936           error-message "For EP-TREE, All-to-One Bundling must " +
1937                     "be enabled for all UNIs in the EVC UNI List.";
1938           description
1939                     "For EP-TREE, All-to-One Bundling must be enabled " +
1940                     "for all UNIs in the EVC UNI List.";
1941         }
1942         must "(. != 'eptree') or ((. = 'eptree') and " +
1943                 "(count(/mef-interfaces:mef-interfaces/" +
1944                 "mef-interfaces:unis/mef-interfaces:uni" +
1945                 "[mef-interfaces:uni-id = current()/../" +
1946                 "mef-services:evc/mef-services:unis/" +
1947                 "mef-services:uni/mef-services:uni-id]" +
1948                 "[mef-interfaces:uni-id/../mef-interfaces:" +
1949                 "max-evc-count != 1]) = 0))" {
1950           error-message "For EP-TREE, Max EVC Count must be 1 " +
1951                     "for all UNIs in the EVC UNI List.";
1952           description
1953                     "For EP-TREE, Max EVC Count must be 1 for all UNIs " +
1954                     "in the EVC UNI List.";
1955         }
1956         must "(. != 'eptree') or ((. = 'eptree') and " +
1957                 "(../evc/evc-type = 'rooted-multipoint'))" {
1958           error-message "For EP-TREE, EVC Type must be " +
1959                     "Rooted-Multipoint.";
1960           description
1961                     "For EP-TREE, EVC Type must be Rooted-Multipoint.";
1962         }
1963         must "(. != 'eptree') or ((. = 'eptree') and " +
1964                 "(../evc/preserve-ce-vlan-id = 'true'))" {
1965           error-message "For EP-TREE, CE-VLAN ID Preservation " +
1966                     "must be enabled.";
1967           description
1968                     "For EP-TREE, CE-VLAN ID Preservation must be enabled.";
1969         }
1970         must "(. != 'eptree') or ((. = 'eptree') and " +
1971                 "(../evc/cos-preserve-ce-vlan-id = 'true'))" {
1972           error-message "For EP-TREE, CE-VLAN ID " +
1973                     "CoS Preservation must be enabled.";
1974           description
1975                     "For EP-TREE, CE-VLAN ID CoS Preservation must be " +
1976                     "enabled.";
1977         }
1978         must "(. != 'evptree') or ((. = 'evptree') and " +
1979                 "(count(/mef-interfaces:mef-interfaces/" +
1980                 "mef-interfaces:unis/mef-interfaces:uni" +
1981                 "[mef-interfaces:uni-id = current()/../" +
1982                 "mef-services:evc/mef-services:unis/mef-services:" +
1983                 "uni/mef-services:uni-id]" +
1984                 "[mef-interfaces:uni-id/../mef-interfaces:" +
1985                 "all-to-one-bundling-enabled = 'true']) = 0))" {
1986           error-message "For EVP-TREE, All-to-One Bundling " +
1987                     "must be disabled for all UNIs in the EVC UNI List.";
1988           description
1989                     "For EVP-TREE, All-to-One Bundling must be disabled " +
1990                     "for all UNIs in the EVC UNI List.";
1991         }
1992         must "(. != 'evptree') or ((. = 'evptree') and " +
1993                 "(../evc/evc-type = 'rooted-multipoint'))" {
1994           error-message "For EVP-TREE, EVC Type must be " +
1995                     "Rooted-Multipoint.";
1996           description
1997                     "For EVP-TREE, EVC Type must be Rooted-Multipoint.";
1998         }
1999         description
2000                 "The MEF Service Type.";
2001       }
2002       leaf user-label {
2003         type mef-types:identifier45;
2004         description
2005                 "This MEF user label is set by the user to a value " +
2006                 "that is easier to identify than the Service ID.";
2007       }
2008       leaf svc-entity {
2009         type mef-types:service-entity-type;
2010         default "evc";
2011         description
2012                 "MEF Service Entity.";
2013         reference "[MEF12.2] Table 3.";
2014       }
2015       leaf tenant-id {
2016         type leafref {
2017           path "/mef-global:mef-global/mef-global:tenants-instances/mef-global:tenant-list/mef-global:name";
2018         }
2019       }
2020     }
2021   }
2022
2023   augment "/mef-services:mef-services/mef-services:mef-service/mef-services:mef-service-choice/mef-services:evc-choice/mef-services:evc" {
2024     ext:augment-identifier "evc-elan";
2025     leaf elan-id {type string;}
2026     list elan-ports {
2027       key "port-id";
2028       leaf port-id {type string;}
2029     }
2030   }
2031
2032   augment "/mef-services:mef-services/mef-services:mef-service/mef-services:mef-service-choice/mef-services:ipvc-choice/mef-services:ipvc" {
2033     ext:augment-identifier "ipvc-vpn";
2034     leaf vpn-id {type string;}
2035     list vpn-elans {
2036       key "uni-id ip-uni-id";
2037       leaf uni-id {type  mef-types:identifier45;}
2038       leaf ip-uni-id {type  mef-types:identifier45;}
2039       leaf elan-id {type string;}
2040       leaf elan-port {type string;}
2041       list subnets {
2042         key "subnet";
2043         leaf subnet {type string;}
2044       }
2045     }
2046   }
2047 }