Renamed artifacts to reflect the project's name.
[unimgr.git] / api / src / main / yang / cl-unimgr-mef.yang
1 /*\r
2  * Copyright (c) 2015 Cable Television Laboratories, Inc. All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL\r
7  */\r
8 \r
9 // Constructed based on Adolfo's UML UNI model\r
10 // UNI\r
11 // + uniIdentifier : string\r
12 // + physicalMedium : string = UNI Type 2 Physical Interface\r
13 // + speed : string = Set (10M, 100M, 10M/100M, 10M/100M/1000M, 1G, 10G>\r
14 // + mode : string = Full Duplex\r
15 // + macLayer : string = IEEE 802.3-2005\r
16 // + type : string\r
17 // + uniMtuSize : int = [uniMtuSize >= 1522]\r
18 \r
19 module cl-unimgr-mef {\r
20 \r
21     yang-version 1;\r
22     namespace "urn:opendaylight:params:xml:ns:yang:unimgr";\r
23     prefix "unimgr";\r
24 \r
25     import ietf-yang-types { prefix yang; revision-date 2013-07-15; }\r
26     import ietf-inet-types { prefix inet; revision-date 2010-09-24; }\r
27     import network-topology { prefix topo; revision-date 2013-10-21; }\r
28 \r
29     revision "2015-06-22" {\r
30         description "Initial revision of unimgr model";\r
31     }\r
32 \r
33     grouping service-speed {\r
34         choice speed {\r
35             case speed-10M {\r
36                 leaf speed-10M {\r
37                     type empty;\r
38                 }\r
39             }\r
40             case speed-100M {\r
41                 leaf speed-100M {\r
42                     type empty;\r
43                 }\r
44             }\r
45             case speed-1G {\r
46                 leaf speed-1G {\r
47                     type empty;\r
48                 }\r
49             }\r
50             case speed-10G {\r
51                 leaf speed-10G {\r
52                     type empty;\r
53                 }\r
54             }\r
55         }\r
56     }\r
57 \r
58     // represent simplification of MEF Per Uni Attributes\r
59     grouping uni {\r
60         leaf id {\r
61             type topo:node-id;\r
62             mandatory true;\r
63             description "Uniquely identifies the uni";\r
64         }\r
65         leaf ovsdb-node-id {\r
66             type topo:node-id;\r
67             mandatory false;\r
68             description "Uniquely identifies the uni and ovsdb";\r
69         }\r
70         leaf physical-medium {\r
71             type string;\r
72             default "UNI TypeFull Duplex 2 Physical Interface";\r
73         }\r
74         leaf ip-address {\r
75             type inet:ip-address;\r
76         }\r
77         leaf mac-address {\r
78            type yang:mac-address;\r
79         }\r
80         container speed {\r
81             uses service-speed;\r
82         }\r
83         leaf mode {\r
84             type string;\r
85             default "Full Duplex";\r
86         }\r
87         leaf mac-layer {\r
88             type string;\r
89             default "IEEE 802.3-2005";\r
90         }\r
91         leaf type {\r
92             type string;\r
93         }\r
94         leaf mtu-size {\r
95             type uint64;\r
96             units byte;\r
97         }\r
98     }\r
99 \r
100     // Represents simplification of MEF EVC Per Uni Atrributes\r
101     grouping evc {\r
102         leaf id {\r
103             type topo:node-id;\r
104             mandatory true;\r
105             description "Uniquely identifies the evc";\r
106         }\r
107         list uni-source {\r
108             key "order";\r
109             leaf order {\r
110                 type uint8;\r
111             }\r
112             leaf uni {\r
113                 type topo:node-id;\r
114             }\r
115         }\r
116         list uni-dest {\r
117             key "order";\r
118             leaf order {\r
119                 type uint8;\r
120             }\r
121             leaf uni {\r
122                 type topo:node-id;\r
123             }\r
124         }\r
125         leaf cos-id {\r
126             type string;\r
127         }\r
128         container ingress-bw {\r
129             uses service-speed;\r
130         }\r
131         container egress-bw {\r
132             uses service-speed;\r
133         }\r
134     }\r
135 \r
136     container unis {\r
137         list uni {\r
138             key "id";\r
139             uses uni;\r
140         }\r
141     }\r
142 \r
143     container evcs {\r
144         list evc {\r
145             key "id";\r
146             uses evc;\r
147         }\r
148     }\r
149 }\r