Joey Armstrong | 003e83e | 2023-01-09 20:23:48 -0500 | [diff] [blame] | 1 | # Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors |
Matteo Scandolo | d4195ce | 2020-01-15 14:33:56 -0800 | [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 | |
Matteo Scandolo | d5a9968 | 2020-01-15 15:55:47 -0800 | [diff] [blame] | 15 | # curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @onf-p4-demo-pod-fabric.yaml http://192.168.100.1:30007/run |
Matteo Scandolo | d4195ce | 2020-01-15 14:33:56 -0800 | [diff] [blame] | 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 |
Matteo Scandolo | e02c688 | 2020-01-15 14:41:49 -0800 | [diff] [blame] | 22 | - custom_types/bngportmapping.yaml |
Matteo Scandolo | d4195ce | 2020-01-15 14:33:56 -0800 | [diff] [blame] | 23 | - custom_types/fabricipaddress.yaml |
| 24 | - custom_types/serviceinstanceattribute.yaml |
| 25 | - custom_types/onosapp.yaml |
Matteo Scandolo | d4195ce | 2020-01-15 14:33:56 -0800 | [diff] [blame] | 26 | - custom_types/servicegraphconstraint.yaml |
| 27 | - custom_types/attworkflowdriverwhitelistentry.yaml |
| 28 | - custom_types/attworkflowdriverservice.yaml |
| 29 | |
| 30 | description: Configures the fabric and the whitelist |
| 31 | |
| 32 | topology_template: |
| 33 | node_templates: |
| 34 | |
| 35 | # Fabric configuration |
| 36 | switch#leaf_1: |
| 37 | type: tosca.nodes.Switch |
| 38 | properties: |
| 39 | driver: ofdpa3 |
| 40 | ipv4Loopback: 192.168.0.201 |
| 41 | ipv4NodeSid: 17 |
| 42 | isEdgeRouter: True |
| 43 | name: AGG_SWITCH |
Matteo Scandolo | b9568be | 2020-01-15 14:48:44 -0800 | [diff] [blame] | 44 | ofId: of:0000000000000205 |
Matteo Scandolo | d4195ce | 2020-01-15 14:33:56 -0800 | [diff] [blame] | 45 | routerMac: 00:00:02:01:06:01 |
| 46 | |
| 47 | # Setup the OLT switch port |
| 48 | port#olt_port: |
| 49 | type: tosca.nodes.SwitchPort |
| 50 | properties: |
| 51 | portId: 1 |
| 52 | host_learning: false |
| 53 | requirements: |
| 54 | - switch: |
| 55 | node: switch#leaf_1 |
| 56 | relationship: tosca.relationships.BelongsToOne |
| 57 | |
| 58 | |
| 59 | # Port connected to the BNG |
| 60 | port#bng_port: |
| 61 | type: tosca.nodes.SwitchPort |
| 62 | properties: |
| 63 | portId: 31 |
| 64 | requirements: |
| 65 | - switch: |
| 66 | node: switch#leaf_1 |
| 67 | relationship: tosca.relationships.BelongsToOne |
| 68 | |
| 69 | # Setup the fabric switch port where the external |
| 70 | # router is connected to |
| 71 | bngmapping: |
| 72 | type: tosca.nodes.BNGPortMapping |
| 73 | properties: |
| 74 | s_tag: any |
| 75 | switch_port: 31 |
| 76 | |
| 77 | |
| 78 | # DHCP L2 Relay config |
| 79 | onos_app#dhcpl2relay: |
| 80 | type: tosca.nodes.ONOSApp |
| 81 | properties: |
| 82 | name: dhcpl2relay |
| 83 | must-exist: true |
| 84 | |
| 85 | dhcpl2relay-config-attr: |
| 86 | type: tosca.nodes.ServiceInstanceAttribute |
| 87 | properties: |
| 88 | name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay |
| 89 | value: > |
| 90 | { |
| 91 | "dhcpl2relay" : { |
| 92 | "useOltUplinkForServerPktInOut" : false, |
Matteo Scandolo | cae524b | 2020-01-15 16:35:46 -0800 | [diff] [blame] | 93 | "dhcpServerConnectPoints" : [ "of:0000000000000205/31" ] |
Matteo Scandolo | d4195ce | 2020-01-15 14:33:56 -0800 | [diff] [blame] | 94 | } |
| 95 | } |
| 96 | requirements: |
| 97 | - service_instance: |
| 98 | node: onos_app#dhcpl2relay |
| 99 | relationship: tosca.relationships.BelongsToOne |
| 100 | |
| 101 | # ONU Whitelist |
| 102 | service#attworkflow: |
| 103 | type: tosca.nodes.AttWorkflowDriverService |
| 104 | properties: |
| 105 | name: att-workflow-driver |
| 106 | must-exist: true |
| 107 | |
| 108 | ALPHe3d1cfe3: |
| 109 | type: tosca.nodes.AttWorkflowDriverWhiteListEntry |
| 110 | properties: |
| 111 | serial_number: ALPHe3d1cfe3 |
| 112 | pon_port_id: 536870912 |
| 113 | device_id: of:00000000c0a86470 |
| 114 | requirements: |
| 115 | - owner: |
| 116 | node: service#attworkflow |
| 117 | relationship: tosca.relationships.BelongsToOne |
| 118 | |
| 119 | ISKT71e80080: |
| 120 | type: tosca.nodes.AttWorkflowDriverWhiteListEntry |
| 121 | properties: |
| 122 | serial_number: ISKT71e80080 |
| 123 | pon_port_id: 536870912 |
| 124 | device_id: of:00000000c0a86470 |
| 125 | requirements: |
| 126 | - owner: |
| 127 | node: service#attworkflow |
| 128 | relationship: tosca.relationships.BelongsToOne |