Merge "Added commonly used dashboards in fixtures"
diff --git a/common/Makedefs b/common/Makedefs
index 7111b42..0911ee8 100644
--- a/common/Makedefs
+++ b/common/Makedefs
@@ -1,2 +1,41 @@
-SERVICE_DIR=../../xos_services
-XOS_DIR=../../xos
+# service-profile/common/Makedefs
+
+SERVICE_DIR ?= ../../xos_services
+XOS_DIR ?= ../../xos
+
+CORD_BASE_GIT_URL ?= https://gerrit.opencord.org/p
+
+DEFAULT_BRANCH ?= master
+
+XOS_BRANCH ?= $(DEFAULT_BRANCH)
+XOS_GIT_URL ?= $(CORD_BASE_GIT_URL)/xos.git
+
+EXAMPLESERVICE_BRANCH ?= $(DEFAULT_BRANCH)
+EXAMPLESERVICE_GIT_URL ?= $(CORD_BASE_GIT_URL)/exampleservice.git
+
+OLT_BRANCH ?= $(DEFAULT_BRANCH)
+OLT_GIT_URL ?= $(CORD_BASE_GIT_URL)/olt.git
+
+VSG_BRANCH ?= $(DEFAULT_BRANCH)
+VSG_GIT_URL ?= $(CORD_BASE_GIT_URL)/vsg.git
+
+VTN_BRANCH ?= $(DEFAULT_BRANCH)
+VTN_GIT_URL ?= $(CORD_BASE_GIT_URL)/vtn.git
+
+VROUTER_BRANCH ?= $(DEFAULT_BRANCH)
+VROUTER_GIT_URL ?= $(CORD_BASE_GIT_URL)/vrouter.git
+
+VTR_BRANCH ?= $(DEFAULT_BRANCH)
+VTR_GIT_URL ?= $(CORD_BASE_GIT_URL)/vtr.git
+
+ONOS_BRANCH ?= $(DEFAULT_BRANCH)
+ONOS_GIT_URL ?= $(CORD_BASE_GIT_URL)/onos-service.git
+
+FABRIC_BRANCH ?= $(DEFAULT_BRANCH)
+FABRIC_GIT_URL ?= $(CORD_BASE_GIT_URL)/fabric.git
+
+MONITORING_BRANCH ?= $(DEFAULT_BRANCH)
+MONITORING_GIT_URL ?= $(CORD_BASE_GIT_URL)/monitoring.git
+
+HYPERCACHE_BRANCH ?= $(DEFAULT_BRANCH)
+HYPERCACHE_GIT_URL ?= $(CORD_BASE_GIT_URL)/hypercache.git
diff --git a/common/Makedefs.branches b/common/Makedefs.branches
deleted file mode 100644
index 3522ac4..0000000
--- a/common/Makedefs.branches
+++ /dev/null
@@ -1,12 +0,0 @@
-BRANCH=master
-
-XOS_BRANCH=$(BRANCH)
-EXAMPLESERVICE_BRANCH=$(BRANCH)
-OLT_BRANCH=$(BRANCH)
-VSG_BRANCH=$(BRANCH)
-VTN_BRANCH=$(BRANCH)
-VROUTER_BRANCH=$(BRANCH)
-VTR_BRANCH=$(BRANCH)
-ONOS_BRANCH=$(BRANCH)
-FABRIC_BRANCH=$(BRANCH)
-MONITORING_BRANCH=$(BRANCH)
diff --git a/common/Makefile.services b/common/Makefile.services
index b7d92d5..d34313c 100644
--- a/common/Makefile.services
+++ b/common/Makefile.services
@@ -1,51 +1,60 @@
 include ../common/Makedefs
-include ../common/Makedefs.branches
 
 GITOPTS=-c advice.detachedHead=false
 
 services: $(SERVICE_DIR) \
           $(SERVICE_DIR)/exampleservice \
           $(SERVICE_DIR)/olt \
-	  $(SERVICE_DIR)/vsg \
+          $(SERVICE_DIR)/vsg \
           $(SERVICE_DIR)/vtn \
-	  $(SERVICE_DIR)/vrouter \
-	  $(SERVICE_DIR)/vtr \
-	  $(SERVICE_DIR)/onos-service \
-	  $(SERVICE_DIR)/fabric
+          $(SERVICE_DIR)/vrouter \
+          $(SERVICE_DIR)/vtr \
+          $(SERVICE_DIR)/onos-service \
+          $(SERVICE_DIR)/fabric \
+          $(SERVICE_DIR)/hypercache
 
 monitoring_services: $(SERVICE_DIR)/monitoring
 
 xos_core: $(XOS_DIR)
 
+$(XOS_DIR):
+	git -C ../.. $(GITOPTS) clone -b $(XOS_BRANCH) $(XOS_GIT_URL)
+
+update_xos:
+	git -C $(XOS_DIR) pull
+
 $(SERVICE_DIR):
 	mkdir -p $(SERVICE_DIR)
 
 $(SERVICE_DIR)/exampleservice:
-	git -C $(SERVICE_DIR) $(GITOPTS) clone  -b $(EXAMPLESERVICE_BRANCH) https://gerrit.opencord.org/p/exampleservice.git
+	git -C $(SERVICE_DIR) $(GITOPTS) clone  -b $(EXAMPLESERVICE_BRANCH) $(EXAMPLESERVICE_GIT_URL)
 
 $(SERVICE_DIR)/olt:
-	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(OLT_BRANCH) https://gerrit.opencord.org/p/olt.git
+	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(OLT_BRANCH) $(OLT_GIT_URL)
 
 $(SERVICE_DIR)/vsg:
-	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(VSG_BRANCH) https://gerrit.opencord.org/p/vsg.git
+	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(VSG_BRANCH) $(VSG_GIT_URL)
 
 $(SERVICE_DIR)/vtn:
-	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(VTN_BRANCH) https://gerrit.opencord.org/p/vtn.git
+	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(VTN_BRANCH) $(VTN_GIT_URL)
 
 $(SERVICE_DIR)/vrouter:
-	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(VROUTER_BRANCH) https://gerrit.opencord.org/p/vrouter.git
+	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(VROUTER_BRANCH) $(VROUTER_GIT_URL)
 
 $(SERVICE_DIR)/vtr:
-	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(VTR_BRANCH) https://gerrit.opencord.org/p/vtr.git
+	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(VTR_BRANCH) $(VTR_GIT_URL)
 
 $(SERVICE_DIR)/onos-service:
-	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(ONOS_BRANCH) https://gerrit.opencord.org/p/onos-service.git
+	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(ONOS_BRANCH) $(ONOS_GIT_URL)
 
 $(SERVICE_DIR)/fabric:
-	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(FABRIC_BRANCH) https://gerrit.opencord.org/p/fabric.git
+	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(FABRIC_BRANCH) $(FABRIC_GIT_URL)
 
 $(SERVICE_DIR)/monitoring:
-	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(MONITORING_BRANCH) https://gerrit.opencord.org/p/monitoring.git
+	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(MONITORING_BRANCH) $(MONITORING_GIT_URL)
+
+$(SERVICE_DIR)/hypercache:
+	git -C $(SERVICE_DIR) $(GITOPTS) clone -b $(HYPERCACHE_BRANCH) $(HYPERCACHE_GIT_URL)
 
 cleanup:
 	rm -rf $(SERVICE_DIR)/*
@@ -59,9 +68,5 @@
 	git -C $(SERVICE_DIR)/vtr pull
 	git -C $(SERVICE_DIR)/onos-service pull
 	git -C $(SERVICE_DIR)/fabric pull
+	git -C $(SERVICE_DIR)/hypercache pull
 
-$(XOS_DIR):
-	git -C ../.. $(GITOPTS) clone -b $(XOS_BRANCH) https://gerrit.opencord.org/p/xos.git
-
-update_xos:
-	git -C $(XOS_DIR) pull
diff --git a/frontend/Makefile b/frontend/Makefile
index 14c0dec..c1d46a6 100644
--- a/frontend/Makefile
+++ b/frontend/Makefile
@@ -54,7 +54,7 @@
 	@echo "[FRONTENDCONFIG]"
 	$(RUN_TOSCA) sample.yaml
 
-containers: prereqs download_xos
+local_containers: prereqs download_xos
 	make -f ../common/Makefile.containers xos_devel synchronizer onboarding_synchronizer
 
 rebuild:
diff --git a/frontend/README.md b/frontend/README.md
index 17f2626..9e10d83 100644
--- a/frontend/README.md
+++ b/frontend/README.md
@@ -14,7 +14,7 @@
 If you need to work on the Django application itself:
 - comment out the `sleep 86400` command for the `xos_bootstrap_ui` container in `docker-compose-bootstrap.yml`
 - comment the `python /opt/xos/manage.py runserver 0.0.0.0:9998 --insecure --makemigrations` in the same file
-- run `make containers`.
+- run `make local_containers`.
 - run `make`
 
 You'll notice that the `make` command will hang on to `Waiting for XOS to start listening on port 9998`, so in another shell:
@@ -51,7 +51,7 @@
 
 Delete the containers and relaunch them: `make rm; make`
 
-Build the containers from scratch using the local XOS source tree: `make containers`
+Build the containers from scratch using the local XOS source tree: `make local_containers`
 
 View logs: `make showlogs`
 
diff --git a/frontend/docker-compose-bootstrap.yml b/frontend/docker-compose-bootstrap.yml
index 66ca64e..51eba35 100644
--- a/frontend/docker-compose-bootstrap.yml
+++ b/frontend/docker-compose-bootstrap.yml
@@ -16,17 +16,20 @@
     volumes:
       - ../common/xos_common_config:/opt/xos/xos_configuration/xos_common_config
       - ../cord-pod/files/xos_vtn_config:/opt/xos/xos_configuration/xos_vtn_config:ro
-      - ../../xos_services:/opt/xos_services
       - ../../xos/xos/api/utility:/opt/xos/api/utility
-      - ../../xos/xos/core/models:/opt/xos/core/models
+      - ../../xos/xos/templates:/opt/xos/templates
       - ../../xos/xos/core/templatetags:/opt/xos/core/templatetags
       - ../../xos/xos/core/xoslib/dashboards:/opt/xos/core/xoslib/dashboards
       - ../../xos/xos/core/xoslib/static/css:/opt/xos/core/xoslib/static/css
       - ../../xos/xos/core/xoslib/static/images:/opt/xos/core/xoslib/static/images
       - ../../xos/xos/core/xoslib/static/js:/opt/xos/core/xoslib/static/js
-      - ../../xos/xos/xos:/opt/xos/xos
-      - ../../xos/xos/tosca:/opt/xos/tosca
-      - ../../xos/xos/synchronizers:/opt/xos/synchronizers
+      
+      # The following volumes are sometimes used in development,
+      # but they are not tested and they can break part of the system, handle with care.
+      # - ../../xos_services:/opt/xos_services
+      # - ../../xos/xos/core/models:/opt/xos/core/models
+      # - ../../xos/xos/tosca:/opt/xos/tosca
+      # - ../../xos/xos/xos:/opt/xos/xos
 
 xos_synchronizer_onboarding:
     image: xosproject/xos-synchronizer-onboarding
diff --git a/frontend/xos.yaml b/frontend/xos.yaml
index 76d23f1..1f15cef 100644
--- a/frontend/xos.yaml
+++ b/frontend/xos.yaml
@@ -36,16 +36,6 @@
               node: xos
               relationship: tosca.relationships.UsedByXOS
 
-    /opt/xos/core/models:
-          type: tosca.nodes.XOSVolume
-          properties:
-              host_path: { path_join: [ SELF, CONFIG_DIR, ../../xos/xos/core/models/, ENV_VAR ] }
-              read_only: false
-          requirements:
-              - xos:
-                  node: xos
-                  relationship: tosca.relationships.UsedByXOS
-
     /opt/xos/core/templatetags:
           type: tosca.nodes.XOSVolume
           properties:
@@ -106,22 +96,45 @@
                   node: xos
                   relationship: tosca.relationships.UsedByXOS
 
-    /opt/xos/tosca:
-          type: tosca.nodes.XOSVolume
-          properties:
-              host_path: { path_join: [ SELF, CONFIG_DIR, ../../xos/xos/tosca/, ENV_VAR ] }
-              read_only: false
-          requirements:
-              - xos:
-                  node: xos
-                  relationship: tosca.relationships.UsedByXOS
+    # The following volumes are sometimes used in development,
+    # but they are not tested and they can break part of the system, handle with care.
 
-    /opt/xos/xos:
-          type: tosca.nodes.XOSVolume
-          properties:
-              host_path: { path_join: [ SELF, CONFIG_DIR, ../../xos/xos/xos/, ENV_VAR ] }
-              read_only: false
-          requirements:
-              - xos:
-                  node: xos
-                  relationship: tosca.relationships.UsedByXOS
\ No newline at end of file
+    # /opt/xos/tosca:
+    #       type: tosca.nodes.XOSVolume
+    #       properties:
+    #           host_path: { path_join: [ SELF, CONFIG_DIR, ../../xos/xos/tosca/, ENV_VAR ] }
+    #           read_only: false
+    #       requirements:
+    #           - xos:
+    #               node: xos
+    #               relationship: tosca.relationships.UsedByXOS
+
+    # /opt/xos/xos:
+    #       type: tosca.nodes.XOSVolume
+    #       properties:
+    #           host_path: { path_join: [ SELF, CONFIG_DIR, ../../xos/xos/xos/, ENV_VAR ] }
+    #           read_only: false
+    #       requirements:
+    #           - xos:
+    #               node: xos
+    #               relationship: tosca.relationships.UsedByXOS
+
+    # /opt/xos/core/models:
+    #       type: tosca.nodes.XOSVolume
+    #       properties:
+    #           host_path: { path_join: [ SELF, CONFIG_DIR, ../../xos/xos/core/models/, ENV_VAR ] }
+    #           read_only: false
+    #       requirements:
+    #           - xos:
+    #               node: xos
+    #               relationship: tosca.relationships.UsedByXOS
+
+    # /opt/xos/api/utility:
+    #       type: tosca.nodes.XOSVolume
+    #       properties:
+    #           host_path: { path_join: [ SELF, CONFIG_DIR, ../../xos/xos/api/utility/, ENV_VAR ] }
+    #           read_only: false
+    #       requirements:
+    #           - xos:
+    #               node: xos
+    #               relationship: tosca.relationships.UsedByXOS
\ No newline at end of file