[CORD-3184] Adding compute-nodes to fabric config

Change-Id: Ief7158e635cae5df89a3bbd6c210e625bc7bb1fc
diff --git a/samples/fabric.yaml b/samples/fabric-config.yaml
similarity index 95%
rename from samples/fabric.yaml
rename to samples/fabric-config.yaml
index f61a3b7..63ba218 100644
--- a/samples/fabric.yaml
+++ b/samples/fabric-config.yaml
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @fabric.yaml http://192.168.99.100:30007/run
+# curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @fabric-config.yaml http://192.168.99.100:30007/run
 
 tosca_definitions_version: tosca_simple_yaml_1_0
 imports:
diff --git a/samples/nodes.yaml b/samples/nodes.yaml
new file mode 100644
index 0000000..578410a
--- /dev/null
+++ b/samples/nodes.yaml
@@ -0,0 +1,126 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @nodes.yaml http://192.168.99.100:30007/run
+
+tosca_definitions_version: tosca_simple_yaml_1_0
+description: Set up Fabric service and attach it to ONOS (note that onos-service needs to be loaded)
+imports:
+  - custom_types/node.yaml
+  - custom_types/nodetoswitchport.yaml
+  - custom_types/switch.yaml
+  - custom_types/switchport.yaml
+  - custom_types/deployment.yaml
+  - custom_types/site.yaml
+  - custom_types/sitedeployment.yaml
+
+topology_template:
+  node_templates:
+
+    # nodes
+    node#node1:
+        type: tosca.nodes.Node
+        properties:
+            dataPlaneIntf: fabricbridge
+            dataPlaneIp: 10.6.1.1/24
+            name: node1.cord.lab
+        requirements:
+            - site_deployment:
+                node: site_deployment
+                relationship: tosca.relationships.BelongsToOne
+
+
+    node#node2:
+        type: tosca.nodes.Node
+        properties:
+            dataPlaneIntf: fabricbridge
+            dataPlaneIp: 10.6.1.2/24
+            name: node2.cord.lab
+        requirements:
+            - site_deployment:
+                node: site_deployment
+                relationship: tosca.relationships.BelongsToOne
+
+    # ports (defined in fabric-config.yaml)
+    switch#leaf1:
+      type: tosca.nodes.Switch
+      properties:
+        name: leaf1
+        must-exist: true
+    
+    port#port1:
+      type: tosca.nodes.SwitchPort
+      properties:
+        portId: 1
+        must-exist: true
+      requirements:
+        - switch:
+            node: switch#leaf1
+            relationship: tosca.relationships.BelongsToOne
+    
+    port#port2:
+      type: tosca.nodes.SwitchPort
+      properties:
+        portId: 2
+        must-exist: true
+      requirements:
+        - switch:
+            node: switch#leaf1
+            relationship: tosca.relationships.BelongsToOne
+
+    # attaching nodes to ports
+    node1_to_port1:
+        type: tosca.nodes.NodeToSwitchPort
+        requirements:
+            - port:
+                node: port#port1
+                relationship: tosca.relationships.BelongsToOne
+            - node:
+                node: node#node1
+                relationship: tosca.relationships.BelongsToOne
+    
+    node2_to_port2:
+        type: tosca.nodes.NodeToSwitchPort
+        requirements:
+            - port:
+                node: port#port2
+                relationship: tosca.relationships.BelongsToOne
+            - node:
+                node: node#node2
+                relationship: tosca.relationships.BelongsToOne
+
+    # extra setup required by XOS
+    mySite:
+      type: tosca.nodes.Site
+      properties:
+          name: mySite
+          login_base: opencord
+          abbreviated_name: ms
+          site_url: http://opencord.org/
+          hosts_nodes: true
+
+    myDeployment:
+      type: tosca.nodes.Deployment
+      properties:
+        name: myDeployment
+
+    site_deployment:
+      type: tosca.nodes.SiteDeployment
+      requirements:
+        - site:
+            node: mySite
+            relationship: tosca.relationships.BelongsToOne
+        - deployment:
+            node: myDeployment
+            relationship: tosca.relationships.BelongsToOne
\ No newline at end of file
diff --git a/samples/service.yaml b/samples/service.yaml
new file mode 100644
index 0000000..5944808
--- /dev/null
+++ b/samples/service.yaml
@@ -0,0 +1,51 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @service.yaml http://192.168.99.100:30007/run
+
+tosca_definitions_version: tosca_simple_yaml_1_0
+description: Set up Fabric service and attach it to ONOS (note that onos-service needs to be loaded)
+imports:
+  - custom_types/fabricservice.yaml
+  - custom_types/onosservice.yaml
+  - custom_types/servicedependency.yaml
+
+topology_template:
+  node_templates:
+
+    service#ONOS_Fabric:
+      type: tosca.nodes.ONOSService
+      properties:
+          name: ONOS_Fabric
+          kind: platform
+          rest_hostname: onos-fabric-ui
+          rest_port: 8181
+
+    service#fabric:
+      type: tosca.nodes.FabricService
+      properties:
+        name: fabric
+        kind: platform
+
+    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
\ No newline at end of file