Refactor clone and compile functions

The clone_all_* and compile_all_* functions share same instructions
for performing their functionality.  This change pretends to reduce
the duplication of the code.

Change-Id: Ief63a5a58c79af85c829602b0451637424659438
Signed-off-by: Victor Morales <victor.morales@intel.com>
Issue-Id: INT-339
diff --git a/bootstrap/vagrant-onap/lib/robot b/bootstrap/vagrant-onap/lib/robot
index 6dcdf90..d9b8417 100755
--- a/bootstrap/vagrant-onap/lib/robot
+++ b/bootstrap/vagrant-onap/lib/robot
@@ -2,36 +2,18 @@
 
 source /var/onap/functions
 
-robot_src_folder=$git_src_folder/testsuite
-robot_repos=("heatbridge" "properties" "python-testing-utils")
-
-# clone_robot_repos() - Function that clones Robot source repo.
-function clone_robot_repos {
-    clone_repo testsuite $robot_src_folder
-
-    for dirc in ${robot_repos[@]}; do
-        clone_repo testsuite/$dirc $robot_src_folder/$dirc
-    done
-}
-
-# compile_robot_repos() - Function that compile Robot source repo.
-function compile_robot_repos {
-    install_python_package tox
-    compile_src $robot_src_folder
-
-    for dirc in ${robot_repos[@]}; do
-        compile_src $robot_src_folder/$dirc
-    done
-}
+testsuite_src_folder=$git_src_folder/testsuite
+testsuite_repos=("testsuite" "testsuite/heatbridge" "testsuite/properties" \
+"testsuite/python-testing-utils")
 
 # _setup_ete_folder() - Create and copy ete folder structure
 function _setup_ete_folder {
     mkdir -p /opt/eteshare/config
 
-    cp $src_folder/integration_* /opt/eteshare/config
-    cp $src_folder/vm_config2robot.sh /opt/eteshare/config
-    cp $src_folder/ete.sh /opt
-    cp $src_folderdemo.sh /opt
+    cp $testsuite_src_folder/integration_* /opt/eteshare/config
+    cp $testsuite_src_folder/vm_config2robot.sh /opt/eteshare/config
+    cp $testsuite_src_folder/ete.sh /opt
+    cp $testsuite_src_folder/demo.sh /opt
 
     chmod +x /opt/ete.sh
     chmod +x /opt/demo.sh
@@ -51,10 +33,10 @@
 # init_robot() - Function that initialize Robot services
 function init_robot {
     if [[ "$clone_repo" == "True" ]]; then
-        clone_robot_repos
+        clone_repos "testsuite"
         _setup_ete_folder
         if [[ "$compile_repo" == "True" ]]; then
-            compile_robot_repos
+            compile_repos "testsuite"
         fi
     fi