blob: e82db0f45963c1f8f95fd1711276031b25683a87 [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
Scott Bakera3b3ff22019-01-23 11:25:18 -080022 - custom_types/fabricipaddress.yaml
Luca Preteb601c382018-04-30 16:10:43 -070023description: Configures fabric switches and related ports
24topology_template:
25 node_templates:
26 switch#leaf1:
27 type: tosca.nodes.Switch
28 properties:
29 driver: ofdpa3
30 ipv4Loopback: 192.168.0.201
31 ipv4NodeSid: 17
32 isEdgeRouter: True
33 name: leaf1
34 ofId: of:0000000000000001
35 routerMac: 00:00:02:01:06:01
Luca Preteb601c382018-04-30 16:10:43 -070036
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:
Luca Preteb601c382018-04-30 16:10:43 -070051 name: port1
52 requirements:
53 - port:
54 node: port#port1
55 relationship: tosca.relationships.BelongsToOne
Matteo Scandolodfe75ff2018-06-15 10:52:09 -070056
Scott Bakera3b3ff22019-01-23 11:25:18 -080057 # Setup a fabric switch port interface
58 ipaddress#ipaddress1:
59 type: tosca.nodes.FabricIpAddress
60 properties:
61 ip: 192.168.0.254/24
62 description: some ip address
63 requirements:
64 - interface:
65 node: interface#interface1
66 relationship: tosca.relationships.BelongsToOne
67
Matteo Scandolodfe75ff2018-06-15 10:52:09 -070068 # Setup a fabric switch port with host_learning disabled
69 port#port2:
70 type: tosca.nodes.SwitchPort
71 properties:
72 portId: 2
73 host_learning: false
74 requirements:
75 - switch:
76 node: switch#leaf1
77 relationship: tosca.relationships.BelongsToOne