imports:
- custom_types/onosapp.yaml
- custom_types/onosservice.yaml
- custom_types/serviceinstanceattribute.yaml
description: Configures the VOLTHA ONOS service
topology_template:
node_templates:
service#onos:
type: tosca.nodes.ONOSService
properties:
name: onos
kind: data
rest_hostname: "onos-ui.default.svc.cluster.local"
rest_port: 8181
onos_app#olt:
type: tosca.nodes.ONOSApp
properties:
name: olt
app_id: org.opencord.olt
url: https://oss.sonatype.org/service/local/repositories/releases/content/org/opencord/olt-app/2.1.0/olt-app-2.1.0.oar
version: 2.1.0
dependencies: org.opencord.sadis
requirements:
- owner:
node: service#onos
relationship: tosca.relationships.BelongsToOne
onos_app#sadis:
type: tosca.nodes.ONOSApp
properties:
name: sadis
app_id: org.opencord.sadis
url: https://oss.sonatype.org/service/local/repositories/releases/content/org/opencord/sadis-app/2.2.0/sadis-app-2.2.0.oar
version: 2.2.0
requirements:
- owner:
node: service#onos
relationship: tosca.relationships.BelongsToOne
olt-config-attr:
type: tosca.nodes.ServiceInstanceAttribute
properties:
name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true
value: >
{
"enableDhcpOnProvisioning" : true
}
requirements:
- service_instance:
node: onos_app#olt
relationship: tosca.relationships.BelongsToOne
sadis-config-attr:
type: tosca.nodes.ServiceInstanceAttribute
properties:
name: /onos/v1/network/configuration/apps/org.opencord.sadis
value: >
{
"sadis" : {
"integration" : {
"cache" : {
"maxsize" : 1000,
"ttl": "PT300S"
},
"url" : "http://sadis-service:8000/subscriber/%s"
}
}
}
requirements:
- service_instance:
node: onos_app#sadis
relationship: tosca.relationships.BelongsToOne
Integration with other Services
The ONOS service is a dependency of many other services, including the Fabric and Fabric-crosconnect services. The ONOS service often is responsible for bringing up and configuring apps that these other services use.
Synchronization workflow
ONOSService
Any time an ONOSService
model is created/updated, the synchronizer checks for the corresponding ServiceAttributes
and if any are found it pushes the configuration to ONOS.
ONOSServiceInstance
Any time an ONOSServiceInstance
model is created/updated, the synchronizer checks for the corresponding ServiceInstanceAttributes
and if any are found:
- checks for the application dependencies
- if they are not matched
- defer the synchronization
- if they are matched
- it pushes the configuration to ONOS
- it installs/activates the application in ONOS
ONOS Applications can be activated if they already present in the container by providing the app_id
. If an application is not already present in the container then it can be installed from a remote .oar
, in which case it is necessary to also provide an url
and a version