Merge "[CORD-3141] Adding onos-voltha to rcord-lite"
diff --git a/xos-profiles/rcord-lite/templates/_tosca.tpl b/xos-profiles/rcord-lite/templates/_tosca.tpl
index c9985ae..fef0364 100644
--- a/xos-profiles/rcord-lite/templates/_tosca.tpl
+++ b/xos-profiles/rcord-lite/templates/_tosca.tpl
@@ -137,6 +137,12 @@
name: ONOS_Fabric
must-exist: true
+ service#ONOS_VOLTHA:
+ type: tosca.nodes.ONOSService
+ properties:
+ name: ONOS_VOLTHA
+ must-exist: true
+
service#fabric:
type: tosca.nodes.FabricService
properties:
@@ -193,6 +199,18 @@
node: service#volt
relationship: tosca.relationships.BelongsToOne
+ service_dependency#onos_voltha_volt:
+ type: tosca.nodes.ServiceDependency
+ properties:
+ connect_method: None
+ requirements:
+ - subscriber_service:
+ node: service#volt
+ relationship: tosca.relationships.BelongsToOne
+ - provider_service:
+ node: service#ONOS_VOLTHA
+ relationship: tosca.relationships.BelongsToOne
+
service_dependency#fabric_vrouter:
type: tosca.nodes.ServiceDependency
properties:
@@ -232,6 +250,6 @@
constraints:
type: tosca.nodes.ServiceGraphConstraint
properties:
- constraints: '[[null, "rcord"], [null, "volt"], ["ONOS_Fabric", "vsg-hw"], ["fabric", null], ["vrouter", null]]'
+ constraints: '[[null, "rcord"], ["ONOS_VOLTHA", "volt"], ["ONOS_Fabric", "vsg-hw"], ["fabric", null], ["vrouter", null]]'
{{- end -}}
diff --git a/xos-profiles/rcord-lite/templates/tosca-configmap.yaml b/xos-profiles/rcord-lite/templates/tosca-configmap.yaml
index e4a5f40..49c0a7c 100644
--- a/xos-profiles/rcord-lite/templates/tosca-configmap.yaml
+++ b/xos-profiles/rcord-lite/templates/tosca-configmap.yaml
@@ -31,6 +31,8 @@
{{ include "vrouter.serviceTosca" .Values.vrouter | indent 4 }}
060-onos-service-fabric.yaml: |
{{ include "onos-service.fabricAppTosca" (index .Values "onos-service") | indent 4 }}
+ 061-onos-voltha-service-fabric.yaml: |
+{{ include "onos-service.volthaOnosTosca" (index .Values "onos-service") | indent 4 }}
070-fabric-service.yaml: |
{{ include "fabric.serviceTosca" .Values.fabric | indent 4 }}
300-service-graph.yaml: |
diff --git a/xos-services/onos-service/templates/_tosca.tpl b/xos-services/onos-service/templates/_tosca.tpl
index ecaf964..e801ccf 100644
--- a/xos-services/onos-service/templates/_tosca.tpl
+++ b/xos-services/onos-service/templates/_tosca.tpl
@@ -33,7 +33,7 @@
onos_app#segmentrouting:
type: tosca.nodes.ONOSApp
properties:
- name: segmentrouting
+ name: org.onosproject.segmentrouting
app_id: org.onosproject.segmentrouting
requirements:
- owner:
@@ -43,7 +43,7 @@
onos_app#vrouter:
type: tosca.nodes.ONOSApp
properties:
- name: vrouter
+ name: org.onosproject.vrouter
app_id: org.onosproject.vrouter
requirements:
- owner:
@@ -94,3 +94,52 @@
node: service#ONOS_CORD
relationship: tosca.relationships.BelongsToOne
{{- end -}}
+
+{{- define "onos-service.volthaOnosTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+imports:
+ - custom_types/onosapp.yaml
+ - custom_types/onosservice.yaml
+ - custom_types/serviceinstanceattribute.yaml
+
+description: Configures the VTN ONOS service
+
+topology_template:
+ node_templates:
+
+ service#ONOS_CORD:
+ type: tosca.nodes.ONOSService
+ properties:
+ name: ONOS_VOLTHA
+ kind: platform
+ rest_hostname: onos-voltha-ui.voltha.svc.cluster.local
+ rest_port: 8181
+
+ onos_app#olt:
+ type: tosca.nodes.ONOSApp
+ properties:
+ name: org.opencord.olt
+ app_id: org.opencord.olt
+ version: 1.4.0
+ requirements:
+ - owner:
+ node: service#ONOS_CORD
+ relationship: tosca.relationships.BelongsToOne
+
+ # CORD-Configuration
+ cord-config-attr:
+ type: tosca.nodes.ServiceInstanceAttribute
+ properties:
+ name: /onos/v1/network/configuration/apps/org.opencord.olt
+ value: >
+ {
+ "kafka" : {
+ "bootstrapServers" : "cord-kafka-kafka.default.svc.cluster.local:9092"
+ }
+ }
+ requirements:
+ - service_instance:
+ node: onos_app#olt
+ relationship: tosca.relationships.BelongsToOne
+{{- end -}}
\ No newline at end of file