Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 1 | --- |
| 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 | |
Daniele Moro | 50fa407 | 2019-11-07 23:42:16 -0800 | [diff] [blame] | 16 | {{- if $.Values.bng.external.enabled }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 17 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 18 | imports: |
| 19 | - custom_types/switch.yaml |
Andy Bavier | 2d4364b | 2018-10-15 10:00:56 -0700 | [diff] [blame] | 20 | - custom_types/onosapp.yaml |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 21 | - custom_types/switchport.yaml |
| 22 | - custom_types/portinterface.yaml |
| 23 | - custom_types/bngportmapping.yaml |
Matteo Scandolo | b029c7a | 2018-10-12 13:19:30 -0700 | [diff] [blame] | 24 | - custom_types/serviceinstanceattribute.yaml |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 25 | |
Andy Bavier | 923d8ff | 2019-03-15 14:49:13 -0700 | [diff] [blame] | 26 | description: Configures the Ponsim SEBA POD fabric |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 27 | |
| 28 | topology_template: |
| 29 | node_templates: |
| 30 | # Fabric configuration |
| 31 | switch#leaf_1: |
| 32 | type: tosca.nodes.Switch |
| 33 | properties: |
Daniele Moro | 93c2c50 | 2019-11-05 16:01:36 -0800 | [diff] [blame] | 34 | {{- if not $.Values.fabric.stratum.enabled }} |
| 35 | driver: "ofdpa-ovs" |
| 36 | ofId: of:0000000000000001 |
| 37 | {{- else }} |
| 38 | driver: "stratum-bmv2" |
| 39 | pipeconf: 'org.onosproject.pipelines.fabric' |
| 40 | managementAddress: "grpc://mininet-stratum:50001?device_id=1" |
| 41 | ofId: device:agg1 |
| 42 | {{- end }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 43 | ipv4Loopback: 192.168.0.201 |
| 44 | ipv4NodeSid: 17 |
| 45 | isEdgeRouter: True |
| 46 | name: leaf_1 |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 47 | routerMac: 00:00:02:01:06:01 |
| 48 | |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 49 | # Setup the OLT switch ports |
| 50 | {{- range $i, $junk := until (.Values.numOlts|int) }} |
| 51 | |
| 52 | port#olt{{ $i }}_port: |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 53 | type: tosca.nodes.SwitchPort |
| 54 | properties: |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 55 | portId: {{ add 2 $i }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 56 | host_learning: false |
| 57 | requirements: |
| 58 | - switch: |
| 59 | node: switch#leaf_1 |
| 60 | relationship: tosca.relationships.BelongsToOne |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 61 | {{- end }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 62 | |
| 63 | # Port connected to the BNG |
| 64 | port#bng_port: |
| 65 | type: tosca.nodes.SwitchPort |
| 66 | properties: |
| 67 | portId: 1 |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 68 | requirements: |
| 69 | - switch: |
| 70 | node: switch#leaf_1 |
| 71 | relationship: tosca.relationships.BelongsToOne |
| 72 | |
| 73 | # Setup the fabric switch port where the external |
| 74 | # router is connected to |
| 75 | bngmapping: |
| 76 | type: tosca.nodes.BNGPortMapping |
| 77 | properties: |
| 78 | s_tag: "any" |
| 79 | switch_port: 1 |
Matteo Scandolo | b029c7a | 2018-10-12 13:19:30 -0700 | [diff] [blame] | 80 | |
Andy Bavier | 2d4364b | 2018-10-15 10:00:56 -0700 | [diff] [blame] | 81 | onos_app#dhcpl2relay: |
| 82 | type: tosca.nodes.ONOSApp |
| 83 | properties: |
| 84 | name: dhcpl2relay |
| 85 | must-exist: true |
| 86 | |
Matteo Scandolo | b029c7a | 2018-10-12 13:19:30 -0700 | [diff] [blame] | 87 | # DHCP L2 Relay config |
| 88 | dhcpl2relay-config-attr: |
| 89 | type: tosca.nodes.ServiceInstanceAttribute |
| 90 | properties: |
| 91 | name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay |
| 92 | value: > |
| 93 | { |
| 94 | "dhcpl2relay" : { |
| 95 | "useOltUplinkForServerPktInOut" : false, |
Daniele Moro | 93c2c50 | 2019-11-05 16:01:36 -0800 | [diff] [blame] | 96 | {{- if not $.Values.fabric.stratum.enabled }} |
Matteo Scandolo | b029c7a | 2018-10-12 13:19:30 -0700 | [diff] [blame] | 97 | "dhcpServerConnectPoints" : [ "of:0000000000000001/1" ] |
Daniele Moro | 93c2c50 | 2019-11-05 16:01:36 -0800 | [diff] [blame] | 98 | {{- else }} |
| 99 | "dhcpServerConnectPoints" : [ "device:agg1/1" ] |
| 100 | {{- end }} |
Matteo Scandolo | b029c7a | 2018-10-12 13:19:30 -0700 | [diff] [blame] | 101 | } |
| 102 | } |
| 103 | requirements: |
| 104 | - service_instance: |
| 105 | node: onos_app#dhcpl2relay |
Andy Bavier | 2d4364b | 2018-10-15 10:00:56 -0700 | [diff] [blame] | 106 | relationship: tosca.relationships.BelongsToOne |
Daniele Moro | 50fa407 | 2019-11-07 23:42:16 -0800 | [diff] [blame] | 107 | {{- end }} |
| 108 | |
| 109 | {{- if $.Values.bng.embedded.enabled }} |
| 110 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 111 | imports: |
| 112 | - custom_types/switch.yaml |
| 113 | - custom_types/onosapp.yaml |
| 114 | - custom_types/switchport.yaml |
| 115 | - custom_types/portinterface.yaml |
| 116 | - custom_types/vrouterserviceinstance.yaml |
| 117 | - custom_types/vrouterstaticroute.yaml |
| 118 | - custom_types/fabricipaddress.yaml |
| 119 | - custom_types/serviceinstanceattribute.yaml |
| 120 | |
| 121 | description: Configures the Ponsim SEBA POD fabric |
| 122 | |
| 123 | topology_template: |
| 124 | node_templates: |
| 125 | # Fabric configuration |
| 126 | switch#agg_sw: |
| 127 | type: tosca.nodes.Switch |
| 128 | properties: |
| 129 | driver: "stratum-bmv2" |
| 130 | pipeconf: 'org.onosproject.pipelines.fabric-bng' |
| 131 | managementAddress: "grpc://mininet-stratum:50001?device_id=1" |
| 132 | ipv4Loopback: 192.168.0.201 |
| 133 | ipv4NodeSid: 17 |
| 134 | isEdgeRouter: True |
| 135 | ofId: device:agg1 |
| 136 | name: AGG SWITCH |
| 137 | routerMac: 00:00:02:01:06:01 |
| 138 | |
| 139 | # Setup the OLT switch ports |
| 140 | {{- range $i, $junk := until (.Values.numOlts|int) }} |
| 141 | |
| 142 | port#olt{{ $i }}_port: |
| 143 | type: tosca.nodes.SwitchPort |
| 144 | properties: |
| 145 | portId: {{ add 3 $i }} |
| 146 | host_learning: false |
| 147 | requirements: |
| 148 | - switch: |
| 149 | node: switch#agg_sw |
| 150 | relationship: tosca.relationships.BelongsToOne |
| 151 | |
| 152 | interface#access_interface_{{ $i }}: |
| 153 | type: tosca.nodes.PortInterface |
| 154 | properties: |
| 155 | name: access |
| 156 | requirements: |
| 157 | - port: |
| 158 | node: port#olt{{ $i }}_port |
| 159 | relationship: tosca.relationships.BelongsToOne |
| 160 | |
| 161 | ip#access_ip_{{ $i }}: |
| 162 | type: tosca.nodes.FabricIpAddress |
| 163 | properties: |
| 164 | ip: "10.255.255.{{ $i }}/24" |
| 165 | description: access_ip_{{ $i }} |
| 166 | requirements: |
| 167 | - interface: |
| 168 | node: interface#access_interface_{{ $i }} |
| 169 | relationship: tosca.relationships.BelongsToOne |
| 170 | {{- end }} |
| 171 | |
| 172 | # Port connected to the PPPoE Server |
| 173 | port#pppoe_server_port: |
| 174 | type: tosca.nodes.SwitchPort |
| 175 | properties: |
| 176 | portId: 1 |
| 177 | requirements: |
| 178 | - switch: |
| 179 | node: switch#agg_sw |
| 180 | relationship: tosca.relationships.BelongsToOne |
| 181 | |
| 182 | interface#ppoe_server_interface_1: |
| 183 | type: tosca.nodes.PortInterface |
| 184 | properties: |
| 185 | vlanUntagged: 100 |
| 186 | name: pppoe_server |
| 187 | requirements: |
| 188 | - port: |
| 189 | node: port#pppoe_server_port |
| 190 | relationship: tosca.relationships.BelongsToOne |
| 191 | |
| 192 | # Port connected to the Upstream router |
| 193 | port#upstream_port: |
| 194 | type: tosca.nodes.SwitchPort |
| 195 | properties: |
| 196 | portId: 2 |
| 197 | requirements: |
| 198 | - switch: |
| 199 | node: switch#agg_sw |
| 200 | relationship: tosca.relationships.BelongsToOne |
| 201 | |
| 202 | interface#upstream_interface_1: |
| 203 | type: tosca.nodes.PortInterface |
| 204 | properties: |
| 205 | vlanUntagged: 200 |
| 206 | name: upstream |
| 207 | requirements: |
| 208 | - port: |
| 209 | node: port#upstream_port |
| 210 | relationship: tosca.relationships.BelongsToOne |
| 211 | |
| 212 | ip#upstream_ip_1: |
| 213 | type: tosca.nodes.FabricIpAddress |
| 214 | properties: |
| 215 | ip: "10.10.10.254/24" |
| 216 | description: upstream_ip_1 |
| 217 | requirements: |
| 218 | - interface: |
| 219 | node: interface#upstream_interface_1 |
| 220 | relationship: tosca.relationships.BelongsToOne |
| 221 | |
| 222 | # Upstream host configuration |
| 223 | upstream-host-config: |
| 224 | type: tosca.nodes.ServiceInstanceAttribute |
| 225 | properties: |
| 226 | name: /onos/v1/network/configuration |
| 227 | value: > |
| 228 | { |
| 229 | "hosts": { |
| 230 | "00:66:77:88:99:AA/None": { |
| 231 | "basic": { |
| 232 | "name": "Upstream", |
| 233 | "ips": [ |
| 234 | "10.10.10.1" |
| 235 | ], |
| 236 | "locations": [ |
| 237 | "device:agg1/2" |
| 238 | ] |
| 239 | } |
| 240 | } |
| 241 | } |
| 242 | } |
| 243 | requirements: |
| 244 | - service_instance: |
| 245 | node: ip#upstream_ip_1 |
| 246 | relationship: tosca.relationships.BelongsToOne |
| 247 | |
| 248 | onos_app#segmentrouting: |
| 249 | type: tosca.nodes.ONOSApp |
| 250 | properties: |
| 251 | name: org.onosproject.segmentrouting |
| 252 | must-exist: true |
| 253 | |
| 254 | segmentrouting-config-attr: |
| 255 | type: tosca.nodes.ServiceInstanceAttribute |
| 256 | properties: |
| 257 | name: /onos/v1/configuration/org.onosproject.segmentrouting.SegmentRoutingManager?preset=true |
| 258 | value: > |
| 259 | { |
| 260 | "routeSimplification": "false", |
| 261 | "routeDoubleTaggedHosts": "true", |
| 262 | "respondToUnknownHosts": "true", |
| 263 | "defaultInternalVlan": "4094", |
| 264 | "pwTransportVlan": "4090", |
| 265 | "activeProbing": "true", |
| 266 | "singleHomedDown": "false", |
| 267 | "symmetricProbing": "false" |
| 268 | } |
| 269 | requirements: |
| 270 | - service_instance: |
| 271 | node: onos_app#segmentrouting |
| 272 | relationship: tosca.relationships.BelongsToOne |
| 273 | |
| 274 | # VRouter and default route. |
| 275 | vrouter#my_vrouter: |
| 276 | type: tosca.nodes.VRouterServiceInstance |
| 277 | properties: |
| 278 | name: my_vrouter |
| 279 | |
| 280 | route#default_route: |
| 281 | type: tosca.nodes.VRouterStaticRoute |
| 282 | properties: |
| 283 | prefix: "0.0.0.0/0" |
| 284 | next_hop: "10.10.10.1" |
| 285 | requirements: |
| 286 | - vrouter: |
| 287 | node: vrouter#my_vrouter |
| 288 | relationship: tosca.relationships.BelongsToOne |
| 289 | |
| 290 | # BNG App and its configuration for the PPPoE server relay. |
| 291 | onos_app#bng: |
| 292 | type: tosca.nodes.ONOSApp |
| 293 | properties: |
| 294 | name: org.opencord.bng |
| 295 | must-exist: true |
| 296 | |
| 297 | bng-config-attr: |
| 298 | type: tosca.nodes.ServiceInstanceAttribute |
| 299 | properties: |
| 300 | name: /onos/v1/network/configuration/apps/org.opencord.bng |
| 301 | value: > |
| 302 | { |
| 303 | "pppoerelay": { |
| 304 | "oltConnectPoint": "device:agg1/3", |
| 305 | "pppoeServerConnectPoint": "device:agg1/1" |
| 306 | }, |
| 307 | "bng": { |
| 308 | "bnguDeviceId": "device:agg1" |
| 309 | } |
| 310 | } |
| 311 | requirements: |
| 312 | - service_instance: |
| 313 | node: onos_app#bng |
| 314 | relationship: tosca.relationships.BelongsToOne |
| 315 | {{- end }} |