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