[CORD-2349] Migrating REM-CORD

Change-Id: Iae573428e3bee89026262055263f24a32dd12183
diff --git a/roles/cord-profile/templates/carrierethernet-local-app.yaml.j2 b/roles/cord-profile/templates/carrierethernet-local-app.yaml.j2
index b882fb4..70f24aa 100644
--- a/roles/cord-profile/templates/carrierethernet-local-app.yaml.j2
+++ b/roles/cord-profile/templates/carrierethernet-local-app.yaml.j2
@@ -1,36 +1,48 @@
 tosca_definitions_version: tosca_simple_yaml_1_0
 
 imports:
-   - custom_types/xos.yaml
+   - custom_types/onosapp.yaml
+   - custom_types/onosservice.yaml
+   - custom_types/serviceinstanceattribute.yaml
 
 description: carrierethernet-app onboarding, generated by platform-install
 topology_template:
   node_templates:
 
+    # ONOS_CORD, fully created in vtn.yaml
     service#ONOS_CORD:
       type: tosca.nodes.ONOSService
       properties:
-        no-delete: true
-        no-create: true
-        no-update: true
+        name: ONOS_CORD
+        must-exist: true
 
+    # ONOS_Fabric, fully created in fabric.yaml
     service#ONOS_Fabric:
       type: tosca.nodes.ONOSService
       properties:
-        no-delete: true
-        no-create: true
-        no-update: true
+        name: ONOS_Fabric
+        must-exist: true
 
     CarrierEthernet_ONOS_app:
       type: tosca.nodes.ONOSApp
       requirements:
-          - onos_tenant:
+          - owner:
               node: service#ONOS_CORD
-              relationship: tosca.relationships.TenantOfService
+              relationship: tosca.relationships.BelongsToOne
       properties:
+          name: CarrierEthernet_ONOS_app
           install_dependencies: {{ onos_mavenrepo_url }}/repository/org/opencord/ce/ce-api/1.1.0-SNAPSHOT/ce-api-1.1.0-SNAPSHOT.oar, {{ onos_mavenrepo_url }}/repository/org/opencord/ce/bigswitch/1.1.0-SNAPSHOT/bigswitch-1.1.0-SNAPSHOT.oar, {{ onos_mavenrepo_url }}/repository/org/opencord/ce/local-channel/1.1.0-SNAPSHOT/local-channel-1.1.0-SNAPSHOT.oar, {{ onos_mavenrepo_url }}//repository/org/opencord/ce/vee/1.1.0-SNAPSHOT/vee-1.1.0-SNAPSHOT.oar
           dependencies: org.onosproject.drivers.microsemi, org.onosproject.cfm
-          component_config: >
+
+    CarrierEthernet_ONOS_app_component_config:
+        type: tosca.nodes.ServiceInstanceAttribute
+        requirements:
+          - service_instance:
+              node: CarrierEthernet_ONOS_app
+              relationship: tosca.relationships.BelongsToOne
+        properties:
+            name: component_config
+            value: >
               {
                   "org.onosproject.netconf.ctl.impl.NetconfControllerImpl": {
                       "netconfConnectTimeout": "120",
@@ -44,12 +56,22 @@
     CarrierEthernet_Fabric_ONOS_app:
       type: tosca.nodes.ONOSApp
       requirements:
-          - onos_tenant:
+          - owner:
               node: service#ONOS_Fabric
-              relationship: tosca.relationships.TenantOfService
+              relationship: tosca.relationships.BelongsToOne
       properties:
+          name: CarrierEthernet_Fabric_ONOS_app
           install_dependencies: {{ onos_mavenrepo_url }}/repository/org/opencord/ce/ce-api/1.1.0-SNAPSHOT/ce-api-1.1.0-SNAPSHOT.oar, {{ onos_mavenrepo_url }}/repository/org/opencord/ce/bigswitch/1.1.0-SNAPSHOT/bigswitch-1.1.0-SNAPSHOT.oar, {{ onos_mavenrepo_url }}//repository/org/opencord/ce/local-channel/1.1.0-SNAPSHOT/local-channel-1.1.0-SNAPSHOT.oar, {{ onos_mavenrepo_url }}//repository/org/opencord/ce/fabric/1.1.0-SNAPSHOT/fabric-1.1.0-SNAPSHOT.oar
-          component_config: >
+
+    CarrierEthernet_Fabric_ONOS_app_component_config:
+        type: tosca.nodes.ServiceInstanceAttribute
+        requirements:
+          - service_instance:
+              node: CarrierEthernet_Fabric_ONOS_app
+              relationship: tosca.relationships.BelongsToOne
+        properties:
+            name: component_config
+            value: >
               {
                   "org.opencord.ce.local.bigswitch.BigSwitchManager": {
                       "domainId": "{{ carrierethernet_domainid_prefix }}-fabric-onos"