Added an IP leaf in the UNI list for EVC creation.
[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     import yang-ext { prefix "ext"; }\r
29     import ovsdb { prefix "ovsdb"; revision-date 2015-01-05;}\r
30 \r
31     revision "2015-10-12" {\r
32         description "Updated revision of the unimgr model.";\r
33     }\r
34 \r
35     grouping service-speed {\r
36         choice speed {\r
37             case speed-10M {\r
38                 leaf speed-10M {\r
39                     type empty;\r
40                 }\r
41             }\r
42             case speed-100M {\r
43                 leaf speed-100M {\r
44                     type empty;\r
45                 }\r
46             }\r
47             case speed-1G {\r
48                 leaf speed-1G {\r
49                     type empty;\r
50                 }\r
51             }\r
52             case speed-10G {\r
53                 leaf speed-10G {\r
54                     type empty;\r
55                 }\r
56             }\r
57         }\r
58     }\r
59 \r
60     // represent simplification of MEF Per Uni Attributes\r
61     grouping uni {\r
62         leaf ovsdb-node-ref {\r
63             type ovsdb:ovsdb-node-ref;\r
64             description "A reference to the ovsdb node.";\r
65         }\r
66         leaf physical-medium {\r
67             type string;\r
68             default "UNI TypeFull Duplex 2 Physical Interface";\r
69         }\r
70         leaf ip-address {\r
71             type inet:ip-address;\r
72         }\r
73         leaf mac-address {\r
74            type yang:mac-address;\r
75         }\r
76         container speed {\r
77             uses service-speed;\r
78         }\r
79         leaf mode {\r
80             type string;\r
81             default "Full Duplex";\r
82         }\r
83         leaf mac-layer {\r
84             type string;\r
85             default "IEEE 802.3-2005";\r
86         }\r
87         leaf type {\r
88             type string;\r
89         }\r
90         leaf mtu-size {\r
91             type uint64;\r
92             units byte;\r
93         }\r
94     }\r
95 \r
96     // Represents simplification of MEF EVC Per Uni Atrributes\r
97     grouping evc {\r
98         list uni-source {\r
99             key "order";\r
100             leaf order {\r
101                 type uint8;\r
102             }\r
103             leaf uni {\r
104                 type instance-identifier;\r
105             }\r
106             leaf ip-address {\r
107                 type inet:ip-address;\r
108             }\r
109         }\r
110         list uni-dest {\r
111             key "order";\r
112             leaf order {\r
113                 type uint8;\r
114             }\r
115             leaf uni {\r
116                 type instance-identifier;\r
117             }\r
118             leaf ip-address {\r
119                 type inet:ip-address;\r
120             }\r
121         }\r
122         leaf cos-id {\r
123             type string;\r
124         }\r
125         container ingress-bw {\r
126             uses service-speed;\r
127         }\r
128         container egress-bw {\r
129             uses service-speed;\r
130         }\r
131     }\r
132 \r
133     augment "/topo:network-topology/topo:topology/topo:node" {\r
134         description "Augmentation for UNI nodes under topology";\r
135         ext:augment-identifier "uni-augmentation";\r
136         uses uni;\r
137     }\r
138 \r
139     augment "/topo:network-topology/topo:topology/topo:link" {\r
140         description "Augmentation for EVC Link under topology";\r
141         ext:augment-identifier "evc-augmentation";\r
142         uses evc;\r
143     }\r
144 \r
145 }\r