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 |
| 6 | rc_folder=$git_src_folder/vfc |
| 7 | |
| 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 { |
| 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 |
| 44 | function 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 |
| 54 | function init_vfc { |
| 55 | install_python |
| 56 | install_package libmysqlclient-dev |
| 57 | install_vfc |
| 58 | } |