Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | set -o xtrace |
| 4 | |
| 5 | source /var/onap/functions |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 6 | |
Victor Morales | 94b3e97 | 2017-08-17 14:55:55 -0500 | [diff] [blame] | 7 | src_folder=$git_src_folder/vfc |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 8 | vfc_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. |
| 12 | function 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. |
| 19 | function compile_all_vfc_repos { |
Victor Morales | 970ec19 | 2017-07-31 09:10:11 -0500 | [diff] [blame] | 20 | install_python_package tox |
| 21 | |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 22 | 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 |
| 46 | function install_vfc { |
Victor Morales | 94b3e97 | 2017-08-17 14:55:55 -0500 | [diff] [blame] | 47 | # TODO(sshank): Add further installation steps if necessary. |
| 48 | echo "" |
| 49 | } |
| 50 | |
| 51 | # init_vfc() - Function that initialize VF-C services |
| 52 | function init_vfc { |
| 53 | install_package libmysqlclient-dev |
| 54 | |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 55 | clone_all_vfc_repos |
| 56 | if [[ "$compile_repo" == "False" ]]; then |
| 57 | compile_all_vfc_repos |
| 58 | fi |
| 59 | |
Victor Morales | dd07480 | 2017-07-26 16:06:35 -0500 | [diff] [blame] | 60 | install_vfc |
| 61 | } |