[CORD-3002] Creating dependencing fro Fabric components

Change-Id: I87720304b0e22edd2b83324f6674274333c2216c
diff --git a/xos-profiles/rcord-lite/values.yaml b/xos-profiles/rcord-lite/values.yaml
index d465cd9..9e09b78 100644
--- a/xos-profiles/rcord-lite/values.yaml
+++ b/xos-profiles/rcord-lite/values.yaml
@@ -131,10 +131,11 @@
   fabricService:
     tosca_definitions_version: tosca_simple_yaml_1_0
     imports:
-      - custom_types/onosservice.yaml
-      - custom_types/serviceattribute.yaml
       - custom_types/fabricservice.yaml
       - custom_types/onosapp.yaml
+      - custom_types/onosservice.yaml
+      - custom_types/serviceattribute.yaml
+      - custom_types/servicedependency.yaml
       - custom_types/serviceinstancelink.yaml
     description: fabric services, generated by rcord profile
     topology_template:
@@ -147,15 +148,6 @@
               no_container: true
               rest_hostname: onos-fabric-ui
               rest_port: 8181
-        serviceattribute#fabric_network_cfg_json:
-          type: tosca.nodes.ServiceAttribute
-          requirements:
-              - service:
-                  node: service#ONOS_Fabric
-                  relationship: tosca.relationships.BelongsToOne
-          properties:
-              name: rest_onos/v1/network/configuration/
-              value: '{}'
         service#fabric:
           type: tosca.nodes.FabricService
           properties:
@@ -170,20 +162,23 @@
           properties:
               name: Fabric_ONOS_app
               dependencies: org.onosproject.drivers, org.onosproject.openflow, org.onosproject.netcfghostprovider, org.onosproject.segmentrouting
-        Fabric_ONOS_app_ONOS_Fabric:
-            type: tosca.nodes.ServiceInstanceLink
-            requirements:
-              - provider_service_instance:
-                  node: Fabric_ONOS_app
-                  relationship: tosca.relationships.BelongsToOne
-              - subscriber_service:
-                  node: service#fabric
-                  relationship: tosca.relationships.BelongsToOne
+        service_dependency#onos-fabric_fabric:
+          type: tosca.nodes.ServiceDependency
+          properties:
+            connect_method: None
+          requirements:
+            - subscriber_service:
+                node: service#ONOS_Fabric
+                relationship: tosca.relationships.BelongsToOne
+            - provider_service:
+                node: service#fabric
+                relationship: tosca.relationships.BelongsToOne
 
   cordServices:
     tosca_definitions_version: tosca_simple_yaml_1_0
     description: Set up VOLT, AddressManager, and RCORD services
     imports:
+      - custom_types/fabricservice.yaml
       - custom_types/image.yaml
       - custom_types/kubernetesservice.yaml
       - custom_types/network.yaml
@@ -208,6 +203,11 @@
           properties:
               name: ONOS_Fabric
               must-exist: true
+        service#fabric:
+          type: tosca.nodes.FabricService
+          properties:
+              name: fabric
+              must-exist: true
         service#rcord:
           type: tosca.nodes.Service
           properties:
@@ -248,6 +248,17 @@
             rest_port: 8181
             rest_user: karaf
             rest_pass: karaf
+        service_dependency#fabric_vrouter:
+          type: tosca.nodes.ServiceDependency
+          properties:
+            connect_method: None
+          requirements:
+            - subscriber_service:
+                node: service#fabric
+                relationship: tosca.relationships.BelongsToOne
+            - provider_service:
+                node: service#vrouter
+                relationship: tosca.relationships.BelongsToOne
         volt_vsg-hw:
           type: tosca.nodes.ServiceDependency
           properties:
@@ -270,17 +281,6 @@
             - provider_service:
                 node: service#ONOS_Fabric
                 relationship: tosca.relationships.BelongsToOne
-        vsg-hw_vrouter:
-          type: tosca.nodes.ServiceDependency
-          properties:
-            connect_method: None
-          requirements:
-            - subscriber_service:
-                node: service#vsg-hw
-                relationship: tosca.relationships.BelongsToOne
-            - provider_service:
-                node: service#vrouter
-                relationship: tosca.relationships.BelongsToOne
 
   serviceGraphConstraints:
     tosca_definitions_version: tosca_simple_yaml_1_0
@@ -292,4 +292,4 @@
         constraints:
           type: tosca.nodes.ServiceGraphConstraint
           properties:
-            constraints: '[[null, "rcord"], [null, "volt"], ["ONOS_Fabric", "vsg-hw"], [null, "vrouter"]]'
+            constraints: '[[null, "rcord"], [null, "volt"], ["ONOS_Fabric", "vsg-hw"], ["fabric", null], ["vrouter", null]]'