blob: 89f14aa2f2d3b2e58b0f624c6c3e27d485a3ee04 [file] [log] [blame]
Zack Williams06e75f42018-11-21 11:54:06 -07001# 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# Example TOSCA to configure dhcpl2relay when running BBSim standalone with SiaB
16# Load into xos-tosca with:
17# curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @bbsim-dhcp.yaml http://127.0.0.1:30007/run
18
19tosca_definitions_version: tosca_simple_yaml_1_0
20imports:
21 - custom_types/bngportmapping.yaml
22 - custom_types/onosapp.yaml
23 - custom_types/serviceinstanceattribute.yaml
24
25description: Create a simulated OLT Device in VOLTHA
26topology_template:
27 node_templates:
28
29 # map the BNG to a port
30 # this is not really used by BBSIM as there's no data-plane traffic,
31 # but it's required by NEM to configure the crossconnect
32 bngmapping:
33 type: tosca.nodes.BNGPortMapping
34 properties:
35 s_tag: any
36 switch_port: 1
37
38 # DHCP L2 Relay config
39 onos_app#dhcpl2relay:
40 type: tosca.nodes.ONOSApp
41 properties:
42 name: dhcpl2relay
43 must-exist: true
44
45 dhcpl2relay-config-attr:
46 type: tosca.nodes.ServiceInstanceAttribute
47 properties:
48 name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay
49 value: >
50 {
51 "dhcpl2relay" : {
52 "useOltUplinkForServerPktInOut" : true
53 }
54 }
55 requirements:
56 - service_instance:
57 node: onos_app#dhcpl2relay
58 relationship: tosca.relationships.BelongsToOne