blob: b2b85c121d15d6adb56755e18eb6b8c139e0aa78 [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 CORD test subscriber, created by platform-install
imports:
- custom_types/cordsubscriberroot.yaml
- custom_types/site.yaml
- custom_types/slice.yaml
- custom_types/user.yaml
- custom_types/voltservice.yaml
- custom_types/volttenant.yaml
- custom_types/serviceinstancelink.yaml
topology_template:
node_templates:
# site, fully created in deployment.yaml
{{ site_name }}:
type: tosca.nodes.Site
properties:
name: {{ site_name }}
must-exist: true
# vsg slice, volt service, fully created in cord-services.yaml
{{ site_name }}_vsg:
type: tosca.nodes.Slice
properties:
name: {{ site_name }}_vsg
must-exist: true
service#volt:
type: tosca.nodes.VOLTService
properties:
name: volt
must-exist: true
# Test subscriber
# Let's add a user who can be administrator of the household
johndoe@myhouse.com:
type: tosca.nodes.User
properties:
password: letmein
firstname: john
lastname: doe
username: johndoe@myhouse.com
email: johndoe@myhouse.com
requirements:
- site:
node: {{ site_name }}
relationship: tosca.relationships.BelongsToOne
# NOTE: is this useful? can't find this relation in the old TOSCA
# - dependency:
# node: {{ site_name }}_vsg
# relationship: tosca.relationships.DependsOn
# A subscriber
my_house:
type: tosca.nodes.CordSubscriberRoot
properties:
name: My House
service_specific_id: "123"
firewall_enable: false
cdn_enable: false
url_filter_enable: false
url_filter_level: R
# NOTE this appears not to be used
# requirements:
# - house_admin:
# node: johndoe@myhouse.com
# relationship: tosca.relationships.AdminPrivilege
# NOTE needs to be moved to a new model (now they are JSON encoded)
# Mom's PC:
# type: tosca.nodes.CORDUser
# properties:
# mac: 01:02:03:04:05:06
# level: PG_13
# requirements:
# - household:
# node: My House
# relationship: tosca.relationships.SubscriberDevice
# Dad's PC:
# type: tosca.nodes.CORDUser
# properties:
# mac: 90:E2:BA:82:F9:75
# level: PG_13
# requirements:
# - household:
# node: My House
# relationship: tosca.relationships.SubscriberDevice
# Jack's Laptop:
# type: tosca.nodes.CORDUser
# properties:
# mac: 68:5B:35:9D:91:D5
# level: PG_13
# requirements:
# - household:
# node: My House
# relationship: tosca.relationships.SubscriberDevice
# Jill's Laptop:
# type: tosca.nodes.CORDUser
# properties:
# mac: 34:36:3B:C9:B6:A6
# level: PG_13
# requirements:
# - household:
# node: My House
# relationship: tosca.relationships.SubscriberDevice
si#volt:
type: tosca.nodes.VOLTTenant
properties:
name: My Volt
service_specific_id: "123"
s_tag: 222
c_tag: 111
requirements:
- owner:
node: service#volt
relationship: tosca.relationships.BelongsToOne
# - subscriber:
# node: my_house
# relationship: tosca.relationships.BelongsToSubscriber
# - dependency:
# node: {{ site_name }}_vsg
# relationship: tosca.relationships.DependsOn
My_Volt_My_House:
type: tosca.nodes.ServiceInstanceLink
requirements:
- provider_service_instance:
node: si#volt
relationship: tosca.relationships.BelongsToOne
- subscriber_service_instance:
node: my_house
relationship: tosca.relationships.BelongsToOne