Add TAPI Topology simulated network function type.
[sim/o1-interface.git] / ntsimulator / deploy / smo-nts-ng-topology-server / yang / tapi-virtual-network@2020-06-16.yang
1 module tapi-virtual-network {\r
2     namespace "urn:onf:otcc:yang:tapi-virtual-network";\r
3     prefix tapi-virtual-network;\r
4     import tapi-topology {\r
5         prefix tapi-topology;\r
6     }\r
7     import tapi-common {\r
8         prefix tapi-common;\r
9     }\r
10     organization "ONF OTCC (Open Transport Configuration & Control) Project";\r
11     contact "\r
12          Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>\r
13          Project List: <mailto:transport-api@opennetworking.org>\r
14          Editor: Karthik Sethuraman <mailto:karthik.sethuraman@necam.com>\r
15          Andrea Mazzini <mailto:andrea.mazzini@nokia.com>\r
16          Arturo Mayoral <mailto:arturo.mayoral@telefonica.com>\r
17          Nigel Davis <mailto:ndavis@ciena.com>";\r
18     description "\r
19         This module contains TAPI Virtual Network Model definitions.\r
20         Source: TapiVirtualNetwork.uml\r
21         - The TAPI YANG models included in this TAPI release are a *normative* part of the TAPI SDK.\r
22         - The YANG specifications have been generated from the corresponding UML model using the [ONF EAGLE UML2YANG mapping tool]\r
23         <https://github.com/OpenNetworkingFoundation/EagleUmlYang>\r
24         and further edited manually to comply with the [ONF IISOMI UML2YANG mapping guidelines]\r
25         <https://wiki.opennetworking.org/display/OIMT/UML+-+YANG+Guidelines>\r
26         - Status of YANG model artifacts can be determined by referring to the corresponding UML artifacts.\r
27         As described in the UML models, some artifacts are considered *experimental*, and thus the corresponding YANG artifacts.\r
28         - The ONF TAPI release process does not guarantee backward compatibility of YANG models across major versions of TAPI releases.\r
29         The YANG model backward compatibility criteria are outlined in section 11 of <https://tools.ietf.org/html/rfc7950>.\r
30         YANG models included in this release may not be backward compatible with previous TAPI releases.\r
31         Copyright (c) 2018 Open Networking Foundation (ONF). All rights reserved.\r
32         License: This module is distributed under the Apache License 2.0.";\r
33     revision 2020-06-16 {\r
34         description "ONF Transport API version 2.1.3.\r
35                    - schedule type changed to tapi-common:time-range.\r
36                    Changes included in this TAPI release (v2.1.3) are listed in\r
37                    <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop_v2_1/CHANGE_LOG/change-log.2.1.3.md>";\r
38         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model\r
39                   <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML>";\r
40     }\r
41     revision 2019-07-16 {\r
42         description "ONF Transport API version 2.1.2.\r
43                    Changes included in this TAPI release (v2.1.2) are listed in\r
44                    <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop_v2_1/CHANGE_LOG/change-log.2.1.2.md>";\r
45         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model\r
46                   <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML>";\r
47     }\r
48     revision 2018-12-10 {\r
49         description "ONF Transport API version 2.1.1.\r
50                    Changes included in this TAPI release (v2.1.1) are listed in\r
51                    <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.1.1.md>";\r
52         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model\r
53                   <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML>";\r
54     }\r
55     revision 2018-10-16 {\r
56         description "ONF Transport API version 2.1.0.\r
57                    Changes included in this TAPI release (v2.1.0) are listed in\r
58                    <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.1.0.md>";\r
59         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 7950, RFC 6087 and ONF TAPI UML model\r
60                   <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML>";\r
61     }\r
62     revision 2018-03-07 {\r
63         description "ONF Transport API version 2.0.2\r
64         This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.\r
65         Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.2.md>";\r
66         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model\r
67                   <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.2/UML>";\r
68     }\r
69     revision 2018-02-16 {\r
70         description "ONF Transport API version 2.0.1\r
71         This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.\r
72         Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.1.md>";\r
73         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model\r
74                   <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.1/UML>";\r
75     }\r
76     revision 2018-01-02 {\r
77         description "ONF Transport API version 2.0.0\r
78         This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.\r
79         Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.0.md>";\r
80         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model\r
81                   <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.0/UML>";\r
82     }\r
83     augment "/tapi-common:context" {\r
84         container virtual-network-context {\r
85             uses virtual-network-context;\r
86             description "Augments the base TAPI Context with VirtualNetworkService information";\r
87         }\r
88         description "Augments the base TAPI Context with VirtualNetworkService information";\r
89     }\r
90    /**************************\r
91     * definitions of references\r
92     **************************/\r
93     grouping virtual-nw-service-ref {\r
94         leaf virtual-nw-service-uuid {\r
95             type leafref {\r
96                 path '/tapi-common:context/tapi-virtual-network:virtual-network-context/tapi-virtual-network:virtual-nw-service/tapi-virtual-network:uuid';\r
97             }\r
98             description "none";\r
99         }\r
100         description "none";\r
101     }\r
102 \r
103    /**************************\r
104     * package object-classes\r
105     **************************/ \r
106     grouping virtual-network-constraint {\r
107         container src-service-end-point {\r
108             uses tapi-common:service-interface-point-ref;\r
109             config false;\r
110             description "none";\r
111         }\r
112         container sink-service-end-point {\r
113             uses tapi-common:service-interface-point-ref;\r
114             config false;\r
115             description "none";\r
116         }\r
117         list diversity-exclusion {\r
118             uses virtual-nw-service-ref;\r
119             key 'virtual-nw-service-uuid';\r
120             config false;\r
121             description "none";\r
122         }\r
123         container requested-capacity {\r
124             uses tapi-common:capacity;\r
125             description "none";\r
126         }\r
127         leaf service-level {\r
128             type string;\r
129             description "An abstract value the meaning of which is mutually agreed – typically represents metrics such as - Class of service, priority, resiliency, availability";\r
130         }\r
131         leaf-list service-layer {\r
132             type tapi-common:layer-protocol-name;\r
133             description "none";\r
134         }\r
135         list cost-characteristic {\r
136             key 'cost-name';\r
137             uses tapi-topology:cost-characteristic;\r
138             description "The list of costs where each cost relates to some aspect of the TopologicalEntity.";\r
139         }\r
140         list latency-characteristic {\r
141             key 'traffic-property-name';\r
142             uses tapi-topology:latency-characteristic;\r
143             description "The effect on the latency of a queuing process. This only has significant effect for packet based systems and has a complex characteristic.";\r
144         }\r
145         uses tapi-common:local-class;\r
146         description "none";\r
147     }\r
148     grouping virtual-network-service {\r
149         container topology {\r
150             uses tapi-topology:topology-ref;\r
151             config false;\r
152             description "none";\r
153         }\r
154         list end-point {\r
155             key 'local-id';\r
156             min-elements 2;\r
157             uses virtual-network-service-end-point;\r
158             description "none";\r
159         }\r
160         list vnw-constraint {\r
161             key 'local-id';\r
162             min-elements 1;\r
163             uses virtual-network-constraint;\r
164             description "none";\r
165         }\r
166         container schedule {\r
167             uses tapi-common:time-range;\r
168             description "none";\r
169         }\r
170         container state {\r
171             uses tapi-common:admin-state-pac;\r
172             description "none";\r
173         }\r
174         leaf-list layer-protocol-name {\r
175             type tapi-common:layer-protocol-name;\r
176             min-elements 1;\r
177             description "none";\r
178         }\r
179         uses tapi-common:service-spec;\r
180         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
181             At the lowest level of recursion, a FC represents a cross-connection within an NE.";\r
182     }\r
183     grouping virtual-network-service-end-point {\r
184         container service-interface-point {\r
185             uses tapi-common:service-interface-point-ref;\r
186             config false;\r
187             description "none";\r
188         }\r
189         leaf role {\r
190             type tapi-common:port-role;\r
191             config false;\r
192             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
193         }\r
194         leaf direction {\r
195             type tapi-common:port-direction;\r
196             config false;\r
197             description "The orientation of defined flow at the EndPoint.";\r
198         }\r
199         leaf service-layer {\r
200             type tapi-common:layer-protocol-name;\r
201             config false;\r
202             description "none";\r
203         }\r
204         uses tapi-common:local-class;\r
205         description "The association of the FC to LTPs is made via EndPoints.\r
206             The EndPoint (EP) object class models the access to the FC function. \r
207             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
208             In cases where there is resilience the EndPoint may convey the resilience role of the access to the FC. \r
209             It can represent a protected (resilient/reliable) point or a protecting (unreliable working or protection) point.\r
210             The EP replaces the Protection Unit of a traditional protection model. \r
211             The ForwadingConstruct can be considered as a component and the EndPoint as a Port on that component";\r
212     }\r
213     grouping virtual-network-context {\r
214         list virtual-nw-service {\r
215             key 'uuid';\r
216             uses virtual-network-service;\r
217             description "none";\r
218         }\r
219         description "none";\r
220     }\r
221 \r
222     /**************************\r
223     * package interfaces\r
224     **************************/ \r
225     rpc create-virtual-network-service {\r
226         description "none";\r
227         input {\r
228             list sep {\r
229                 min-elements 2;\r
230                 uses virtual-network-service-end-point;\r
231                 description "none";\r
232             }\r
233             container vnw-constraint {\r
234                 uses virtual-network-constraint;\r
235                 description "none";\r
236             }\r
237             container conn-schedule {\r
238                 uses tapi-common:time-range;\r
239                 description "none";\r
240             }\r
241         }\r
242         output {\r
243             container service {\r
244                 uses virtual-network-service;\r
245                 description "none";\r
246             }\r
247         }\r
248     }\r
249     rpc delete-virtual-network-service {\r
250         description "none";\r
251         input {\r
252             leaf service-id-or-name {\r
253                 type string;\r
254                 description "none";\r
255             }\r
256         }\r
257         output {\r
258             container service {\r
259                 uses virtual-network-service;\r
260                 description "none";\r
261             }\r
262         }\r
263     }\r
264     rpc get-virtual-network-service-details {\r
265         description "none";\r
266         input {\r
267             leaf service-id-or-name {\r
268                 type string;\r
269                 description "none";\r
270             }\r
271         }\r
272         output {\r
273             container service {\r
274                 uses virtual-network-service;\r
275                 description "none";\r
276             }\r
277         }\r
278     }\r
279     rpc get-virtual-network-service-list {\r
280         description "none";\r
281         output {\r
282             list service {\r
283                 uses virtual-network-service;\r
284                 description "none";\r
285             }\r
286         }\r
287     }\r
288 \r
289 }\r