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