Matteo Scandolo | 1c92dac | 2018-11-05 17:30:58 -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 | |
Matteo Scandolo | b9a27ef | 2018-11-13 10:51:40 -0800 | [diff] [blame] | 15 | # curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @bbsim-2.yaml http://10.90.0.120:30007/run |
Matteo Scandolo | 1c92dac | 2018-11-05 17:30:58 -0800 | [diff] [blame] | 16 | |
| 17 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 18 | imports: |
| 19 | - custom_types/oltdevice.yaml |
| 20 | - custom_types/onudevice.yaml |
| 21 | - custom_types/voltservice.yaml |
| 22 | - custom_types/bngportmapping.yaml |
| 23 | - custom_types/attworkflowdriverwhitelistentry.yaml |
| 24 | - custom_types/attworkflowdriverservice.yaml |
| 25 | - custom_types/rcordsubscriber.yaml |
| 26 | - custom_types/serviceinstanceattribute.yaml |
| 27 | - custom_types/onosapp.yaml |
| 28 | description: Create a simulated OLT Device in VOLTHA |
| 29 | topology_template: |
| 30 | node_templates: |
| 31 | |
| 32 | service#volt: |
| 33 | type: tosca.nodes.VOLTService |
| 34 | properties: |
| 35 | name: volt |
| 36 | must-exist: true |
| 37 | |
| 38 | olt_device: |
| 39 | type: tosca.nodes.OLTDevice |
| 40 | properties: |
| 41 | name: BBSIM_OLT |
| 42 | device_type: bbsimolt |
| 43 | host: bbsim.voltha.svc |
| 44 | port: 50060 |
| 45 | switch_datapath_id: of:0000000000000002 |
| 46 | switch_port: "3" |
| 47 | outer_tpid: "0x8100" |
| 48 | uplink: "65536" |
| 49 | nas_id: "NAS_ID" |
| 50 | serial_number: "bbsim.voltha.svc:50060" |
| 51 | requirements: |
| 52 | - volt_service: |
| 53 | node: service#volt |
| 54 | relationship: tosca.relationships.BelongsToOne |
| 55 | |
Matteo Scandolo | b9a27ef | 2018-11-13 10:51:40 -0800 | [diff] [blame] | 56 | # map the BNG to a port |
| 57 | # this is not really used by BBSIM as there's no data-plane traffic, |
| 58 | # but it's required by NEM to configure the crossconnect |
| 59 | bngmapping: |
| 60 | type: tosca.nodes.BNGPortMapping |
| 61 | properties: |
| 62 | s_tag: any |
| 63 | switch_port: 1 |
| 64 | |
| 65 | # DHCP L2 Relay config |
| 66 | onos_app#dhcpl2relay: |
Matteo Scandolo | 1c92dac | 2018-11-05 17:30:58 -0800 | [diff] [blame] | 67 | type: tosca.nodes.ONOSApp |
| 68 | properties: |
Matteo Scandolo | b9a27ef | 2018-11-13 10:51:40 -0800 | [diff] [blame] | 69 | name: dhcpl2relay |
Matteo Scandolo | 1c92dac | 2018-11-05 17:30:58 -0800 | [diff] [blame] | 70 | must-exist: true |
| 71 | |
Matteo Scandolo | b9a27ef | 2018-11-13 10:51:40 -0800 | [diff] [blame] | 72 | dhcpl2relay-config-attr: |
Matteo Scandolo | 1c92dac | 2018-11-05 17:30:58 -0800 | [diff] [blame] | 73 | type: tosca.nodes.ServiceInstanceAttribute |
| 74 | properties: |
Matteo Scandolo | b9a27ef | 2018-11-13 10:51:40 -0800 | [diff] [blame] | 75 | name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay |
Matteo Scandolo | 1c92dac | 2018-11-05 17:30:58 -0800 | [diff] [blame] | 76 | value: > |
| 77 | { |
Matteo Scandolo | b9a27ef | 2018-11-13 10:51:40 -0800 | [diff] [blame] | 78 | "dhcpl2relay" : { |
| 79 | "useOltUplinkForServerPktInOut" : true |
Matteo Scandolo | 1c92dac | 2018-11-05 17:30:58 -0800 | [diff] [blame] | 80 | } |
| 81 | } |
| 82 | requirements: |
| 83 | - service_instance: |
Matteo Scandolo | b9a27ef | 2018-11-13 10:51:40 -0800 | [diff] [blame] | 84 | node: onos_app#dhcpl2relay |
Matteo Scandolo | 1c92dac | 2018-11-05 17:30:58 -0800 | [diff] [blame] | 85 | relationship: tosca.relationships.BelongsToOne |
| 86 | |
| 87 | # Whitelist |
| 88 | service#att: |
| 89 | type: tosca.nodes.AttWorkflowDriverService |
| 90 | properties: |
| 91 | name: att-workflow-driver |
| 92 | must-exist: true |
| 93 | |
| 94 | BBSM00000100: |
| 95 | type: tosca.nodes.AttWorkflowDriverWhiteListEntry |
| 96 | properties: |
| 97 | serial_number: BBSM00000100 |
| 98 | pon_port_id: 536870913 |
| 99 | device_id: of:0000000000000012 |
| 100 | requirements: |
| 101 | - owner: |
| 102 | node: service#att |
| 103 | relationship: tosca.relationships.BelongsToOne |
| 104 | |
| 105 | BBSM00000101: |
| 106 | type: tosca.nodes.AttWorkflowDriverWhiteListEntry |
| 107 | properties: |
| 108 | serial_number: BBSM00000101 |
| 109 | pon_port_id: 536870913 |
| 110 | device_id: of:0000000000000012 |
| 111 | requirements: |
| 112 | - owner: |
| 113 | node: service#att |
| 114 | relationship: tosca.relationships.BelongsToOne |
| 115 | |
| 116 | # Pre-provision the subscriber |
| 117 | bbsim_subscriber_0: |
| 118 | type: tosca.nodes.RCORDSubscriber |
| 119 | properties: |
| 120 | name: Sub_BBSM00000100 |
| 121 | status: pre-provisioned |
| 122 | c_tag: 900 |
| 123 | s_tag: 999 |
| 124 | onu_device: BBSM00000100 |
Matteo Scandolo | 146038f | 2018-11-14 16:41:18 -0800 | [diff] [blame] | 125 | circuit_id: circuit0 |
| 126 | remote_id: remote0 |
| 127 | nas_port_id: PON 2/1/01/1:1.1.0 |
Matteo Scandolo | 1c92dac | 2018-11-05 17:30:58 -0800 | [diff] [blame] | 128 | |
| 129 | bbsim_subscriber_1: |
| 130 | type: tosca.nodes.RCORDSubscriber |
| 131 | properties: |
| 132 | name: Sub_BBSM00000101 |
| 133 | status: pre-provisioned |
| 134 | c_tag: 901 |
| 135 | s_tag: 999 |
| 136 | onu_device: BBSM00000101 |
Matteo Scandolo | 146038f | 2018-11-14 16:41:18 -0800 | [diff] [blame] | 137 | circuit_id: circuit1 |
| 138 | remote_id: remote1 |
| 139 | nas_port_id: PON 2/1/01/1:1.1.1 |