blob: 3bf6030b9a8cdaa30fbe32caf91e49cdeabc185b [file] [log] [blame]
Andy Bavier7a080492018-08-30 14:26:09 -07001---
2# Copyright 2018-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16tosca_definitions_version: tosca_simple_yaml_1_0
17imports:
18 - custom_types/switch.yaml
Andy Bavier2d4364b2018-10-15 10:00:56 -070019 - custom_types/onosapp.yaml
Andy Bavier7a080492018-08-30 14:26:09 -070020 - custom_types/switchport.yaml
21 - custom_types/portinterface.yaml
22 - custom_types/bngportmapping.yaml
Matteo Scandolob029c7a2018-10-12 13:19:30 -070023 - custom_types/serviceinstanceattribute.yaml
Andy Bavier7a080492018-08-30 14:26:09 -070024
Andy Bavier923d8ff2019-03-15 14:49:13 -070025description: Configures the Ponsim SEBA POD fabric
Andy Bavier7a080492018-08-30 14:26:09 -070026
27topology_template:
28 node_templates:
29 # Fabric configuration
30 switch#leaf_1:
31 type: tosca.nodes.Switch
32 properties:
Daniele Moro93c2c502019-11-05 16:01:36 -080033{{- if not $.Values.fabric.stratum.enabled }}
34 driver: "ofdpa-ovs"
35 ofId: of:0000000000000001
36{{- else }}
37 driver: "stratum-bmv2"
38 pipeconf: 'org.onosproject.pipelines.fabric'
39 managementAddress: "grpc://mininet-stratum:50001?device_id=1"
40 ofId: device:agg1
41{{- end }}
Andy Bavier7a080492018-08-30 14:26:09 -070042 ipv4Loopback: 192.168.0.201
43 ipv4NodeSid: 17
44 isEdgeRouter: True
45 name: leaf_1
Andy Bavier7a080492018-08-30 14:26:09 -070046 routerMac: 00:00:02:01:06:01
47
Andy Baviere21a5f52019-05-28 15:39:52 -070048 # Setup the OLT switch ports
49{{- range $i, $junk := until (.Values.numOlts|int) }}
50
51 port#olt{{ $i }}_port:
Andy Bavier7a080492018-08-30 14:26:09 -070052 type: tosca.nodes.SwitchPort
53 properties:
Andy Baviere21a5f52019-05-28 15:39:52 -070054 portId: {{ add 2 $i }}
Andy Bavier7a080492018-08-30 14:26:09 -070055 host_learning: false
56 requirements:
57 - switch:
58 node: switch#leaf_1
59 relationship: tosca.relationships.BelongsToOne
Andy Baviere21a5f52019-05-28 15:39:52 -070060{{- end }}
Andy Bavier7a080492018-08-30 14:26:09 -070061
62 # Port connected to the BNG
63 port#bng_port:
64 type: tosca.nodes.SwitchPort
65 properties:
66 portId: 1
Andy Bavier7a080492018-08-30 14:26:09 -070067 requirements:
68 - switch:
69 node: switch#leaf_1
70 relationship: tosca.relationships.BelongsToOne
71
72 # Setup the fabric switch port where the external
73 # router is connected to
74 bngmapping:
75 type: tosca.nodes.BNGPortMapping
76 properties:
77 s_tag: "any"
78 switch_port: 1
Matteo Scandolob029c7a2018-10-12 13:19:30 -070079
Andy Bavier2d4364b2018-10-15 10:00:56 -070080 onos_app#dhcpl2relay:
81 type: tosca.nodes.ONOSApp
82 properties:
83 name: dhcpl2relay
84 must-exist: true
85
Matteo Scandolob029c7a2018-10-12 13:19:30 -070086 # DHCP L2 Relay config
87 dhcpl2relay-config-attr:
88 type: tosca.nodes.ServiceInstanceAttribute
89 properties:
90 name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay
91 value: >
92 {
93 "dhcpl2relay" : {
94 "useOltUplinkForServerPktInOut" : false,
Daniele Moro93c2c502019-11-05 16:01:36 -080095{{- if not $.Values.fabric.stratum.enabled }}
Matteo Scandolob029c7a2018-10-12 13:19:30 -070096 "dhcpServerConnectPoints" : [ "of:0000000000000001/1" ]
Daniele Moro93c2c502019-11-05 16:01:36 -080097{{- else }}
98 "dhcpServerConnectPoints" : [ "device:agg1/1" ]
99{{- end }}
Matteo Scandolob029c7a2018-10-12 13:19:30 -0700100 }
101 }
102 requirements:
103 - service_instance:
104 node: onos_app#dhcpl2relay
Andy Bavier2d4364b2018-10-15 10:00:56 -0700105 relationship: tosca.relationships.BelongsToOne