Modify spectrum assignment management in PCE
[transportpce.git] / api / src / main / yang / service_path / transportpce-pathDescription@2021-07-05.yang
1 module transportpce-pathDescription {
2   namespace "http://org/transportpce/B-C-interface/pathDescription";
3   prefix transportpce-pathDescription;
4
5   import org-openroadm-common-optical-channel-types {
6     prefix org-openroadm-common-optical-channel-types;
7     revision-date 2020-05-29;
8   }
9
10   import org-openroadm-common-state-types {
11     prefix org-openroadm-common-state-types;
12     revision-date 2019-11-29;
13   }
14   import org-openroadm-otn-common-types {
15     prefix org-openroadm-otn-common-types;
16     revision-date 2018-11-30;
17   }
18
19   organization
20     "transportPCE";
21   contact
22     "transportPCE committers - ODL";
23   description
24     "YANG definitions of B interface (transportPCE). Adapted from service definition (openroadm)
25      Copyright © 2017 Orange, Inc. and others.  All rights reserved.
26
27      openroadm copyright:
28       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
29       AT&T Intellectual Property.  All other rights reserved.
30
31       Redistribution and use in source and binary forms, with or without modification,
32       are permitted provided that the following conditions are met:
33
34       * Redistributions of source code must retain the above copyright notice, this
35         list of conditions and the following disclaimer.
36       * Redistributions in binary form must reproduce the above copyright notice,
37         this list of conditions and the following disclaimer in the documentation and/or
38         other materials provided with the distribution.
39       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
40         contributors may be used to endorse or promote products derived from this software
41         without specific prior written permission.
42
43       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
44       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
45       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
46       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
47       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
48       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
49       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
50       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
51       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
52       POSSIBILITY OF SUCH DAMAGE";
53
54   revision 2021-07-05 {
55     description
56       "Version 1.6.4. To add a list of trib-slots and complex-trib-slots
57       to be compliant with transportpce-device-renderer yang model";
58   }
59   revision 2020-12-10 {
60     description
61       "Version 1.6.3. To add states in path description elements";
62   }
63   revision 2020-11-26 {
64     description
65       "Version 1.6.2. To manage flexgrid";
66   }
67   revision 2020-06-29 {
68     description
69       "Version 1.6.1. To manage otn services";
70   }
71   revision 2017-10-17 {
72     description
73       "Version 1.6";
74   }
75   revision 2017-04-26 {
76     description
77       "Version 1.5";
78   }
79
80   grouping PCE-resource {
81     description
82       "This resource identifier is intended to provide a generic identifer
83        for any resource that can be used without specific knowledge of
84        the resource.";
85     container resource {
86       choice resource {
87         case termination-point {
88           leaf tp-id {
89             type string;
90             //to be clarified with topology model
91           }
92           leaf tp-node-id {
93             type string;
94             //to be clarified with topology model
95           }
96         }
97         case link {
98           leaf link-id {
99             type string;
100             //to be clarified with topology model
101           }
102         }
103         case node {
104           leaf node-id {
105             type string;
106             // to be clarified with topology model
107           }
108         }
109       }
110       leaf state {
111         type org-openroadm-common-state-types:state;
112         mandatory true;
113         description "Operational state of pce-resource";
114       }
115     }
116   }
117
118   grouping path-description {
119     description
120       "Topology reports the individual hops along the service in the A to Z direction and Z to A directions.  This includes both ports internal to a device and those
121        at its edge that are available for externally connections. It includes both physical and logical ports.
122        Physical ports are ordered with the logical ports that run over them as follows:
123        a.\tOn ingress to a node/card, physical then logical
124        b.\tOn egress to a node/card, logical then physical";
125     container aToZ-direction {
126       leaf aToZ-wavelength-number {
127         type uint32;
128       }
129       leaf aToZ-min-frequency {
130          type org-openroadm-common-optical-channel-types:frequency-THz;
131          description
132          "Minimum frequency in THz.";
133       }
134       leaf aToZ-max-frequency {
135            type org-openroadm-common-optical-channel-types:frequency-THz;
136          description
137          "Maximum frequency in THz.";
138       }
139       leaf min-trib-slot {
140           type org-openroadm-otn-common-types:opucn-trib-slot-def;
141           description
142               "Minimum trib slots in the form of 'A.B',
143               where A and B correspond to port-number and trib-slots respectively";
144       }
145       leaf max-trib-slot {
146           type org-openroadm-otn-common-types:opucn-trib-slot-def;
147           description
148               "Maximum trib slots in the form of 'A.B',
149               where A and B correspond to port-number and trib-slots respectively";
150       }
151       leaf rate {
152         type uint32;
153         mandatory true;
154       }
155       leaf modulation-format {
156         type string;
157         // enum ?
158       }
159       list aToZ {
160         key "id";
161         leaf id {
162           type string;
163           description
164             "Unique identifier for this topology component within this service";
165         }
166         uses hop;
167       }
168     }
169     container zToA-direction {
170       leaf zToA-wavelength-number {
171         type uint32;
172       }
173       leaf zToA-min-frequency {
174          type org-openroadm-common-optical-channel-types:frequency-THz;
175          description
176          "Minimum frequency in THz.";
177       }
178       leaf zToA-max-frequency {
179            type org-openroadm-common-optical-channel-types:frequency-THz;
180          description
181          "Maximum frequency in THz.";
182       }
183       leaf min-trib-slot {
184           type org-openroadm-otn-common-types:opucn-trib-slot-def;
185           description
186               "Minimum trib slots in the form of 'A.B',
187               where A and B correspond to port-number and trib-slots respectively";
188       }
189       leaf max-trib-slot {
190           type org-openroadm-otn-common-types:opucn-trib-slot-def;
191           description
192               "Maximum trib slots in the form of 'A.B',
193               where A and B correspond to port-number and trib-slots respectively";
194       }
195       leaf rate {
196         type uint32;
197         mandatory true;
198       }
199       leaf modulation-format {
200         type string;
201         // enum ?
202       }
203       list zToA {
204         key "id";
205         leaf id {
206           type string;
207           description
208             "Unigue identifier for this topology component within this service";
209         }
210         uses hop;
211       }
212     }
213   }
214
215   grouping hop {
216     uses PCE-resource;
217   }
218 }