Add node-info in portmapping structure
[transportpce.git] / api / src / main / yang / transportpce-portmapping@2019-07-02.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 ietf-inet-types { prefix ietf-inet-types; revision-date 2013-07-15; }
8
9   organization
10     "transportPCE";
11   contact
12     "transportPCE committers - ODL";
13   description
14     "YANG definitions of RPCs supported by OLM. Copyright (c) 2017
15     AT&T and others. All rights reserved. authors: Dhruv Bhardwaj
16     ( db929a@att.com ) Shweta Vachhani ( sv111y@att.com )";
17
18   revision 2019-07-02 {
19     description
20         "Version 2. To manage device 2.2.1";
21   }
22
23   revision 2017-02-28 {
24     description "Initial revision of port mapping model";
25   }
26
27   container network {
28     list nodes {
29       key node-id;
30       leaf node-id {
31         type string;
32         description
33           "Unique identifier for node in the network";
34       }
35       container node-info {
36         leaf node-type {
37           type org-openroadm-common-types:node-types;
38           description
39             "Identifier for node-type e.g Roadm, xponder";
40         }
41         leaf openroadm-version {
42           type enumeration {
43             enum "1.2.1" {
44               value 1;
45               description
46                 "Version 1.2.1";
47             }
48             enum "2.2.1" {
49               value 2;
50               description
51                 "Version 2.2.1";
52             }
53           }
54         }
55         leaf node-clli {
56           type string;
57           description
58             "Common Language Location Identifier.";
59         }
60         leaf node-vendor {
61           type string;
62           description
63             "Vendor of the equipment";
64         }
65         leaf node-model {
66           type string;
67           description
68             "Physical resource model information.";
69         }
70         leaf node-ip-address {
71           type ietf-inet-types:ip-address;
72           description
73             "Current IP Address of device";
74         }
75       }
76
77       list mapping {
78         description
79           "Mapping for Physical circuit pack/port/parent interfaces corresponding
80           to each logical connection point present in the node.";
81         key logical-connection-point;
82         leaf logical-connection-point {
83           type string;
84         }
85         leaf supporting-circuit-pack-name {
86           type string;
87           description
88             "Circuit pack where the logical connection point is located";
89         }
90         leaf supporting-port {
91           type string;
92           description
93             "Port where the logical connection point is located";
94         }
95         leaf supporting-oms {
96           type string;
97           description
98             "OMS interface provisioned on the port";
99         }
100         leaf supporting-ots {
101           type string;
102           description
103             "OTS interface provisioned on the port";
104         }
105         leaf port-direction {
106           type string;
107           description
108             "Useful for line port of XPDR, for which there is no indication
109             in its logical-termination-point naming";
110         }
111         leaf port-qual {
112           type string;
113           description
114              "Useful to identify from portmapping client from network ports
115              of XPDR";
116         }
117         leaf associated-lcp {
118           type string;
119           description
120              "For XPDR, associate two logical-connection-points from device/connnection-map
121              data";
122         }
123         leaf partner-lcp {
124           type string;
125           description
126              "For XPDR unidirectional NETWORK port, associate two logical-connection-points
127              from device/partner port data";
128         }
129       }
130       list cp-to-degree {
131         description
132              "This mapping helps locate degree number of the circuitpack that
133              does lldp protocol management";
134         key circuit-pack-name;
135         leaf circuit-pack-name {
136           type string;
137         }
138         leaf degree-number {
139           type uint32;
140         }
141         leaf interface-name {
142           type string;
143         }
144       }
145     }
146   }
147 }