CORD-772 Added make target and TOSCA spec for example UI extension

Change-Id: If26ccc840259e82edcec11df2949fd6798bcdfbc
diff --git a/common/Makefile b/common/Makefile
index 9dba3b3..3771b40 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -247,3 +247,14 @@
 	bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
 	bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
 
+xos_gui_sample_extension_c:
+	# this folder is cloned by repo
+	cd $(HOME_DIR)/xos-sample-gui-extension; sudo docker build --no-cache=${NO_DOCKER_CACHE} -t xosproject/xos-sample-gui-extension .
+
+ui-sample-extension: xos_gui_sample_extension_c
+	$(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
+	$(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/xos-gui-extension.yaml
+	$(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
+	bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
+	bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
+
diff --git a/common/xos-gui-extension.yaml b/common/xos-gui-extension.yaml
new file mode 100644
index 0000000..5b999cd
--- /dev/null
+++ b/common/xos-gui-extension.yaml
@@ -0,0 +1,37 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Onboard the exampleservice
+
+imports:
+   - custom_types/xos.yaml
+
+topology_template:
+  node_templates:
+
+    # UI Container
+    xos-spa-gui:
+      type: tosca.nodes.Component
+      properties:
+        no-create: true
+        no-update: true
+        no-delete: true
+
+     # UI Extension Container
+    xos-sample-gui-extension:
+      type: tosca.nodes.Component
+      properties:
+        image: xosproject/xos-sample-gui-extension
+        ports: 4001:4000
+        # extra: '["xos-sample-gui-extension:4001/spa/vendor.js", "xos-sample-gui-extension:4001/spa/app.js"]'
+        extra: '["http://xos.dev:4001/spa/vendor.js", "http://xos.dev:4001/spa/app.js"]'
+
+    gui-to-extension:
+      type: tosca.nodes.ComponentLink
+      properties:
+          container: xos-sample-gui-extension
+          alias: xos-sample-gui-extension
+          kind: internal
+      requirements:
+          - xos:
+             node: xos-spa-gui
+             relationship: tosca.relationships.LinkOfComponent
\ No newline at end of file