#!/bin/bash

set -o xtrace

source /var/onap/functions

vnfsdk_src_folder=$git_src_folder/vnfsdk

vnfsdk_repos=("refrepo")

# clone_all_vnfsdk_repos() - Function that clones vnfsdk source repo.
function clone_all_vnfsdk_repos {

    for dirc in ${vnfsdk_repos[@]}; do
        clone_repo vnfsdk/$dirc $vnfsdk_src_folder/$dirc
    done
}

# compile_all_vnfsdk_repos - Function that builds vnfsdk source repo
function compile_all_vnfsdk_repos {

    for dirc in ${vnfsdk_repos[@]}; do
        clone_repo vnfsdk/$dirc $vnfsdk_src_folder/$dirc
    done
}

# _build_vnfsdk_images() - Builds VNFSDK images from source code
function _build_vnfsdk_images {
    install_package unzip
    pushd $vnfsdk_src_folder/refrepo/vnfmarket-be/deployment/docker/docker-refrepo
    build_docker_image .
    popd
}

# get_vnfsdk_images - Function that clones vnfsdk Docker images
function get_vnfsdk_images {
    if [[ "$build_image" == "True" ]]; then
        # TODO(sshank): Has errors building.
        _build_vnfsdk_images
    else
        pull_docker_image refrepo:1.0-STAGING-latest
        pull_docker_image refrepo:latest
    fi
}

# install_vnfsdk - Function that installs vnfsdk Docker images
function install_vnfsdk {
    install_docker_compose
    pushd $vnfsdk_src_folder/refrepo/vnfmarket-be/deployment/install
    /opt/docker/docker-compose up -d
    popd
}

# init_vnfsdk() - Init VNFSDK services
function init_vnfsdk {
    if [[ "$clone_repo" == "True" ]]; then
        clone_all_vnfsdk_repos
        if [[ "$compile_repo" == "True" ]]; then
            compile_all_vnfsdk_repos
        fi
    fi

    if [[ "$skip_get_images" == "False" ]]; then
        get_vnfsdk_images
        if [[ "$skip_install" == "False" ]]; then
            install_vnfsdk
        fi
    fi
}
