added security group ref to unimgr
[unimgr.git] / legato-api / src / main / yang / mef-interfaces.yang
1 module mef-interfaces {
2   namespace "http://metroethernetforum.org/ns/yang/mef-interfaces";
3   prefix mef-interfaces;
4   import ietf-inet-types { prefix inet; }
5   import ietf-yang-types { prefix yang; }
6   import mef-types { prefix mef-types; }
7   import mef-global { prefix mef-global; }
8   import mef-topology { prefix mef-topology; }
9   import yang-ext {prefix ext; revision-date "2013-07-09";}
10
11   import opendaylight-l2-types { prefix ethertype; }
12   // revision-date "2013-08-27";
13
14   organization "Metro Ethernet Forum";
15   contact
16     "Web URL: http://metroethernetforum.org/ E-mail: mibs@metroethernetforum.org
17     Postal: Metro Ethernet Forum 6033 W. Century Boulevard, Suite
18     1107 Los Angeles, CA 90045 U.S.A. Phone: +1 310-642-2800 Fax:
19     +1 310-642-2808";
20   description
21     "This module implements the UNI functionality specified in MEF
22     10.3, MEF 6.2, and MEF 7.2. Reference Overview: A number of base
23     documents have been used to create the MEF Interfaces YANG Module.
24     The following are the abbreviations for the baseline documents:
25     [RFC 6991] refers to IETF RFC 6991 'Common YANG Data Types', 2013-07-15
26     [RFC 6643] refers to IETF RFC 6643 'Translation of Structure of
27     Management Information Version 2 (SMIv2) MIB Modules to YANG Modules',
28     2011-11-25 [802.1AB] refers to 'Station and Media Access Control
29     Connectivity Discovery', IEEE 802.1AB-2009, September 2009 [802.1q]
30     refers to IEEE 802.1Q-2011 'IEEE Standard for Local and metropolitan
31     area networks --Media Access Control (MAC) Bridges and Virtual
32     Bridged Local Area Networks, August 2011 [802-2001] refers to
33     'IEEE Standard for Local and Metropolitan Area Networks: Overview
34     and Architecture', IEEE 802-2001, February 2002 [MEF10.3] refers
35     to MEF 10.3 'Ethernet Services Attributes Phase 3', October 2013
36     [MEF6.2] refers to MEF 6.2 'EVC Ethernet Services Defintions Phase
37     3', August 2014 [MEF40] refers to MEF 40 'UNI and EVC Definition
38     of Managed Objects', April 2013 [MEF45] refers to MEF 45 'Multi-CEN
39     L2CP', August 2014 [MEF7.2] refers to MEF 7.2 'Carrier Ethernet
40     Management Information Model', April 2013 [MEF7.3] refers to MEF
41     7.3 'Carrier Ethernet Management Information Model', Working Draft
42     #1 2015 [RFC 2737] refers to IETF RFC 2737 'Entity MIB (Version
43     2)', December 1999 [RFC 2863] refers to IETF RFC 2863 'The Interfaces
44     Group MIB', June 2000 [RFC 3419] refers to IETF RFC 3419 'Textual
45     Conventions for Transport Addresses', December 2002 [Y.1731] refers
46     to ITU-T Y.1731 'OAM functions and mechanisms for Ethernet based
47     networks', July 2011 [Q.840.1] refers to ITU-T Q.840.1 'Requirements
48     and analysis for NMS-EMS management interface of Ethernet over
49     Transport and Metro Ethernet Network(EoT/MEN)' March 2007";
50   revision 2015-05-26 {
51     description
52         "Formal Project Review Draft 1.";
53     reference "EVC Ethernet Services Definitions YANG Modules " +
54         "(MEF XX), TBD";
55   }
56   container mef-interfaces {
57     description
58         "MEF Interfaces";
59     container unis {
60       description
61             "User Network Interface(UNI).";
62       list uni {
63         must "not(./ingress-bw-profile-per-uni) or " +
64                 "((./ingress-bw-profile-per-uni) and " +
65                 "not(./ingress-envelopes))" {
66           error-message "If there is a per UNI Ingress Bandwidth " +
67                     "Profile, then there cannot be any other Ingress " +
68                     "Bandwidth Profiles at that UNI.";
69           description
70                     "If there is a per UNI Ingress Bandwidth Profile, " +
71                     "then there cannot be any other Ingress Bandwidth " +
72                     "Profiles at that UNI.";
73         }
74         must "not(./egress-bw-profile-per-uni) or " +
75                 "((./egress-bw-profile-per-uni) and " +
76                 "not(./egress-envelopes))" {
77           error-message "If there is a per UNI Egress Bandwidth " +
78                     "Profile, then there cannot be any other Egress " +
79                     "Bandwidth Profiles at that UNI.";
80           description
81                     "If there is a per UNI Egress Bandwidth Profile, " +
82                     "then there cannot be any other Egress Bandwidth " +
83                     "Profiles at that UNI.";
84         }
85         must "(not(/mef-global:mef-global/mef-global:" +
86                 "subscribers) and " +
87                 "not(./subscriber)) or " +
88                 "(/mef-global:mef-global/mef-global:" +
89                 "subscribers and " +
90                 "./subscriber)" {
91           error-message "If the Subscribers list has been " +
92                     "populated, a UNI must be configured for " +
93                     "a single Subscriber.";
94           description
95                     "[MEF103] [R1] A UNI must be dedicated to a single " +
96                     "Subscriber. This must statement is effectively " +
97                     "a 'mandatory true' when the Global Subscribers " +
98                     "list is being used.";
99         }
100         must "(not(/mef-global:mef-global/mef-global:cens) and " +
101                 "not(./cen-id)) or " +
102                 "(/mef-global:mef-global/mef-global:cens and " +
103                 "./cen-id)" {
104           error-message "If the CENs list has been populated, " +
105                     "a UNI must be configured for a single CEN.";
106           description
107                     "[MEF103] [R57] A UNI must be dedicated to a " +
108                     "single CEN. This must statement is effectively " +
109                     "a 'mandatory true' when the Global CENs list " +
110                     "is being used.";
111         }
112         key "uni-id";
113         description
114                 "MEF UNI List.";
115         reference "[MEF6.2] Section 8.2.2.";
116         container ip-unis {
117           list ip-uni {
118             key "ip-uni-id";
119             leaf ip-uni-id {
120                             description "";
121               type mef-types:identifier45;
122             }
123             leaf ip-address {
124               type inet:ip-prefix;
125             }
126             leaf vlan {
127               type ethertype:vlan-id;
128             }
129             leaf segmentation-id {
130               type uint32;
131             }
132           }
133         }
134         container physical-layers {
135           description
136                     "The Physical Layer MUST operate in a full duplex " +
137                     "mode. It is not configurable.";
138           reference "[MEF10.3] Section 9.2, [R61], [R62]";
139           container links {
140             presence "A UNI must have links.";
141             description
142                         "The Physical Layer for each physical link " +
143                         "implementing the UNI MUST be one of the " +
144                         "PHYs listed in IEEE Std 802.3–2012 but " +
145                         "excluding 1000BASE-PX-D and 1000BASE-PX-U.";
146             reference "[MEF10.3] Section 9.2 [R60]";
147             list link {
148               must "count(.) >= 1" {
149                 error-message "A UNI must have at least one " +
150                                 "physical link configured.";
151                 description
152                                 "A UNI must have at least one physical link " +
153                                 "configured.";
154               }
155               key "device interface";
156               description
157                             "A list of all the physical ports associated " +
158                             "with this Link Layer.";
159               leaf device {
160                 type leafref {
161                   path "/mef-topology:mef-topology/mef-topology:" +
162                                     "devices/mef-topology:device/" +
163                                     "mef-topology:dev-id";
164                 }
165                 description
166                                 "The Physical Layer for each physical link " +
167                                 "implementing the UNI MUST be one of the " +
168                                 "PHYs listed in IEEE Std 802.3–2012 but " +
169                                 "excluding 1000BASE-PX-D and 1000BASE-PX-U.";
170                 reference "[MEF10.3] Section 9.2 [R60]";
171               }
172               leaf interface {
173                 type leafref {
174                   path "/mef-topology:mef-topology/mef-topology:" +
175                                     "devices/mef-topology:device" +
176                                     "[mef-topology:dev-id = " +
177                                     "current()/../device]" +
178                                     "/mef-topology:interfaces/mef-topology:" +
179                                     "interface/mef-topology:phy";
180                 }
181                 description
182                                 "The Physical Layer for each physical link " +
183                                 "implementing the UNI MUST be one of the " +
184                                 "PHYs listed in IEEE Std 802.3–2012 but " +
185                                 "excluding 1000BASE-PX-D and 1000BASE-PX-U.";
186                 reference "[MEF10.3] Section 9.2 [R60]";
187               }
188               leaf ieee8023-phy {
189                 type identityref {
190                   base mef-types:ieee-8023-interface-type;
191                 }
192                 must "(. != 'mef-types:" +
193                                 "ieee8023-1000BASE-PX-D') and " +
194                                 "(. != 'mef-types:ieee8023-1000BASE-PX-U')" {
195                   error-message "The Physical Layer for each " +
196                                     "physical link implementing the UNI " +
197                                     "cannot be 1000BASE-PX-D and 1000BASE-PX-U.";
198                   description
199                                     "The Physical Layer for each physical " +
200                                     "link implementing the UNI cannot be " +
201                                     "1000BASE-PX-D and 1000BASE-PX-U.";
202                 }
203                 description
204                                 "The Physical Layer for each physical link " +
205                                 "implementing the UNI MUST be one of the " +
206                                 "PHYs listed in IEEE Std 802.3–2012 but " +
207                                 "excluding 1000BASE-PX-D and 1000BASE-PX-U.";
208                 reference "[MEF10.3] Section 9.2 [R60]";
209               }
210               leaf connection-speed {
211                 type mef-types:ext-if-physical-layer-type;
212                 units "bits-per-second";
213                 default "1G";
214                 description
215                                 "Physical Layer Connection Speed (Max Data Rate).";
216                 reference "[MEF10.3] Section 9.2. [MEF6.2] " +
217                                 "Section 8.2.2. [MEF20] [R80].";
218               }
219               leaf phy-auto-neg {
220                 type mef-types:auto-negotiation-type;
221                 default "on";
222                 description
223                                 "Auto-Negotiation ON/OFF/Auto.";
224                 reference "[MEF6.2] Section 8.2.2. [MEF20] [R80]. " +
225                                 "[MEF7.3] Section 10.2.2.";
226               }
227               leaf sync-mode-enabled {
228                 type boolean;
229                 must ".='false' or (.='true' and " +
230                                 "../clock-accuracy)" {
231                   error-message "The quality of the clock " +
232                                     "reference must be set if Synchronous " +
233                                     "Mode is enabled.";
234                   description
235                                     "The quality of the clock reference must " +
236                                     "be set if Synchronous Mode is enabled.";
237                 }
238                 default "false";
239                 description
240                                 "Enabled or Disabled for each physical link " +
241                                 "implementing the UNI.";
242                 reference "[MEF10.3] Section 9.3. [MEF6.2] " +
243                                 "Section 8.2.2. [MEF7.3] Section 10.2.2.";
244               }
245               leaf clock-accuracy {
246                 type decimal64 {
247                   fraction-digits 3;
248                 }
249                 units "ppm";
250                 description
251                                 "ESMC:Ethernet Equipment Slave Clock Accuracy " +
252                                 "in PPM. IEEE 802.3 standard specifies " +
253                                 "that Ethernet clock accuracy is to be less " +
254                                 "than or equal to +- 4.6 PPM.";
255                 reference "[MEF10.3] Section 9.3, [R62]. " +
256                                 "[MEF22.1], [IEEE802.3].";
257               }
258             }
259           }
260           leaf number-of-links {
261             type uint32 {
262               range "1..max";
263             }
264             must ". = count(../links/link)" {
265               error-message "The UNI Number of Links value " +
266                             "must match to the number of interfaces " +
267                             "in the link list.";
268               description
269                             "The UNI Number of Links value must match " +
270                             "to the number of interfaces in the link list.";
271             }
272             default "1";
273             description
274                         "The number of links configured in the links list.";
275             reference "[MEF10.3] [R63]. [MEF7.3] Section 10.2.2.";
276           }
277         }
278         container ce-vlans {
279           description
280                     "Each Device (and by extension UNIs) MUST have list " +
281                     "of the CE-VLAN ID including mappings to configured " +
282                     "EVCs if assigned. This list of ce-vlans is a " +
283                     "complete list of all VLANs associated with this " +
284                     "UNI. At the Service Module level, there are two " +
285                     "lists: This one and the list of CE-VLAN IDs " +
286                     "associated with the EVC's UNI List as part of " +
287                     "the MEF Service Definition. ";
288           reference "[MEF10.3] Section 9.10, [R77], [R78]. " +
289                     "[MEF7.3] Section 10.2.2.";
290           list ce-vlan {
291             key "vid";
292             description
293                         "A list of all EC-VLANs allowed ingres or egress " +
294                         "on the UNI. This is the UNI-specific CE-VLAN ID " +
295                         "listing as part of the Service Level " +
296                         "CE-VLAN ID / EVC Map.";
297             reference "[MEF10.3] Section 9.10.1.";
298             leaf vid {
299               type mef-types:vlan-id-type;
300               description
301                             "The Customer Edge VLAN ID is equivalent " +
302                             "to a Static VLAN allowed on that port " +
303                             "(ie. Port is not Forbidden). The " +
304                             "association with the EVC is part of " +
305                             "the EVC configuration.";
306               reference "[MEF10.3] Section 9.10.";
307             }
308           }
309         }
310         container ingress-envelopes {
311           presence "Ingress Bandwidth Profile Envelopes " +
312                     "configured.";
313           description
314                     "UNI Bandwidth Profile Flow Envelopes.";
315           reference "[MEF10.3] Section 9.15, Section 12.1. " +
316                     "[MEF6.2] Section 8.2.1: [R3]. " +
317                     "[MEF7.3] Section 10.2.2.";
318           list envelope {
319             key "env-id";
320             description
321                         "UNI Bandwidth Profile Flow Envelope List.";
322             reference "[MEF10.3] Section 9.15, Section 12.1. " +
323                         "[MEF6.2] Section 8.2.1, [R3], " +
324                         "Section 8.2.2, [R4]. [MEF7.3] " +
325                         "Section 10.2.2.";
326             container bwp-flows {
327               presence "Bandwidth Profile configured for " +
328                             "this envelope.";
329               description
330                             "UNI Bandwidth Profile Flows per Envelope.";
331               reference "[MEF10.3] Section 12.1. " +
332                             "[MEF6.2] Section 10.1.";
333               list bwp-flow {
334                 key "bw-profile";
335                 ordered-by user;
336                 description
337                                 "UNI Bandwidth Profile Flow List per Envelope. " +
338                                 "The order of entries in the list is user " +
339                                 "controlled. The first element of the list " +
340                                 "has the lowest priority and the last " +
341                                 "element will have the highest priority.";
342                 reference "[MEF10.3] Section 12.1. " +
343                                 "[MEF6.2] Section 10.1. " +
344                                 "[MEF6.2] Section 8.2.1, [R3]. ";
345                 leaf bw-profile {
346                   type leafref {
347                     path "/mef-global:mef-global/mef-global:" +
348                                         "profiles/mef-global:" +
349                                         "ingress-bwp-flows/mef-global:" +
350                                         "bwp-flow/mef-global:bw-profile";
351                   }
352                   must "(../../../../../token-share-enabled = " +
353                                     "'true') or " +
354                                     "((../../../../../token-share-enabled = " +
355                                     "'false') and " +
356                                     "(count(../../bwp-flow) = 1))" {
357                     error-message "A UNI with Token Share " +
358                                         "Disabled MUST have exactly one " +
359                                         "Bandwidth Profile Flow per envelope.";
360                     description
361                                         "A UNI with Token Share Disabled MUST " +
362                                         "have exactly one Bandwidth Profile Flow " +
363                                         "per envelope.";
364                   }
365                   must "(../../../coupling-enabled = 'false') or " +
366                                     "(/mef-global:mef-global/mef-global:" +
367                                     "profiles/mef-global:" +
368                                     "ingress-bwp-flows/mef-global:bwp-flow" +
369                                     "[mef-global:bw-profile = current()]/" +
370                                     "mef-global:coupling-enabled = 'false')" {
371                     error-message "If an Ingress Envelope's " +
372                                         "Coupling Flag is Enabled, then " +
373                                         "the Coupling Flags must be disabled " +
374                                         "for all Bandwidth Profile Flows " +
375                                         "mapped to the Envelope.";
376                     description
377                                         "If an Ingress Envelope's Coupling Flag is " +
378                                         "Enabled, then the Coupling Flags must " +
379                                         "be disabled for all Bandwidth Profile " +
380                                         "Flows mapped to the Envelope.";
381                   }
382                   description
383                                     "If no Ingress Bandwidth Profile per UNI " +
384                                     "has been defined (ie. 'No'), then the " +
385                                     "behavior has been defined at the Service " +
386                                     "Level of the configuration.";
387                   reference "[MEF10.3] Section 9.14, " +
388                                     "Section 12.1, [R84], [R134]. " +
389                                     "[MEF6.2] Section 8.2.1,[R3],[R136]. " +
390                                     "Section 8.2.2, 10.1, [R6]. [MEF7.3] " +
391                                     "Section 10.2.2.";
392                 }
393               }
394             }
395             leaf env-id {
396               type mef-types:identifier45;
397               description
398                             "This attribute identifies the Envelope of " +
399                             "Bandwidth Profile Parameters.";
400               reference "[MEF10.3] Section 12.1.";
401             }
402             leaf coupling-enabled {
403               type boolean;
404               must "not(../bwp-flows) or " +
405                             "(../bwp-flows/bwp-flow[2]) or " +
406                             "(. = 'false')" {
407                 error-message "When only one Bandwidth Profile " +
408                                 "Flow is mapped to an envelope, Envelope " +
409                                 "Coupling must be Disabled.";
410                 description
411                                 "When only one Bandwidth Profile Flow is " +
412                                 "mapped to an envelope, Envelope " +
413                                 "Coupling must be Disabled.";
414               }
415               default "false";
416               description
417                             "The Envelope Coupling Flag (CF) attribute.";
418               reference "[MEF10.3] Section 12.1.";
419             }
420           }
421         }
422         container egress-envelopes {
423           presence "Egress Bandwidth Profile Envelopes configured.";
424           description
425                     "UNI Bandwidth Profile Flow Envelopes.";
426           reference "[MEF10.3] Section 9.15, Section 12.1. " +
427                     "[MEF6.2] Section 8.2.1: [R3]. " +
428                     "[MEF7.3] Section 10.2.2.";
429           list envelope {
430             key "env-id";
431             description
432                         "UNI Bandwidth Profile Flow Envelope List.";
433             reference "[MEF10.3] Section 9.15, Section 12.1. " +
434                         "[MEF6.2] Section 8.2.1, [R3], " +
435                         "Section 8.2.2, [R4]. [MEF7.3] " +
436                         "Section 10.2.2.";
437             container bwp-flows {
438               presence "Bandwidth Profile configured for " +
439                             "this envelope.";
440               description
441                             "UNI Bandwidth Profile Flows per Envelope.";
442               reference "[MEF10.3] Section 12.1. [MEF6.2] " +
443                             "Section 10.1.";
444               list bwp-flow {
445                 key "bw-profile";
446                 ordered-by user;
447                 description
448                                 "UNI Bandwidth Profile Flow List per Envelope. " +
449                                 "The order of entries in the list is user " +
450                                 "controlled. The first element of the list " +
451                                 "has the lowest priority and the last element " +
452                                 "will have the highest priority.";
453                 reference "[MEF10.3] Section 12.1. " +
454                                 "[MEF6.2] Section 10.1. " +
455                                 "[MEF6.2] Section 8.2.1, [R3]. ";
456                 leaf bw-profile {
457                   type leafref {
458                     path "/mef-global:mef-global/mef-global:" +
459                                         "profiles/mef-global:egress-bwp-flows" +
460                                         "/mef-global:bwp-flow/" +
461                                         "mef-global:bw-profile";
462                   }
463                   must "(../../../../../token-share-enabled = " +
464                                     "'true') or " +
465                                     "((../../../../../token-share-enabled = " +
466                                     "'false') and " +
467                                     "(count(../../bwp-flow) = 1))" {
468                     error-message "A UNI with Token Share " +
469                                         "Disabled must have exactly one " +
470                                         "Bandwidth Profile Flow per envelope.";
471                     description
472                                         "A UNI with Token Share Disabled must have " +
473                                         "exactly one Bandwidth Profile Flow per " +
474                                         "envelope.";
475                   }
476                   must "(../../../coupling-enabled = 'false') or " +
477                                     "(/mef-global:mef-global/mef-global:" +
478                                     "profiles/mef-global:" +
479                                     "egress-bwp-flows/mef-global:bwp-flow" +
480                                     "[mef-global:bw-profile = current()]/" +
481                                     "mef-global:coupling-enabled = 'false')" {
482                     error-message "If an Egress Envelope's " +
483                                         "Coupling Flag is Enabled, then the " +
484                                         "Coupling Flags must be disabled " +
485                                         "for all Bandwidth Profile Flows " +
486                                         "mapped to the Envelope.";
487                     description
488                                         "If an Egress Envelope's Coupling Flag " +
489                                         "is Enabled, then the Coupling Flags must " +
490                                         "be disabled for all Bandwidth Profile " +
491                                         "Flows mapped to the Envelope.";
492                   }
493                   description
494                                     "UNI Bandwidth Profile Flow per Envelope.";
495                   reference "[MEF10.3] Section 12.1. " +
496                                     "[MEF6.2] Section 10.1. " +
497                                     "[MEF6.2] Section 8.2.1, [R3], [R136]. ";
498                 }
499               }
500             }
501             leaf env-id {
502               type mef-types:identifier45;
503               description
504                             "This attribute identifies the Envelope of " +
505                             "Bandwidth Profile Parameters.";
506               reference "[MEF10.3] Section 12.1.";
507             }
508             leaf coupling-enabled {
509               type boolean;
510               must "not(../bwp-flows) or " +
511                             "(../bwp-flows/bwp-flow[2]) or " +
512                             "(. = 'false')" {
513                 error-message "When only one Bandwidth Profile " +
514                                 "Flow is mapped to an envelope, " +
515                                 "Envelope Coupling must be Disabled.";
516                 description
517                                 "When only one Bandwidth Profile Flow is " +
518                                 "mapped to an envelope, Envelope Coupling " +
519                                 "must be Disabled.";
520               }
521               default "false";
522               description
523                             "The Envelope Coupling Flag (CF) attribute.";
524               reference "[MEF10.3] Section 12.1.";
525             }
526           }
527         }
528         container status {
529           description
530                     "This group is related to the MEF 7.3 External " +
531                     "Network Interface";
532           leaf oper-state-enabled {
533             type boolean;
534             default "false";
535             config false;
536             description
537                         "Operational Status of the Link as " +
538                         "Enabled/Disabled.";
539             reference "[MEF15]. [MEF7.3] Section 10.1.1.";
540           }
541           leaf available-status {
542             type mef-types:ext-if-availability-type;
543             default "not-installed";
544             config false;
545             description
546                         "Availability Status of the Link.";
547             reference "[MEF15]. [MEF7.3] Section 10.1.1.";
548           }
549           leaf physical-layer {
550             type mef-types:ext-if-physical-layer-type;
551             default "1G";
552             config false;
553             description
554                         "Physical Layer Connection Speed.";
555             reference "[MEF15]. [MEF7.3] Section 10.1.1.";
556           }
557           leaf number-of-links {
558             type uint32;
559             default "0";
560             config false;
561             description
562                         "A count of the number of physical links in this " +
563                         "physical layer.";
564             reference "[MEF15]. [MEF7.3] Section 10.1.1.";
565           }
566           leaf svc-frame-format {
567             type mef-types:svc-frame-format-type;
568             default "ctag";
569             config false;
570             description
571                         "The format must be that of a MAC Frame specified " +
572                         "in IEEE Std 802.3-2012 Clause 3.";
573             reference "[MEF10.3] Section 9.6. [MEF15]. " +
574                         "[MEF7.2]. [MEF7.3] Section 10.1.1.";
575           }
576         }
577         leaf cen-id {
578           when "/mef-global:mef-global/mef-global:cens" {
579             description
580                         "Only configure when the Global CENs list " +
581                         "has been populated.";
582           }
583           type leafref {
584             path "/mef-global:mef-global/mef-global:cens/" +
585                         "mef-global:cen/mef-global:cen-id";
586           }
587           description
588                     "A CEN is defined as a network from a Service " +
589                     "Provider (SP). The CEN ID must be unique for " +
590                     "a specific Service Provider.";
591           reference "[MEF10.3] Section 7.";
592         }
593         leaf uni-id {
594           type mef-types:identifier45;
595           description
596                     " The UNI IDs must be be unique within a specific CEN.";
597           reference "[MEF10.3] Section 9.1, [R1], [R57], [R58], " +
598                     "[R59]. [MEF7.3] Section 10.2.2.";
599         }
600         leaf uni-type {
601           type mef-types:uni-mode-type;
602           default "uni";
603           description
604                     " The UNI Type must be one of {UNI, VUNI}.";
605           reference "[MEF10.3] Section 9.1, [R1], [R57], [R58], " +
606                     "[R59]. [MEF7.3] Section 10.2.2.";
607         }
608         leaf subscriber {
609           when "/mef-global:mef-global/mef-global:subscribers" {
610             description
611                         "UNI Subscriber Attribute is only configurable " +
612                         "when multiple Global Subscribers have been " +
613                         "configured.";
614           }
615           type leafref {
616             path "/mef-global:mef-global/mef-global:subscribers/" +
617                         "mef-global:subscriber/mef-global:sub-id";
618           }
619           description
620                     "A UNI MUST be dedicated to a single Subscriber. " +
621                     "This value can only be configured if the " +
622                     "'/mef-global/subscribers/subscriber' list " +
623                     "has been populated.";
624           reference "[MEF10.3] Section 7.";
625         }
626         leaf admin-state-enabled {
627           type boolean;
628           default "true";
629           description
630                     "Locked/Unlocked is inconsistent with Oper Status " +
631                     "and will be confusing.";
632           reference "MEF 15. MEF 7.3 Section 10.1.1.";
633         }
634         leaf mac-address {
635           type yang:mac-address;
636           description
637                     "MAC Address.";
638           reference "[MEF15]. [MEF7.3] Section 10.1.1.";
639         }
640         leaf uni-resiliency {
641           type mef-types:uni-resiliency-type;
642           must "(. != 'none') or ((. = 'none') and " +
643                     "(../physical-layers/number-of-links = 1))" {
644             error-message "If uni-resiliency is 'none', " +
645                         "number-of-links must be 1.";
646             description
647                         "If uni-resiliency is 'none', number-of-links " +
648                         "must be 1.";
649           }
650           must "(. != 'dual-link-aggregation') or " +
651                     "((. = 'dual-link-aggregation') and " +
652                     "(../physical-layers/number-of-links = 2))" {
653             error-message "If uni-resiliency is " +
654                         "'dual-link-aggregation', " +
655                         "number-of-links must be 2.";
656             description
657                         "If uni-resiliency is 'dual-link-aggregation', " +
658                         "number-of-links must be 2.";
659           }
660           must "(. != 'other') or " +
661                     "((. = 'other') and " +
662                     "(../physical-layers/number-of-links > 2))" {
663             error-message "If uni-resiliency is 'other', " +
664                         "number-of-links must be 3 or greater.";
665             description
666                         "If uni-resiliency is 'other', number-of-links " +
667                         "must be 3 or greater.";
668           }
669           default "none";
670           description
671                     "UNI Resiliency.";
672           reference "[MEF10.3] Section 9.5 [R64], [R65], [R66], " +
673                     "[R67]. [MEF6.2] Section 8.2.2.";
674         }
675         leaf max-svc-frame-size {
676           type mef-types:max-svc-frame-size-type;
677           default "1600";
678           description
679                     "This attribute describes the maximum service frame " +
680                     "size for the UNI.";
681           reference "[MEF10.3] Section 9.7, [R71], MEF 6.2 " +
682                     "Section 8.2.2 and MEF 22.1: [D2]. " +
683                     "[MEF7.3] Section 10.2.2.";
684         }
685         leaf svc-mux-enabled {
686           type boolean;
687           default "false";
688           description
689                     "Service Multiplexing Enable - Enable if to support " +
690                     "multiple EVCs per UNI.";
691           reference "[MEF10.3] Section 9.8. " +
692                     "[MEF7.3] Section 10.2.2.";
693         }
694         leaf bundling-enabled {
695           type boolean;
696           default "false";
697           description
698                     "When a UNI has Bundling Enabled, it MUST be able to " +
699                     "support more than one CE-VLAN ID mapping to a " +
700                     "particular EVC at the UNI.  When more than one " +
701                     "CE-VLAN-ID is mapped to an EVC at a UNI, the " +
702                     "EVC have CE-VLAN ID Preservation enabled";
703           reference "[MEF10.3] Section 9.12, [R25], [R77], " +
704                     "[R78], [R80]. [MEF7.3] Section 10.2.2.";
705         }
706         leaf all-to-one-bundling-enabled {
707           type boolean;
708           default "false";
709           description
710                     "When all-to-one-bundling-enabled = true, all " +
711                     "CE-VLAN IDs MUST map to a single EVC at the " +
712                     "UNI. This also means that the UNI cannot " +
713                     "have svc-mux-enabled = true. When " +
714                     "all-to-one-bundling-enabled = true, " +
715                     "all other UNIs in the EVC associating this UNI " +
716                     "must have all-to-one-bundling-enabled = true. " +
717                     "If this values is true, the value of " +
718                     "ce-vlan-id-for-untagged-and-priority is not " +
719                     "applicable.";
720           reference "[MEF10.3] Section 9.13, Table 12 " +
721                     "(5 valid combinations), [R82], [R83]. " +
722                     "[MEF7.3] Section 10.2.2.";
723         }
724         leaf ce-vlan-id-for-untagged-and-priority {
725           type mef-types:vlan-id-type;
726           default "1";
727           description
728                     "The ce-vlan-id-for-untagged-and-priority is " +
729                     "equivalent to the Layer 2 PVID (Port VLAN ID) " +
730                     "with the Q-BRIDGE-MIB option for frame admitance set " +
731                     "to admitAll. With AdmitAll set, all Untagged and " +
732                     "Priority Tagged Service Frames are treated with " +
733                     "the CE-VLAN-ID tag on ingress. It is not applicable " +
734                     "if All in One Bundling is enabled.";
735           reference "[MEF10.3] Section 9.9, [R73], [R74], " +
736                     "[R75]. [MEF7.3] Section 10.2.2.";
737         }
738         leaf max-evc-count {
739           type uint32 {
740             range "1..max";
741           }
742           default "1";
743           description
744                     "The Maximum Number of EVCs that can be supported " +
745                     "by this UNI (Default 1).";
746           reference "[MEF10.3] Section 9.11, [R79]. " +
747                     "[MEF7.3] Section 10.2.2.";
748         }
749         leaf token-share-enabled {
750           type boolean;
751           default "false";
752           description
753                     "Token Share Enabled/Disabled is used to indicate " +
754                     "whether a given UNI is capable of sharing tokens " +
755                     "across Bandwidth Profile Flows in an envelope.";
756           reference "[MEF6.2] Section 8.2.1, [R2], [D1], [R3]. " +
757                     "[MEF7.3] Section 10.2.2.";
758         }
759         leaf ingress-bw-profile-per-uni {
760           type leafref {
761             path "/mef-global:mef-global/mef-global:profiles/" +
762                         "mef-global:ingress-bwp-flows/mef-global:" +
763                         "bwp-flow/mef-global:bw-profile";
764           }
765           description
766                     "Ingress Bandwidth Profile for this UNI.";
767           reference "[MEF10.3] Section 9.15, Section 12.1. " +
768                     "[MEF6.2] Section 8.2.1: [R3]. " +
769                     "[MEF7.3] Section 10.2.2.";
770         }
771         leaf egress-bw-profile-per-uni {
772           type leafref {
773             path "/mef-global:mef-global/mef-global:profiles/" +
774                         "mef-global:egress-bwp-flows/mef-global:" +
775                         "bwp-flow/mef-global:bw-profile";
776           }
777           description
778                     "Egress Bandwidth Profile Flow for this UNI.";
779           reference "[MEF10.3] Section 9.15, Section 12.1. " +
780                     "[MEF6.2] Section 8.2.1: [R3]. " +
781                     "[MEF7.3] Section 10.2.2.";
782         }
783         leaf link-oam-enabled {
784           type boolean;
785           default "false";
786           description
787                     "Link OAM Enabled/Disabled.";
788           reference "[MEF10.3] Section 9.16, [R86]. " +
789                     "[MEF6.2] Section 8.2.2, [D3]. " +
790                     "[MEF7.3] Section 10.2.2.";
791         }
792         leaf uni-meg-enabled {
793           type boolean;
794           default "false";
795           description
796                     "Enables / Disables the Maintenance Entity Group (MEG).";
797           reference "[MEF10.3] Section 9.17, [R87]. " +
798                     "[MEF30.1] Section 7.9. [MEF6.2] Section 8.2.2, " +
799                     "[D4]. [MEF7.3] Section 10.2.2.";
800         }
801         leaf elmi-enabled {
802           type boolean;
803           must "(. = 'false') or " +
804                     "(. = 'true' and " +
805                     "(../elmi-profile))" {
806             error-message "ELMI Profile must be set if " +
807                         "ELMI is Enabled.";
808             description
809                         "Ethernet Local Management Interface(ELMI) " +
810                         "Profile ID must be set if ELMI is Enabled.";
811           }
812           default "false";
813           description
814                     "Ethernet Local Management Interface(ELMI) " +
815                     "Enabled / Disabled.";
816           reference "[MEF10.3] Section 9.18, [R88]. " +
817                     "[MEF16]. [MEF6.2] Section 8.2.2, [D5]. " +
818                     "[MEF7.3] Section 10.2.2.";
819         }
820         leaf elmi-profile {
821           type leafref {
822             path "/mef-global:mef-global/mef-global:profiles/" +
823                         "mef-global:elmi/mef-global:elmi-profile/" +
824                         "mef-global:id";
825           }
826           description
827                     "The ELMI Profile is only applicable when ELMI " +
828                     "is enabled. The E-LMI protocol is based on " +
829                     "ITU-T Q.933, X.36 and other relevant " +
830                     "recommendations as well as Frame Relay " +
831                     "Local Management Interface (FR-LMI) " +
832                     "Implementation Agreement document defined " +
833                     "by the Frame Relay Forum and related " +
834                     "ITU-T recommendations.";
835           reference "[MEF10.3] Section 9.18. " +
836                     "[MEF7.3] Section 10.2.2.";
837         }
838         leaf l2cp-address-set {
839           type mef-types:l2cp-address-set-type;
840           default "aware-cta";
841           description
842                     "The L2CP Address Set Service Attribute specifies " +
843                     "the subset of the Bridge Reserved Addresses " +
844                     "that are filtered (i.e. L2CP Frames with " +
845                     "this destination address are Peered or " +
846                     "Discarded but not Passed) at a L2CP Decision Point.";
847           reference "[MEF10.3] Section 9.19. " +
848                     "[MEF45] Section 8.1, [R2] through [R9]. " +
849                     "[MEF6.2] Section 8.2.2, [R1]. " +
850                     "[MEF45] Section 8.1.";
851         }
852         leaf l2cp-peering-profile {
853           type leafref {
854             path "/mef-global:mef-global/mef-global:profiles/" +
855                         "mef-global:l2cp-peering/mef-global:" +
856                         "l2cp-profile/mef-global:id";
857           }
858           description
859                     "L2CP Peering Profile for this UNI. This profile " +
860                     "may contain groups of L2CP Destination " +
861                     "MAC Addresses and protocols to be peered at " +
862                     "the UNI (as opposed to being passed or discarded).";
863           reference "[MEF10.3] Section 9.19. " +
864                     "[MEF45] Section 8.2. " +
865                     "[MEF7.3] Section 10.2.2.";
866         }
867         leaf tenant-id {
868           type leafref {
869             path "/mef-global:mef-global/mef-global:tenants-instances/mef-global:tenant-list/mef-global:name";
870           }
871         }
872       }
873     }
874
875     container subnets {
876       list subnet {
877         key "uni-id ip-uni-id subnet";
878         leaf uni-id {
879           type leafref {
880             path "/mef-interfaces:mef-interfaces/mef-interfaces:unis/mef-interfaces:uni/mef-interfaces:uni-id";
881           }
882         }
883         leaf ip-uni-id {
884           type leafref {
885             path "/mef-interfaces:mef-interfaces/mef-interfaces:unis/mef-interfaces:uni/" +
886                  "mef-interfaces:ip-unis/mef-interfaces:ip-uni/mef-interfaces:ip-uni-id";
887           }
888         }
889         leaf subnet {type inet:ip-prefix;}
890         leaf gateway {type inet:ip-address;}
891       }
892     }
893
894   }
895
896   augment "/mef-interfaces:mef-interfaces/mef-interfaces:unis/mef-interfaces:uni" {
897     ext:augment-identifier "port-vlan-mapping";
898     list vlan-to-port {
899       key "vlan";
900       leaf vlan {
901         type mef-types:vlan-id-or-none-type;
902       }
903       leaf vlan-port-id {
904         type string;
905       }
906     }
907   }
908
909 }