50d8828db5ff701aa422630f514fed35459cef85
[ccsdk/features.git] /
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 "
12         Project Web: <https://wiki.opennetworking.org/display/OTCC/TAPI>
13         Project List: <mailto:transport-api@opennetworking.org>
14         Editor: Karthik Sethuraman
15                 <mailto:karthik.sethuraman@necam.com>";\r
16     description "\r
17         This module contains TAPI Virtual Network Model definitions.\r
18         Source: TapiVirtualNetwork.uml\r
19         Copyright (c) 2018 Open Networking Foundation (ONF). All rights reserved.\r
20         License: This module is distributed under the Apache License 2.0";\r
21     revision 2018-08-31 {\r
22         description "ONF Transport API version 2.1.0
23         This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.
24         Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.1.0.md>";\r
25         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
26                   <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.1.0/UML>";\r
27     }\r
28     revision 2018-03-07 {\r
29         description "ONF Transport API version 2.0.2
30         This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.
31         Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.2.md>";\r
32         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
33                   <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.2/UML>";\r
34     }\r
35     revision 2018-02-16 {\r
36         description "ONF Transport API version 2.0.1
37         This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.
38         Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.1.md>";\r
39         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
40                   <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.1/UML>";\r
41     }\r
42     revision 2018-01-02 {\r
43         description "ONF Transport API version 2.0.0
44         This YANG module has been generated from the TAPI UML Model using the IISOMI-Eagle xmi2yang mapping tool.
45         Changes in this revision: <https://github.com/OpenNetworkingFoundation/TAPI/blob/develop/CHANGE_LOG/change-log.2.0.0.md>";\r
46         reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020, RFC 6087 and ONF TAPI UML model
47                   <https://github.com/OpenNetworkingFoundation/TAPI/tree/v2.0.0/UML>";\r
48     }\r
49     augment "/tapi-common:context" {\r
50         uses virtual-network-context-g;\r
51         description "Augments the base TAPI Context with VirtualNetworkService information";\r
52     }\r
53     /*************************\r
54      * definitions of refrences\r
55      *************************/\r
56      grouping virtual-nw-service-ref-g {\r
57          leaf virtual-nw-service-uuid {\r
58              type leafref {\r
59                  path '/tapi-common:context/tapi-virtual-network:virtual-nw-service/tapi-virtual-network:uuid';\r
60              }\r
61              description "none";\r
62          }\r
63          description "none";\r
64      }\r
65      \r
66     /***********************\r
67     * package object-classes\r
68     **********************/ \r
69         grouping virtual-network-constraint-g {\r
70             container src-service-end-point {\r
71                 uses tapi-common:service-interface-point-ref-g;\r
72                 config false;\r
73                 description "none";\r
74             }\r
75             container sink-service-end-point {\r
76                 uses tapi-common:service-interface-point-ref-g;\r
77                 config false;\r
78                 description "none";\r
79             }\r
80             list diversity-exclusion {\r
81                 uses virtual-nw-service-ref-g;\r
82                 key 'virtual-nw-service-uuid';\r
83                 config false;\r
84                 description "none";\r
85             }\r
86             container requested-capacity {\r
87                 uses tapi-common:capacity-g;\r
88                 description "none";\r
89             }\r
90             leaf service-level {\r
91                 type string;\r
92                 description "An abstract value the meaning of which is mutually agreed – typically represents metrics such as - Class of service, priority, resiliency, availability";\r
93             }\r
94             leaf-list service-layer {\r
95                 type tapi-common:layer-protocol-name;\r
96                 description "none";\r
97             }\r
98             list cost-characteristic {\r
99                 key 'cost-name';\r
100                 uses tapi-topology:cost-characteristic-g;\r
101                 description "The list of costs where each cost relates to some aspect of the TopologicalEntity.";\r
102             }\r
103             list latency-characteristic {\r
104                 key 'traffic-property-name';\r
105                 uses tapi-topology:latency-characteristic-g;\r
106                 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
107             }\r
108             uses tapi-common:local-class-g;\r
109             description "none";\r
110         }\r
111         grouping virtual-network-service-g {\r
112             container topology {\r
113                 uses tapi-topology:topology-ref-g;\r
114                 config false;\r
115                 description "none";\r
116             }\r
117             list end-point {\r
118                 key 'local-id';\r
119                 min-elements 2;\r
120                 uses virtual-network-service-end-point-g;\r
121                 description "none";\r
122             }\r
123             list vnw-constraint {\r
124                 key 'local-id';\r
125                 min-elements 1;\r
126                 uses virtual-network-constraint-g;\r
127                 description "none";\r
128             }\r
129             leaf schedule {\r
130                 type string;\r
131                 description "none";\r
132             }\r
133             container state {\r
134                 uses tapi-common:admin-state-pac-g;\r
135                 description "none";\r
136             }\r
137             leaf-list layer-protocol-name {\r
138                 type tapi-common:layer-protocol-name;\r
139                 min-elements 1;\r
140                 description "none";\r
141             }\r
142             uses tapi-common:service-spec-g;\r
143             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
144                 At the lowest level of recursion, a FC represents a cross-connection within an NE.";\r
145         }\r
146         grouping virtual-network-service-end-point-g {\r
147             container service-interface-point {\r
148                 uses tapi-common:service-interface-point-ref-g;\r
149                 config false;\r
150                 description "none";\r
151             }\r
152             leaf role {\r
153                 type tapi-common:port-role;\r
154                 config false;\r
155                 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
156             }\r
157             leaf direction {\r
158                 type tapi-common:port-direction;\r
159                 config false;\r
160                 description "The orientation of defined flow at the EndPoint.";\r
161             }\r
162             leaf service-layer {\r
163                 type tapi-common:layer-protocol-name;\r
164                 config false;\r
165                 description "none";\r
166             }\r
167             uses tapi-common:local-class-g;\r
168             description "The association of the FC to LTPs is made via EndPoints.\r
169                 The EndPoint (EP) object class models the access to the FC function. \r
170                 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
171                 In cases where there is resilience the EndPoint may convey the resilience role of the access to the FC. \r
172                 It can represent a protected (resilient/reliable) point or a protecting (unreliable working or protection) point.\r
173                 The EP replaces the Protection Unit of a traditional protection model. \r
174                 The ForwadingConstruct can be considered as a component and the EndPoint as a Port on that component";\r
175         }\r
176         grouping virtual-network-context-g {\r
177             list virtual-nw-service {\r
178                 key 'uuid';\r
179                 uses virtual-network-service-g;\r
180                 description "none";\r
181             }\r
182             description "none";\r
183         }\r
184 \r
185     /***********************\r
186     * package interfaces\r
187     **********************/ \r
188         rpc create-virtual-network-service {\r
189             description "none";\r
190             input {\r
191                 list sep {\r
192                     min-elements 2;\r
193                     uses virtual-network-service-end-point-g;\r
194                     description "none";\r
195                 }\r
196                 container vnw-constraint {\r
197                     uses virtual-network-constraint-g;\r
198                     description "none";\r
199                 }\r
200                 leaf conn-schedule {\r
201                     type string;\r
202                     description "none";\r
203                 }\r
204             }\r
205             output {\r
206                 container service {\r
207                     uses virtual-network-service-g;\r
208                     description "none";\r
209                 }\r
210             }\r
211         }\r
212         rpc delete-virtual-network-service {\r
213             description "none";\r
214             input {\r
215                 leaf service-id-or-name {\r
216                     type string;\r
217                     description "none";\r
218                 }\r
219             }\r
220             output {\r
221                 container service {\r
222                     uses virtual-network-service-g;\r
223                     description "none";\r
224                 }\r
225             }\r
226         }\r
227         rpc get-virtual-network-service-details {\r
228             description "none";\r
229             input {\r
230                 leaf service-id-or-name {\r
231                     type string;\r
232                     description "none";\r
233                 }\r
234             }\r
235             output {\r
236                 container service {\r
237                     uses virtual-network-service-g;\r
238                     description "none";\r
239                 }\r
240             }\r
241         }\r
242         rpc get-virtual-network-service-list {\r
243             description "none";\r
244             output {\r
245                 list service {\r
246                     uses virtual-network-service-g;\r
247                     description "none";\r
248                 }\r
249             }\r
250         }\r
251 \r
252 }\r