summaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-07-31 16:43:23 +0000
committerGerrit Code Review <gerrit@onap.org>2017-07-31 16:43:23 +0000
commitf48e43230eeaa5dc19ce5ec914bb8216922fc7cc (patch)
tree9ab6986151e0ee793c6e1feab8148c4db80584bc /bootstrap/vagrant-onap
parentd04e4407a6a5888b8f6d924e0c9706378c3d285a (diff)
parent970ec198ae769b50fa204ed7ad998db76a7320a2 (diff)
Merge "Refactor install_python function"
Diffstat (limited to 'bootstrap/vagrant-onap')
-rwxr-xr-xbootstrap/vagrant-onap/lib/functions20
-rwxr-xr-xbootstrap/vagrant-onap/lib/sdnc1
-rwxr-xr-xbootstrap/vagrant-onap/lib/vfc2
3 files changed, 19 insertions, 4 deletions
diff --git a/bootstrap/vagrant-onap/lib/functions b/bootstrap/vagrant-onap/lib/functions
index b0c6e978d..a2bb98e29 100755
--- a/bootstrap/vagrant-onap/lib/functions
+++ b/bootstrap/vagrant-onap/lib/functions
@@ -62,6 +62,8 @@ function clone_repo {
function install_dev_tools {
install_package apt-transport-https
install_package ca-certificates
+ # ca-certificates-java is not a dependency in the Oracle JDK/JRE so this must be explicitly installed.
+ /var/lib/dpkg/info/ca-certificates-java.postinst configure
install_package curl
}
@@ -122,11 +124,23 @@ function install_nodejs {
function install_python {
install_package python2.7
install_package python-dev
+}
+
+# _install_pip() - Install Python Package Manager
+function _install_pip {
+ install_python
curl -sL https://bootstrap.pypa.io/get-pip.py | python
- pip install tox
}
-# install_docker() - Download and install docker-engine
+# install_python_package() - Install a python module
+function install_python_package {
+ local python_package=$1
+
+ _install_pip
+ pip install $python_package
+}
+
+# install_docker() - Download and install docker-engine
function install_docker {
if is_package_installed docker-ce; then
return
@@ -192,7 +206,7 @@ function compile_src {
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
+ mvn clean install -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dadditionalparam=-Xdoclint:none
fi
popd
}
diff --git a/bootstrap/vagrant-onap/lib/sdnc b/bootstrap/vagrant-onap/lib/sdnc
index 6765f1444..8bf6ae625 100755
--- a/bootstrap/vagrant-onap/lib/sdnc
+++ b/bootstrap/vagrant-onap/lib/sdnc
@@ -32,7 +32,6 @@ function _build_sdnc_images {
build_docker_image $folder/installation/ubuntu
asserts_image openecomp/ubuntu-sdnc-image
- /var/lib/dpkg/info/ca-certificates-java.postinst configure
build_docker_image $folder/installation/sdnc
asserts_image openecomp/sdnc-image
diff --git a/bootstrap/vagrant-onap/lib/vfc b/bootstrap/vagrant-onap/lib/vfc
index 44e433d35..5aba76f47 100755
--- a/bootstrap/vagrant-onap/lib/vfc
+++ b/bootstrap/vagrant-onap/lib/vfc
@@ -17,6 +17,8 @@ function clone_all_vfc_repos {
# compile_all_vfc_repos() - Function that compiles VF-C source repo.
function compile_all_vfc_repos {
+ install_python_package tox
+
pushd $src_folder/gvnfm/vnflcm/lcm
tox -e py27
popd