blob: 90a73affd0bb46488a8202f48ee91109c2adc704 [file] [log] [blame]
Victor Moralesdd074802017-07-26 16:06:35 -05001#!/bin/bash
2
3set -o xtrace
4
5source /var/onap/functions
Shashank Kumar Shankar3e08dc82017-08-02 12:09:07 -07006src_folder=$git_src_folder/vfc
Victor Moralesdd074802017-07-26 16:06:35 -05007
8vfc_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 {
47 clone_all_vfc_repos
48 if [[ "$compile_repo" == "False" ]]; then
49 compile_all_vfc_repos
50 fi
51
52 # TODO(sshank): Add further installation steps if necessary.
53}
54
55# init_vfc() - Function that initialize VF-C services
56function init_vfc {
57 install_python
58 install_package libmysqlclient-dev
59 install_vfc
60}