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