#!/bin/bash

source /var/onap/functions

# compile_all_vfc_repos() - Function that compiles VF-C source repo.
function compile_all_vfc_repos {
    install_python_package tox

    tox_repos=("gvnfm/vnflcm/lcm" "gvnfm/vnfmgr/mgr" "gvnfm/vnfres/res" "nfvo/lcm" \
        "nfvo/driver/vnfm/gvnfm/gvnfmadapter" "nfvo/driver/vnfm/svnfm/zte/vmanager")
    for dirc in ${tox_repos[@]}; do
        pushd $vfc_src_folder/$dirc
        tox -e py27
        popd
    done

    # TODO(sshank): Add compile for other vfc_repos. (Java based.)

    # Java based:
    # nfvo/catalog
    # nfvo/driver/ems/ems/sems/boco/ems-driver
    # nfvo/driver/sfc/zte/sfc-driver
    # nfvo/driver/vnfm/gvnfm/juju/juju-vnfmadapter
    # nfvo/driver/vnfm/svnfm/huawei/vnfmadapter
    # nfvo/resmanagement
    # nfvo/wfengine
}

# _build_vfc_image() - Build VFC  docker image
function _build_vfc_image {
    pushd $vfc_src_folder/$1/docker
    sed -i "s/^push_image/#push_image/g" build_image.sh
    sed -i 's|IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}"|IMAGE_NAME=${ORG}/${IMAGE}|g' build_image.sh
    ./build_image.sh
    popd
}

# get_vfc_images() - Build VFC docker images
function get_vfc_images {
    if [[ "$build_image" == "True" ]]; then
        install_docker
        # Separate methods are required since the image build process will change.
        _build_vfc_image gvnfm/vnflcm/lcm onap/nslcm
        _build_vfc_image gvnfm/vnfmgr/mgr onap/gvnfmdriver
        _build_vfc_image gvnfm/vnfres/res onap/vnfres
        _build_vfc_image nfvo/lcm onap/vnflcm
        _build_vfc_image nfvo/driver/vnfm/gvnfm/gvnfmadapter

        build_gvnfm_lcm_image
        build_gvnfm_vnfmgr_image
        build_gvnfm_vnfres_image
        build_nfvo_lcm_image
        build_nfvo_vnfm_gvnfmadapter_image
        # TODO(sshank): Add other VFC component docker image builds.
    else
        pull_onap_image vfc/gvnfm/vnflcm/lcm
        pull_onap_image vfc/gvnfm/vnfmgr/mgr
        pull_onap_image vfc/gvnfm/vnfres/res
        pull_onap_image vfc/nfvo/lcm
        pull_onap_image vfc/nfvo/driver/vnfm/gvnfm/gvnfmadapter
    fi
}

# install_vfc() - Download and install vfc service from source code
function install_vfc {
    nslcm_image=`docker images | grep nslcm | grep latest| awk '{print $1 ":" $2}'`
    vnflcm_image=`docker images | grep vnflcm | grep latest| awk '{print $1 ":" $2}'`
    vnfmgr_image=`docker images | grep vnfmgr | grep latest| awk '{print $1 ":" $2}'`
    vnfres_image=`docker images | grep vnfres | grep latest| awk '{print $1 ":" $2}'`
    gvnfmdriver_image=`docker images | grep gvnfmdriver | grep latest| awk '{print $1 ":" $2}'`

    run_docker_image -d --name vfc-nslcm -p 8403:8403 -e MSB_ADDR=127.0.0.1 $nslcm_image
    run_docker_image -d --name vfc-vnflcm -p 8801:8801 -e MSB_ADDR=127.0.0.1 $vnflcm_image
    run_docker_image -d --name vfc-vnfmgr -p 8803:8803 -e MSB_ADDR=127.0.0.1 $vnfmgr_image
    run_docker_image -d --name vfc-vnfres -p 8802:8802 -e MSB_ADDR=127.0.0.1 $vnfres_image
    run_docker_image -d --name vfc-gvnfmdriver -p 8484:8484 -e MSB_ADDR=127.0.0.1 $gvnfmdriver_image

    # TODO(sshank): Run other VFC component docker images.
}

# init_vfc() - Function that initialize VF-C services
function init_vfc {
    install_package libmysqlclient-dev

    if [[ "$clone_repo" == "True" ]]; then
        clone_repos "vfc"
        if [[ "$compile_repo" == "True" ]]; then
            compile_all_vfc_repos
        fi
    fi

    if [[ "$skip_get_images" == "False" ]]; then
        get_vfc_images
        if [[ "$skip_install" == "False" ]]; then
            install_vfc
        fi
    fi
}
