blob: 9b166592556f3c45a0a31180de960adffbea3952 [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.
tosca_definitions_version: tosca_simple_yaml_1_0
description: >
Creates a TrustDomain, Principal, Slice, Image, and then brings up an openstack
VM attached to the management network.
imports:
- custom_types/trustdomain.yaml
- custom_types/principal.yaml
- custom_types/image.yaml
- custom_types/flavor.yaml
- custom_types/network.yaml
- custom_types/networkslice.yaml
- custom_types/node.yaml
- custom_types/site.yaml
- custom_types/slice.yaml
- custom_types/openstackservice.yaml
- custom_types/openstackserviceinstance.yaml
topology_template:
node_templates:
service#openstack:
type: tosca.nodes.OpenStackService
properties:
name: OpenStack
must-exist: true
mysite:
type: tosca.nodes.Site
properties:
name: mysite
must-exist: true
management_network:
type: tosca.nodes.Network
properties:
name: management
must-exist: true
m1.small:
type: tosca.nodes.Flavor
properties:
name: m1.small
must-exist: true
demo_trustdomain:
type: tosca.nodes.TrustDomain
properties:
name: "demo-trust"
requirements:
- owner:
node: service#openstack
relationship: tosca.relationships.BelongsToOne
demo_principal:
type: tosca.nodes.Principal
properties:
name: "demo-account"
requirements:
- trust_domain:
node: demo_trustdomain
relationship: tosca.relationships.BelongsToOne
image_ubuntu:
type: tosca.nodes.Image
properties:
name: "trusty-server-cloudimg"
container_format: "BARE"
disk_format: "QCOW2"
path: "http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img"
demo_slice:
type: tosca.nodes.Slice
properties:
name: "demo-slice"
requirements:
- site:
node: mysite
relationship: tosca.relationships.BelongsToOne
- trust_domain:
node: demo_trustdomain
relationship: tosca.relationships.BelongsToOne
- principal:
node: demo_principal
relationship: tosca.relationships.BelongsToOne
demo_slice_management_network:
type: tosca.nodes.NetworkSlice
requirements:
- network:
node: management_network
relationship: tosca.relationships.BelongsToOne
- slice:
node: demo_slice
relationship: tosca.relationships.BelongsToOne
demo_instance:
type: tosca.nodes.OpenStackServiceInstance
properties:
name: "demo-instance-ub"
requirements:
- slice:
node: demo_slice
relationship: tosca.relationships.BelongsToOne
- owner:
node: service#openstack
relationship: tosca.relationships.BelongsToOne
- image:
node: image_ubuntu
relationship: tosca.relationships.BelongsToOne
- flavor:
node: m1.small
relationship: tosca.relationships.BelongsToOne