Add TAPI Topology simulated network function type.
[sim/o1-interface.git] / ntsimulator / deploy / smo-nts-ng-topology-server / yang / tapi-connectivity@2020-06-16.yang
1 module tapi-connectivity {\r
2     namespace "urn:onf:otcc:yang:tapi-connectivity";\r
3     prefix tapi-connectivity;\r
4     import tapi-common {\r
5         prefix tapi-common;\r
6     }\r
7     import tapi-topology {\r
8         prefix tapi-topology;\r
9     }\r
10     import tapi-path-computation {\r
11         prefix tapi-path-computation;\r
12     }\r
13     organization "ONF OTCC (Open Transport Configuration & Control) Project";\r
14     contact "\r
15          Project Web: <https://urldefense.com/v3/__https://wiki.opennetworking.org/display/OTCC/TAPI__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_yiFzE6g$ >\r
16          Project List: <mailto:transport-api@opennetworking.org>\r
17          Editor: Karthik Sethuraman <mailto:karthik.sethuraman@necam.com>\r
18          Andrea Mazzini <mailto:andrea.mazzini@nokia.com>\r
19          Arturo Mayoral <mailto:arturo.mayoral@telefonica.com>\r
20          Nigel Davis <mailto:ndavis@ciena.com>";\r
21     description "\r
22         This module contains TAPI Connectivity Model definitions.\r
23         Source: TapiConnectivity.uml\r
24         - The TAPI YANG models included in this TAPI release are a *normative* part of the TAPI SDK.\r
25         - The YANG specifications have been generated from the corresponding UML model using the [ONF EAGLE UML2YANG mapping tool]\r
26         <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/EagleUmlYang__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_6pxiNxl$ >\r
27         and further edited manually to comply with the [ONF IISOMI UML2YANG mapping guidelines]\r
28         <https://urldefense.com/v3/__https://wiki.opennetworking.org/display/OIMT/UML*-*YANG*Guidelines__;Kysr!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_wxKUbJ_$ >\r
29         - Status of YANG model artifacts can be determined by referring to the corresponding UML artifacts.\r
30         As described in the UML models, some artifacts are considered *experimental*, and thus the corresponding YANG artifacts.\r
31         - The ONF TAPI release process does not guarantee backward compatibility of YANG models across major versions of TAPI releases.\r
32         The YANG model backward compatibility criteria are outlined in section 11 of <https://urldefense.com/v3/__https://tools.ietf.org/html/rfc7950__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_zcAY1P4$ >.\r
33         YANG models included in this release may not be backward compatible with previous TAPI releases.\r
34         Copyright (c) 2018 Open Networking Foundation (ONF). All rights reserved.\r
35         License: This module is distributed under the Apache License 2.0.";\r
36     revision 2020-06-16 {\r
37         description "ONF Transport API version 2.1.3.\r
38                    - Minor corrections in comments.\r
39                    Changes included in this TAPI release (v2.1.3) are listed in\r
40                    <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/blob/develop_v2_1/CHANGE_LOG/change-log.2.1.3.md__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_xm1nx_D$ >";\r
41         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model\r
42                   <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_8UH3XnH$ >";\r
43     }\r
44     revision 2019-07-16 {\r
45         description "ONF Transport API version 2.1.2.\r
46                    Changes included in this TAPI release (v2.1.2) are listed in\r
47                    <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/blob/develop_v2_1/CHANGE_LOG/change-log.2.1.2.md__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_0xFu4bN$ >";\r
48         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model\r
49                   <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_8UH3XnH$ >";\r
50     }\r
51     revision 2018-12-10 {\r
52         description "ONF Transport API version 2.1.1.\r
53                    Changes included in this TAPI release (v2.1.1) are listed in\r
54                    <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.1.1.md__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur__2p0od1$ >";\r
55         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model\r
56                   <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_8UH3XnH$ >";\r
57     }\r
58     revision 2018-10-16 {\r
59         description "ONF Transport API version 2.1.0.\r
60                    Changes included in this TAPI release (v2.1.0) are listed in\r
61                    <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.1.0.md__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_4DGi8ul$ >";\r
62         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model\r
63                   <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_8UH3XnH$ >";\r
64     }\r
65     revision 2018-03-07 {\r
66         description "ONF Transport API version 2.0.2\r
67         This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.\r
68         Changes in this revision: <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.2.md__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_8KlxwJZ$ >";\r
69         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model\r
70                   <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.2/UML__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_-hMD5Xl$ >";\r
71     }\r
72     revision 2018-02-16 {\r
73         description "ONF Transport API version 2.0.1\r
74         This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.\r
75         Changes in this revision: <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.1.md__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur__C1vuym$ >";\r
76         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model\r
77                   <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.1/UML__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_5DYNwzZ$ >";\r
78     }\r
79     revision 2018-01-02 {\r
80         description "ONF Transport API version 2.0.0\r
81         This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.\r
82         Changes in this revision: <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.0.md__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_1xZSBRA$ >";\r
83         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model\r
84                   <https://urldefense.com/v3/__https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.0/UML__;!!OSsGDw!bx-l35NqfQHpJ8R_DmXfi2NX2ll5dMl9VbK5aS_m3ZShiVoz74Ur_xt-GtqY$ >";\r
85     }\r
86     augment "/tapi-common:context" {\r
87         container connectivity-context {\r
88             uses connectivity-context;\r
89             description "Augments the base TAPI Context with ConnectivityService information";\r
90         }\r
91         description "Augments the base TAPI Context with ConnectivityService information";\r
92     }\r
93     augment "/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point" {\r
94         container cep-list {\r
95             uses cep-list;\r
96             description "none";\r
97         }\r
98         description "none";\r
99     }\r
100    /**************************\r
101     * definitions of references\r
102     **************************/\r
103     grouping connectivity-service-ref {\r
104         leaf connectivity-service-uuid {\r
105             type leafref {\r
106                 path '/tapi-common:context/tapi-connectivity:connectivity-context/tapi-connectivity:connectivity-service/tapi-connectivity:uuid';\r
107             }\r
108             description "none";\r
109         }\r
110         description "none";\r
111     }\r
112     grouping connectivity-service-end-point-ref {\r
113         uses connectivity-service-ref;\r
114         leaf connectivity-service-end-point-local-id {\r
115             type leafref {\r
116                 path '/tapi-common:context/tapi-connectivity:connectivity-context/tapi-connectivity:connectivity-service/tapi-connectivity:end-point/tapi-connectivity:local-id';\r
117             }\r
118             description "none";\r
119         }\r
120         description "none";\r
121     }\r
122     grouping connection-end-point-ref {\r
123         uses tapi-topology:node-edge-point-ref;\r
124         leaf connection-end-point-uuid {\r
125             type leafref {\r
126                 path '/tapi-common:context/tapi-topology:topology-context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-connectivity:cep-list/tapi-connectivity:connection-end-point/tapi-connectivity:uuid';\r
127             }\r
128             description "none";\r
129         }\r
130         description "none";\r
131     }\r
132     grouping connection-ref {\r
133         leaf connection-uuid {\r
134             type leafref {\r
135                 path '/tapi-common:context/tapi-connectivity:connectivity-context/tapi-connectivity:connection/tapi-connectivity:uuid';\r
136             }\r
137             description "none";\r
138         }\r
139         description "none";\r
140     }\r
141     grouping switch-control-ref {\r
142         uses connection-ref;\r
143         leaf switch-control-uuid {\r
144             type leafref {\r
145                 path '/tapi-common:context/tapi-connectivity:connectivity-context/tapi-connectivity:connection/tapi-connectivity:switch-control/tapi-connectivity:uuid';\r
146             }\r
147             description "none";\r
148         }\r
149         description "none";\r
150     }\r
151     grouping route-ref {\r
152         uses connection-ref;\r
153         leaf route-local-id {\r
154             type leafref {\r
155                 path '/tapi-common:context/tapi-connectivity:connectivity-context/tapi-connectivity:connection/tapi-connectivity:route/tapi-connectivity:local-id';\r
156             }\r
157             description "none";\r
158         }\r
159         description "none";\r
160     }\r
161 \r
162    /**************************\r
163     * package object-classes\r
164     **************************/ \r
165     grouping connection {\r
166         list connection-end-point {\r
167             uses connection-end-point-ref;\r
168             key 'topology-uuid node-uuid node-edge-point-uuid connection-end-point-uuid';\r
169             config false;\r
170             min-elements 2;\r
171             description "none";\r
172         }\r
173         list lower-connection {\r
174             uses connection-ref;\r
175             key 'connection-uuid';\r
176             config false;\r
177             description "An Connection object supports a recursive aggregation relationship such that the internal construction of an Connection can be exposed as multiple lower level Connection objects (partitioning).\r
178                 Aggregation is used as for the Node/Topology  to allow changes in hierarchy. \r
179                 Connection aggregation reflects Node/Topology aggregation. \r
180                 The FC represents a Cross-Connection in an NE. The Cross-Connection in an NE is not necessarily the lowest level of FC partitioning.";\r
181         }\r
182         list supported-client-link {\r
183             uses tapi-topology:link-ref;\r
184             key 'topology-uuid link-uuid';\r
185             config false;\r
186             description "none";\r
187         }\r
188         list route {\r
189             key 'local-id';\r
190             config false;\r
191             uses route;\r
192             description "none";\r
193         }\r
194         list switch-control {\r
195             key 'uuid';\r
196             config false;\r
197             uses switch-control;\r
198             description "none";\r
199         }\r
200         leaf direction {\r
201             type tapi-common:forwarding-direction;\r
202             config false;\r
203             description "none";\r
204         }\r
205         leaf layer-protocol-name {\r
206             type tapi-common:layer-protocol-name;\r
207             config false;\r
208             description "none";\r
209         }\r
210         container connection-spec-reference {\r
211             config false;\r
212             uses connection-spec-reference;\r
213             description "Provides the reference to the spec that defines the connection type and cepRoles.";\r
214         }\r
215         uses tapi-common:resource-spec;\r
216         uses tapi-common:operational-state-pac;\r
217         description "The ForwardingConstruct (FC) object class models enabled potential for forwarding between two or more LTPs and like the LTP supports any transport protocol including all circuit and packet forms.\r
218             At the lowest level of recursion, a FC represents a cross-connection within an NE.";\r
219     }\r
220     grouping connection-end-point {\r
221         leaf layer-protocol-name {\r
222             type tapi-common:layer-protocol-name;\r
223             config false;\r
224             description "none";\r
225         }\r
226         leaf layer-protocol-qualifier {\r
227             type tapi-common:layer-protocol-qualifier;\r
228             config false;\r
229             description "none";\r
230         }\r
231         container parent-node-edge-point {\r
232             uses tapi-topology:node-edge-point-ref;\r
233             config false;\r
234             description "none";\r
235         }\r
236         list client-node-edge-point {\r
237             uses tapi-topology:node-edge-point-ref;\r
238             key 'topology-uuid node-uuid node-edge-point-uuid';\r
239             config false;\r
240             description "none";\r
241         }\r
242         list aggregated-connection-end-point {\r
243             uses connection-end-point-ref;\r
244             key 'topology-uuid node-uuid node-edge-point-uuid connection-end-point-uuid';\r
245             config false;\r
246             description "none";\r
247         }\r
248         leaf connection-port-direction {\r
249             type tapi-common:port-direction;\r
250             config false;\r
251             description "The orientation of defined flow at the EndPoint.";\r
252         }\r
253         leaf connection-port-role {\r
254             type tapi-common:port-role;\r
255             config false;\r
256             description "Each EP of the FC has a role (e.g., working, protection, protected, symmetric, hub, spoke, leaf, root)  in the context of the FC with respect to the FC function. ";\r
257         }\r
258         list cep-role {\r
259             uses cep-role;\r
260                         config false;\r
261             description "Defines the role of the CEP in the context of the connection spec.\r
262                 There may be many cep role - connection spec combinations for a particular CEP where each corresponds to a specific connection associated with the CEP.";\r
263         }\r
264         uses tapi-common:resource-spec;\r
265         uses tapi-common:operational-state-pac;\r
266         uses tapi-common:termination-pac;\r
267         description "The LogicalTerminationPoint (LTP) object class encapsulates the termination and adaptation functions of one or more transport layers. \r
268             The structure of LTP supports all transport protocols including circuit and packet forms.";\r
269     }\r
270     grouping connectivity-constraint {\r
271         leaf service-layer {\r
272             type tapi-common:layer-protocol-name;\r
273             description "none";\r
274         }\r
275         leaf service-type {\r
276             type service-type;\r
277             description "none";\r
278         }\r
279         leaf service-level {\r
280             type string;\r
281             description "An abstract value the meaning of which is mutually agreed – typically represents metrics such as - Class of service, priority, resiliency, availability";\r
282         }\r
283         container requested-capacity {\r
284             uses tapi-common:capacity;\r
285             description "none";\r
286         }\r
287         leaf connectivity-direction {\r
288             type tapi-common:forwarding-direction;\r
289             description "none";\r
290         }\r
291         container schedule {\r
292             uses tapi-common:time-range;\r
293             description "none";\r
294         }\r
295         container coroute-inclusion {\r
296             uses connectivity-service-ref;\r
297             description "none";\r
298         }\r
299         list diversity-exclusion {\r
300             uses connectivity-service-ref;\r
301             key 'connectivity-service-uuid';\r
302             description "none";\r
303         }\r
304         leaf-list connection-exclusion {\r
305             type tapi-common:uuid;\r
306             description "none";\r
307         }\r
308         leaf-list connection-inclusion {\r
309             type tapi-common:uuid;\r
310             description "A ConnectivityService may use one or more existing Connections.\r
311                 A common traditional strategy is to set up “stranded” connectivity in the core of the network as “express channels” (this is essentially a serial compound link, but can be treated as simple connections)\r
312                 A connection inclusion capability allows for adoption of a discovered Connections.\r
313                 A ConnectivityService is requested with a connection inclusion constraint that identifies a connection (or chain of connections) that is bounded by CEPs that each belong to a NEP that references a SIP that is referenced by a CSEP of the ConnectivityService such that all CSEPs are satisfied by CEPs of the existing Connection. will allow discovered Connections with no stated intent to be associated with an intent via the ConnectivityService.";\r
314         }\r
315         description "none";\r
316     }\r
317     grouping connectivity-service {\r
318         list end-point {\r
319             key 'local-id';\r
320             min-elements 2;\r
321             uses connectivity-service-end-point;\r
322             description "none";\r
323         }\r
324         list connection {\r
325             uses connection-ref;\r
326             key 'connection-uuid';\r
327             config false;\r
328             description "none";\r
329         }\r
330         uses tapi-common:service-spec;\r
331         uses connectivity-constraint;\r
332         uses tapi-path-computation:routing-constraint;\r
333         uses tapi-path-computation:topology-constraint;\r
334         uses resilience-constraint;\r
335         uses tapi-common:admin-state-pac;\r
336         description "The ForwardingConstruct (FC) object class models enabled potential for forwarding between two or more LTPs and like the LTP supports any transport protocol including all circuit and packet forms.\r
337             At the lowest level of recursion, a FC represents a cross-connection within an NE.";\r
338     }\r
339     grouping connectivity-service-end-point {\r
340         leaf layer-protocol-name {\r
341             type tapi-common:layer-protocol-name;\r
342             description "none";\r
343         }\r
344         leaf layer-protocol-qualifier {\r
345             type tapi-common:layer-protocol-qualifier;\r
346             description "none";\r
347         }\r
348         container service-interface-point {\r
349             uses tapi-common:service-interface-point-ref;\r
350             description "none";\r
351         }\r
352         list connection-end-point {\r
353             uses connection-end-point-ref;\r
354             key 'topology-uuid node-uuid node-edge-point-uuid connection-end-point-uuid';\r
355             config false;\r
356             description "none";\r
357         }\r
358         container capacity {\r
359             uses tapi-common:capacity;\r
360             description "none";\r
361         }\r
362         leaf direction {\r
363             type tapi-common:port-direction;\r
364             description "The orientation of defined flow at the EndPoint.";\r
365         }\r
366         leaf role {\r
367             type tapi-common:port-role;\r
368             description "Each EP of the FC has a role (e.g., working, protection, protected, symmetric, hub, spoke, leaf, root)  in the context of the FC with respect to the FC function. ";\r
369         }\r
370         leaf protection-role {\r
371             type protection-role;\r
372             description "To specify the protection role of this Port when create or update ConnectivityService.";\r
373         }\r
374         container peer-fwd-connectivity-service-end-point {\r
375             uses connectivity-service-end-point-ref;\r
376             description "none";\r
377         }\r
378         container protecting-connectivity-service-end-point {\r
379             uses connectivity-service-end-point-ref;\r
380             description "none";\r
381         }\r
382         container server-connectivity-service-end-point {\r
383             uses connectivity-service-end-point-ref;\r
384             description "none";\r
385         }\r
386         uses tapi-common:local-class;\r
387         uses tapi-common:admin-state-pac;\r
388         description "The association of the FC to LTPs is made via EndPoints.\r
389             The EndPoint (EP) object class models the access to the FC function. \r
390             The traffic forwarding between the associated EPs of the FC depends upon the type of FC and may be associated with FcSwitch object instances.  \r
391             In cases where there is resilience the EndPoint may convey the resilience role of the access to the FC. \r
392             It can represent a protected (resilient/reliable) point or a protecting (unreliable working or protection) point.\r
393             The EP replaces the Protection Unit of a traditional protection model. \r
394             The ForwadingConstruct can be considered as a component and the EndPoint as a Port on that component";\r
395     }\r
396     grouping route {\r
397         list connection-end-point {\r
398             uses connection-end-point-ref;\r
399             key 'topology-uuid node-uuid node-edge-point-uuid connection-end-point-uuid';\r
400             config false;\r
401             min-elements 2;\r
402             description "none";\r
403         }\r
404         container resilience-route-pac {\r
405             uses resilience-route;\r
406             description "Provides optional resilience and state attributes to the Route.";\r
407         }\r
408         uses tapi-common:local-class;\r
409         description "The Route of a Connection is modeled as a collection of Connection End Points.\r
410             The logical order of the Connection End Points within the Route object can be inferred by the TAPI client by the knowledge of the Topology information.";\r
411     }\r
412     grouping connectivity-context {\r
413         list connectivity-service {\r
414             key 'uuid';\r
415             uses connectivity-service;\r
416             description "none";\r
417         }\r
418         list connection {\r
419             key 'uuid';\r
420             config false;\r
421             uses connection;\r
422             description "none";\r
423         }\r
424         description "none";\r
425     }\r
426     grouping switch {\r
427         list selected-connection-end-point {\r
428             uses connection-end-point-ref;\r
429             key 'topology-uuid node-uuid node-edge-point-uuid connection-end-point-uuid';\r
430             config false;\r
431             min-elements 1;\r
432             description "none";\r
433         }\r
434         list selected-route {\r
435             uses route-ref;\r
436             key 'connection-uuid route-local-id';\r
437                         config false;\r
438             min-elements 1;\r
439             description "none";\r
440         }\r
441         leaf selection-control {\r
442             type selection-control;\r
443             description "Degree of administrative control applied to the switch selection.";\r
444         }\r
445         leaf selection-reason {\r
446             type selection-reason;\r
447             config false;\r
448             description "The reason for the current switch selection.";\r
449         }\r
450         leaf switch-direction {\r
451             type tapi-common:port-direction;\r
452             description "Indicates whether the switch selects from ingress to the FC or to egress of the FC, or both.";\r
453         }\r
454         uses tapi-common:local-class;\r
455         description "The class models the switched forwarding of traffic (traffic flow) between FcPorts (ConnectionEndPoints) and is present where there is protection functionality in the FC (Connection). \r
456             If an FC exposes protection (having two or more FcPorts that provide alternative identical inputs/outputs), the FC will have one or more associated FcSwitch objects to represent the alternative flow choices visible at the edge of the FC.\r
457             The FC switch represents and defines a protection switch structure encapsulated in the FC. \r
458             Essentially performs one of the functions of the Protection Group in a traditional model. It associates to 2 or more FcPorts each playing the role of a Protection Unit. \r
459             One or more protection, i.e. standby/backup, FcPorts provide protection for one or more working (i.e. regular/main/preferred) FcPorts where either protection or working can feed one or more protected FcPort.\r
460             The switch may be used in revertive or non-revertive (symmetric) mode. When in revertive mode it may define a waitToRestore time.\r
461             It may be used in one of several modes including source switch, destination switched, source and destination switched etc (covering cases such as 1+1 and 1:1).\r
462             It may be locked out (prevented from switching), force switched or manual switched.\r
463             It will indicate switch state and change of state.\r
464             The switch can be switched away from all sources such that it becomes open and hence two coordinated switches can both feed the same LTP so long as at least one of the two is switched away from all sources (is 'open').\r
465             The ability for a Switch to be 'high impedance' allows bidirectional ForwardingConstructs to be overlaid on the same bidirectional LTP where the appropriate control is enabled to prevent signal conflict.\r
466             This ability allows multiple alternate routes to be present that otherwise would be in conflict.";\r
467     }\r
468     grouping switch-control {\r
469         list sub-switch-control {\r
470             uses switch-control-ref;\r
471             key 'connection-uuid switch-control-uuid';\r
472             config false;\r
473             description "none";\r
474         }\r
475         list switch {\r
476             key 'local-id';\r
477             uses switch;\r
478             description "none";\r
479         }\r
480         uses tapi-common:resource-spec;\r
481         uses resilience-constraint;\r
482         description "Represents the capability to control and coordinate switches, to add/delete/modify FCs and to add/delete/modify LTPs/LPs so as to realize a protection scheme.";\r
483     }\r
484     grouping resilience-constraint {\r
485         container resilience-type {\r
486             uses tapi-topology:resilience-type;\r
487             description "none";\r
488         }\r
489         leaf restoration-coordinate-type {\r
490             type coordinate-type;\r
491             description " The coordination mechanism between multi-layers.";\r
492         }\r
493         leaf restore-priority {\r
494             type uint64;\r
495             description "none";\r
496         }\r
497         leaf reversion-mode {\r
498             type reversion-mode;\r
499             description "Indcates whether the protection scheme is revertive or non-revertive.";\r
500         }\r
501         leaf wait-to-revert-time {\r
502             type uint64;\r
503             default "15";\r
504             description "If the protection system is revertive, this attribute specifies the time, in minutes, to wait after a fault clears on a higher priority (preferred) resource before reverting to the preferred resource.";\r
505         }\r
506         leaf hold-off-time {\r
507             type uint64;\r
508             description "This attribute indicates the time, in milliseconds, between declaration of signal degrade or signal fail, and the initialization of the protection switching algorithm.";\r
509         }\r
510         leaf is-lock-out {\r
511             type boolean;\r
512             description "The resource is configured to temporarily not be available for use in the protection scheme(s) it is part of.\r
513                 This overrides all other protection control states including forced.\r
514                 If the item is locked out then it cannot be used under any circumstances.\r
515                 Note: Only relevant when part of a protection scheme.";\r
516         }\r
517         leaf is-frozen {\r
518             type boolean;\r
519             description "Temporarily prevents any switch action to be taken and, as such, freezes the current state. \r
520                 Until the freeze is cleared, additional near-end external commands are rejected and fault condition changes and received APS messages are ignored.\r
521                 All administrative controls of any aspect of protection are rejected.";\r
522         }\r
523         leaf is-coordinated-switching-both-ends {\r
524             type boolean;\r
525             description "Is operating such that switching at both ends of each flow acorss the FC is coordinated at both ingress and egress ends.";\r
526         }\r
527         leaf max-switch-times {\r
528             type uint64;\r
529             description "Used to limit the maximum swtich times. When work fault disappears , and traffic return to the original work path, switch counter reset.";\r
530         }\r
531         leaf-list preferred-restoration-layer {\r
532             type tapi-common:layer-protocol-name;\r
533             description "Indicate which layer this resilience parameters package configured for.";\r
534         }\r
535         description "A list of control parameters to apply to a switch.";\r
536     }\r
537     grouping cep-list {\r
538         list connection-end-point {\r
539             key 'uuid';\r
540             uses connection-end-point;\r
541             description "none";\r
542         }\r
543         description "none";\r
544     }\r
545     grouping resilience-route {\r
546         leaf priority {\r
547             type uint64;\r
548             config false;\r
549             description "Value of 0 (zero) means 'unspecified priority'.\r
550                 Highest priority is 1, sometimes referred as 'preferred' or 'main' or 'intended' route.\r
551                 2 has lower priority than 1, 3 has lower priority than 2, etc.";\r
552         }\r
553         leaf route-state {\r
554             type route-state;\r
555             config false;\r
556             description "Current information on the route selection.";\r
557         }\r
558         uses tapi-common:local-class;\r
559         description "This object adds resilience and state attributes to the Route.\r
560             When this object is not present, then the Route is intendend as 'current' Route of the Connection.";\r
561     }\r
562 \r
563     /**************************\r
564     * package type-definitions\r
565     **************************/ \r
566     identity ROUTE_STATE {\r
567         description "none";\r
568     }\r
569     identity ROUTE_STATE_CURRENT {\r
570         base ROUTE_STATE;\r
571         description "The route identified is the current route, i.e., is the one that is active and selected to support service.\r
572             ";\r
573     }\r
574     identity ROUTE_STATE_NOT_CURRENT {\r
575         base ROUTE_STATE;\r
576         description "The route is not the one supporting the service.";\r
577     }\r
578     identity ROUTE_STATE_UNKNOWN {\r
579         base ROUTE_STATE;\r
580         description "The route state is unknown.";\r
581     }\r
582     typedef service-type {\r
583         type enumeration {\r
584             enum POINT_TO_POINT_CONNECTIVITY {\r
585                 description "none";\r
586             }\r
587             enum POINT_TO_MULTIPOINT_CONNECTIVITY {\r
588                 description "none";\r
589             }\r
590             enum MULTIPOINT_CONNECTIVITY {\r
591                 description "none";\r
592             }\r
593             enum ROOTED_MULTIPOINT_CONNECTIVITY {\r
594                 description "none";\r
595             }\r
596         }\r
597         description "none";\r
598     }\r
599     typedef reversion-mode {\r
600         type enumeration {\r
601             enum REVERTIVE {\r
602                 description "An FC switched to a lower priority (non-preferred) resource will revert to a higher priority (preferred) resource when that recovers (potentially after some hold-off time).";\r
603             }\r
604             enum NON-REVERTIVE {\r
605                 description "An FC switched to a lower priority (non-preferred) resource will not revert to a higher priority (preferred) resource when that recovers.";\r
606             }\r
607         }\r
608         description "The reversion mode associated with protection.";\r
609     }\r
610     typedef selection-control {\r
611         type enumeration {\r
612             enum LOCK_OUT {\r
613                 description "The resource is configured to temporarily not be available for use in the protection scheme(s) it is part of.\r
614                     This overrides all other protection control states including forced.\r
615                     If the item is locked out then it cannot be used under any circumstances.\r
616                     Note: Only relevant when part of a protection scheme.";\r
617             }\r
618             enum NORMAL {\r
619                 description "none";\r
620             }\r
621             enum MANUAL {\r
622                 description "none";\r
623             }\r
624             enum FORCED {\r
625                 description "none";\r
626             }\r
627         }\r
628         description "Possible degrees of administrative control applied to the Route selection.";\r
629     }\r
630     typedef selection-reason {\r
631         type enumeration {\r
632             enum LOCKOUT {\r
633                 description "none";\r
634             }\r
635             enum NORMAL {\r
636                 description "none";\r
637             }\r
638             enum MANUAL {\r
639                 description "none";\r
640             }\r
641             enum FORCED {\r
642                 description "none";\r
643             }\r
644             enum WAIT_TO_REVERT {\r
645                 description "none";\r
646             }\r
647             enum SIGNAL_DEGRADE {\r
648                 description "none";\r
649             }\r
650             enum SIGNAL_FAIL {\r
651                 description "none";\r
652             }\r
653         }\r
654         description "The cause of the current route selection.";\r
655     }\r
656     typedef coordinate-type {\r
657         type enumeration {\r
658             enum NO_COORDINATE {\r
659                 description "none";\r
660             }\r
661             enum HOLD_OFF_TIME {\r
662                 description "none";\r
663             }\r
664             enum WAIT_FOR_NOTIFICATION {\r
665                 description "none";\r
666             }\r
667         }\r
668         description "none";\r
669     }\r
670     typedef protection-role {\r
671         type enumeration {\r
672             enum WORK {\r
673                 description "none";\r
674             }\r
675             enum PROTECT {\r
676                 description "none";\r
677             }\r
678             enum PROTECTED {\r
679                 description "none";\r
680             }\r
681             enum NA {\r
682                 description "none";\r
683             }\r
684             enum WORK_RESTORE {\r
685                 description "none";\r
686             }\r
687             enum PROTECT_RESTORE {\r
688                 description "none";\r
689             }\r
690         }\r
691         description "none";\r
692     }\r
693     grouping cep-role {\r
694         leaf role-name {\r
695             type string;\r
696             description "The name of the cep role in the context of the referenced spec.";\r
697         }\r
698         container connection-spec-reference {\r
699             config false;\r
700             uses connection-spec-reference;\r
701             description "The reference to the spec that defines the cep role.";\r
702         }\r
703         description "The role of the cep in the context of the connection spec.";\r
704     }\r
705     grouping connection-spec-reference {\r
706         leaf connection-spec-id {\r
707             type tapi-common:uuid;\r
708             config false;\r
709             description "The reference to a formal spec. \r
710                 This reference need not be provided (e.g., where there is no formal machine interpretable spec for the type of connection).";\r
711         }\r
712         leaf connection-spec-name {\r
713             type string;\r
714             config false;\r
715             description "The name of the connection spec.\r
716                 This can be used alone (with no spec reference) where there is only a paper spec.";\r
717         }\r
718         description "The reference to a spec for a type of connection.";\r
719     }\r
720     typedef route-state {\r
721         type identityref {\r
722             base ROUTE_STATE;\r
723         }\r
724         description "Potential route states.";\r
725     }\r
726 \r
727     /**************************\r
728     * package interfaces\r
729     **************************/ \r
730     rpc get-connection-details {\r
731         description "none";\r
732         input {\r
733             leaf connection-id-or-name {\r
734                 type string;\r
735                 description "none";\r
736             }\r
737         }\r
738         output {\r
739             container connection {\r
740                 uses connection;\r
741                 description "none";\r
742             }\r
743         }\r
744     }\r
745     rpc get-connectivity-service-list {\r
746         description "none";\r
747         output {\r
748             list service {\r
749                 key 'uuid';\r
750                 uses connectivity-service;\r
751                 description "none";\r
752             }\r
753         }\r
754     }\r
755     rpc get-connectivity-service-details {\r
756         description "none";\r
757         input {\r
758             leaf service-id-or-name {\r
759                 type string;\r
760                 description "none";\r
761             }\r
762         }\r
763         output {\r
764             container service {\r
765                 uses connectivity-service;\r
766                 description "none";\r
767             }\r
768         }\r
769     }\r
770     rpc create-connectivity-service {\r
771         description "none";\r
772         input {\r
773             list end-point {\r
774                 key 'local-id';\r
775                 min-elements 2;\r
776                 uses connectivity-service-end-point;\r
777                 description "none";\r
778             }\r
779             container connectivity-constraint {\r
780                 uses connectivity-constraint;\r
781                 description "none";\r
782             }\r
783             container routing-constraint {\r
784                 uses tapi-path-computation:routing-constraint;\r
785                 description "none";\r
786             }\r
787             container topology-constraint {\r
788                 uses tapi-path-computation:topology-constraint;\r
789                 description "none";\r
790             }\r
791             container resilience-constraint {\r
792                 uses resilience-constraint;\r
793                 description "none";\r
794             }\r
795             leaf state {\r
796                 type string;\r
797                 description "none";\r
798             }\r
799         }\r
800         output {\r
801             container service {\r
802                 uses connectivity-service;\r
803                 description "none";\r
804             }\r
805         }\r
806     }\r
807     rpc update-connectivity-service {\r
808         description "none";\r
809         input {\r
810             leaf service-id-or-name {\r
811                 type string;\r
812                 description "none";\r
813             }\r
814             list end-point {\r
815                 key 'local-id';\r
816                 uses connectivity-service-end-point;\r
817                 description "none";\r
818             }\r
819             container connectivity-constraint {\r
820                 uses connectivity-constraint;\r
821                 description "none";\r
822             }\r
823             container routing-constraint {\r
824                 uses tapi-path-computation:routing-constraint;\r
825                 description "none";\r
826             }\r
827             container topology-constraint {\r
828                 uses tapi-path-computation:topology-constraint;\r
829                 description "none";\r
830             }\r
831             container resilience-constraint {\r
832                 uses resilience-constraint;\r
833                 description "none";\r
834             }\r
835             leaf state {\r
836                 type string;\r
837                 description "none";\r
838             }\r
839         }\r
840         output {\r
841             container service {\r
842                 uses connectivity-service;\r
843                 description "none";\r
844             }\r
845         }\r
846     }\r
847     rpc delete-connectivity-service {\r
848         description "none";\r
849         input {\r
850             leaf service-id-or-name {\r
851                 type string;\r
852                 description "none";\r
853             }\r
854         }\r
855     }\r
856     rpc get-connection-end-point-details {\r
857         description "none";\r
858         input {\r
859             leaf topology-id-or-name {\r
860                 type string;\r
861                 description "none";\r
862             }\r
863             leaf node-id-or-name {\r
864                 type string;\r
865                 description "none";\r
866             }\r
867             leaf nep-id-or-name {\r
868                 type string;\r
869                 description "none";\r
870             }\r
871             leaf cep-id-or-name {\r
872                 type string;\r
873                 description "none";\r
874             }\r
875         }\r
876         output {\r
877             container connection-end-point {\r
878                 uses connection-end-point;\r
879                 description "none";\r
880             }\r
881         }\r
882     }\r
883 \r
884 }\r