blob: 44e433d35026fc26b8651ee0efbe9002f5a63c48 [file] [log] [blame]
Victor Moralesdd074802017-07-26 16:06:35 -05001#!/bin/bash
2
3set -o xtrace
4
5source /var/onap/functions
6rc_folder=$git_src_folder/vfc
7
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 {
20 pushd $src_folder/gvnfm/vnflcm/lcm
21 tox -e py27
22 popd
23
24 # TODO(sshank): Add compile for other vfc_repos. (Both Java and Python based.)
25 # Python based:
26 # gvnfm/vnflcm/lcm
27 # gvnfm/vnfmgr/mgr
28 # gvnfm/vnfres/res
29 # nfvo/driver/vnfm/gvnfm/gvnfmadapter
30 # nfvo/driver/vnfm/svnfm/zte/vmanager
31 # nfvo/lcm
32
33 # Java based:
34 # nfvo/catalog
35 # nfvo/driver/ems/ems/sems/boco/ems-driver
36 # nfvo/driver/sfc/zte/sfc-driver
37 # nfvo/driver/vnfm/gvnfm/juju/juju-vnfmadapter
38 # nfvo/driver/vnfm/svnfm/huawei/vnfmadapter
39 # nfvo/resmanagement
40 # nfvo/wfengine
41}
42
43# install_vfc() - Download and install vfc service from source code
44function install_vfc {
45 clone_all_vfc_repos
46 if [[ "$compile_repo" == "False" ]]; then
47 compile_all_vfc_repos
48 fi
49
50 # TODO(sshank): Add further installation steps if necessary.
51}
52
53# init_vfc() - Function that initialize VF-C services
54function init_vfc {
55 install_python
56 install_package libmysqlclient-dev
57 install_vfc
58}