aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/lib
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
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')
-rwxr-xr-xbootstrap/vagrant-onap/lib/_composed_functions11
-rwxr-xr-xbootstrap/vagrant-onap/lib/aai8
-rwxr-xr-xbootstrap/vagrant-onap/lib/appc18
-rwxr-xr-xbootstrap/vagrant-onap/lib/ccsdk23
-rwxr-xr-xbootstrap/vagrant-onap/lib/dcae23
-rwxr-xr-xbootstrap/vagrant-onap/lib/functions26
-rwxr-xr-xbootstrap/vagrant-onap/lib/mr7
-rwxr-xr-xbootstrap/vagrant-onap/lib/mso28
-rwxr-xr-xbootstrap/vagrant-onap/lib/multicloud18
-rwxr-xr-xbootstrap/vagrant-onap/lib/policy18
-rwxr-xr-xbootstrap/vagrant-onap/lib/robot36
-rwxr-xr-xbootstrap/vagrant-onap/lib/sdc18
-rwxr-xr-xbootstrap/vagrant-onap/lib/sdnc11
-rwxr-xr-xbootstrap/vagrant-onap/lib/vfc9
-rwxr-xr-xbootstrap/vagrant-onap/lib/vid18
-rwxr-xr-x[-rw-r--r--]bootstrap/vagrant-onap/lib/vnfsdk21
-rwxr-xr-x[-rw-r--r--]bootstrap/vagrant-onap/lib/vvp23
17 files changed, 74 insertions, 242 deletions
diff --git a/bootstrap/vagrant-onap/lib/_composed_functions b/bootstrap/vagrant-onap/lib/_composed_functions
index f46499766..9f2d0a1d8 100755
--- a/bootstrap/vagrant-onap/lib/_composed_functions
+++ b/bootstrap/vagrant-onap/lib/_composed_functions
@@ -1,16 +1,5 @@
#!/bin/bash
-# compile_src() - Function that compiles the java source code thru maven
-function compile_src {
- local src_folder=$1
- pushd $src_folder
- if [ -f pom.xml ]; then
- install_maven
- mvn clean install -U -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dadditionalparam=-Xdoclint:none
- fi
- popd
-}
-
# build_docker_image() - Build Docker container image from source code
function build_docker_image {
local src_folder=$1
diff --git a/bootstrap/vagrant-onap/lib/aai b/bootstrap/vagrant-onap/lib/aai
index 538ad2c02..828d4d14e 100755
--- a/bootstrap/vagrant-onap/lib/aai
+++ b/bootstrap/vagrant-onap/lib/aai
@@ -51,12 +51,6 @@ function install_haproxy {
service haproxy restart
}
-# clone_all_aai_repos() - Function that clones AAI source repo.
-function clone_all_aai_repos {
- for repo in ${aai_repos[@]}; do
- clone_repo $repo $aai_src_folder${repo#*aai}
- done
-}
# compile_aai_repos() - Function that compiles AAI source repo.
function compile_aai_repos {
@@ -182,7 +176,7 @@ function init_aai {
install_haproxy
if [[ "$clone_repo" == "True" ]]; then
- clone_all_aai_repos
+ clone_repos "aai"
if [[ "$compile_repo" == "True" ]]; then
compile_aai_repos
fi
diff --git a/bootstrap/vagrant-onap/lib/appc b/bootstrap/vagrant-onap/lib/appc
index 181c73f1f..14ba3cf96 100755
--- a/bootstrap/vagrant-onap/lib/appc
+++ b/bootstrap/vagrant-onap/lib/appc
@@ -6,20 +6,6 @@ source /var/onap/functions
appc_src_folder=$git_src_folder/appc
appc_repos=("appc" "appc/deployment")
-# clone_all_appc_repos() - Function that clones APPC source repo.
-function clone_all_appc_repos {
- for repo in ${appc_repos[@]}; do
- clone_repo $repo $appc_src_folder${repo#*appc}
- done
-}
-
-# compile_all_appc_repos() - Function that compiles APPC source repo.
-function compile_all_appc_repos {
- for repo in ${appc_repos[@]}; do
- compile_src $appc_src_folder${repo#*appc}
- done
-}
-
# _build_appc_images() - Function that creates APPC images from source code.
function _build_appc_images {
get_sdnc_images
@@ -47,9 +33,9 @@ function install_appc {
# init_appc() - Function that initialize APPC services
function init_appc {
if [[ "$clone_repo" == "True" ]]; then
- clone_all_appc_repos
+ clone_repos "appc"
if [[ "$compile_repo" == "True" ]]; then
- compile_all_appc_repos
+ compile_repos "appc"
fi
fi
diff --git a/bootstrap/vagrant-onap/lib/ccsdk b/bootstrap/vagrant-onap/lib/ccsdk
index 3502e01e8..9f00e9ad2 100755
--- a/bootstrap/vagrant-onap/lib/ccsdk
+++ b/bootstrap/vagrant-onap/lib/ccsdk
@@ -9,25 +9,9 @@ ccsdk_repos=("ccsdk" "ccsdk/dashboard" "ccsdk/distribution" "ccsdk/parent"
"ccsdk/sli/plugins" "ccsdk/storage" "ccsdk/storage/esaas" "ccsdk/storage/pgaas"
"ccsdk/utils")
-# clone_ccsdk_repos() - Function that clones the CCSDK repositories
-function clone_ccsdk_repos {
- for repo in ${ccsdk_repos[@]}; do
- clone_repo $repo $ccsdk_src_folder${repo#ccsdk}
- done
-}
-
-# compile_ccsdk_repos() -
-function compile_ccsdk_repos {
- install_package unzip
- for repo in ${ccsdk_repos[@]}; do
- compile_src $ccsdk_src_folder${repo#ccsdk}
- done
-}
-
# _build_ccsdk_images() - Build CCSDK Docker images from source code
function _build_ccsdk_images {
install_package unzip
- clone_repo ccsdk/distribution $ccsdk_src_folder/distribution
compile_src $ccsdk_src_folder/distribution
for image in ubuntu opendaylight odlsli dgbuilder-docker; do
build_docker_image $ccsdk_src_folder/distribution/$image docker
@@ -48,9 +32,12 @@ function get_ccsdk_images {
# init_ccsdk() - Function that initialize Multi Cloud services
function init_ccsdk {
if [[ "$clone_repo" == "True" ]]; then
- clone_ccsdk_repos
+ clone_repos "ccsdk"
if [[ "$compile_repo" == "True" ]]; then
- compile_ccsdk_repos
+ compile_repos "ccsdk"
fi
fi
+ if [[ "$skip_get_images" == "False" ]]; then
+ get_ccsdk_images
+ fi
}
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
diff --git a/bootstrap/vagrant-onap/lib/functions b/bootstrap/vagrant-onap/lib/functions
index c4ed3c85f..157c910de 100755
--- a/bootstrap/vagrant-onap/lib/functions
+++ b/bootstrap/vagrant-onap/lib/functions
@@ -67,6 +67,19 @@ function clone_repo {
fi
}
+# clone_repos() - Function that clones source repositories for a given project
+function clone_repos {
+ local project=$1
+ local name=${project}_repos[@]
+ local src_name=${project}_src_folder
+ local repos_list=("${!name}")
+ local dest_folder=${3:-${!src_name}}
+
+ for repo in ${repos_list[@]}; do
+ clone_repo $repo $dest_folder${repo#*$project}
+ done
+}
+
# _install_bind() - Install bind utils
function _install_bind {
install_packages bind9 bind9utils
@@ -282,6 +295,19 @@ function compile_src {
popd
}
+# compile_repos() - Function that compiles source repositories for a given project
+function compile_repos {
+ local project=$1
+ local name=${project}_repos[@]
+ local repos_list=("${!name}")
+ local dest_folder=${3:-$git_src_folder/$project}
+
+ install_package unzip
+ for repo in ${repos_list[@]}; do
+ compile_src $dest_folder${repo#*$project}
+ done
+}
+
# build_docker_image() - Build Docker container image from source code
function build_docker_image {
local src_folder=$1
diff --git a/bootstrap/vagrant-onap/lib/mr b/bootstrap/vagrant-onap/lib/mr
index 55096cb4b..2ffe69e26 100755
--- a/bootstrap/vagrant-onap/lib/mr
+++ b/bootstrap/vagrant-onap/lib/mr
@@ -4,11 +4,6 @@ source /var/onap/functions
mr_src_folder=$git_src_folder/dcae/message-router
-# clone_mr_repos() - Function that clones the Message Router repositories
-function clone_mr_repos {
- clone_repo dcae/demo/startup/message-router $mr_src_folder
-}
-
# get_mr_images() - Function that retrieves the Message Router Docker images
function get_mr_images {
pull_docker_image attos/dmaap
@@ -27,7 +22,7 @@ function install_message_router {
# init_mr() - Function that initialize Message Router services
function init_mr {
if [[ "$clone_repo" == "True" ]]; then
- clone_mr_repos
+ clone_repo dcae/demo/startup/message-router $mr_src_folder
fi
if [[ "$skip_get_images" == "False" ]]; then
get_mr_images
diff --git a/bootstrap/vagrant-onap/lib/mso b/bootstrap/vagrant-onap/lib/mso
index 0f29b33c5..e99bff912 100755
--- a/bootstrap/vagrant-onap/lib/mso
+++ b/bootstrap/vagrant-onap/lib/mso
@@ -2,30 +2,16 @@
source /var/onap/functions
-src_folder=$git_src_folder/mso
+mso_src_folder=$git_src_folder/mso
mso_repos=("mso" "mso/chef-repo" "mso/docker-config" "mso/libs"
"mso/mso-config")
-# clone_all_mso_repos() - Function that clones MSO source repo.
-function clone_all_mso_repos {
- for repo in ${mso_repos[@]}; do
- clone_repo $repo $src_folder${repo#*mso}
- done
-}
-
-# compile_all_mso_repos() - Function that compiles MSO source repo.
-function compile_all_mso_repos {
- for repo in ${mso_repos[@]}; do
- compile_src $src_folder${repo#*mso}
- done
-}
-
# get_mso_images() - Function that retrieves or create MSO Docker images
function get_mso_images {
if [[ "$build_image" == "True" ]]; then
export GIT_NO_PROJECT=/opt/
- compile_src $src_folder
- build_docker_image $src_folder/packages/docker docker
+ compile_src $mso_src_folder
+ build_docker_image $mso_src_folder/packages/docker docker
fi
}
@@ -80,10 +66,10 @@ EOF
export MSO_CONFIG_UPDATES
export MSO_DOCKER_IMAGE_VERSION=$docker_version
- is_package_installed docker-ce || install_docker
+ install_docker
install_docker_compose
# Deploy the environment
- pushd $src_folder/docker-config
+ pushd $mso_src_folder/docker-config
chmod +x deploy.sh
if [[ "$build_image" == "True" ]]; then
bash deploy.sh
@@ -97,9 +83,9 @@ EOF
# init_mso() - Function that initialize MSO services
function init_mso {
if [[ "$clone_repo" == "True" ]]; then
- clone_all_mso_repos
+ clone_repos "mso"
if [[ "$compile_repo" == "True" ]]; then
- compile_all_mso_repos
+ compile_repos "mso"
fi
fi
diff --git a/bootstrap/vagrant-onap/lib/multicloud b/bootstrap/vagrant-onap/lib/multicloud
index 2f9e5d8d8..4031956e4 100755
--- a/bootstrap/vagrant-onap/lib/multicloud
+++ b/bootstrap/vagrant-onap/lib/multicloud
@@ -8,20 +8,6 @@ multicloud_repos=("multicloud" "multicloud/framework" "multicloud/openstack" \
"multicloud/azure")
openstack_release="newton"
-# clone_multicloud_repos() - Function that clones the Multi Cloud repositories
-function clone_multicloud_repos {
- for repo in ${multicloud_repos[@]}; do
- clone_repo $repo $multicloud_src_folder${repo#*multicloud}
- done
-}
-
-# compile_multicloud_repos() -
-function compile_multicloud_repos {
- for repo in ${multicloud_repos[@]}; do
- compile_src $multicloud_src_folder${repo#*multicloud}
- done
-}
-
function _build_images {
install_docker
install_python_requirements $multicloud_src_folder/openstack/$openstack_release
@@ -49,9 +35,9 @@ function install_multicloud {
# init_multicloud() - Function that initialize Multi Cloud services
function init_multicloud {
if [[ "$clone_repo" == "True" ]]; then
- clone_multicloud_repos
+ clone_repos "multicloud"
if [[ "$compile_repo" == "True" ]]; then
- compile_multicloud_repos
+ compile_repos "multicloud"
fi
fi
if [[ "$skip_get_images" == "False" ]]; then
diff --git a/bootstrap/vagrant-onap/lib/policy b/bootstrap/vagrant-onap/lib/policy
index 65a65a186..05ad32094 100755
--- a/bootstrap/vagrant-onap/lib/policy
+++ b/bootstrap/vagrant-onap/lib/policy
@@ -7,20 +7,6 @@ policy_repos=("policy/api" "policy/common" "policy/docker" \
"policy/drools-applications" "policy/drools-pdp" "policy/engine" \
"policy/gui" "policy/pap" "policy/pdp")
-# clone_all_policy_repos() - Function that clones Policy source repo.
-function clone_all_policy_repos {
- for repo in ${policy_repos[@]}; do
- clone_repo $repo $policy_src_folder${repo#*policy}
- done
-}
-
-# compile_all_policy_repos() - Function that compiles Policy source repo.
-function compile_all_policy_repos {
- for repo in ${policy_repos[@]}; do
- compile_src $policy_src_folder${repo#*policy}
- done
-}
-
# _build_policy_images() - Function that build Policy docker images from source code
function _build_policy_images {
compile_src $policy_src_folder/docker
@@ -59,9 +45,9 @@ function install_policy {
# init_policy() - Function that initialize Policy services
function init_policy {
if [[ "$clone_repo" == "True" ]]; then
- clone_all_policy_repos
+ clone_repos "policy"
if [[ "$compile_repo" == "True" ]]; then
- compile_all_policy_repos
+ compile_repos "policy"
fi
fi
diff --git a/bootstrap/vagrant-onap/lib/robot b/bootstrap/vagrant-onap/lib/robot
index 6dcdf90f0..d9b841757 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 @@ function install_robot {
# 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
diff --git a/bootstrap/vagrant-onap/lib/sdc b/bootstrap/vagrant-onap/lib/sdc
index 88d1cc0fd..f99e8b204 100755
--- a/bootstrap/vagrant-onap/lib/sdc
+++ b/bootstrap/vagrant-onap/lib/sdc
@@ -45,20 +45,6 @@ alias health='/data/scripts/docker_health.sh'
EOL
}
-# clone_all_sdc_repos() - Function that clones SDC source repo.
-function clone_all_sdc_repos {
- for repo in ${sdc_repos[@]}; do
- clone_repo $repo $sdc_src_folder${repo#*sdc}
- done
-}
-
-# compile_all_sdc_repos() - Function that compiles SDC source repo.
-function compile_all_sdc_repos {
- for repo in ${sdc_repos[@]}; do
- compile_src $sdc_src_folder${repo#*sdc}
- done
-}
-
# get_sdc_images() - Function that retrieves the SDC docker images
function get_sdc_images {
if [[ "$build_image" == "True" ]]; then
@@ -103,9 +89,9 @@ function install_sdc {
function init_sdc {
_mount_external_partition
if [[ "$clone_repo" == "True" ]]; then
- clone_all_sdc_repos
+ clone_repos "sdc"
if [[ "$compile_repo" == "True" ]]; then
- compile_all_sdc_repos
+ compile_repos "sdc"
fi
fi
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
diff --git a/bootstrap/vagrant-onap/lib/vfc b/bootstrap/vagrant-onap/lib/vfc
index a4517ff7c..a1f4bef27 100755
--- a/bootstrap/vagrant-onap/lib/vfc
+++ b/bootstrap/vagrant-onap/lib/vfc
@@ -9,13 +9,6 @@ vfc_repos=("vfc/gvnfm" "vfc/gvnfm/vnflcm" "vfc/gvnfm/vnfmgr" \
"vfc/nfvo/driver/vnfm/gvnfm" "vfc/nfvo/driver/vnfm/svnfm" "vfc/nfvo/lcm" \
"vfc/nfvo/resmanagement" "vfc/nfvo/wfengine")
-# clone_all_vfc_repos() - Function that clones VF-C source repo.
-function clone_all_vfc_repos {
- for repo in ${vfc_repos[@]}; do
- clone_repo $repo $vfc_src_folder${repo#*vfc}
- done
-}
-
# compile_all_vfc_repos() - Function that compiles VF-C source repo.
function compile_all_vfc_repos {
install_python_package tox
@@ -97,7 +90,7 @@ function init_vfc {
install_package libmysqlclient-dev
if [[ "$clone_repo" == "True" ]]; then
- clone_all_vfc_repos
+ clone_repos "vfc"
if [[ "$compile_repo" == "True" ]]; then
compile_all_vfc_repos
fi
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
diff --git a/bootstrap/vagrant-onap/lib/vnfsdk b/bootstrap/vagrant-onap/lib/vnfsdk
index 863bae0f6..020d437da 100644..100755
--- a/bootstrap/vagrant-onap/lib/vnfsdk
+++ b/bootstrap/vagrant-onap/lib/vnfsdk
@@ -3,21 +3,8 @@
source /var/onap/functions
vnfsdk_src_folder=$git_src_folder/vnfsdk
-vnfsdk_repos=("vnfsdk/compliance" "vnfsdk/functest" "vnfsdk/lctest" "vnfsdk/model" "vnfsdk/pkgtools" "vnfsdk/refrepo" "vnfsdk/validation")
-
-# clone_all_vnfsdk_repos() - Function that clones vnfsdk source repo.
-function clone_all_vnfsdk_repos {
- for repo in ${vnfsdk_repos[@]}; do
- clone_repo $repo $vnfsdk_src_folder${repo#*vnfsdk}
- done
-}
-
-# compile_all_vnfsdk_repos - Function that builds vnfsdk source repo
-function compile_all_vnfsdk_repos {
- for repo in ${vnfsdk_repos[@]}; do
- compile_src $vnfsdk_src_folder${repo#*vnfsdk}
- done
-}
+vnfsdk_repos=("vnfsdk/compliance" "vnfsdk/functest" "vnfsdk/lctest" \
+"vnfsdk/model" "vnfsdk/pkgtools" "vnfsdk/refrepo" "vnfsdk/validation")
# _build_vnfsdk_images() - Builds VNFSDK images from source code
function _build_vnfsdk_images {
@@ -49,9 +36,9 @@ function install_vnfsdk {
# init_vnfsdk() - Init VNFSDK services
function init_vnfsdk {
if [[ "$clone_repo" == "True" ]]; then
- clone_all_vnfsdk_repos
+ clone_repos "vnfsdk"
if [[ "$compile_repo" == "True" ]]; then
- compile_all_vnfsdk_repos
+ compile_repos "vnfsdk"
fi
fi
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