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