From f1f1ba5dac1b531c346758072c798ceb511100b3 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Mon, 20 Nov 2017 16:38:28 -0800 Subject: 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 Issue-Id: INT-339 --- bootstrap/vagrant-onap/lib/vid | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'bootstrap/vagrant-onap/lib/vid') diff --git a/bootstrap/vagrant-onap/lib/vid b/bootstrap/vagrant-onap/lib/vid index 6fc7f351f..6a358bf97 100755 --- a/bootstrap/vagrant-onap/lib/vid +++ b/bootstrap/vagrant-onap/lib/vid @@ -5,20 +5,6 @@ source /var/onap/functions vid_src_folder=$git_src_folder/vid vid_repos=("vid" "vid/asdcclient") -# clone_all_vid_repos() - Function that clones VID source code. -function clone_all_vid_repos { - for repo in ${vid_repos[@]}; do - clone_repo $repo $vid_src_folder${repo#*vid} - done -} - -# compile_all_vid_repos() - Function that compiles VID source repo. -function compile_all_vid_repos { - for repo in ${vid_repos[@]}; do - compile_src $vid_src_folder${repo#*vid} - done -} - # _build_vid_images() - Function that builds VID docker images function _build_vid_images { if [[ "$compile_repo" != "True" ]]; then @@ -51,9 +37,9 @@ function install_vid { # init_vid() - Function that initialize Vid services function init_vid { if [[ "$clone_repo" == "True" ]]; then - clone_all_vid_repos + clone_repos "vid" if [[ "$compile_repo" == "True" ]]; then - compile_all_vid_repos + compile_repos "vid" fi fi -- cgit 1.2.3-korg