blob: 578410ad2703b78feef10ee1630005d898c769d3 [file] [log] [blame]
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @nodes.yaml http://192.168.99.100:30007/run
tosca_definitions_version: tosca_simple_yaml_1_0
description: Set up Fabric service and attach it to ONOS (note that onos-service needs to be loaded)
imports:
- custom_types/node.yaml
- custom_types/nodetoswitchport.yaml
- custom_types/switch.yaml
- custom_types/switchport.yaml
- custom_types/deployment.yaml
- custom_types/site.yaml
- custom_types/sitedeployment.yaml
topology_template:
node_templates:
# nodes
node#node1:
type: tosca.nodes.Node
properties:
dataPlaneIntf: fabricbridge
dataPlaneIp: 10.6.1.1/24
name: node1.cord.lab
requirements:
- site_deployment:
node: site_deployment
relationship: tosca.relationships.BelongsToOne
node#node2:
type: tosca.nodes.Node
properties:
dataPlaneIntf: fabricbridge
dataPlaneIp: 10.6.1.2/24
name: node2.cord.lab
requirements:
- site_deployment:
node: site_deployment
relationship: tosca.relationships.BelongsToOne
# ports (defined in fabric-config.yaml)
switch#leaf1:
type: tosca.nodes.Switch
properties:
name: leaf1
must-exist: true
port#port1:
type: tosca.nodes.SwitchPort
properties:
portId: 1
must-exist: true
requirements:
- switch:
node: switch#leaf1
relationship: tosca.relationships.BelongsToOne
port#port2:
type: tosca.nodes.SwitchPort
properties:
portId: 2
must-exist: true
requirements:
- switch:
node: switch#leaf1
relationship: tosca.relationships.BelongsToOne
# attaching nodes to ports
node1_to_port1:
type: tosca.nodes.NodeToSwitchPort
requirements:
- port:
node: port#port1
relationship: tosca.relationships.BelongsToOne
- node:
node: node#node1
relationship: tosca.relationships.BelongsToOne
node2_to_port2:
type: tosca.nodes.NodeToSwitchPort
requirements:
- port:
node: port#port2
relationship: tosca.relationships.BelongsToOne
- node:
node: node#node2
relationship: tosca.relationships.BelongsToOne
# extra setup required by XOS
mySite:
type: tosca.nodes.Site
properties:
name: mySite
login_base: opencord
abbreviated_name: ms
site_url: http://opencord.org/
hosts_nodes: true
myDeployment:
type: tosca.nodes.Deployment
properties:
name: myDeployment
site_deployment:
type: tosca.nodes.SiteDeployment
requirements:
- site:
node: mySite
relationship: tosca.relationships.BelongsToOne
- deployment:
node: myDeployment
relationship: tosca.relationships.BelongsToOne