blob: bffd43e69cb55025ccb4b2f3d2731c83aad257e1 [file] [log] [blame]
Luca Pretea67d3532018-09-14 10:16:10 -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# 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 - custom_types/hippieossservice.yaml
25 - custom_types/servicedependency.yaml
26 - custom_types/voltservice.yaml
27
28description: Configures the ONF SEBA POD with AT&T workflow
29
30topology_template:
31 node_templates:
32 # Fabric configuration
33 switch#leaf_1:
34 type: tosca.nodes.Switch
35 properties:
36 driver: ofdpa3
37 ipv4Loopback: 192.168.9.24
38 ipv4NodeSid: 17
39 isEdgeRouter: false
40 name: Fabric Switch - 1
41 ofId: of:0000cc37ab5b6da8
42 routerMac: 00:00:00:00:00:03
43
44 # Setup the OLT switch port
45 port#olt_port:
46 type: tosca.nodes.SwitchPort
47 properties:
48 portId: 7
49 host_learning: false
50 requirements:
51 - switch:
52 node: switch#leaf_1
53 relationship: tosca.relationships.BelongsToOne
54
55 # Setup the OLT switch port interface
56 interface#olt_interface:
57 type: tosca.nodes.PortInterface
58 properties:
59 ips: 10.8.2.254/24
60 name: olt_interface
61 requirements:
62 - port:
63 node: port#olt_port
64 relationship: tosca.relationships.BelongsToOne
65
66 # Setup the fabric switch port where the external
67 # router is connected to
68 port#upstream_port:
69 type: tosca.nodes.SwitchPort
70 properties:
71 portId: 8
72 requirements:
73 - switch:
74 node: switch#leaf_1
75 relationship: tosca.relationships.BelongsToOne
76
77 # Setup the fabric switch port interface where the
78 # external router is connected to
79 interface#upstream_interface:
80 type: tosca.nodes.PortInterface
81 properties:
82 name: upstream_interface
83 vlanUntagged: 40
84 ips: 10.8.3.254/24
85 requirements:
86 - port:
87 node: port#upstream_port
88 relationship: tosca.relationships.BelongsToOne
89
90 # Add a vRouter (ONOS)
91 vrouter#my_vrouter:
92 type: tosca.nodes.VRouterServiceInstance
93 properties:
94 name: my_vrouter
95
96 # Add a static route to the vRouter (ONOS)
97 route#my_route:
98 type: tosca.nodes.VRouterStaticRoute
99 properties:
100 prefix: "0.0.0.0/0"
101 next_hop: "10.8.3.1"
102 requirements:
103 - vrouter:
104 node: vrouter#my_vrouter
105 relationship: tosca.relationships.BelongsToOne
106
107 service#volt:
108 type: tosca.nodes.VOLTService
109 properties:
110 name: volt
111 must-exist: true
112
113 service#oss:
114 type: tosca.nodes.HippieOSSService
115 properties:
116 name: hippie-oss
117 kind: oss
118
119 ALPHe3d1cfa7:
120 type: tosca.nodes.HippieOSSWhiteListEntry
121 properties:
122 serial_number: ALPHe3d1cfa7
123 requirements:
124 - owner:
125 node: service#oss
126 relationship: tosca.relationships.BelongsToOne
127
128 service_dependency#oss_volt:
129 type: tosca.nodes.ServiceDependency
130 properties:
131 connect_method: None
132 requirements:
133 - subscriber_service:
134 node: service#oss
135 relationship: tosca.relationships.BelongsToOne
136 - provider_service:
137 node: service#volt
138 relationship: tosca.relationships.BelongsToOne