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