blob: 92aa0b5c77ff37bbe766b16d249ee749d8165a62 [file] [log] [blame]
Matteo Scandolod4195ce2020-01-15 14:33:56 -08001# 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
17tosca_definitions_version: tosca_simple_yaml_1_0
18imports:
19 - custom_types/switch.yaml
20 - custom_types/switchport.yaml
21 - custom_types/portinterface.yaml
22 - custom_types/fabricipaddress.yaml
23 - custom_types/serviceinstanceattribute.yaml
24 - custom_types/onosapp.yaml
25 - custom_types/vrouterserviceinstance.yaml
26 - custom_types/vrouterstaticroute.yaml
27 - custom_types/servicegraphconstraint.yaml
28 - custom_types/attworkflowdriverwhitelistentry.yaml
29 - custom_types/attworkflowdriverservice.yaml
30
31description: Configures the fabric and the whitelist
32
33topology_template:
34 node_templates:
35
36 # Fabric configuration
37 switch#leaf_1:
38 type: tosca.nodes.Switch
39 properties:
40 driver: ofdpa3
41 ipv4Loopback: 192.168.0.201
42 ipv4NodeSid: 17
43 isEdgeRouter: True
44 name: AGG_SWITCH
45 ofId: of:0000000000000001
46 routerMac: 00:00:02:01:06:01
47
48 # Setup the OLT switch port
49 port#olt_port:
50 type: tosca.nodes.SwitchPort
51 properties:
52 portId: 1
53 host_learning: false
54 requirements:
55 - switch:
56 node: switch#leaf_1
57 relationship: tosca.relationships.BelongsToOne
58
59
60 # Port connected to the BNG
61 port#bng_port:
62 type: tosca.nodes.SwitchPort
63 properties:
64 portId: 31
65 requirements:
66 - switch:
67 node: switch#leaf_1
68 relationship: tosca.relationships.BelongsToOne
69
70 # Setup the fabric switch port where the external
71 # router is connected to
72 bngmapping:
73 type: tosca.nodes.BNGPortMapping
74 properties:
75 s_tag: any
76 switch_port: 31
77
78
79 # DHCP L2 Relay config
80 onos_app#dhcpl2relay:
81 type: tosca.nodes.ONOSApp
82 properties:
83 name: dhcpl2relay
84 must-exist: true
85
86 dhcpl2relay-config-attr:
87 type: tosca.nodes.ServiceInstanceAttribute
88 properties:
89 name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay
90 value: >
91 {
92 "dhcpl2relay" : {
93 "useOltUplinkForServerPktInOut" : false,
94 "dhcpServerConnectPoints" : [ "of:0000000000000001/31" ]
95 }
96 }
97 requirements:
98 - service_instance:
99 node: onos_app#dhcpl2relay
100 relationship: tosca.relationships.BelongsToOne
101
102 # ONU Whitelist
103 service#attworkflow:
104 type: tosca.nodes.AttWorkflowDriverService
105 properties:
106 name: att-workflow-driver
107 must-exist: true
108
109 ALPHe3d1cfe3:
110 type: tosca.nodes.AttWorkflowDriverWhiteListEntry
111 properties:
112 serial_number: ALPHe3d1cfe3
113 pon_port_id: 536870912
114 device_id: of:00000000c0a86470
115 requirements:
116 - owner:
117 node: service#attworkflow
118 relationship: tosca.relationships.BelongsToOne
119
120 ISKT71e80080:
121 type: tosca.nodes.AttWorkflowDriverWhiteListEntry
122 properties:
123 serial_number: ISKT71e80080
124 pon_port_id: 536870912
125 device_id: of:00000000c0a86470
126 requirements:
127 - owner:
128 node: service#attworkflow
129 relationship: tosca.relationships.BelongsToOne