blob: 578410ad2703b78feef10ee1630005d898c769d3 [file] [log] [blame]
Matteo Scandoloaf3c9942018-06-27 14:03:12 -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 @nodes.yaml http://192.168.99.100:30007/run
16
17tosca_definitions_version: tosca_simple_yaml_1_0
18description: Set up Fabric service and attach it to ONOS (note that onos-service needs to be loaded)
19imports:
20 - custom_types/node.yaml
21 - custom_types/nodetoswitchport.yaml
22 - custom_types/switch.yaml
23 - custom_types/switchport.yaml
24 - custom_types/deployment.yaml
25 - custom_types/site.yaml
26 - custom_types/sitedeployment.yaml
27
28topology_template:
29 node_templates:
30
31 # nodes
32 node#node1:
33 type: tosca.nodes.Node
34 properties:
35 dataPlaneIntf: fabricbridge
36 dataPlaneIp: 10.6.1.1/24
37 name: node1.cord.lab
38 requirements:
39 - site_deployment:
40 node: site_deployment
41 relationship: tosca.relationships.BelongsToOne
42
43
44 node#node2:
45 type: tosca.nodes.Node
46 properties:
47 dataPlaneIntf: fabricbridge
48 dataPlaneIp: 10.6.1.2/24
49 name: node2.cord.lab
50 requirements:
51 - site_deployment:
52 node: site_deployment
53 relationship: tosca.relationships.BelongsToOne
54
55 # ports (defined in fabric-config.yaml)
56 switch#leaf1:
57 type: tosca.nodes.Switch
58 properties:
59 name: leaf1
60 must-exist: true
61
62 port#port1:
63 type: tosca.nodes.SwitchPort
64 properties:
65 portId: 1
66 must-exist: true
67 requirements:
68 - switch:
69 node: switch#leaf1
70 relationship: tosca.relationships.BelongsToOne
71
72 port#port2:
73 type: tosca.nodes.SwitchPort
74 properties:
75 portId: 2
76 must-exist: true
77 requirements:
78 - switch:
79 node: switch#leaf1
80 relationship: tosca.relationships.BelongsToOne
81
82 # attaching nodes to ports
83 node1_to_port1:
84 type: tosca.nodes.NodeToSwitchPort
85 requirements:
86 - port:
87 node: port#port1
88 relationship: tosca.relationships.BelongsToOne
89 - node:
90 node: node#node1
91 relationship: tosca.relationships.BelongsToOne
92
93 node2_to_port2:
94 type: tosca.nodes.NodeToSwitchPort
95 requirements:
96 - port:
97 node: port#port2
98 relationship: tosca.relationships.BelongsToOne
99 - node:
100 node: node#node2
101 relationship: tosca.relationships.BelongsToOne
102
103 # extra setup required by XOS
104 mySite:
105 type: tosca.nodes.Site
106 properties:
107 name: mySite
108 login_base: opencord
109 abbreviated_name: ms
110 site_url: http://opencord.org/
111 hosts_nodes: true
112
113 myDeployment:
114 type: tosca.nodes.Deployment
115 properties:
116 name: myDeployment
117
118 site_deployment:
119 type: tosca.nodes.SiteDeployment
120 requirements:
121 - site:
122 node: mySite
123 relationship: tosca.relationships.BelongsToOne
124 - deployment:
125 node: myDeployment
126 relationship: tosca.relationships.BelongsToOne