add python compatibility module
[ccsdk/apps.git] / sdnr / model / yang / onf-otn-odu-conditional-packages@2017-10-20.yang
1 module onf-otn-odu-conditional-packages {
2     namespace "urn:onf:params:xml:ns:yang:onf-otn-odu-conditional-packages";
3     prefix onf-otn-odu-conditional-packages;
4     import core-model {
5         prefix core-model;
6     }
7     organization "ONF (Open Networking Foundation) Open Transport Working Group";
8     contact "WG Web: <https://www.opennetworking.org/technical-communities/areas/specification/1931-optical-transport>
9              WG Chair: Lyndon Ong
10                        <mailto:lyong@ciena.com>
11              Editors:  Mohit Chamania 
12                        <MChamania@advaoptical.com>
13                        Dzmitry Khomchanka
14                        <dzmitry.khomchanka@vpi-minsk.com>
15                        Martin Skorupski
16                        <mailto:martin.skorupski@highstreet-technologies.com>";
17     description "This model adds conditional packages to the ONF CoreModel 1.2 
18                  in order address OTN ODU use cases. It is a temorary model for 
19                  demontration purposes and bases on the ideas an concepts of
20                  TAPI. However, modifications for a pure southbound were
21                  nessesary.";
22     revision 2017-10-20 {
23         description "Initial version";
24         reference "ONF TR 512: Core Model.";
25     }
26     /***********************
27     * package type-definitions (copied from TAPI; revision: 2017-05-31)
28     **********************/ 
29         typedef mapping-type {
30             type enumeration {
31                 enum amp {
32                     description "none";
33                 }
34                 enum bmp {
35                     description "none";
36                 }
37                 enum gfp-f {
38                     description "none";
39                 }
40                 enum gmp {
41                     description "none";
42                 }
43                 enum ttp-gfp-bmp {
44                     description "none";
45                 }
46                 enum null {
47                     description "none";
48                 }
49             }
50             description "none";
51         }
52         typedef odu-named-payload-type {
53             type enumeration {
54                 enum unknown {
55                     description "none";
56                 }
57                 enum uninterpretable {
58                     description "none";
59                 }
60             }
61             description "none";
62         }
63         typedef odu-slot-size {
64             type enumeration {
65                 enum 1-g-25 {
66                     description "none";
67                 }
68                 enum 2-g-5 {
69                     description "none";
70                 }
71             }
72             description "none";
73         }
74         typedef odu-type {
75             type enumeration {
76                 enum odu-0 {
77                     description "none";
78                 }
79                 enum odu-1 {
80                     description "none";
81                 }
82                 enum odu-2 {
83                     description "none";
84                 }
85                 enum odu-2-e {
86                     description "none";
87                 }
88                 enum odu-3 {
89                     description "none";
90                 }
91                 enum odu-4 {
92                     description "none";
93                 }
94                 enum odu-flex {
95                     description "none";
96                 }
97                 enum odu-cn {
98                     description "none";
99                 }
100             }
101             description "none";
102         }
103         grouping odu-payload-type-g {
104             leaf named-payload-type {
105                 type odu-named-payload-type;
106                 description "none";
107             }
108             leaf hex-payload-type {
109                 type uint64;
110                 description "none";
111             }
112             description "none";
113         }
114     /***********************
115     * package object-classes
116     **********************/ 
117
118         /***********************
119          * OTN ODU Connection (ODU-CTP)
120          **********************/ 
121         list otn-odu-connection-pac {
122             key 'layer-protocol';
123             leaf layer-protocol {
124                 type leafref {
125                     path '/core-model:network-element/core-model:ltp/core-model:lp/core-model:uuid';
126                 }
127                 description "none";
128             }
129             container otn-odu-connection-capability {
130                 config false;
131                 uses otn-odu-connection-capability-g;
132                 description "none";
133             }
134             container otn-odu-connection-configuration {
135                 uses otn-odu-connection-configuration-g;
136                 description "none";
137             }
138             container otn-odu-connection-status {
139                 config false;
140                 uses otn-odu-connection-status-g;
141                 description "none";
142             }
143             container otn-odu-connection-current-problems {
144                 config false;
145                 uses otn-odu-connection-current-problems-g;
146                 description "none";
147             }
148             container otn-odu-connection-current-performance {
149                 config false;
150                 uses otn-odu-connection-current-performance-g;
151                 description "none";
152             }
153             container otn-odu-connection-historical-performances {
154                 config false;
155                 uses otn-odu-connection-historical-performances-g;
156                 description "none";
157             }
158             description "none";
159         }
160         grouping otn-odu-connection-capability-g {
161             container accepted-payload-type {
162                 uses odu-payload-type-g;
163                 description 
164                     "This attribute is applicable when the ODU CTP object 
165                      instance represents a lower order ODU CTP Sink at the 
166                      client layer of the ODUP/ODU[i]j or ODUP/ODUj-21 adaptation
167                      function. 
168                      This attribute is a 2-digit Hex code that indicates the new
169                      accepted payload type.
170                      Valid values are defined in Table 15-8 of ITU-T 
171                      Recommendation G.709 with one additional value 
172                      UN_INTERPRETABLE.";
173             }
174             description "none";
175         }
176         grouping otn-odu-connection-configuration-g {
177             leaf-list tributary-slot-list {
178                 type uint64;
179                 description 
180                     "This attribute contains a set of distinct (i.e. unique) 
181                      integers (e.g. 2, 3, 5, 9, 15 representing the tributary 
182                      slots TS2, TS3, TS5, TS9 and TS15) which represents the 
183                      resources occupied by the Low Order ODU Link Connection 
184                      (e.g. carrying an ODUflex with a bit rate of 6.25G). 
185                      This attribute applies when the LO ODU_ConnectionTerminationPoint 
186                      connects with an HO ODU_TrailTerminationPoint object. 
187                      It will not apply if this ODU_ConnectionTerminationPoint 
188                      object directly connects to an OTU_TrailTerminationPoint 
189                      object (i.e. OTU has no trib slots). 
190                      The upper bound of the integer allowed in this set is a 
191                      function of the HO-ODU server layer to which the ODU 
192                      connection has been mapped (adapted). 
193                      Thus, for example, M=8/32/80 for ODU2/ODU3/ODU4 server 
194                      layers (respectively). Note that the value of this 
195                      attribute can be changed only in the case of ODUflex and 
196                      has to be through specific operations (i.e. not be changing
197                      the attribute tributarySlotList directly).";
198             }
199             leaf tributary-port-number {
200                 type uint64;
201                 description 
202                     "This attribute identifies the tributary port number that is
203                      associated with the ODU CTP. 
204                      range of type : The value range depends on the size of the 
205                      Tributary Port Number (TPN) field used which depends on th 
206                      server-layer ODU or OTU.
207                      In case of ODUk mapping into OTUk, there is no TPN field, 
208                      so the tributaryPortNumber shall be zero.
209                      In case of LO ODUj mapping over ODU1, ODU2 or ODU3, the TPN
210                      is encoded in a 6-bit field so the value range is 0-63. 
211                      See clause 14.4.1/G.709-2016.
212                      In case of LO ODUj mapping over ODU4, the TPN is encoded in 
213                      a 7-bit field so the value range is 0-127. 
214                      See clause 14.4.1.4/G.709-2016.
215                      In case of ODUk mapping over ODUCn, the TPN is encoded in a
216                      14-bit field so the value range is 0-16383. See clause 
217                      20.4.1.1/G.709-2016.
218                     ";
219             }
220             leaf accepted-m-si {
221                 type string;
222                 description 
223                     "This attribute is applicable when the ODU CTP object 
224                      instance represents a lower order ODU1 or ODU2 CTP Sink at 
225                      the client layer of the ODU3P/ODU12 adaptation function or 
226                      represents a lower order ODUj CTP Sink at the client layer 
227                      of the ODUP/ODUj-21 adaptation function. This attribute is 
228                      a 1-byte field that represents the accepted multiplex 
229                      structure of the adaptation function. ";
230             }
231             leaf opu-tributary-slot-size {
232                 type odu-slot-size;
233                 description 
234                     "This attribute is applicable for ODU2 and ODU3 CTP only.
235                      [sko] Why that? 
236                      It indicates the slot size of the ODU CTP.";
237             }
238             leaf auto-payload-type {
239                 type boolean;
240                 description 
241                     "This attribute is applicable when the ODU CTP object 
242                      instance represents a lower order ODU CTP Source at the 
243                      client layer of the ODUP/ODUj-21 adaptation function. The 
244                      value of true of this attribute configures that the 
245                      adaptation source function shall fall back to the payload 
246                      type PT=20 if the conditions specified in 14.3.10.1/G.798 
247                      are satisfied. ";
248             }
249             leaf configured-mapping-type {
250                 type mapping-type;
251                 description 
252                     "This attributes indicates the configured mapping type.";
253             }
254             leaf configured-client-type {
255                 type string;
256                 description 
257                     "This attribute configures the type of the client CTP of the
258                      server ODU TTP.";
259             }
260             description 
261                "This Pac contains the attributes associated with the ODU-CTP.";
262         }
263         grouping otn-odu-connection-status-g {
264             description "none";
265         }
266         grouping otn-odu-connection-current-problems-g {
267             description "none";
268         }
269         grouping otn-odu-connection-current-performance-g {
270             description "none";
271         }
272         grouping otn-odu-connection-historical-performances-g {
273             description "none";
274         }
275
276
277         /***********************
278          * OTN ODU Termination (ODU-TTP)
279          **********************/ 
280         list otn-odu-termination-pac {
281             key 'layer-protocol';
282             leaf layer-protocol {
283                 type leafref {
284                     path '/core-model:network-element/core-model:ltp/core-model:lp/core-model:uuid';
285                 }
286                 description "none";
287             }
288             container otn-odu-termination-capability {
289                 config false;
290                 uses otn-odu-termination-capability-g;
291                 description "none";
292             }
293             container otn-odu-termination-configuration {
294                 uses otn-odu-termination-configuration-g;
295                 description "none";
296             }
297             container otn-odu-termination-status {
298                 config false;
299                 uses otn-odu-termination-status-g;
300                 description "none";
301             }
302             container otn-odu-termination-current-problems {
303                 config false;
304                 uses otn-odu-termination-current-problems-g;
305                 description "none";
306             }
307             container otn-odu-termination-current-performance {
308                 config false;
309                 uses otn-odu-termination-current-performance-g;
310                 description "none";
311             }
312             container otn-odu-termination-historical-performances {
313                 config false;
314                 uses otn-odu-termination-historical-performances-g;
315                 description "none";
316             }
317             description "none";
318         }
319         grouping otn-odu-termination-capability-g {
320             description "none";
321         }
322         grouping otn-odu-termination-configuration-g {
323             leaf odu-type {
324                 type odu-type;
325                 description "This attribute specifies the type of the ODU 
326                              termination point.";
327             }
328             leaf odu-rate {
329                 type uint64;
330                 description "This attribute indicates the rate of the ODU 
331                              terminatinon point. 
332                              This attribute is Set at create; i.e., once created
333                              it cannot be changed directly. 
334                              In case of resizable ODU flex, its value can be 
335                              changed via HAO (not directly on the attribute).";
336             }
337             leaf odu-rate-tolerance {
338                 type uint64;
339                 units "ppm";
340                 description "This attribute indicates the rate tolerance of the 
341                              ODU termination point. 
342                              Valid values are real value in the unit of ppm. 
343                              Standardized values are defined in Table 7-2/G.709.
344                              ";
345             }
346             description "none";
347         }
348         grouping otn-odu-termination-status-g {
349             description "none";
350         }
351         grouping otn-odu-termination-current-problems-g {
352             description "none";
353         }
354         grouping otn-odu-termination-current-performance-g {
355             description "none";
356         }
357         grouping otn-odu-termination-historical-performances-g {
358             description "none";
359         }
360
361 }