migrate sdnr features to phosphorus
[ccsdk/features.git] / sdnr / wt / devicemanager-onap / onf14 / provider / src / test / resources / l-3vpn-profile-1-0.yang
1 module l-3vpn-profile-1-0 {\r
2   yang-version 1.1;\r
3   namespace "urn:onf:yang:l-3vpn-profile-1-0";\r
4   prefix l-3vpn-profile;\r
5 \r
6   import ietf-yang-types {\r
7     prefix yang;\r
8   }\r
9   import core-model-1-4 {\r
10     prefix core-model;\r
11   }\r
12 \r
13   organization\r
14     "openBackhaul.com proposal to Open Networking Foundation (ONF)";\r
15   contact\r
16     "WG Web : https://github.com/openBackhaul/Overview\r
17      WG List: L3vpnProfile@openBackhaul.com\r
18      Editor : Thorsten Heinze\r
19      Email  : Thorsten.Heinze@openBackhaul.com";\r
20   description\r
21     "Technology specific profile definition for Layer 3 Virtual Private Networks\r
22 \r
23      Copyright 2019 openBackhaul.com\r
24 \r
25      Licensed under the Apache License, Version 2.0 (the 'License');\r
26      you may not use this file except in compliance with the License.\r
27      You may obtain a copy of the License at\r
28      http://www.apache.org/licenses/LICENSE-2.0\r
29      Unless required by applicable law or agreed to in writing, software\r
30      distributed under the License is distributed on an 'AS IS' BASIS,\r
31      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
32      See the License for the specific language governing permissions and\r
33      limitations under the License.";\r
34 \r
35   revision 2020-01-27 {\r
36     description\r
37       "Model for the Transport SDN Pilot at Telefonica Germany.\r
38        Please view https://github.com/openBackhaul/l3vpnProfile/issues for changes.";\r
39     reference\r
40       "https://github.com/openBackhaul/l3vpnProfile/tree/tsp: Model definition\r
41        https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";\r
42   }\r
43   revision 2019-07-12 {\r
44     description\r
45       "Model for the Transport SDN Pilot at Telefonica Germany.\r
46        Please view https://github.com/openBackhaul/l3vpnProfile/issues for changes.";\r
47     reference\r
48       "https://github.com/openBackhaul/l3vpnProfile/tree/tsp: Model definition\r
49        https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";\r
50   }\r
51 \r
52   identity PROFILE_NAME_TYPE_L3VPN_PROFILE {\r
53     base core-model:PROFILE_NAME_TYPE;\r
54     description\r
55       "none";\r
56   }\r
57 \r
58   augment "/core-model:control-construct/core-model:profile-collection/core-model:profile" {\r
59     when "derived-from-or-self(./core-model:profile-name, 'l-3vpn-profile:PROFILE_NAME_TYPE_L3VPN_PROFILE')";\r
60     uses l-3vpn-profile-spec;\r
61     description\r
62       "none";\r
63   }\r
64 \r
65   /****************************************\r
66    * package notifications\r
67    **************************************/ \r
68 \r
69   notification object-creation-notification {\r
70     uses object-creation-notification;\r
71     description\r
72       "none";\r
73   }\r
74 \r
75   grouping object-creation-notification {\r
76     leaf counter {\r
77       type int32;\r
78       default "-1";\r
79       config false;\r
80       description\r
81         "Counts object creation notifications.";\r
82     }\r
83     leaf timestamp {\r
84       type yang:date-and-time;\r
85       default "2010-11-20T14:00:00+01:00";\r
86       config false;\r
87       description\r
88         "none";\r
89     }\r
90     leaf object-id-ref {\r
91       type leafref {\r
92         path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";\r
93         require-instance false;\r
94       }\r
95       config false;\r
96       description\r
97         "none";\r
98     }\r
99     leaf object-type {\r
100       type string;\r
101       default "Type of created object not specified.";\r
102       config false;\r
103       description\r
104         "none";\r
105     }\r
106     description\r
107       "none";\r
108   }\r
109 \r
110   notification object-deletion-notification {\r
111     uses object-deletion-notification;\r
112     description\r
113       "none";\r
114   }\r
115 \r
116   grouping object-deletion-notification {\r
117     leaf counter {\r
118       type int32;\r
119       default "-1";\r
120       config false;\r
121       description\r
122         "Counts object deletion notifications.";\r
123     }\r
124     leaf timestamp {\r
125       type yang:date-and-time;\r
126       default "2010-11-20T14:00:00+01:00";\r
127       config false;\r
128       description\r
129         "none";\r
130     }\r
131     leaf object-id-ref {\r
132       type leafref {\r
133         path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";\r
134         require-instance false;\r
135       }\r
136       config false;\r
137       description\r
138         "none";\r
139     }\r
140     description\r
141       "none";\r
142   }\r
143 \r
144   /****************************************\r
145    * grouping statements for object classes\r
146    **************************************/ \r
147 \r
148   grouping l-3vpn-profile-spec {\r
149     container l-3vpn-pac {\r
150       uses l-3vpn-pac;\r
151       description\r
152         "none";\r
153     }\r
154     description\r
155       "none";\r
156   }\r
157 \r
158   grouping l-3vpn-pac {\r
159     container l-3vpn-capability {\r
160       config false;\r
161       uses l-3vpn-capability;\r
162       description\r
163         "none";\r
164     }\r
165     container l-3vpn-configuration {\r
166       config false;\r
167       uses l-3vpn-configuration;\r
168       description\r
169         "none";\r
170     }\r
171     description\r
172       "none";\r
173   }\r
174 \r
175   grouping l-3vpn-capability {\r
176     leaf profile-naming-is-avail {\r
177       type boolean;\r
178       default "false";\r
179       config false;\r
180       description\r
181         "1 = There is a free text field available for naming the profile.";\r
182     }\r
183     leaf l-3vpn-based-on-ip-v-6-is-avail {\r
184       type boolean;\r
185       default "false";\r
186       config false;\r
187       description\r
188         "1 = Virtual Private Networks based on IP v6 addresses is available at the device.";\r
189     }\r
190     description\r
191       "none";\r
192   }\r
193 \r
194   grouping l-3vpn-configuration {\r
195     leaf profile-name {\r
196       type string;\r
197       default "Name of profile not yet defined.";\r
198       description\r
199         "Identifier of the profile. Could be a name, could be a number. Free text field to be filled by the operator.";\r
200     }\r
201     leaf l-3vpn-description {\r
202       type string;\r
203       default "VPN description not yet defined.";\r
204       description\r
205         "Short description of the VPN.";\r
206     }\r
207     list l-3vpn-configuration-list {\r
208       key "label-mode";\r
209       min-elements 1;\r
210       max-elements 2;\r
211       uses l-3vpn-configuration-type;\r
212       description\r
213         "L3 VPN instance Configuration.";\r
214     }\r
215     description\r
216       "none";\r
217   }\r
218 \r
219   /****************************************\r
220    * typedef statements\r
221    **************************************/ \r
222 \r
223   typedef label-mode-type {\r
224     type identityref {\r
225       base LABEL_MODE_TYPE;\r
226     }\r
227     description\r
228       "none";\r
229   }\r
230 \r
231   typedef device-identifier-kind-type {\r
232     type identityref {\r
233       base DEVICE_IDENTIFIER_KIND_TYPE;\r
234     }\r
235     description\r
236       "none";\r
237   }\r
238 \r
239   typedef address-family-type {\r
240     type identityref {\r
241       base ADDRESS_FAMILY_TYPE;\r
242     }\r
243     description\r
244       "Address family of the VRF IPv4/IPV6.";\r
245   }\r
246 \r
247   typedef route-pritority-type {\r
248     type identityref {\r
249       base ROUTE_PRITORITY_TYPE;\r
250     }\r
251     description\r
252       "The priority of the Route";\r
253   }\r
254 \r
255   typedef route-state-type {\r
256     type identityref {\r
257       base ROUTE_STATE_TYPE;\r
258     }\r
259     description\r
260       "The state of the route as per the routing table. It is a combination of the one or more of the following states: ADV, NOADV,ACTIVE, INACTIVE, RELIED.";\r
261   }\r
262 \r
263   typedef route-flag-type {\r
264     type identityref {\r
265       base ROUTE_FLAG_TYPE;\r
266     }\r
267     description\r
268       "Indicates the route flag, that is, Route Flags in the heading of the routing table displayed. It is a combination of one or more of the following flags: D and,R Meaning of each of the flag is availble under corresponding flag value.";\r
269   }\r
270 \r
271   /*********************************************\r
272    * grouping statements for complex data types\r
273    *******************************************/ \r
274 \r
275   identity LABEL_MODE_TYPE {\r
276     description\r
277       "none";\r
278   }\r
279 \r
280   identity LABEL_MODE_TYPE_PER_INSTANCE {\r
281     base LABEL_MODE_TYPE;\r
282     description\r
283       "Labels are assigned to VPN instances in one label per instance mode, that is, all routes in a VPN instance are assigned with the same label.";\r
284   }\r
285 \r
286   identity LABEL_MODE_TYPE_PER_ROUTE {\r
287     base LABEL_MODE_TYPE;\r
288     description\r
289       "Labels are assigned to routes in the 'one label per route' mode, that is, each route is assigned with one label.";\r
290   }\r
291 \r
292   identity DEVICE_IDENTIFIER_KIND_TYPE {\r
293     description\r
294       "none";\r
295   }\r
296 \r
297   identity DEVICE_IDENTIFIER_KIND_TYPE_LOOP_BACK_IP_ADDRESS {\r
298     base DEVICE_IDENTIFIER_KIND_TYPE;\r
299     description\r
300       "none";\r
301   }\r
302 \r
303   identity DEVICE_IDENTIFIER_KIND_TYPE_AS_NUMBER {\r
304     base DEVICE_IDENTIFIER_KIND_TYPE;\r
305     description\r
306       "none";\r
307   }\r
308 \r
309   identity DEVICE_IDENTIFIER_KIND_TYPE_NOT_YET_DEFINED {\r
310     base DEVICE_IDENTIFIER_KIND_TYPE;\r
311     description\r
312       "none";\r
313   }\r
314 \r
315   identity ADDRESS_FAMILY_TYPE {\r
316     description\r
317       "none";\r
318   }\r
319 \r
320   identity ADDRESS_FAMILY_TYPE_IPV4-FAMILY {\r
321     base ADDRESS_FAMILY_TYPE;\r
322     description\r
323       "none";\r
324   }\r
325 \r
326   identity ADDRESS_FAMILY_TYPE_IPV6-FAMILY {\r
327     base ADDRESS_FAMILY_TYPE;\r
328     description\r
329       "none";\r
330   }\r
331 \r
332   identity ADDRESS_FAMILY_TYPE_UNKNOWN {\r
333     base ADDRESS_FAMILY_TYPE;\r
334     description\r
335       "none";\r
336   }\r
337 \r
338   identity ADDRESS_FAMILY_TYPE_NOT_YET_DEFINED {\r
339     base ADDRESS_FAMILY_TYPE;\r
340     description\r
341       "none";\r
342   }\r
343 \r
344   identity ROUTE_PRITORITY_TYPE {\r
345     description\r
346       "none";\r
347   }\r
348 \r
349   identity ROUTE_PRITORITY_TYPE_CRITICAL {\r
350     base ROUTE_PRITORITY_TYPE;\r
351     description\r
352       "Highest protocol priority.";\r
353   }\r
354 \r
355   identity ROUTE_PRITORITY_TYPE_HIGH {\r
356     base ROUTE_PRITORITY_TYPE;\r
357     description\r
358       "High protocol priority";\r
359   }\r
360 \r
361   identity ROUTE_PRITORITY_TYPE_MEDIUM {\r
362     base ROUTE_PRITORITY_TYPE;\r
363     description\r
364       "Medium protocol priority.";\r
365   }\r
366 \r
367   identity ROUTE_PRITORITY_TYPE_LOW {\r
368     base ROUTE_PRITORITY_TYPE;\r
369     description\r
370       "Low protocol priority.";\r
371   }\r
372 \r
373   identity ROUTE_STATE_TYPE {\r
374     description\r
375       "none";\r
376   }\r
377 \r
378   identity ROUTE_STATE_TYPE_ACTIVE_ADV {\r
379     base ROUTE_STATE_TYPE;\r
380     description\r
381       "The route state is active and advertised.";\r
382   }\r
383 \r
384   identity ROUTE_STATE_TYPE_ACTIVE_NOADV {\r
385     base ROUTE_STATE_TYPE;\r
386     description\r
387       "The route state is active and not advertised.";\r
388   }\r
389 \r
390   identity ROUTE_STATE_TYPE_ACTIVE_ADV_RELIED {\r
391     base ROUTE_STATE_TYPE;\r
392     description\r
393       "The route state is active, advertised, and relied.";\r
394   }\r
395 \r
396   identity ROUTE_STATE_TYPE_ACTIVE_NOADV_RELIED {\r
397     base ROUTE_STATE_TYPE;\r
398     description\r
399       "The route state is active, not advertised, and relied.";\r
400   }\r
401 \r
402   identity ROUTE_STATE_TYPE_INVALID_NOADV {\r
403     base ROUTE_STATE_TYPE;\r
404     description\r
405       "The route state is invalid and not advertised.";\r
406   }\r
407 \r
408   identity ROUTE_STATE_TYPE_INACTIVE_NOADV {\r
409     base ROUTE_STATE_TYPE;\r
410     description\r
411       "The route state is inactive and not advertised.";\r
412   }\r
413 \r
414   identity ROUTE_FLAG_TYPE {\r
415     description\r
416       "none";\r
417   }\r
418 \r
419   identity ROUTE_FLAG_TYPE_D {\r
420     base ROUTE_FLAG_TYPE;\r
421     description\r
422       "A route is advertised to the Forwarding Information Base table.";\r
423   }\r
424 \r
425   identity ROUTE_FLAG_TYPE_RD {\r
426     base ROUTE_FLAG_TYPE;\r
427     description\r
428       "A route is an iterated route and needs to be advertised to the FIB table.";\r
429   }\r
430 \r
431   identity ROUTE_FLAG_TYPE_R {\r
432     base ROUTE_FLAG_TYPE;\r
433     description\r
434       "A route is an iterated route.";\r
435   }\r
436 \r
437   grouping route-distinguisher-and-target-type {\r
438     leaf vpn-number {\r
439       type uint32;\r
440       description\r
441         "Identifier of the VPN, which is unique in the entire network";\r
442     }\r
443     leaf device-identifier-kind {\r
444       type device-identifier-kind-type;\r
445       default "DEVICE_IDENTIFIER_KIND_TYPE_NOT_YET_DEFINED";\r
446       description\r
447         "none";\r
448     }\r
449     leaf loop-back-ip-address {\r
450       type string;\r
451       default "-1.-1.-1.-1";\r
452       description\r
453         "Only relevant if (deviceIdentifierKind==LOOP_BACK_IP_ADDRESS). Loop back address of the device.";\r
454     }\r
455     leaf as-number {\r
456       type uint32;\r
457       default "0";\r
458       description\r
459         "Only relevant if (deviceIdentifierKind==AS_NUMBER). Autonomous System number of the device.";\r
460     }\r
461     description\r
462       "none";\r
463   }\r
464 \r
465   grouping l-3vpn-configuration-type {\r
466     leaf label-mode {\r
467       type label-mode-type;\r
468       description\r
469         "Label model used by the VPN.";\r
470     }\r
471     container route-distinguisher {\r
472       uses route-distinguisher-and-target-type;\r
473       description\r
474         "The route distinguisher that should be used for the local VRF or VSI instance when it is signalled via BGP.";\r
475     }\r
476     list route-target-import-list {\r
477       key "vpn-number";\r
478       min-elements 1;\r
479       uses route-distinguisher-and-target-type;\r
480       description\r
481         "Route targets that will be imported to this VPN ";\r
482     }\r
483     list route-target-export-list {\r
484       key "vpn-number";\r
485       min-elements 1;\r
486       uses route-distinguisher-and-target-type;\r
487       description\r
488         "Route targets that will be tagged to outgoing routes";\r
489     }\r
490     leaf address-family {\r
491       type address-family-type;\r
492       default "ADDRESS_FAMILY_TYPE_NOT_YET_DEFINED";\r
493       description\r
494         "Address family type for the VPN instance is created for";\r
495     }\r
496     description\r
497       "L3 VPN instance configuration information.";\r
498   }\r
499 }\r