1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
|
# Copyright 2017 Huawei Technologies Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
tosca_definitions_version: tosca_simple_yaml_1_0
description: undelay vpn type definitions
# *****************************************************************************
# underlay vpn type definitions, used for both L3vpn and l2vpn
# *****************************************************************************
metadata:
version: 0.1
vendor: sdno
template_author: Huawei
imports:
- sdno_type_definition.yaml
# *****************************************************************************
# DSL definitions
# *****************************************************************************
dsl_definitions:
# *****************************************************************************
# data types
# *****************************************************************************
data_types:
# Base SDNO Type for Specs - used in Underlay VPN only for now, check reuse and move to common if needed. May need to move iot from type to node
sdno.datatypes.Spec:
derived_from: tosca.datatypes.Root
properties:
uuid:
type: string
description: unique id, format maxLength36
required: true
default: 'none'
additionalInfo:
type: list
#max size = 1000
entry_schema:
type: AdditionalInfoRow
required: false
# PW Schema Type
PWSchema:
derived_from: sdno.datatypes.Spec
properties:
pwTech:
type: string
description: PW Technology
required: true
default: 'none'
# Tunnel Schema Type
TunnelSchema:
derived_from: sdno.datatypes.Spec
properties:
tunnelTech:
type: string
description: Technology used for the tunnel
constraints:
- valid_values: ['NOP','LDP','RSVP-TE','SR-TE','MPLS-TP','TE-ANY','TE','GRE']
required: true
default: 'RSVP-TE'
pwTech:
type: PWSpec
description: Technology used for the pseudowire
required: true
tunnelLatency:
type: integer
description: this is integer, format int32, minimum 0 and maximum 60000000
required: true
default: 0
tunnelSelectMode:
type: string
description: Tunnel selection mode
constraints:
- valid_values: ['AutoCreate','AutoSelect','ManualSelect','NOP']
required: true
default: 'AutoSelect'
tunnelCreatePolicy:
type: MplsTESpec
description: Policy for creating the tunnel
required: false
tunnelAutoSelectPolicy:
type: SelectTunnelPolicy
description: Policy for selecting the tunnel
required: false
PWSpec:
derived_from: sdno.datatypes.Spec
properties:
controlWord:
type: boolean
description: enable control
required: true
default: false
pwVlanAction:
type: string
description: VLAN action on the pseudowire
constraints:
- valid_values: ['Raw','tagged']
required: true
default: 'Raw'
MplsTESpec:
derived_from: sdno.datatypes.Spec
properties:
bestEffort:
type: string
description: max length 200
required: true
default: 'true'
shareMode:
type: string
description: Tunnel sharing mode
constraints:
- valid_values: ['delegate','1:1','N:1']
required: true
default: 'N:1'
coRoute:
type: boolean
description: max length 200
required: true
default: false
bfdEnable:
type: boolean
description: max length 200
required: true
default: true
pathConstraint:
type: TunnelPathConstraint
description:
required: false
tunnelProtectPolicy:
type: ProtectionSchema
description:
required: false
TunnelPathConstraint:
derived_from: sdno.datatypes.Spec
properties:
setupPriority:
type: integer
description: format int32, min 0 max 7
required: true
default: 5
holdupPriority:
type: integer
description: format int32, min 0 max 7
required: true
default: 5
ProtectionSchema:
derived_from: sdno.datatypes.Spec
properties:
layerRate:
type: string
description: Layer Rate
constraints:
- valid_values: ['LR_Ethernet','LR_IP','LR_Vxlan','LR_PW','LR_NOP','LR_MPLS_TE']
required: true
default: 'LR_IP'
protectType:
type: string
description: type of protection
constraints:
- valid_values: ['nop','1:1','1+1','hot-standby']
required: true
default: '1:1'
protectDetailType:
type: string
description: more detailed protection info
required: false
reversionMode:
type: string
description: Reversion Mode
constraints:
- valid_values: ['RM_UNKNOWN','RM_NON_REVERTIVE','RM_REVERTIVE']
required: true
default: 'RM_REVERTIVE'
wtr:
type: integer
description: format int32 minimum 0, maximum 2592000
required: true
default: 1
SelectTunnelPolicy:
derived_from: sdno.datatypes.Spec
properties:
loadBalanceNum:
type: integer
description: format int32, minimum 1 maximum 64
required: true
default: 1
selectTunnels:
type: list
entry_schema:
type: SelectTunnel
description: Tunnel Selection Policy
required: true
SelectTunnel:
derived_from: sdno.datatypes.Spec
properties:
priority:
type: integer
description: Tunnel priority to be selected, format int32, minimum 1 maximum 3
required: true
default: 1
tunnelTech:
type: string
description: tunnel technology to be selected
constraints:
- valid_values: ['NOP','LDP','RSVP-TE','SR-TE','MPLS-TP','TE-ANY','TE','GRE']
required: true
default: RSVP-TE
# Path Constraints Type
PathConstraints:
derived_from: sdno.datatypes.Spec
properties:
tunnelConstraints:
type: list
entry_schema:
type: TunnelSpecificPathConstraint
pwConstraints:
type: list
entry_schema:
type: PWSpecPathConstraint
TunnelSpecificPathConstraint:
derived_from: sdno.datatypes.Spec
properties:
pathConnection:
type: PathConnection
tunnelWorkMode:
type: string
constraints:
- valid_values: ['AutoCreate','AutoSelect','ManualSelect','NOP']
required: true
tunnelTech:
type: string
constraints:
- valid_values: ['NOP','LDP','RSVP-TE','SR-TE','MPLS-TP','TE-ANY','TE','GRE']
required: true
bodMode:
type: string
constraints:
- valid_values: ['realBod','renewBod']
required: true
bandwidth:
type: integer
description: bandwidth int64, minimum 0 and max 4000000000
required: true
latency:
type: integer
description: bandwidth int64, minimum 0 and max 60000000
required: true
bindingTunnels:
type: list
entry_schema:
type: string
PathConnection:
derived_from: sdno.datatypes.Spec
properties:
aObject:
type: ObjectIdentifier
required: true
zObject:
type: ObjectIdentifier
required: true
direction:
type: string
constraints:
- valid_values: ['CD_UNI','CD_BI']
required: true
# Object Identifier is currently only used in L3 VPN, should be moved to the common and re-used
ObjectIdentifier:
derived_from: tosca.datatypes.Root
properties:
uuid:
type: string
required: true
# format: maxLen36
objectId:
type: string
required: true
# format: maxLen36
roleLabel:
type: string
required: true
objectType:
type: string
constraints:
- valid_values: ['Nop','SEG-VPN','TP','TPL','BUSINESSTYPE','COMPOSED-VPN', 'RESOURCE-POOL', 'SUBNETWORK', 'TUNNEL-LSP']
required: true
PWSpecPathConstraint:
derived_from: sdno.datatypes.Spec
properties:
role:
type: string
constraints:
- valid_values: ['master','backup']
required: true
tunnelWorkMode:
type: string
constraints:
- valid_values: ['AutoCreate','AutoSelect','ManualSelect','NOP']
required: true
tunnelTech:
type: string
constraints:
- valid_values: ['NOP','LDP','RSVP-TE','SR-TE','MPLS-TP','TE-ANY','TE','GRE']
required: true
# VPN TYPES
DiffService:
derived_from: sdno.datatypes.Spec
properties:
diffServMode:
type: string
description: mode of diffservice
constraints:
- valid_values: ['Uniform','Pipe','ShortPipe']
required: true
default: 'Uniform'
serviceClass:
type: string
description: class of service
constraints:
- valid_values: ['BE','AF1','AF2','AF3','AF4','EF','CS6','CS7']
required: true
default: 'BE'
serviceColor:
type: string
description: Service Color
constraints:
- valid_values: ['Green','Yellow','Red']
required: true
default: 'Green'
IpVpnSpec:
derived_from: sdno.datatypes.Spec
properties:
labelMode:
type: string
description: label mode type
constraints:
- valid_values: ['PerInstance','PerRoute']
required: true
default: 'PerInstance'
frrEnable:
type: boolean
description: frr enable
required: true
default: false
diffServ:
type: DiffService
description: diff service type
required: true
VpnBasicInfo:
derived_from: sdno.datatypes.Spec
properties:
topology:
type: string
description: type of VPN topology
constraints:
- valid_values: ['full-mesh','point_to_multipoint','point_to_point','singlePoint','hubspoke','hubspoke_via_hubce','hubspoke_disjoint','ADD_DROP_Z']
required: true
default: 'full-mesh'
serviceType:
type: string
description: type of VPN service
constraints:
- valid_values: ['l3vpn','l2vpn','other']
required: true
default: 'l3vpn'
technology:
type: string
description: type of VPN technology
constraints:
- valid_values: ['mpls','rosen multivpn','vxlan overlay l3vpn','eth over sdh','vlan']
required: true
default: 'mpls'
ipMtu:
type: integer
description: IP MTU, format is int32, minimum 46 and maximum 9600
required: true
default: 9600
ipVpnSpec:
type: IpVpnSpec
description: IP VPN Spec
required: false
# VPN TYPES
TpTypeSpec:
derived_from: sdno.datatypes.Spec
properties:
layerRate:
type: string
description: Layer Rate
constraints:
- valid_values: ['LR_Ethernet','LR_IP','LR_Vxlan','LR_PW','LR_NOP','LR_MPLS_TE']
required: true
default: 'LR_IP'
ethernetTpSpec:
required: false
type: EthernetTpSpec
ipTpSpec:
required: false
type: IpTpSpec
EthernetTpSpec:
derived_from: sdno.datatypes.Spec
properties:
accessType:
type: string
constraints:
- valid_values: ['dot1q','qinq','untag','default']
required: true
default: 'default'
vlanAction:
type: string
constraints:
- valid_values: ['nop','untag','pass','pvlan','swap','stacking']
required: true
default: 'pass'
actionValue:
type: string
required: true
default: 'none'
qinqCvlanList:
type: string
required: true
default: 'none'
qinqSvalList:
type: string
required: true
default: 'none'
dot1qVlanList:
type: string
required: true
default: 'none'
IpTpSpec:
derived_from: sdno.datatypes.Spec
properties:
masterIp:
type: string
required: true
default: '0.0.0.0'
CeTp:
derived_from: sdno.datatypes.Spec
properties:
todo:
type: string
required: true
default: 'none'
RouteProtocolSpec:
derived_from: sdno.datatypes.Spec
properties:
todo:
type: string
required: true
default: 'none'
# *****************************************************************************
# node types
# *****************************************************************************
node_types:
# *****************************************************************************
# Underlay VPN Service Endpoints
# *****************************************************************************
sdno.node.ServiceEndPoint.AC:
description: Attach Circuit
derived_from: sdno.node.ServiceEndPoint
properties:
port:
type: string
required: true
default: '0'
ip:
type: string
required: true
default: '0.0.0.0'
svlan:
type: integer
required: true
default: 0
route:
type: string
required: true
default: 'none'
peerIp:
type: string
required: true
default: '0.0.0.0'
# *****************************************************************************
# Underlay VPN Connectivity Service
# *****************************************************************************
sdno.node.ConnectivityService.UnderlayVpn:
derived_from: sdno.node.ConnectivityService
interfaces:
standard:
type: sdno.interfaces.lifecycle.Standard
deploy:
description: "Deploy VPN"
implementation:
# primary:
dependencies:
- sdno.node.Connection.UnderlayVpn/deploy
requirements:
- endPoint:
node: sdno.node.ServiceEndPoint.AC
capability: sdno.capability.ServiceEndPoint
relationship: sdno.relationship.ServiceEndPoint
occurrences: [2, UNBOUNDED]
- realizes:
node: sdno.node.Connection.UnderlayVpn
capability: sdno.capability.Realizes
relationship: sdno.relationship.RealizedBy
# *****************************************************************************
# Underlay VPN Connection Endpoints
# *****************************************************************************
sdno.node.ConnectionEndPoint.Tp:
description: Attach Circuit
derived_from: sdno.node.ConnectionEndPoint
properties:
neId:
type: string
required: false
edgePointRole:
type: string
description: Role of the edge point
constraints:
- valid_values: [ASBR,nop]
required: false
hubSpoke:
type: string
description: Is the endpoint hub or spoke
constraints:
- valid_values: ['hub','spoke','spokeBridge','other']
required: true
default: 'spoke'
type:
type: string
description: Type of the TP
constraints:
- valid_values: ['PTP','CTP','TRUNK','LoopBack','NetworkVNode','TPPool','nop']
required: true
default: 'CTP'
workingLayer:
type: string
description: Working Layer Rate
constraints:
- valid_values: ['LR_Ethernet','LR_IP','LR_Vxlan','LR_PW','LR_NOP','LR_MPLS_TE']
required: true
default: 'LR_IP'
typeSpecList:
type: list
#max size = 1000
entry_schema:
type: TpTypeSpec
required: false
peerCpTp:
type: CeTp
required: false
qosProfileId:
type: string
required: false
inboundQosPolicyId:
type: string
required: false
outboundQosPolicyId:
type: string
required: false
inboundQueueProfileId:
type: string
required: false
outboundQueueProfileId:
type: string
required: false
containedMainTP:
type: string
required: false
routeProtocolSpecs:
type: list
#max size = 1000
entry_schema:
type: RouteProtocolSpec
required: false
direction:
type: string
constraints:
- valid_values: ['IN','OUT','BI_DIRECTION']
required: true
default: 'BI_DIRECTION'
tpRole:
type: string
constraints:
- valid_values: ['UNI','NNI']
required: true
default: 'UNI'
# *****************************************************************************
# VPN Node Types
# *****************************************************************************
sdno.node.Connection.UnderlayVpn:
derived_from: sdno.node.Connection
properties:
pwSchema:
type: PWSchema
required: false
tunnelSchema:
type: TunnelSchema
required: false
pathConstraints:
type: PathConstraints
required: false
vpnBasicInfo:
type: VpnBasicInfo
required: false
requirements:
- endPoint:
node: sdno.node.ConnectionEndPoint.Tp
capability: sdno.capability.ConnectionEndPoint
relationship: sdno.relationship.ConnectionEndPoint
occurrences: [2, UNBOUNDED]
interfaces:
standard:
type: sdno.interfaces.lifecycle.Standard
create:
#implementation: 'POST /openoapi/sdnol3vpn/v1/l3vpns'
delete:
implementation: 'DELETE /openoapi/sdnol3vpn/v1/l3vpns/{uuid}'
get:
implementation: 'GET /openoapi/sdnol3vpn/v1/l3vpns/{uuid}'
deploy:
implementation: 'POST /openoapi/sdnol3vpn/v1/l3vpns'
undeploy:
implementation: 'DELETE /openoapi/sdnol3vpn/v1/l3vpns/{uuid}'
update:
#implementation: 'PUT /openoapi/sdnol3vpn/v1/l3vpns/{uuid}'
# *****************************************************************************
# Underlayvpn Node Types
# *****************************************************************************
tosca.nodes.sdno.NS.underlayvpn:
properties:
id:
type: string
required: false
template_name:
type: string
required: false
version:
type: string
required: false
vendor:
type: string
required: false
template_author:
type: string
required: false
name:
type: string
required: false
description:
type: string
required: false
serviceType:
type: string
required: false
topology:
type: string
required: false
technology:
type: string
required: false
pe1_ip:
type: string
required: false
ac1_port:
type: string
required: false
ac1_svlan:
type: integer
required: false
ac1_ip:
type: string
required: false
ac1_peer_ip:
type: string
required: false
ac1_route:
type: string
required: false
pe2_ip:
type: string
required: false
ac2_port:
type: string
required: false
ac2_svlan:
type: integer
required: false
ac2_ip:
type: string
required: false
ac2_peer_ip:
type: string
required: false
ac2_route:
type: string
required: false
|