blob: 02951dd4dda8cd5b211e36b0ca153df9cb241b91 [file] [log] [blame]
---
# Copyright 2018-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.
# TOSCA recipe for adding a sample R-CORD subscriber
#
# http POST $(minikube service xos-tosca --url)/run \
# xos-username:admin@opencord.org xos-password:letmein \
# @./openstack-compute-tosca.yaml
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- custom_types/deployment.yaml
- custom_types/node.yaml
- custom_types/site.yaml
- custom_types/sitedeployment.yaml
description: Adds OpenStack compute nodes
topology_template:
node_templates:
# Site/Deployment, fully defined in deployment.yaml
mysite:
type: tosca.nodes.Site
properties:
name: mysite
must-exist: true
MyDeployment:
type: tosca.nodes.Deployment
properties:
name: MyDeployment
must-exist: true
# OpenStack compute nodes
head1:
type: tosca.nodes.Node
properties:
name: head1
requirements:
- site_deployment:
node: mysite_MyDeployment
relationship: tosca.relationships.BelongsToOne
compute1:
type: tosca.nodes.Node
properties:
name: compute1
requirements:
- site_deployment:
node: mysite_MyDeployment
relationship: tosca.relationships.BelongsToOne
compute2:
type: tosca.nodes.Node
properties:
name: compute2
requirements:
- site_deployment:
node: mysite_MyDeployment
relationship: tosca.relationships.BelongsToOne
mysite_MyDeployment:
type: tosca.nodes.SiteDeployment
requirements:
- site:
node: mysite
relationship: tosca.relationships.BelongsToOne
- deployment:
node: MyDeployment
relationship: tosca.relationships.BelongsToOne