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