Remove openroadm and tapi models building
[transportpce.git] / ordmodels / service / src / main / yang / org-openroadm-topology@2021-12-10.yang
1 module org-openroadm-topology {
2   namespace "http://org/openroadm/topology";
3   prefix org-openroadm-topology;
4
5   import org-openroadm-resource {
6     prefix org-openroadm-resource;
7     revision-date 2021-12-10;
8   }
9   import org-openroadm-network-resource {
10     prefix org-openroadm-network-resource;
11     revision-date 2019-11-29;
12   }
13
14   organization
15     "Open ROADM MSA";
16   contact
17     "OpenROADM.org";
18   description
19     "YANG definitions of topology.
20
21       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
22       All other rights reserved.
23
24       Redistribution and use in source and binary forms, with or without modification,
25       are permitted provided that the following conditions are met:
26
27       * Redistributions of source code must retain the above copyright notice, this
28         list of conditions and the following disclaimer.
29       * Redistributions in binary form must reproduce the above copyright notice,
30         this list of conditions and the following disclaimer in the documentation and/or
31         other materials provided with the distribution.
32       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
33         contributors may be used to endorse or promote products derived from this software
34         without specific prior written permission.
35
36       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
37       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
38       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
39       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
40       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
41       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
42       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
43       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
44       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
45       POSSIBILITY OF SUCH DAMAGE";
46
47   revision 2021-12-10 {
48     description
49       "Version 10.1";
50   }
51   revision 2021-09-24 {
52     description
53       "Version 10.0";
54   }
55   revision 2021-05-28 {
56     description
57       "Version 9.1";
58   }
59   revision 2021-03-26 {
60     description
61       "Version 9.0";
62   }
63   revision 2020-05-29 {
64     description
65       "Version 7.1.0";
66   }
67   revision 2020-03-27 {
68     description
69       "Version 7.0.0";
70   }
71   revision 2019-11-29 {
72     description
73       "Version 6.1.0";
74   }
75   revision 2019-09-27 {
76     description
77       "Version 6.0.0";
78   }
79   revision 2019-05-31 {
80     description
81       "Version 5.1.0";
82   }
83   revision 2019-03-29 {
84     description
85       "Version 5.0.0";
86   }
87   revision 2018-11-30 {
88     description
89       "Version 4.1.0";
90   }
91   revision 2018-09-28 {
92     description
93       "Version 4.0.0";
94   }
95   revision 2018-03-30 {
96     description
97       "Version 3.0.0";
98   }
99   revision 2017-12-15 {
100     description
101       "Version 2.2";
102   }
103   revision 2017-09-29 {
104     description
105       "Version 2.1";
106   }
107   revision 2017-07-28 {
108     description
109       "Version 2.0.1 - added revision-date to imports";
110   }
111   revision 2017-06-26 {
112     description
113       "Version 2.0";
114   }
115   revision 2016-10-14 {
116     description
117       "Version 1.2";
118   }
119
120   grouping topology {
121     description
122       "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
123        at its edge that are available for externally connections. It includes both physical and logical ports.
124        Physical ports are ordered with the logical ports that run over them as follows:
125        a.\t On ingress to a node/card, physical then logical
126        b.\t On egress to a node/card, logical then physical";
127     list aToZ {
128       key "id";
129       leaf id {
130         type string;
131         description
132           "Unique identifier for this topology component within this service";
133       }
134           container computation-results {
135                   description 
136                         "parameters resulting of path computation";
137                   uses org-openroadm-resource:path-computation-outputs;
138           }
139       uses route_info;
140       uses hop;
141     }
142     list zToA {
143       key "id";
144       leaf id {
145         type string;
146         description
147           "Unique identifier for this topology component within this service";
148       }
149           container computation-results {
150                   description 
151                         "parameters resulting of path computation";
152                   uses org-openroadm-resource:path-computation-outputs;
153           }
154       uses route_info;
155       uses hop;
156     }
157   }
158
159   grouping route_info {
160       leaf subroute_id {
161         type string;
162         description
163           "Unique identifier for the subroute or segment of the topology";
164       }
165       leaf-list previous_ids {
166         type string;
167         description
168           "Pointer to the previous id or set of ids that allows reconstruction
169            of the end-to-end route from the segments. Can be omitted if the
170            previous-id = current-id – 1 (if id is a number-based string) or if
171            each subroute is already representing an end-to-end route.";
172       }
173   }
174
175   grouping hop {
176     leaf hop-type {
177       type enumeration {
178         enum node-external {
179           value 1;
180           description
181             "The given resource is on the edge of the node, and used in relationships to resources outside of the node.";
182         }
183         enum node-internal {
184           value 2;
185           description
186             "The given resource is internally to the node";
187         }
188       }
189     }
190     uses org-openroadm-resource:resource {
191       augment "resource/resource/interface" {
192         uses org-openroadm-resource:resource-reporting;
193       }
194       augment "resource/resource/circuit-pack" {
195         leaf circuit-pack-type {
196           type string;
197           description
198             "Type of circuit-pack";
199         }
200         leaf circuit-pack-product-code {
201           type string;
202           description
203             "Product code of the circuit-pack";
204         }
205       }
206     }
207   }
208
209   grouping network-topology {
210     description
211       "network-topology defines the ordered a-to-z and z-to-a topology in terms of network model entities: tp-id and link-id";
212     list a-to-z {
213       key "id";
214       leaf id {
215         type string;
216         description
217           "Unique identifier for this network-topology component within this service";
218       }
219       uses route_info;
220       uses org-openroadm-network-resource:network-resource;
221     }
222     list z-to-a {
223       key "id";
224       leaf id {
225         type string;
226         description
227           "Unigue identifier for this network-topology component within this service";
228       }
229       uses route_info;
230       uses org-openroadm-network-resource:network-resource;
231     }
232   }
233 }