summaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/lib/dcae
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2017-11-20 16:38:28 -0800
committerVictor Morales <victor.morales@intel.com>2017-11-20 16:38:28 -0800
commitf1f1ba5dac1b531c346758072c798ceb511100b3 (patch)
treea571f9e83be31abd3c63595c04a46dcd7e901a7d /bootstrap/vagrant-onap/lib/dcae
parent25bfc6b99f73bd02047dcc13e64390140777402a (diff)
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
Diffstat (limited to 'bootstrap/vagrant-onap/lib/dcae')
-rwxr-xr-xbootstrap/vagrant-onap/lib/dcae23
1 files changed, 3 insertions, 20 deletions
diff --git a/bootstrap/vagrant-onap/lib/dcae b/bootstrap/vagrant-onap/lib/dcae
index 7ab32fd24..67a43a028 100755
--- a/bootstrap/vagrant-onap/lib/dcae
+++ b/bootstrap/vagrant-onap/lib/dcae
@@ -59,27 +59,10 @@ function _build_docker_image {
popd
}
-# clone_all_dcae_repos() - Function that clones DCAE source repo.
-function clone_all_dcae_repos {
- for repo in ${dcae_repos[@]}; do
- clone_repo $repo $dcae_src_folder${repo#*dcae}
- done
-}
-
-# compile_all_dcae_repos() - Function that compiles DCAE source repo.
-function compile_all_dcae_repos {
- for repo in ${dcae_repos[@]}; do
- compile_src $dcae_src_folder${repo#*dcae}
- done
-}
-
# _build_dcae_images() Function that builds DCAE docker images from source code.
function _build_dcae_images {
if [[ "$compile_repo" != "True" ]]; then
- compile_src $dcae_src_folder/dmaapbc
- compile_src $dcae_src_folder/orch-dispatcher
- compile_src $dcae_src_folder/demo
- compile_src $dcae_src_folder/dcae-inventory
+ compile_repos "dcae"
fi
_build_docker_image $dcae_src_folder/dmaapbc openecomp/dcae-dmaapbc
_build_docker_image $dcae_src_folder/orch-dispatcher dcae/orch-dispatcher
@@ -122,9 +105,9 @@ function install_dcae {
# init_dcae() - Function that initialize DCAE Controller services
function init_dcae {
if [[ "$clone_repo" == "True" ]]; then
- clone_all_dcae_repos
+ clone_repos "dcae"
if [[ "$compile_repo" == "True" ]]; then
- compile_all_dcae_repos
+ compile_repos "dcae"
fi
fi