aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/lib/sdnc
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/sdnc
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/sdnc')
-rwxr-xr-xbootstrap/vagrant-onap/lib/sdnc11
1 files changed, 1 insertions, 10 deletions
diff --git a/bootstrap/vagrant-onap/lib/sdnc b/bootstrap/vagrant-onap/lib/sdnc
index a69ce18fb..05165b18b 100755
--- a/bootstrap/vagrant-onap/lib/sdnc
+++ b/bootstrap/vagrant-onap/lib/sdnc
@@ -7,13 +7,6 @@ sdnc_src_folder=$git_src_folder/openecomp/sdnc
sdnc_repos=("sdnc/adaptors" "sdnc/architecture" "sdnc/core" "sdnc/features" \
"sdnc/northbound" "sdnc/oam" "sdnc/parent" "sdnc/plugins")
-# clone_all_sdnc_repos() - Function that clones SDNC source repo.
-function clone_all_sdnc_repos {
- for repo in ${sdnc_repos[@]}; do
- clone_repo $repo $sdnc_src_folder${repo#*sdnc}
- done
-}
-
# compile_all_sdnc_repos() - Function that compiles SDNC source repo.
function compile_all_sdnc_repos {
for repo in ${sdnc_repos[@]}; do
@@ -30,7 +23,6 @@ function _build_sdnc_images {
get_ccsdk_images
install_package unzip
- clone_repo sdnc/oam $folder
# The OAM code depends on all the SDNC repos which should be downloaded and compiled first
if [[ "$compile_repo" != "True" ]]; then
compile_src $folder
@@ -54,7 +46,6 @@ function get_sdnc_images {
# install_sdnc() - Download and install SDNC services from source code
function install_sdnc {
- clone_repo sdnc/oam $sdnc_src_folder/oam
pushd $sdnc_src_folder/oam/installation/src/main/yaml
install_docker_compose
/opt/docker/docker-compose up -d
@@ -64,7 +55,7 @@ function install_sdnc {
# init_sdnc() - Function that initialize SDNC services
function init_sdnc {
if [[ "$clone_repo" == "True" ]]; then
- clone_all_sdnc_repos
+ clone_repos "sdnc"
if [[ "$compile_repo" == "True" ]]; then
compile_all_sdnc_repos
fi