Add OpenROADM 7.1.0 device and common models
[transportpce.git] / api / src / main / yang / transportpce-portmapping@2020-10-12.yang
1 module transportpce-portmapping {
2   yang-version 1;
3   namespace "http://org/opendaylight/transportpce/portmapping";
4   prefix org-opendaylight-transportpce-portmapping;
5
6   import ietf-inet-types {
7     prefix ietf-inet-types;
8     revision-date 2013-07-15;
9   }
10   import org-openroadm-common-optical-channel-types {
11     prefix org-openroadm-common-optical-channel-types;
12     revision-date 2020-05-29;
13   }
14   import org-openroadm-device-types {
15      prefix org-openroadm-device-types;
16      revision-date 2019-11-29;
17   }
18   import org-openroadm-switching-pool-types {
19     prefix org-openroadm-switching-pool-types;
20     revision-date 2019-11-29;
21   }
22   import org-openroadm-port-types {
23     prefix org-openroadm-port-types;
24     revision-date 2020-03-27;
25   }
26
27
28   organization
29     "transportPCE";
30   contact
31     "transportPCE committers - ODL";
32   description
33     "YANG definitions of RPCs supported by OLM. Copyright (c) 2017
34      AT&T and others. All rights reserved. authors: Dhruv Bhardwaj
35      ( db929a@att.com ) Shweta Vachhani ( sv111y@att.com )";
36
37   revision 2020-10-12 {
38     description
39     "Upgrading imported models to 7.1.0";
40   }
41   revision 2020-08-27 {
42     description
43     "Add support to differentiate flexible and fixed
44      grid capabilities with mc-capabilities";
45   }
46   revision 2020-04-29 {
47     description
48       "Add SAPI/DAPI lcp hash value";
49   }
50   revision 2020-01-28 {
51     description
52       "Add necessary parameters to consolidate OTN
53        and address ONAP MDONS use case";
54   }
55   revision 2020-01-13 {
56     description
57       "Add OTN data from device and necessary
58        to build node inside otn topology";
59   }
60   revision 2019-11-15 {
61     description
62       "OTN support";
63   }
64   revision 2019-07-02 {
65     description
66       "Version 2. To manage device 2.2.1";
67   }
68   revision 2017-02-28 {
69     description
70       "Initial revision of port mapping model";
71   }
72
73   container network {
74     list nodes {
75       key "node-id";
76       leaf node-id {
77         type string;
78         description
79           "Unique identifier for node in the network";
80       }
81       container node-info {
82         leaf node-type {
83           type org-openroadm-device-types:node-types;
84           description
85             "Identifier for node-type e.g Roadm, xponder";
86         }
87         leaf openroadm-version {
88           type enumeration {
89             enum 1.2.1 {
90               value 1;
91               description
92                 "Version 1.2.1";
93             }
94             enum 2.2.1 {
95               value 2;
96               description
97                 "Version 2.2.1";
98             }
99             enum 7.1.0 {
100               value 3;
101               description
102                 "Version 7.1.0";
103             }
104           }
105         }
106         leaf node-clli {
107           type string;
108           description
109             "Common Language Location Identifier.";
110         }
111         leaf node-vendor {
112           type string;
113           description
114             "Vendor of the equipment";
115         }
116         leaf node-model {
117           type string;
118           description
119             "Physical resource model information.";
120         }
121         leaf node-ip-address {
122           type ietf-inet-types:ip-address;
123           description
124             "Current IP Address of device";
125         }
126       }
127       list mapping {
128         key "logical-connection-point";
129         description
130           "Mapping for Physical circuit pack/port/parent interfaces corresponding
131            to each logical connection point present in the node.";
132         leaf logical-connection-point {
133           type string;
134         }
135         leaf supporting-circuit-pack-name {
136           type string;
137           description
138             "Circuit pack where the logical connection point is located";
139         }
140         leaf supporting-port {
141           type string;
142           description
143             "Port where the logical connection point is located";
144         }
145         leaf supporting-oms {
146           type string;
147           description
148             "OMS interface provisioned on the port";
149         }
150         leaf supporting-ots {
151           type string;
152           description
153             "OTS interface provisioned on the port";
154         }
155         leaf port-direction {
156           type string;
157           description
158             "Useful for line port of XPDR, for which there is no indication
159              in its logical-termination-point naming";
160         }
161         leaf port-qual {
162           type string;
163           description
164             "Useful to identify from portmapping client from network ports
165              of XPDR";
166         }
167         leaf supporting-ethernet {
168           type string;
169           description
170             "Ethernet interface provisioned on the port";
171         }
172         leaf supporting-odu4 {
173           type string;
174           description
175             "ODU4 interface provisioned on the port";
176         }
177         leaf rate {
178           type string;
179           description
180             "Rate supported by the port";
181         }
182         leaf-list supported-interface-capability {
183           type identityref {
184             base org-openroadm-port-types:supported-if-capability;
185           }
186         }
187         leaf xponder-type {
188           type org-openroadm-device-types:xpdr-node-types;
189         }
190         leaf connection-map-lcp {
191           type string;
192           description
193             "For XPDR, associate two logical-connection-points from device/connnection-map
194              data";
195         }
196         leaf partner-lcp {
197           type string;
198           description
199             "For XPDR unidirectional NETWORK port, associate two logical-connection-points
200              from device/partner port data";
201         }
202         leaf lcp-hash-val {
203           type string;
204           description
205             "Hash value generated from node-id and lcp. This value will be used to map-
206             back SAPI and DAPI resource";
207         }
208       }
209       list mc-capabilities {
210           key mc-node-name;
211           when "../node-info/node-type = 'rdm'";
212           description
213             "Capabilities of the media channel associated with a degree or a SRG.";
214           leaf mc-node-name {
215             type string;
216             description
217               "Name of the node, it has the format of DEGi-TTP or SRGj-PP
218               Where i, and j are the degree and SRG numbers respectively";
219           }
220           leaf slot-width-granularity {
221             type org-openroadm-common-optical-channel-types:frequency-GHz;
222             default "50";
223             description
224               "Width of a slot measured in GHz.";
225           }
226           leaf center-freq-granularity {
227             type org-openroadm-common-optical-channel-types:frequency-GHz;
228             default "50";
229             description
230               "Width of a slot measured in GHz.";
231           }
232       }
233       list cp-to-degree {
234         key "circuit-pack-name";
235         description
236           "This mapping helps locate degree number of the circuitpack that
237            does lldp protocol management";
238         leaf circuit-pack-name {
239           type string;
240         }
241         leaf degree-number {
242           type uint32;
243         }
244         leaf interface-name {
245           type string;
246         }
247       }
248       list switching-pool-lcp {
249         key "switching-pool-number";
250         description
251           "For MUXPDR and SWITCH, associates from device/odu-switching-pools data, the logical-connection-points";
252         leaf switching-pool-number {
253           type uint16;
254           description
255             "Unique identifier for this odu-switching-pool";
256         }
257         leaf switching-pool-type {
258           type org-openroadm-switching-pool-types:switching-pool-types;
259         }
260         list non-blocking-list {
261           key "nbl-number";
262           leaf nbl-number {
263             type uint16;
264             description
265               "Identifier for this non-blocking-list. Unique within odu-switching-pool";
266           }
267           leaf interconnect-bandwidth-unit {
268             type uint32;
269             description
270               "Switch fabric interconnect bandwidth unit rate in bits per second.
271                Represents granularity of switch fabric";
272           }
273           leaf interconnect-bandwidth {
274             type uint32;
275             description
276               "Total interconnect bandwidth for a non-blocking element expressed as
277                number of inter-connect-bandwidth units : corresponds to capable-
278                inter-connect bandwidth";
279           }
280           leaf available-interconnect-bandwidth {
281             type uint32;
282             description
283               "Total interconnect bandwidth available for a non-blocking element can use as
284                number of inter-connect-bandwidth units";
285           }
286           leaf-list lcp-list {
287             type string;
288           }
289         }
290       }
291     }
292   }
293 }