diff options
author | Victor Morales <victor.morales@intel.com> | 2017-11-20 16:38:28 -0800 |
---|---|---|
committer | Victor Morales <victor.morales@intel.com> | 2017-11-20 16:38:28 -0800 |
commit | f1f1ba5dac1b531c346758072c798ceb511100b3 (patch) | |
tree | a571f9e83be31abd3c63595c04a46dcd7e901a7d /bootstrap/vagrant-onap/lib/vvp | |
parent | 25bfc6b99f73bd02047dcc13e64390140777402a (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/vvp')
-rwxr-xr-x[-rw-r--r--] | bootstrap/vagrant-onap/lib/vvp | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/bootstrap/vagrant-onap/lib/vvp b/bootstrap/vagrant-onap/lib/vvp index 24264ccc9..a924e7a80 100644..100755 --- a/bootstrap/vagrant-onap/lib/vvp +++ b/bootstrap/vagrant-onap/lib/vvp @@ -3,21 +3,10 @@ source /var/onap/functions vvp_src_folder=$git_src_folder/vvp -vvp_repos=("vvp/ansible-ice-bootstrap" "vvp/cms" "vvp/devkit" "vvp/documentation" "vvp/engagementmgr" "vvp/gitlab" "vvp/image-scanner" "vvp/jenkins" "vvp/portal" "vvp/postgresql" "vvp/test-engine" "vvp/validation-scripts") - -# clone_all_vvp_repos() - Function that clones vvp source repo. -function clone_all_vvp_repos { - for repo in ${vvp_repos[@]}; do - clone_repo $repo $vvp_src_folder${repo#*vvp} - done -} - -# compile_all_vvp_repos - Function that builds vvp source repo -function compile_all_vvp_repos { - for repo in ${vvp_repos[@]}; do - compile_src $vvp_src_folder${repo#*vvp} - done -} +vvp_repos=("vvp/ansible-ice-bootstrap" "vvp/cms" "vvp/devkit" \ +"vvp/documentation" "vvp/engagementmgr" "vvp/gitlab" "vvp/image-scanner" \ +"vvp/jenkins" "vvp/portal" "vvp/postgresql" "vvp/test-engine" \ +"vvp/validation-scripts") # _build_vvp_images() - Builds VNFSDK images from source code function _build_vvp_images { @@ -42,9 +31,9 @@ function install_vvp { # init_vvp() - Init VNFSDK services function init_vvp { if [[ "$clone_repo" == "True" ]]; then - clone_all_vvp_repos + clone_repos "vvp" if [[ "$compile_repo" == "True" ]]; then - compile_all_vvp_repos + compile_repos "vvp" fi fi |