blob: 13e301598db531b97055e489b26cb90807549339 [file] [log] [blame]
Victor Moralesdd074802017-07-26 16:06:35 -05001#!/bin/bash
2
3set -o xtrace
4
5source /var/onap/functions
Victor Moralesdd074802017-07-26 16:06:35 -05006
Victor Morales94b3e972017-08-17 14:55:55 -05007src_folder=$git_src_folder/vfc
Victor Moralesdd074802017-07-26 16:06:35 -05008vfc_repos=("gvnfm/vnflcm" "gvnfm/vnfmgr" "gvnfm/vnfres" "nfvo/catalog" "nfvo/driver/ems" "nfvo/driver/sfc" \
9 "nfvo/driver/vnfm/gvnfm" "nfvo/driver/vnfm/svnfm" "nfvo/lcm" "nfvo/resmanagement" "nfvo/wfengine")
10
11# clone_all_vfc_repos() - Function that clones VF-C source repo.
12function clone_all_vfc_repos {
13 for dirc in ${vfc_repos[@]}; do
14 clone_repo vfc/$dirc $src_folder/$dirc
15 done
16}
17
18# compile_all_vfc_repos() - Function that compiles VF-C source repo.
19function compile_all_vfc_repos {
Victor Morales970ec192017-07-31 09:10:11 -050020 install_python_package tox
21
Victor Moralesdd074802017-07-26 16:06:35 -050022 pushd $src_folder/gvnfm/vnflcm/lcm
23 tox -e py27
24 popd
25
26 # TODO(sshank): Add compile for other vfc_repos. (Both Java and Python based.)
27 # Python based:
28 # gvnfm/vnflcm/lcm
29 # gvnfm/vnfmgr/mgr
30 # gvnfm/vnfres/res
31 # nfvo/driver/vnfm/gvnfm/gvnfmadapter
32 # nfvo/driver/vnfm/svnfm/zte/vmanager
33 # nfvo/lcm
34
35 # Java based:
36 # nfvo/catalog
37 # nfvo/driver/ems/ems/sems/boco/ems-driver
38 # nfvo/driver/sfc/zte/sfc-driver
39 # nfvo/driver/vnfm/gvnfm/juju/juju-vnfmadapter
40 # nfvo/driver/vnfm/svnfm/huawei/vnfmadapter
41 # nfvo/resmanagement
42 # nfvo/wfengine
43}
44
45# install_vfc() - Download and install vfc service from source code
46function install_vfc {
Victor Morales94b3e972017-08-17 14:55:55 -050047 # TODO(sshank): Add further installation steps if necessary.
48 echo ""
49}
50
51# init_vfc() - Function that initialize VF-C services
52function init_vfc {
53 install_package libmysqlclient-dev
54
Victor Moralesdd074802017-07-26 16:06:35 -050055 clone_all_vfc_repos
56 if [[ "$compile_repo" == "False" ]]; then
57 compile_all_vfc_repos
58 fi
59
Victor Moralesdd074802017-07-26 16:06:35 -050060 install_vfc
61}