blob: 933f968ef8cb9e593f0a32eef63adb72e859e573 [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: Just enough Tosca to get the vSG slice running on the CORD POD, created by rcord profile
imports:
- custom_types/addressmanagerservice.yaml
- custom_types/addresspool.yaml
- custom_types/image.yaml
- custom_types/network.yaml
- custom_types/networkslice.yaml
- custom_types/networktemplate.yaml
- custom_types/nodelabel.yaml
- custom_types/onosapp.yaml
- custom_types/onosservice.yaml
- custom_types/site.yaml
- custom_types/service.yaml
- custom_types/servicedependency.yaml
- custom_types/serviceinstanceattribute.yaml
- custom_types/serviceinstancelink.yaml
- custom_types/slice.yaml
- custom_types/voltservice.yaml
- custom_types/vrouterservice.yaml
- custom_types/vsgservice.yaml
- custom_types/vtrservice.yaml
topology_template:
node_templates:
{{ site_name }}:
type: tosca.nodes.Site
properties:
name: {{ site_name }}
must-exist: true
image#vsg-1.1:
type: tosca.nodes.Image
properties:
name: vsg-1.1
# management networks, fully created in management-net.yaml
management:
type: tosca.nodes.Network
properties:
name: management
must-exist: true
{% if use_vtn_net_management_host %}
management_host:
type: tosca.nodes.Network
properties:
name: management_host
must-exist: true
{% endif %}
service#rcord:
type: tosca.nodes.Service
properties:
name: rcord
rcord_volt:
type: tosca.nodes.ServiceDependency
properties:
connect_method: None
requirements:
- subscriber_service:
node: service#rcord
relationship: tosca.relationships.BelongsToOne
- provider_service:
node: service#volt
relationship: tosca.relationships.BelongsToOne
# ONOS_CORD, fully created in vtn.yaml
service#ONOS_CORD:
type: tosca.nodes.ONOSService
properties:
name: ONOS_CORD
must-exist: true
# ONOS_Fabric, fully created in fabric.yaml
service#ONOS_Fabric:
type: tosca.nodes.ONOSService
properties:
name: ONOS_Fabric
must-exist: true
# CORD Services
service#vtr:
type: tosca.nodes.VTRService
properties:
name: vtr
kind: rcord
service#volt:
type: tosca.nodes.VOLTService
properties:
name: volt
kind: rcord
public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/volt_rsa.pub') }}
private_key_fn: /opt/xos/services/volt/keys/volt_rsa
volt_vsg:
type: tosca.nodes.ServiceDependency
properties:
connect_method: None
requirements:
- subscriber_service:
node: service#volt
relationship: tosca.relationships.BelongsToOne
- provider_service:
node: service#vsg
relationship: tosca.relationships.BelongsToOne
addresses_vsg:
type: tosca.nodes.AddressPool
properties:
name: addresses_vsg
addresses: {{ addresspool_vsg_cidr }}
gateway_ip: {{ addresspool_vsg_cidr | ipaddr('1') | ipaddr('address') }}
gateway_mac: {{ fabric_gateway_hwaddr }}
requirements:
- service:
node: service#addressmanager
relationship: tosca.relationships.BelongsToOne
addresses_public:
type: tosca.nodes.AddressPool
properties:
name: addresses_public
addresses: {{ addresspool_public_cidr }}
gateway_ip: {{ addresspool_public_cidr | ipaddr('1') | ipaddr('address') }}
gateway_mac: {{ fabric_gateway_hwaddr }}
requirements:
- service:
node: service#addressmanager
relationship: tosca.relationships.BelongsToOne
label_vsg:
type: tosca.nodes.NodeLabel
properties:
name: label_vsg
service#vsg:
type: tosca.nodes.VSGService
properties:
name: vsg
# backend_network_label: hpc_client # what is this? can we drop it?
public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/vsg_rsa.pub') }}
private_key_fn: /opt/xos/services/vsg/keys/vsg_rsa
# node_label: label_vsg
vsg_vrouter:
type: tosca.nodes.ServiceDependency
properties:
connect_method: None
requirements:
- subscriber_service:
node: service#vsg
relationship: tosca.relationships.BelongsToOne
- provider_service:
node: service#vrouter
relationship: tosca.relationships.BelongsToOne
vsg_addressmanager:
type: tosca.nodes.ServiceDependency
properties:
connect_method: None
requirements:
- subscriber_service:
node: service#vsg
relationship: tosca.relationships.BelongsToOne
- provider_service:
node: service#addressmanager
relationship: tosca.relationships.BelongsToOne
service#addressmanager:
type: tosca.nodes.AddressManagerService
properties:
name: addressmanager
service#vrouter:
type: tosca.nodes.VRouterService
properties:
name: vrouter
rest_hostname: onos-fabric.{{ site_suffix }}
rest_port: 8181
rest_user: onos
rest_pass: rocks
vRouter_ONOS_app:
type: tosca.nodes.ONOSApp
requirements:
- owner:
node: service#ONOS_Fabric
relationship: tosca.relationships.BelongsToOne
properties:
name: vRouter_ONOS_app
dependencies: org.onosproject.fpm
vRouter_ONOS_app_autogenerate:
type: tosca.nodes.ServiceInstanceAttribute
requirements:
- service_instance:
node: vRouter_ONOS_app
relationship: tosca.relationships.BelongsToOne
properties:
name: autogenerate
value: vrouter-network-cfg
vRouter_ONOS_app_ONOS_CORD:
type: tosca.nodes.ServiceInstanceLink
requirements:
- provider_service_instance:
node: vRouter_ONOS_app
relationship: tosca.relationships.BelongsToOne
- subscriber_service:
node: service#vrouter
relationship: tosca.relationships.BelongsToOne
vsg_template:
type: tosca.nodes.NetworkTemplate
properties:
name: vsg_template
visibility: private
translation: none
vtn_kind: VSG
# Networks required by the CORD setup
{{ site_name }}_vsg-access:
type: tosca.nodes.Network
properties:
name: {{ site_name }}_vsg-access
# ip_version: 4
requirements:
- template:
node: vsg_template
relationship: tosca.relationships.BelongsToOne
- owner:
node: {{ site_name }}_vsg
relationship: tosca.relationships.BelongsToOne
networkslice#{{ site_name }}_vsg-access_to_{{ site_name }}_vsg:
type: tosca.nodes.NetworkSlice
requirements:
- network:
node: {{ site_name }}_vsg-access
relationship: tosca.relationships.BelongsToOne
- slice:
node: {{ site_name }}_vsg
relationship: tosca.relationships.BelongsToOne
# CORD Slices
{{ site_name }}_vsg:
description: vSG Controller Slice
type: tosca.nodes.Slice
properties:
network: noauto
name: {{ site_name }}_vsg
requirements:
- service:
node: service#vsg
relationship: tosca.relationships.BelongsToOne
- site:
node: {{ site_name }}
relationship: tosca.relationships.BelongsToOne
- default_image:
node: image#vsg-1.1
relationship: tosca.relationships.BelongsToOne
networkslice#management_to_{{ site_name }}_vsg:
type: tosca.nodes.NetworkSlice
requirements:
- network:
node: management
relationship: tosca.relationships.BelongsToOne
- slice:
node: {{ site_name }}_vsg
relationship: tosca.relationships.BelongsToOne
{% if use_vtn_net_management_host %}
networkslice#management_host_to_{{ site_name }}_vsg:
type: tosca.nodes.NetworkSlice
requirements:
- network:
node: management_host
relationship: tosca.relationships.BelongsToOne
- slice:
node: {{ site_name }}_vsg
relationship: tosca.relationships.BelongsToOne
{% endif %}
# TODO: migrate interfaces when we'll start using them
# in#lanside:
# type: tosca.nodes.InterfaceType
# properties:
# direction: in
# out#lanside:
# type: tosca.nodes.InterfaceType
# properties:
# direction: out
# in#wanside:
# type: tosca.nodes.InterfaceType
# properties:
# direction: in
# out#wanside:
# type: tosca.nodes.InterfaceType
# properties:
# direction: out
# volt_lanside:
# type: tosca.nodes.ServiceInterface
# requirements:
# - service:
# node: service#volt
# relationship: tosca.relationships.MemberOfService
# - interface:
# node: out#lanside
# relationship: tosca.relationships.IsType
# vsg_lanside:
# type: tosca.nodes.ServiceInterface
# requirements:
# - service:
# node: service#vsg
# relationship: tosca.relationships.MemberOfService
# - interface:
# node: in#lanside
# relationship: tosca.relationships.IsType
# vsg_wanside:
# type: tosca.nodes.ServiceInterface
# requirements:
# - service:
# node: service#vsg
# relationship: tosca.relationships.MemberOfService
# - interface:
# node: out#wanside
# relationship: tosca.relationships.IsType
# addressmanager_wanside:
# type: tosca.nodes.ServiceInterface
# requirements:
# - service:
# node: service#addressmanager
# relationship: tosca.relationships.MemberOfService
# - interface:
# node: in#wanside
# relationship: tosca.relationships.IsType