blob: 838c800afee6c8d8260aea425d13446e6741f8b6 [file] [log] [blame]
Luca Preteb601c382018-04-30 16:10:43 -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 @fabric.yaml http://192.168.99.100: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
22description: Configures fabric switches and related ports
23topology_template:
24 node_templates:
25 switch#leaf1:
26 type: tosca.nodes.Switch
27 properties:
28 driver: ofdpa3
29 ipv4Loopback: 192.168.0.201
30 ipv4NodeSid: 17
31 isEdgeRouter: True
32 name: leaf1
33 ofId: of:0000000000000001
34 routerMac: 00:00:02:01:06:01
35
36
37 # Setup a fabric switch port
38 port#port1:
39 type: tosca.nodes.SwitchPort
40 properties:
41 portId: 1
42 requirements:
43 - switch:
44 node: switch#leaf1
45 relationship: tosca.relationships.BelongsToOne
46
47 # Setup a fabric switch port interface
48 interface#interface1:
49 type: tosca.nodes.PortInterface
50 properties:
51 ips: 192.168.0.254/24
52 name: port1
53 requirements:
54 - port:
55 node: port#port1
56 relationship: tosca.relationships.BelongsToOne