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