blob: 6a9f1d8b374fcf5a3aa0655fe7a02b2bc6e5f16f [file] [log] [blame]
Joey Armstrong003e83e2023-01-09 20:23:48 -05001# Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
Luca Pretea67d3532018-09-14 10:16:10 -07002#
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 @flex-pod1-olt-fabric.yaml http://10.192.4.241: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/vrouterserviceinstance.yaml
23 - custom_types/vrouterstaticroute.yaml
24
25description: Configures the ONF SEBA POD with AT&T workflow
26
27topology_template:
28 node_templates:
29 # Fabric configuration
30 switch#leaf_1:
31 type: tosca.nodes.Switch
32 properties:
33 driver: ofdpa3
34 ipv4Loopback: 192.168.9.24
35 ipv4NodeSid: 17
36 isEdgeRouter: false
37 name: Fabric Switch - 1
38 ofId: of:0000cc37ab5b6da8
39 routerMac: 00:00:00:00:00:03
40
41 # Setup the OLT switch port
42 port#olt_port:
43 type: tosca.nodes.SwitchPort
44 properties:
45 portId: 7
46 host_learning: false
47 requirements:
48 - switch:
49 node: switch#leaf_1
50 relationship: tosca.relationships.BelongsToOne
51
52 # Setup the OLT switch port interface
53 interface#olt_interface:
54 type: tosca.nodes.PortInterface
55 properties:
56 ips: 10.8.2.254/24
57 name: olt_interface
58 requirements:
59 - port:
60 node: port#olt_port
61 relationship: tosca.relationships.BelongsToOne
62
63 # Setup the fabric switch port where the external
64 # router is connected to
65 port#upstream_port:
66 type: tosca.nodes.SwitchPort
67 properties:
68 portId: 8
69 requirements:
70 - switch:
71 node: switch#leaf_1
72 relationship: tosca.relationships.BelongsToOne
73
74 # Setup the fabric switch port interface where the
75 # external router is connected to
76 interface#upstream_interface:
77 type: tosca.nodes.PortInterface
78 properties:
79 name: upstream_interface
80 vlanUntagged: 40
81 ips: 10.8.3.254/24
82 requirements:
83 - port:
84 node: port#upstream_port
85 relationship: tosca.relationships.BelongsToOne
86
87 # Add a vRouter (ONOS)
88 vrouter#my_vrouter:
89 type: tosca.nodes.VRouterServiceInstance
90 properties:
91 name: my_vrouter
92
93 # Add a static route to the vRouter (ONOS)
94 route#my_route:
95 type: tosca.nodes.VRouterStaticRoute
96 properties:
97 prefix: "0.0.0.0/0"
98 next_hop: "10.8.3.1"
99 requirements:
100 - vrouter:
101 node: vrouter#my_vrouter
102 relationship: tosca.relationships.BelongsToOne