teone | e9ff486 | 2018-11-29 14:36:50 -0800 | [diff] [blame] | 1 | # Copyright 2017-present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | # curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @onf-demo-pod-fabric.yaml http://192.168.100.1:30007/run |
| 16 | |
| 17 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 18 | imports: |
| 19 | - custom_types/switch.yaml |
| 20 | - custom_types/switchport.yaml |
| 21 | - custom_types/portinterface.yaml |
| 22 | - custom_types/bngportmapping.yaml |
| 23 | - custom_types/attworkflowdriverwhitelistentry.yaml |
| 24 | - custom_types/attworkflowdriverservice.yaml |
| 25 | - custom_types/serviceinstanceattribute.yaml |
| 26 | - custom_types/onosapp.yaml |
| 27 | |
| 28 | description: Configures the fabric and the whitelist |
| 29 | |
| 30 | topology_template: |
| 31 | node_templates: |
| 32 | switch#agg_sw: |
| 33 | type: tosca.nodes.Switch |
| 34 | properties: |
| 35 | driver: ofdpa3 |
| 36 | ipv4Loopback: 192.168.0.201 |
| 37 | ipv4NodeSid: 17 |
| 38 | isEdgeRouter: True |
| 39 | name: AGG SWITCH |
| 40 | ofId: of:0000000000000001 |
| 41 | routerMac: 00:00:02:01:06:01 |
| 42 | |
| 43 | # Setup the EdgeCore OLT switch port |
| 44 | port#edgecore_olt_port: |
| 45 | type: tosca.nodes.SwitchPort |
| 46 | properties: |
Matteo Scandolo | f8f5df4 | 2019-03-21 11:54:53 -0700 | [diff] [blame] | 47 | portId: 1 |
teone | e9ff486 | 2018-11-29 14:36:50 -0800 | [diff] [blame] | 48 | host_learning: false |
| 49 | requirements: |
| 50 | - switch: |
| 51 | node: switch#agg_sw |
| 52 | relationship: tosca.relationships.BelongsToOne |
| 53 | |
| 54 | # Setup the Adtran OLT switch port |
| 55 | #port#adtran_olt_port: |
| 56 | # type: tosca.nodes.SwitchPort |
| 57 | # properties: |
| 58 | # portId: 50 |
| 59 | # host_learning: false |
| 60 | # requirements: |
| 61 | # - switch: |
| 62 | # node: switch#agg_sw |
| 63 | # relationship: tosca.relationships.BelongsToOne |
| 64 | |
| 65 | # Port connected to the BNG |
| 66 | port#bng_port: |
| 67 | type: tosca.nodes.SwitchPort |
| 68 | properties: |
Matteo Scandolo | f8f5df4 | 2019-03-21 11:54:53 -0700 | [diff] [blame] | 69 | portId: 153 |
teone | e9ff486 | 2018-11-29 14:36:50 -0800 | [diff] [blame] | 70 | requirements: |
| 71 | - switch: |
| 72 | node: switch#agg_sw |
| 73 | relationship: tosca.relationships.BelongsToOne |
| 74 | |
| 75 | # Setup the fabric switch port where the external |
| 76 | # router is connected to |
| 77 | bngmapping: |
| 78 | type: tosca.nodes.BNGPortMapping |
| 79 | properties: |
| 80 | s_tag: any |
Matteo Scandolo | f8f5df4 | 2019-03-21 11:54:53 -0700 | [diff] [blame] | 81 | switch_port: 153 |
teone | e9ff486 | 2018-11-29 14:36:50 -0800 | [diff] [blame] | 82 | |
| 83 | # DHCP L2 Relay config |
| 84 | onos_app#dhcpl2relay: |
| 85 | type: tosca.nodes.ONOSApp |
| 86 | properties: |
| 87 | name: dhcpl2relay |
| 88 | must-exist: true |
| 89 | |
| 90 | dhcpl2relay-config-attr: |
| 91 | type: tosca.nodes.ServiceInstanceAttribute |
| 92 | properties: |
| 93 | name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay |
| 94 | value: > |
| 95 | { |
| 96 | "dhcpl2relay" : { |
| 97 | "useOltUplinkForServerPktInOut" : false, |
Matteo Scandolo | f8f5df4 | 2019-03-21 11:54:53 -0700 | [diff] [blame] | 98 | "dhcpServerConnectPoints" : [ "of:0000000000000001/153" ] |
teone | e9ff486 | 2018-11-29 14:36:50 -0800 | [diff] [blame] | 99 | } |
| 100 | } |
| 101 | requirements: |
| 102 | - service_instance: |
| 103 | node: onos_app#dhcpl2relay |
| 104 | relationship: tosca.relationships.BelongsToOne |
| 105 | |
| 106 | # ONU Whitelist |
| 107 | service#att: |
| 108 | type: tosca.nodes.AttWorkflowDriverService |
| 109 | properties: |
| 110 | name: att-workflow-driver |
| 111 | must-exist: true |
| 112 | |
| 113 | # ONUs connected to EdgeCore OLT |
Matteo Scandolo | 3668706 | 2019-04-30 11:44:31 -0700 | [diff] [blame] | 114 | ISKT71e801a0: |
teone | e9ff486 | 2018-11-29 14:36:50 -0800 | [diff] [blame] | 115 | type: tosca.nodes.AttWorkflowDriverWhiteListEntry |
| 116 | properties: |
Matteo Scandolo | 3668706 | 2019-04-30 11:44:31 -0700 | [diff] [blame] | 117 | serial_number: ISKT71e801a0 |
teone | e9ff486 | 2018-11-29 14:36:50 -0800 | [diff] [blame] | 118 | pon_port_id: 536870912 |
| 119 | device_id: of:00000000c0a8646f |
| 120 | requirements: |
| 121 | - owner: |
| 122 | node: service#att |
| 123 | relationship: tosca.relationships.BelongsToOne |