SEBA-147: Consolidate multiple ONi into a single ONOS

Also moved the TOSCA for ONOS apps and configuration to
the att-workflow chart rather than having
deployment-specific TOSCA in the ONOS service chart.

Change-Id: Ic835b4eced96d85b55a841fdd6d8d0baaf7b368a
diff --git a/voltha/values.yaml b/voltha/values.yaml
index 700149f..a6743fa 100644
--- a/voltha/values.yaml
+++ b/voltha/values.yaml
@@ -92,7 +92,7 @@
 - "/ofagent/ofagent/main.py"
 - "-v"
 - "--consul=consul.$(NAMESPACE).svc.cluster.local:8500"
-- "--controller=onos-voltha-openflow.default.svc.cluster.local:6653"
+- "--controller=onos-openflow.default.svc.cluster.local:6653"
 - "--grpc-endpoint=vcore.$(NAMESPACE).svc.cluster.local:50556"
 
 netconf_args:
diff --git a/xos-profiles/att-workflow/templates/_tosca.tpl b/xos-profiles/att-workflow/templates/_tosca.tpl
index 310a4d5..f1cd19d 100644
--- a/xos-profiles/att-workflow/templates/_tosca.tpl
+++ b/xos-profiles/att-workflow/templates/_tosca.tpl
@@ -14,6 +14,224 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 */}}
+{{- define "att-workflow.onosTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+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: {{ .onosRestService | quote }}
+          rest_port: 8181
+
+    onos_app#openflow-base:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: openflow-base
+        app_id: org.onosproject.openflow-base
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#hostprovider:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: hostprovider
+        app_id: org.onosproject.hostprovider
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#olt:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: olt
+        app_id: org.opencord.olt
+        url: {{ .oltAppUrl }}
+        version: 2.0.0.SNAPSHOT
+        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: {{ .sadisAppUrl }}
+        version: 2.2.0.SNAPSHOT
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#dhcpl2relay:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: dhcpl2relay
+        app_id: org.opencord.dhcpl2relay
+        url: {{ .dhcpl2relayAppUrl }}
+        version: 1.5.0.SNAPSHOT
+        dependencies: org.opencord.sadis
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#aaa:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: aaa
+        app_id: org.opencord.aaa
+        url: {{ .aaaAppUrl }}
+        version: 1.8.0.SNAPSHOT
+        dependencies: org.opencord.sadis
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#kafka:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: kafka
+        app_id: org.opencord.kafka
+        url: {{ .kafkaAppUrl }}
+        version: 1.0.0.SNAPSHOT
+        dependencies: org.opencord.olt,org.opencord.aaa,org.opencord.dhcpl2relay
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    # CORD-Configuration
+    kafka-config-attr:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/network/configuration/apps/org.opencord.kafka
+        value: >
+          {
+            "kafka" : {
+              "bootstrapServers" : {{ .kafkaService | quote }}
+            }
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#olt
+            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
+
+    dhcpl2relay-config-attr:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay
+        value: >
+          {
+            "dhcpl2relay" : {
+              "useOltUplinkForServerPktInOut" : true
+            }
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#dhcpl2relay
+            relationship: tosca.relationships.BelongsToOne
+
+    aaa-config-attr:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/network/configuration/apps/org.opencord.aaa
+        value: >
+          {
+            "AAA" : {
+              "radiusConnectionType" : "socket",
+              "radiusHost" : "freeradius.voltha.svc.cluster.local",
+              "radiusServerPort" : "1812",
+              "radiusSecret" : "SECRET"
+            }
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#aaa
+            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
+                },
+                "url" : "http://sadis-service:8000/subscriber/%s"
+              }
+            }
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#sadis
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#segmentrouting:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: org.onosproject.segmentrouting
+        app_id: org.onosproject.segmentrouting
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#netcfghostprovider:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: org.onosproject.netcfghostprovider
+        app_id: org.onosproject.netcfghostprovider
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#openflow:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: org.onosproject.openflow
+        app_id: org.onosproject.openflow
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+{{- end -}}
+
 {{- define "att-workflow.basicFixturesTosca" -}}
 tosca_definitions_version: tosca_simple_yaml_1_0
 description: Some basic fixtures
@@ -122,16 +340,10 @@
 
 # These services must be defined before loading the graph
 
-    service#ONOS_Fabric:
+    service#onos:
       type: tosca.nodes.ONOSService
       properties:
-        name: ONOS_Fabric
-        must-exist: true
-
-    service#ONOS_VOLTHA:
-      type: tosca.nodes.ONOSService
-      properties:
-        name: ONOS_VOLTHA
+        name: onos
         must-exist: true
 
     service#fabric:
@@ -175,7 +387,7 @@
             node: service#fabric
             relationship: tosca.relationships.BelongsToOne
         - provider_service:
-            node: service#ONOS_Fabric
+            node: service#onos
             relationship: tosca.relationships.BelongsToOne
 
     service_dependency#rcord_volt:
@@ -190,7 +402,7 @@
             node: service#volt
             relationship: tosca.relationships.BelongsToOne
 
-    service_dependency#onos_voltha_volt:
+    service_dependency#onos_volt:
       type: tosca.nodes.ServiceDependency
       properties:
         connect_method: none
@@ -199,7 +411,7 @@
             node: service#volt
             relationship: tosca.relationships.BelongsToOne
         - provider_service:
-            node: service#ONOS_VOLTHA
+            node: service#onos
             relationship: tosca.relationships.BelongsToOne
 
     service_dependency#volt_fabric-crossconnect:
@@ -214,7 +426,7 @@
             node: service#fabric-crossconnect
             relationship: tosca.relationships.BelongsToOne
 
-    service_dependency#onos_fabric_fabric-crossconnect:
+    service_dependency#onos_fabric-crossconnect:
       type: tosca.nodes.ServiceDependency
       properties:
         connect_method: none
@@ -223,7 +435,7 @@
             node: service#fabric-crossconnect
             relationship: tosca.relationships.BelongsToOne
         - provider_service:
-            node: service#ONOS_Fabric
+            node: service#onos
             relationship: tosca.relationships.BelongsToOne
 
     service_dependency#workflow_volt:
@@ -241,6 +453,5 @@
     constraints:
       type: tosca.nodes.ServiceGraphConstraint
       properties:
-        constraints: '[[null, "rcord", null], ["ONOS_VOLTHA", "volt", null], ["ONOS_Fabric", "fabric-crossconnect", "att-workflow-driver"], ["fabric", null, null]]'
+        constraints: '[[null, "rcord", null], ["onos", "volt", null], [null, "fabric-crossconnect", "att-workflow-driver"], ["fabric", null, null]]'
 {{- end -}}
-
diff --git a/xos-profiles/att-workflow/templates/tosca-configmap.yaml b/xos-profiles/att-workflow/templates/tosca-configmap.yaml
index 979b875..5c50ee6 100644
--- a/xos-profiles/att-workflow/templates/tosca-configmap.yaml
+++ b/xos-profiles/att-workflow/templates/tosca-configmap.yaml
@@ -27,10 +27,8 @@
 {{ include "volt.serviceTosca" .Values.volt | indent 4 }}
   040-fabric-crossconnect-service.yaml: |
 {{ include "fabric-crossconnect.serviceTosca" (index .Values "fabric-crossconnect") | 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 }}
+  061-onos-service.yaml: |
+{{ include "att-workflow.onosTosca" .Values | indent 4 }}
   070-fabric-service.yaml: |
 {{ include "fabric.serviceTosca" .Values.fabric | indent 4 }}
   080-workflow-service.yaml: |
diff --git a/xos-profiles/att-workflow/values.yaml b/xos-profiles/att-workflow/values.yaml
index 0c0163d..0ec28a9 100644
--- a/xos-profiles/att-workflow/values.yaml
+++ b/xos-profiles/att-workflow/values.yaml
@@ -32,3 +32,13 @@
 xosAdminPassword: "letmein"
 
 sadisServerImage: "opencord/sadis-server:latest"
+
+# ONOS applications
+oltAppUrl: "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opencord&a=olt-app&v=2.0.0-SNAPSHOT&e=oar"
+sadisAppUrl: "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opencord&a=sadis-app&v=2.2.0-SNAPSHOT&e=oar"
+dhcpl2relayAppUrl: "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opencord&a=dhcpl2relay&v=1.5.0-SNAPSHOT&e=oar"
+aaaAppUrl: "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opencord&a=aaa&v=1.8.0-SNAPSHOT&e=oar"
+kafkaAppUrl: "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opencord&a=kafka&v=1.0.0-SNAPSHOT&e=oar"
+
+onosRestService: "onos-ui.default.svc.cluster.local"
+kafkaService: "cord-kafka.default.svc.cluster.local:9092"
diff --git a/xos-profiles/rcord-lite/templates/_tosca.tpl b/xos-profiles/rcord-lite/templates/_tosca.tpl
index 613fd7e..a555975 100644
--- a/xos-profiles/rcord-lite/templates/_tosca.tpl
+++ b/xos-profiles/rcord-lite/templates/_tosca.tpl
@@ -14,6 +14,264 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 */}}
+
+{{- define "rcord-lite.fabricAppTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+imports:
+  - custom_types/onosapp.yaml
+  - custom_types/onosservice.yaml
+description: ONOS service and app for fabric
+topology_template:
+  node_templates:
+    service#ONOS_Fabric:
+      type: tosca.nodes.ONOSService
+      properties:
+          name: ONOS_Fabric
+          kind: data
+          rest_hostname: {{ .onosFabricRestService | quote }}
+          rest_port: 8181
+
+    onos_app#segmentrouting:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: org.onosproject.segmentrouting
+        app_id: org.onosproject.segmentrouting
+      requirements:
+        - owner:
+            node: service#ONOS_Fabric
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#vrouter:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: org.onosproject.vrouter
+        app_id: org.onosproject.vrouter
+      requirements:
+        - owner:
+            node: service#ONOS_Fabric
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#netcfghostprovider:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: org.onosproject.netcfghostprovider
+        app_id: org.onosproject.netcfghostprovider
+      requirements:
+        - owner:
+            node: service#ONOS_Fabric
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#openflow:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: org.onosproject.openflow
+        app_id: org.onosproject.openflow
+      requirements:
+        - owner:
+            node: service#ONOS_Fabric
+            relationship: tosca.relationships.BelongsToOne
+{{- end -}}
+
+{{- define "rcord-lite.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 VOLTHA ONOS service
+
+topology_template:
+  node_templates:
+
+    service#ONOS_VOLTHA:
+      type: tosca.nodes.ONOSService
+      properties:
+          name: ONOS_VOLTHA
+          kind: data
+          rest_hostname: {{ .onosVolthaRestService | quote }}
+          rest_port: 8181
+
+    onos_app#openflow-base:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: openflow-base
+        app_id: org.onosproject.openflow-base
+      requirements:
+        - owner:
+            node: service#ONOS_VOLTHA
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#hostprovider:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: hostprovider
+        app_id: org.onosproject.hostprovider
+      requirements:
+        - owner:
+            node: service#ONOS_VOLTHA
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#cord-config:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: cord-config
+        app_id: org.opencord.config
+        url: {{ .cordConfigAppURL }}
+        version: 1.4.0
+      requirements:
+        - owner:
+            node: service#ONOS_VOLTHA
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#olt:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: olt
+        app_id: org.opencord.olt
+        url: {{ .oltAppUrl }}
+        version: 2.0.0.SNAPSHOT
+        dependencies: org.opencord.config
+      requirements:
+        - owner:
+            node: service#ONOS_VOLTHA
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#sadis:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: sadis
+        app_id: org.opencord.sadis
+        url: {{ .sadisAppUrl }}
+        version: 2.1.0
+      requirements:
+        - owner:
+            node: service#ONOS_VOLTHA
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#dhcpl2relay:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: dhcpl2relay
+        app_id: org.opencord.dhcpl2relay
+        url: {{ .dhcpl2relayAppUrl }}
+        version: 1.5.0.SNAPSHOT
+        dependencies: org.opencord.sadis
+      requirements:
+        - owner:
+            node: service#ONOS_VOLTHA
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#aaa:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: aaa
+        app_id: org.opencord.aaa
+        url: {{ .aaaAppUrl }}
+        version: 1.8.0.SNAPSHOT
+        dependencies: org.opencord.sadis
+      requirements:
+        - owner:
+            node: service#ONOS_VOLTHA
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#kafka:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: kafka
+        app_id: org.opencord.kafka
+        url: {{ .kafkaAppUrl }}
+        version: 1.0.0.SNAPSHOT
+        dependencies: org.opencord.olt,org.opencord.aaa,org.opencord.dhcpl2relay
+      requirements:
+        - owner:
+            node: service#ONOS_VOLTHA
+            relationship: tosca.relationships.BelongsToOne
+
+    # CORD-Configuration
+    cord-config-attr:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/network/configuration/apps/org.opencord.kafka
+        value: >
+          {
+            "kafka" : {
+              "bootstrapServers" : {{ .kafkaService | quote }}
+            }
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#olt
+            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
+
+    dhcpl2relay-config-attr:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay
+        value: >
+          {
+            "dhcpl2relay" : {
+              "useOltUplinkForServerPktInOut" : true
+            }
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#dhcpl2relay
+            relationship: tosca.relationships.BelongsToOne
+
+    aaa-config-attr:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/network/configuration/apps/org.opencord.aaa
+        value: >
+          {
+            "AAA" : {
+              "radiusConnectionType" : "socket",
+              "radiusHost" : "freeradius.voltha.svc.cluster.local",
+              "radiusServerPort" : "1812",
+              "radiusSecret" : "SECRET"
+            }
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#aaa
+            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
+                },
+                "url" : "http://sadis-service:8000/subscriber/%s"
+              }
+            }
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#sadis
+            relationship: tosca.relationships.BelongsToOne
+{{- end -}}
+
 {{- define "rcord-lite.basicFixturesTosca" -}}
 tosca_definitions_version: tosca_simple_yaml_1_0
 description: Some basic fixtures
@@ -187,4 +445,3 @@
       properties:
         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 49c0a7c..3649e49 100644
--- a/xos-profiles/rcord-lite/templates/tosca-configmap.yaml
+++ b/xos-profiles/rcord-lite/templates/tosca-configmap.yaml
@@ -30,9 +30,9 @@
   050-vrouter-service.yaml: |
 {{ include "vrouter.serviceTosca" .Values.vrouter | indent 4 }}
   060-onos-service-fabric.yaml: |
-{{ include "onos-service.fabricAppTosca" (index .Values "onos-service") | indent 4 }}
+{{ include "rcord-lite.fabricAppTosca" .Values | indent 4 }}
   061-onos-voltha-service-fabric.yaml: |
-{{ include "onos-service.volthaOnosTosca" (index .Values "onos-service") | indent 4 }}
+{{ include "rcord-lite.volthaOnosTosca" .Values | indent 4 }}
   070-fabric-service.yaml: |
 {{ include "fabric.serviceTosca" .Values.fabric | indent 4 }}
   300-service-graph.yaml: |
diff --git a/xos-profiles/rcord-lite/values.yaml b/xos-profiles/rcord-lite/values.yaml
index a60b34c..5d68541 100644
--- a/xos-profiles/rcord-lite/values.yaml
+++ b/xos-profiles/rcord-lite/values.yaml
@@ -31,3 +31,17 @@
 xosAdminUser: "admin@opencord.org"
 xosAdminPassword: "letmein"
 
+cordConfigAppURL: "https://oss.sonatype.org/service/local/repositories/releases/content/org/opencord/cord-config/1.4.0/cord-config-1.4.0.oar"
+vtnAppURL: "https://oss.sonatype.org/service/local/repositories/releases/content/org/opencord/vtn/1.6.0/vtn-1.6.0.oar"
+
+# onos-voltha applications
+oltAppUrl: "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opencord&a=olt-app&v=2.0.0-SNAPSHOT&e=oar"
+sadisAppUrl: "https://oss.sonatype.org/service/local/repositories/releases/content/org/opencord/sadis-app/2.1.0/sadis-app-2.1.0.oar"
+dhcpl2relayAppUrl: "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opencord&a=dhcpl2relay&v=1.5.0-SNAPSHOT&e=oar"
+aaaAppUrl: "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opencord&a=aaa&v=1.8.0-SNAPSHOT&e=oar"
+kafkaAppUrl: "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opencord&a=kafka&v=1.0.0-SNAPSHOT&e=oar"
+
+onosCordRestService: "onos-cord-ui.default.svc.cluster.local"
+onosVolthaRestService: "onos-voltha-ui.default.svc.cluster.local"
+onosFabricRestService: "onos-fabric-ui.default.svc.cluster.local"
+kafkaService: "cord-kafka.default.svc.cluster.local:9092"
diff --git a/xos-services/onos-service/templates/_tosca.tpl b/xos-services/onos-service/templates/_tosca.tpl
index 8a3f6ed..6f65bbb 100644
--- a/xos-services/onos-service/templates/_tosca.tpl
+++ b/xos-services/onos-service/templates/_tosca.tpl
@@ -14,62 +14,6 @@
 See the License for the specific language governing permissions and
 limitations under the License.
 */}}
-{{- define "onos-service.fabricAppTosca" -}}
-tosca_definitions_version: tosca_simple_yaml_1_0
-imports:
-  - custom_types/onosapp.yaml
-  - custom_types/onosservice.yaml
-description: ONOS service and app for fabric
-topology_template:
-  node_templates:
-    service#ONOS_Fabric:
-      type: tosca.nodes.ONOSService
-      properties:
-          name: ONOS_Fabric
-          kind: data
-          rest_hostname: {{ .onosFabricRestService | quote }}
-          rest_port: 8181
-
-    onos_app#segmentrouting:
-      type: tosca.nodes.ONOSApp
-      properties:
-        name: org.onosproject.segmentrouting
-        app_id: org.onosproject.segmentrouting
-      requirements:
-        - owner:
-            node: service#ONOS_Fabric
-            relationship: tosca.relationships.BelongsToOne
-
-    onos_app#vrouter:
-      type: tosca.nodes.ONOSApp
-      properties:
-        name: org.onosproject.vrouter
-        app_id: org.onosproject.vrouter
-      requirements:
-        - owner:
-            node: service#ONOS_Fabric
-            relationship: tosca.relationships.BelongsToOne
-
-    onos_app#netcfghostprovider:
-      type: tosca.nodes.ONOSApp
-      properties:
-        name: org.onosproject.netcfghostprovider
-        app_id: org.onosproject.netcfghostprovider
-      requirements:
-        - owner:
-            node: service#ONOS_Fabric
-            relationship: tosca.relationships.BelongsToOne
-
-    onos_app#openflow:
-      type: tosca.nodes.ONOSApp
-      properties:
-        name: org.onosproject.openflow
-        app_id: org.onosproject.openflow
-      requirements:
-        - owner:
-            node: service#ONOS_Fabric
-            relationship: tosca.relationships.BelongsToOne
-{{- end -}}
 
 {{- define "onos-service.vtnAppTosca" -}}
 tosca_definitions_version: tosca_simple_yaml_1_0
@@ -138,203 +82,3 @@
             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 VOLTHA ONOS service
-
-topology_template:
-  node_templates:
-
-    service#ONOS_VOLTHA:
-      type: tosca.nodes.ONOSService
-      properties:
-          name: ONOS_VOLTHA
-          kind: data
-          rest_hostname: {{ .onosVolthaRestService | quote }}
-          rest_port: 8181
-
-    onos_app#openflow-base:
-      type: tosca.nodes.ONOSApp
-      properties:
-        name: openflow-base
-        app_id: org.onosproject.openflow-base
-      requirements:
-        - owner:
-            node: service#ONOS_VOLTHA
-            relationship: tosca.relationships.BelongsToOne
-
-    onos_app#hostprovider:
-      type: tosca.nodes.ONOSApp
-      properties:
-        name: hostprovider
-        app_id: org.onosproject.hostprovider
-      requirements:
-        - owner:
-            node: service#ONOS_VOLTHA
-            relationship: tosca.relationships.BelongsToOne
-
-    onos_app#cord-config:
-      type: tosca.nodes.ONOSApp
-      properties:
-        name: cord-config
-        app_id: org.opencord.config
-        url: {{ .cordConfigAppURL }}
-        version: 1.4.0
-      requirements:
-        - owner:
-            node: service#ONOS_VOLTHA
-            relationship: tosca.relationships.BelongsToOne
-
-    onos_app#olt:
-      type: tosca.nodes.ONOSApp
-      properties:
-        name: olt
-        app_id: org.opencord.olt
-        url: {{ .oltAppUrl }}
-        version: 2.0.0.SNAPSHOT
-        dependencies: org.opencord.config
-      requirements:
-        - owner:
-            node: service#ONOS_VOLTHA
-            relationship: tosca.relationships.BelongsToOne
-
-    onos_app#sadis:
-      type: tosca.nodes.ONOSApp
-      properties:
-        name: sadis
-        app_id: org.opencord.sadis
-        url: {{ .sadisAppUrl }}
-        version: 2.1.0
-      requirements:
-        - owner:
-            node: service#ONOS_VOLTHA
-            relationship: tosca.relationships.BelongsToOne
-
-    onos_app#dhcpl2relay:
-      type: tosca.nodes.ONOSApp
-      properties:
-        name: dhcpl2relay
-        app_id: org.opencord.dhcpl2relay
-        url: {{ .dhcpl2relayAppUrl }}
-        version: 1.5.0.SNAPSHOT
-        dependencies: org.opencord.sadis
-      requirements:
-        - owner:
-            node: service#ONOS_VOLTHA
-            relationship: tosca.relationships.BelongsToOne
-
-    onos_app#aaa:
-      type: tosca.nodes.ONOSApp
-      properties:
-        name: aaa
-        app_id: org.opencord.aaa
-        url: {{ .aaaAppUrl }}
-        version: 1.8.0.SNAPSHOT
-        dependencies: org.opencord.sadis
-      requirements:
-        - owner:
-            node: service#ONOS_VOLTHA
-            relationship: tosca.relationships.BelongsToOne
-
-    onos_app#kafka:
-      type: tosca.nodes.ONOSApp
-      properties:
-        name: kafka
-        app_id: org.opencord.kafka
-        url: {{ .kafkaAppUrl }}
-        version: 1.0.0.SNAPSHOT
-        dependencies: org.opencord.olt,org.opencord.aaa,org.opencord.dhcpl2relay
-      requirements:
-        - owner:
-            node: service#ONOS_VOLTHA
-            relationship: tosca.relationships.BelongsToOne
-
-    # CORD-Configuration
-    cord-config-attr:
-      type: tosca.nodes.ServiceInstanceAttribute
-      properties:
-        name: /onos/v1/network/configuration/apps/org.opencord.kafka
-        value: >
-          {
-            "kafka" : {
-              "bootstrapServers" : {{ .kafkaService | quote }}
-            }
-          }
-      requirements:
-        - service_instance:
-            node: onos_app#olt
-            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
-
-    dhcpl2relay-config-attr:
-      type: tosca.nodes.ServiceInstanceAttribute
-      properties:
-        name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay
-        value: >
-          {
-            "dhcpl2relay" : {
-              "useOltUplinkForServerPktInOut" : true
-            }
-          }
-      requirements:
-        - service_instance:
-            node: onos_app#dhcpl2relay
-            relationship: tosca.relationships.BelongsToOne
-
-    aaa-config-attr:
-      type: tosca.nodes.ServiceInstanceAttribute
-      properties:
-        name: /onos/v1/network/configuration/apps/org.opencord.aaa
-        value: >
-          {
-            "AAA" : {
-              "radiusConnectionType" : "socket",
-              "radiusHost" : "freeradius.voltha.svc.cluster.local",
-              "radiusServerPort" : "1812",
-              "radiusSecret" : "SECRET"
-            }
-          }
-      requirements:
-        - service_instance:
-            node: onos_app#aaa
-            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
-                },
-                "url" : "http://sadis-service:8000/subscriber/%s"
-              }
-            }
-          }
-      requirements:
-        - service_instance:
-            node: onos_app#sadis
-            relationship: tosca.relationships.BelongsToOne
-{{- end -}}
diff --git a/xos-services/onos-service/values.yaml b/xos-services/onos-service/values.yaml
index babf7e2..ab52be0 100644
--- a/xos-services/onos-service/values.yaml
+++ b/xos-services/onos-service/values.yaml
@@ -34,16 +34,7 @@
 cordConfigAppURL: "https://oss.sonatype.org/service/local/repositories/releases/content/org/opencord/cord-config/1.4.0/cord-config-1.4.0.oar"
 vtnAppURL: "https://oss.sonatype.org/service/local/repositories/releases/content/org/opencord/vtn/1.6.0/vtn-1.6.0.oar"
 
-# onos-voltha applications
-oltAppUrl: "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opencord&a=olt-app&v=2.0.0-SNAPSHOT&e=oar"
-sadisAppUrl: "https://oss.sonatype.org/service/local/repositories/releases/content/org/opencord/sadis-app/2.1.0/sadis-app-2.1.0.oar"
-dhcpl2relayAppUrl: "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opencord&a=dhcpl2relay&v=1.5.0-SNAPSHOT&e=oar"
-aaaAppUrl: "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opencord&a=aaa&v=1.8.0-SNAPSHOT&e=oar"
-kafkaAppUrl: "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.opencord&a=kafka&v=1.0.0-SNAPSHOT&e=oar"
-
 onosCordRestService: "onos-cord-ui.default.svc.cluster.local"
-onosVolthaRestService: "onos-voltha-ui.default.svc.cluster.local"
-onosFabricRestService: "onos-fabric-ui.default.svc.cluster.local"
 kafkaService: "cord-kafka.default.svc.cluster.local:9092"
 
 resources: {}
diff --git a/xos-services/volt/templates/_tosca.tpl b/xos-services/volt/templates/_tosca.tpl
index fd7e406..9666e06 100644
--- a/xos-services/volt/templates/_tosca.tpl
+++ b/xos-services/volt/templates/_tosca.tpl
@@ -27,9 +27,9 @@
       properties:
         name: volt
         kind: data
-        voltha_url: voltha.voltha.svc.cluster.local
+        voltha_url: {{ .volthaRestService | quote }}
         voltha_port: 8882
-        onos_voltha_url: onos-voltha-ui.default.svc.cluster.local
+        onos_voltha_url: {{ .onosRestService | quote }}
         onos_voltha_port: 8181
         onos_voltha_user: karaf
         onos_voltha_pass: karaf
diff --git a/xos-services/volt/values.yaml b/xos-services/volt/values.yaml
index c8824e4..52cd1df 100644
--- a/xos-services/volt/values.yaml
+++ b/xos-services/volt/values.yaml
@@ -29,6 +29,8 @@
 xosAdminUser: "admin@opencord.org"
 xosAdminPassword: "letmein"
 
+volthaRestService: "voltha.voltha.svc.cluster.local"
+onosRestService: "onos-ui.default.svc.cluster.local"
 kafkaService: "cord-kafka"
 
 resources: {}