Fix ss-netbox-dg
[sdnc/oam.git] / platform-logic / restconfapi-yang / src / main / yang / ietf-eth-tran-types@2018-05-24.yang
1 module ietf-eth-tran-types {
2   namespace "urn:ietf:params:xml:ns:yang:ietf-eth-tran-types";
3   prefix "etht-types";
4
5   organization
6     "Internet Engineering Task Force (IETF) CCAMP WG";
7   contact
8     "
9       WG List: <mailto:ccamp@ietf.org>
10       ID-draft editor:
11         Haomian Zheng (zhenghaomian@huawei.com);
12         Italo Busi (italo.busi@huawei.com);
13         Aihua Guo (aihuaguo@huawei.com);
14         Yunbin Xu (xuyunbin@ritt.cn);
15         Yang Zhao (zhaoyangyjy@chinamobile.com);
16         Xufeng Liu (Xufeng_Liu@jabil.com);
17         Giuseppe Fioccola (giuseppe.fioccola@telecomitalia.it);
18     ";
19
20   description
21     "This module defines the ETH transport types.";
22
23   revision 2018-05-24 {
24     description
25       "Initial revision";
26     reference
27       "draft-zheng-ccamp-client-signal-yang";
28   }
29
30   /*
31    * Identities
32    */
33
34   identity eth-vlan-tag-type {
35     description
36       "ETH VLAN tag type.";
37   }
38
39   identity c-vlan-tag-type {
40     base eth-vlan-tag-type;
41     description
42       "802.1Q Customer VLAN";
43   }
44
45   identity s-vlan-tag-type {
46     base eth-vlan-tag-type;
47     description
48       "802.1Q Service VLAN (QinQ)";
49   }
50
51   identity service-classification-type {
52     description
53       "Service classification.";
54   }
55
56   identity port-classification {
57     base service-classification-type;
58     description
59       "Port classification.";
60   }
61
62   identity vlan-classification {
63     base service-classification-type;
64     description
65       "VLAN classification.";
66   }
67
68   identity eth-vlan-tag-classify {
69     description
70       "VLAN tag classification.";
71   }
72
73   identity classify-c-vlan {
74     base eth-vlan-tag-classify;
75     description
76       "Classify 802.1Q Customer VLAN tag.
77        Only C-tag type is accepted";
78   }
79
80   identity classify-s-vlan {
81     base eth-vlan-tag-classify;
82     description
83       "Classify 802.1Q Service VLAN (QinQ) tag.
84        Only S-tag type is accepted";
85   }
86
87   identity classify-s-or-c-vlan {
88     base eth-vlan-tag-classify;
89     description
90       "Classify S-VLAN or C-VLAN tag-classify.
91        Either tag is accepted";
92   }
93
94   identity bandwidth-profile-type {
95     description
96       "Bandwidth Profile Types";
97   }
98
99   identity mef-10-bwp {
100     base bandwidth-profile-type;
101     description
102       "MEF 10 Bandwidth Profile";
103   }
104   identity rfc-2697-bwp {
105     base bandwidth-profile-type;
106     description
107       "RFC 2697 Bandwidth Profile";
108   }
109
110   identity rfc-2698-bwp {
111     base bandwidth-profile-type;
112     description
113       "RFC 2698 Bandwidth Profile";
114   }
115
116   identity rfc-4115-bwp {
117     base bandwidth-profile-type;
118     description
119       "RFC 4115 Bandwidth Profile";
120   }
121
122   identity service-type {
123     description
124       "Type of Ethernet service.";
125   }
126
127   identity p2p-svc {
128     base service-type;
129     description
130       "Ethernet point-to-point service (EPL, EVPL).";
131   }
132
133   identity rmp-svc {
134     base service-type;
135     description
136       "Ethernet rooted-multitpoint service (E-TREE, EP-TREE).";
137   }
138
139   identity mp2mp-svc {
140     base service-type;
141     description
142       "Ethernet multipoint-to-multitpoint service (E-LAN, EP-LAN).";
143   }
144
145   /*
146    * Type Definitions
147    */
148
149   typedef eth-tag-type {
150     type identityref {
151       base eth-vlan-tag-type;
152     }
153     description
154       "Identifies a specific ETH VLAN tag type.";
155   }
156
157   typedef eth-tag-classify {
158     type identityref {
159       base eth-vlan-tag-classify;
160     }
161     description
162       "Identifies a specific VLAN tag classification.";
163   }
164
165   typedef vlanid {
166     type uint16 {
167       range "1..4094";
168     }
169     description
170       "The 12-bit VLAN-ID used in the VLAN Tag header.";
171   }
172
173   typedef vid-range-type {
174     type string {
175       pattern "([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?" +
176               "(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)";
177     }
178     description
179       "A list of VLAN Ids, or non overlapping VLAN ranges, in
180        ascending order, between 1 and 4094.
181        This type is used to match an ordered list of VLAN Ids, or
182        contiguous ranges of VLAN Ids. Valid VLAN Ids must be in the
183        range 1 to 4094, and included in the list in non overlapping
184        ascending order.
185        For example: 1,10-100,50,500-1000";
186   }
187
188   typedef bandwidth-profile-type {
189     type identityref {
190       base bandwidth-profile-type;
191     }
192     description
193       "Identifies a specific Bandwidth Profile type.";
194     }
195
196   typedef service-type {
197     type identityref {
198       base service-type;
199     }
200     description
201       "Identifies the type of Ethernet service.";
202   }
203
204   /*
205    * Grouping Definitions
206    */
207
208   grouping etht-bandwidth-profiles {
209     description
210       "Bandwidth profile configuration paramters.";
211
212     leaf bandwidth-profile-name {
213       type string;
214       description
215         "Name of the bandwidth profile.";
216     }
217     leaf bandwidth-profile-type {
218       type etht-types:bandwidth-profile-type;
219       description
220         "The type of bandwidth profile.";
221     }
222     leaf CIR {
223       type uint64;
224       description
225         "Committed Information Rate in Kbps";
226     }
227     leaf CBS {
228       type uint64;
229       description
230         "Committed Burst Size in in KBytes";
231     }
232     leaf EIR {
233       type uint64;
234 /*
235  * Open Issue: need to indicate that EIR is not supported by RFC 2697
236  *   must
237  *     '../bw-profile-type = "mef-10-bwp" or ' +
238  *     '../bw-profile-type = "rfc-2698-bwp" or ' +
239  *     '../bw-profile-type = "rfc-4115-bwp"'
240  *
241  *   must
242  *     '../bw-profile-type != "rfc-2697-bwp"'
243 */
244       description
245         "Excess Information Rate in Kbps
246          In case of RFC 2698, PIR = CIR + EIR";
247     }
248     leaf EBS {
249       type uint64;
250       description
251         "Excess Burst Size in KBytes.
252          In case of RFC 2698, PBS = CBS + EBS";
253     }
254     leaf color-aware {
255       type boolean;
256       description
257         "Indicates weather the color-mode is color-aware or color-blind.";
258     }
259     leaf coupling-flag {
260       type boolean;
261 /*
262  * Open issue: need to indicate that Coupling Flag is defined only for MEF 10
263  *
264  *   must
265  *     '../bw-profile-type = "mef-10-bwp"'
266  */
267       description
268         "Coupling Flag.";
269     }
270   }
271
272   grouping eth-bandwidth {
273     leaf eth-bandwidth {
274       type uint64 {
275         range "0..10000000000";
276       }
277       units "Kbps";
278       description
279         "Available bandwith value expressed in kilobits per second";
280     }
281   }
282
283   grouping eth-label-restriction {
284           container eth-label-restriction {
285       leaf tag-type {
286         type etht-types:eth-tag-type;
287         description "VLAN tag type.";
288       }
289       leaf priority {
290               type uint8;
291               description "priority.";
292             }
293     }
294   }
295
296   grouping eth-label {
297     leaf vlanid {
298       type etht-types:vlanid;
299         description
300           "VLAN tag id.";
301       }
302     }
303 }