aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/lib
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2017-08-17 11:50:42 -0500
committerVictor Morales <victor.morales@intel.com>2017-08-17 13:36:48 -0500
commitdbdc30ad2cd10a1b6a38885f51f64ff169dfe4a4 (patch)
tree81e634f921e932fa840907017d1bb25b61a007c2 /bootstrap/vagrant-onap/lib
parent68527bc1a68264f6be0953a91e4cb7c3aac41347 (diff)
Refactor and Improve SDNC UTs
This change refactor the lib/sdnc script and add some unit tests to the SDNC component. Change-Id: Ia389c0e8e78de2eef1b41075a0701b013f9bc925 Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-Id: INT-102
Diffstat (limited to 'bootstrap/vagrant-onap/lib')
-rwxr-xr-xbootstrap/vagrant-onap/lib/sdnc35
1 files changed, 14 insertions, 21 deletions
diff --git a/bootstrap/vagrant-onap/lib/sdnc b/bootstrap/vagrant-onap/lib/sdnc
index 8bf6ae625..332632138 100755
--- a/bootstrap/vagrant-onap/lib/sdnc
+++ b/bootstrap/vagrant-onap/lib/sdnc
@@ -3,7 +3,6 @@
set -o xtrace
source /var/onap/functions
-source /var/onap/asserts
src_folder=$git_src_folder/openecomp/sdnc
sdnc_repos=("core" "adaptors" "northbound" "plugins" "oam")
@@ -25,41 +24,35 @@ function compile_all_sdnc_repos {
done
}
-# _build_sdnc_images() - Builds SDNC images from source code
-function _build_sdnc_images {
- local folder=$1
+# build_sdnc_images() - Builds SDNC images from source code
+function build_sdnc_images {
+ local folder=${1:-$src_folder/oam}
- build_docker_image $folder/installation/ubuntu
- asserts_image openecomp/ubuntu-sdnc-image
-
- build_docker_image $folder/installation/sdnc
- asserts_image openecomp/sdnc-image
-
- build_docker_image $folder/installation/admportal
- asserts_image openecomp/admportal-sdnc-image
-
- build_docker_image $folder/installation/dgbuilder
- asserts_image openecomp/dgbuilder-sdnc-image
+ install_package unzip
+ clone_repo sdnc/oam $src_folder/oam
+ # The OAM code depends on all the SDNC repos which should be downloaded and compiled first
+ if [[ "$compile_repo" == "False" ]]; then
+ compile_src $src_folder/oam/
+ fi
+ for dirc in ubuntu sdnc admportal dgbuilder; do
+ build_docker_image $folder/installation/$dirc
+ done
}
# get_sdnc_images() - Build or retrieve necessary images
function get_sdnc_images {
if [[ "$build_image" == "True" ]]; then
- # The OAM code depends on all the SDNC repos which should be downloaded and compiled first
- if [[ "$compile_repo" == "False" ]]; then
- compile_all_sdnc_repos
- fi
- _build_sdnc_images $src_folder/oam
+ build_sdnc_images
else
pull_openecomp_image sdnc-image openecomp/sdnc-image:latest
pull_openecomp_image admportal-sdnc-image openecomp/admportal-sdnc-image:latest
pull_openecomp_image dgbuilder-sdnc-image openecomp/dgbuilder-sdnc-image:latest
fi
+ pull_docker_image mysql/mysql-server:5.6
}
# install_sdnc() - Download and install SDNC services from source code
function install_sdnc {
- install_package unzip
clone_repo sdnc/oam $src_folder/oam
pushd $src_folder/oam/installation/src/main/yaml
install_docker_compose