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 | |
| 16 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 17 | imports: |
| 18 | - custom_types/switch.yaml |
Andy Bavier | 2d4364b | 2018-10-15 10:00:56 -0700 | [diff] [blame] | 19 | - custom_types/onosapp.yaml |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 20 | - custom_types/switchport.yaml |
| 21 | - custom_types/portinterface.yaml |
| 22 | - custom_types/bngportmapping.yaml |
Matteo Scandolo | b029c7a | 2018-10-12 13:19:30 -0700 | [diff] [blame] | 23 | - custom_types/serviceinstanceattribute.yaml |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 24 | |
Andy Bavier | 923d8ff | 2019-03-15 14:49:13 -0700 | [diff] [blame] | 25 | description: Configures the Ponsim SEBA POD fabric |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 26 | |
| 27 | topology_template: |
| 28 | node_templates: |
| 29 | # Fabric configuration |
| 30 | switch#leaf_1: |
| 31 | type: tosca.nodes.Switch |
| 32 | properties: |
| 33 | driver: ofdpa-ovs |
| 34 | ipv4Loopback: 192.168.0.201 |
| 35 | ipv4NodeSid: 17 |
| 36 | isEdgeRouter: True |
| 37 | name: leaf_1 |
| 38 | ofId: of:0000000000000001 |
| 39 | routerMac: 00:00:02:01:06:01 |
| 40 | |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 41 | # Setup the OLT switch ports |
| 42 | {{- range $i, $junk := until (.Values.numOlts|int) }} |
| 43 | |
| 44 | port#olt{{ $i }}_port: |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 45 | type: tosca.nodes.SwitchPort |
| 46 | properties: |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 47 | portId: {{ add 2 $i }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 48 | host_learning: false |
| 49 | requirements: |
| 50 | - switch: |
| 51 | node: switch#leaf_1 |
| 52 | relationship: tosca.relationships.BelongsToOne |
Andy Bavier | e21a5f5 | 2019-05-28 15:39:52 -0700 | [diff] [blame] | 53 | {{- end }} |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 54 | |
| 55 | # Port connected to the BNG |
| 56 | port#bng_port: |
| 57 | type: tosca.nodes.SwitchPort |
| 58 | properties: |
| 59 | portId: 1 |
Andy Bavier | 7a08049 | 2018-08-30 14:26:09 -0700 | [diff] [blame] | 60 | requirements: |
| 61 | - switch: |
| 62 | node: switch#leaf_1 |
| 63 | relationship: tosca.relationships.BelongsToOne |
| 64 | |
| 65 | # Setup the fabric switch port where the external |
| 66 | # router is connected to |
| 67 | bngmapping: |
| 68 | type: tosca.nodes.BNGPortMapping |
| 69 | properties: |
| 70 | s_tag: "any" |
| 71 | switch_port: 1 |
Matteo Scandolo | b029c7a | 2018-10-12 13:19:30 -0700 | [diff] [blame] | 72 | |
Andy Bavier | 2d4364b | 2018-10-15 10:00:56 -0700 | [diff] [blame] | 73 | onos_app#dhcpl2relay: |
| 74 | type: tosca.nodes.ONOSApp |
| 75 | properties: |
| 76 | name: dhcpl2relay |
| 77 | must-exist: true |
| 78 | |
Matteo Scandolo | b029c7a | 2018-10-12 13:19:30 -0700 | [diff] [blame] | 79 | # DHCP L2 Relay config |
| 80 | dhcpl2relay-config-attr: |
| 81 | type: tosca.nodes.ServiceInstanceAttribute |
| 82 | properties: |
| 83 | name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay |
| 84 | value: > |
| 85 | { |
| 86 | "dhcpl2relay" : { |
| 87 | "useOltUplinkForServerPktInOut" : false, |
| 88 | "dhcpServerConnectPoints" : [ "of:0000000000000001/1" ] |
| 89 | } |
| 90 | } |
| 91 | requirements: |
| 92 | - service_instance: |
| 93 | node: onos_app#dhcpl2relay |
Andy Bavier | 2d4364b | 2018-10-15 10:00:56 -0700 | [diff] [blame] | 94 | relationship: tosca.relationships.BelongsToOne |