blob: e1c0702f6e748b55bf18f1795722bd487c44dd5e [file] [log] [blame]
Joey Armstrong003e83e2023-01-09 20:23:48 -05001# Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
Matteo Scandolod4195ce2020-01-15 14:33:56 -08002#
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 Scandolod5a99682020-01-15 15:55:47 -080015# 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 Scandolod4195ce2020-01-15 14:33:56 -080016
17tosca_definitions_version: tosca_simple_yaml_1_0
18imports:
19 - custom_types/switch.yaml
20 - custom_types/switchport.yaml
21 - custom_types/portinterface.yaml
Matteo Scandoloe02c6882020-01-15 14:41:49 -080022 - custom_types/bngportmapping.yaml
Matteo Scandolod4195ce2020-01-15 14:33:56 -080023 - custom_types/fabricipaddress.yaml
24 - custom_types/serviceinstanceattribute.yaml
25 - custom_types/onosapp.yaml
Matteo Scandolod4195ce2020-01-15 14:33:56 -080026 - custom_types/servicegraphconstraint.yaml
27 - custom_types/attworkflowdriverwhitelistentry.yaml
28 - custom_types/attworkflowdriverservice.yaml
29
30description: Configures the fabric and the whitelist
31
32topology_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 Scandolob9568be2020-01-15 14:48:44 -080044 ofId: of:0000000000000205
Matteo Scandolod4195ce2020-01-15 14:33:56 -080045 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 Scandolocae524b2020-01-15 16:35:46 -080093 "dhcpServerConnectPoints" : [ "of:0000000000000205/31" ]
Matteo Scandolod4195ce2020-01-15 14:33:56 -080094 }
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