blob: 63ba2183d864dff91742a685e574c52d30207479 [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
Matteo Scandoloaf3c9942018-06-27 14:03:12 -070015# curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @fabric-config.yaml http://192.168.99.100:30007/run
Luca Preteb601c382018-04-30 16:10:43 -070016
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
Luca Preteb601c382018-04-30 16:10:43 -070035
36 # Setup a fabric switch port
37 port#port1:
38 type: tosca.nodes.SwitchPort
39 properties:
40 portId: 1
41 requirements:
42 - switch:
43 node: switch#leaf1
44 relationship: tosca.relationships.BelongsToOne
45
46 # Setup a fabric switch port interface
47 interface#interface1:
48 type: tosca.nodes.PortInterface
49 properties:
50 ips: 192.168.0.254/24
51 name: port1
52 requirements:
53 - port:
54 node: port#port1
55 relationship: tosca.relationships.BelongsToOne
Matteo Scandolodfe75ff2018-06-15 10:52:09 -070056
57 # Setup a fabric switch port with host_learning disabled
58 port#port2:
59 type: tosca.nodes.SwitchPort
60 properties:
61 portId: 2
62 host_learning: false
63 requirements:
64 - switch:
65 node: switch#leaf1
66 relationship: tosca.relationships.BelongsToOne