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