Joey Armstrong | 92ac4cf | 2022-12-27 07:39:37 -0500 | [diff] [blame] | 1 | # Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors |
adtran | 2834840 | 2018-10-17 15:23:26 +0200 | [diff] [blame] | 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 @onlab-pod1-fabric.yaml http://10.90.0.101: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#leaf_1: |
| 33 | type: tosca.nodes.Switch |
| 34 | properties: |
| 35 | driver: ofdpa3 |
| 36 | ipv4Loopback: 192.168.0.201 |
| 37 | ipv4NodeSid: 17 |
| 38 | isEdgeRouter: True |
| 39 | name: leaf_1 |
| 40 | ofId: of:b1b2486e73010256 |
| 41 | routerMac: 00:00:02:01:06:01 |
| 42 | |
| 43 | # Setup the Adtran OLT switch port |
| 44 | port#adtran_olt_port: |
| 45 | type: tosca.nodes.SwitchPort |
| 46 | properties: |
| 47 | portId: 50 |
| 48 | host_learning: false |
| 49 | requirements: |
| 50 | - switch: |
| 51 | node: switch#leaf_1 |
| 52 | relationship: tosca.relationships.BelongsToOne |
| 53 | |
| 54 | # Port connected to the BNG |
| 55 | port#bng_port: |
| 56 | type: tosca.nodes.SwitchPort |
| 57 | properties: |
| 58 | portId: 48 |
| 59 | requirements: |
| 60 | - switch: |
| 61 | node: switch#leaf_1 |
| 62 | relationship: tosca.relationships.BelongsToOne |
| 63 | |
| 64 | # Setup the fabric switch port where the external |
| 65 | # router is connected to |
| 66 | bngmapping: |
| 67 | type: tosca.nodes.BNGPortMapping |
| 68 | properties: |
| 69 | s_tag: any |
| 70 | switch_port: 48 |
| 71 | |
| 72 | # DHCP L2 Relay config |
| 73 | onos_app#dhcpl2relay: |
| 74 | type: tosca.nodes.ONOSApp |
| 75 | properties: |
| 76 | name: dhcpl2relay |
| 77 | must-exist: true |
| 78 | |
| 79 | dhcpl2relay-config-attr: |
| 80 | type: tosca.nodes.ServiceInstanceAttribute |
| 81 | properties: |
| 82 | name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay |
| 83 | value: > |
| 84 | { |
| 85 | "dhcpl2relay" : { |
| 86 | "useOltUplinkForServerPktInOut" : false, |
| 87 | "dhcpServerConnectPoints" : [ "of:0000000000000001/48" ] |
| 88 | } |
| 89 | } |
| 90 | requirements: |
| 91 | - service_instance: |
| 92 | node: onos_app#dhcpl2relay |
| 93 | relationship: tosca.relationships.BelongsToOne |
| 94 | |
| 95 | # ONU Whitelist |
| 96 | service#att: |
| 97 | type: tosca.nodes.AttWorkflowDriverService |
| 98 | properties: |
| 99 | name: att-workflow-driver |
| 100 | must-exist: true |
| 101 | |
| 102 | |
| 103 | |
| 104 | ADTN162605D8: |
| 105 | type: tosca.nodes.AttWorkflowDriverWhiteListEntry |
| 106 | properties: |
| 107 | serial_number: ADTN162605D8 |
| 108 | pon_port_id: 5 |
| 109 | device_id: of:0000001992e8bce2 |
| 110 | requirements: |
| 111 | - owner: |
| 112 | node: service#att |
| 113 | relationship: tosca.relationships.BelongsToOne |
| 114 | |
| 115 | |