#!/bin/bash

source /var/onap/functions

# _build_vid_images() - Function that builds VID docker images
function _build_vid_images {
    if [[ "$compile_repo" != "True" ]]; then
        compile_src $vid_src_folder
    fi
    build_docker_image $vid_src_folder/deliveries
}

# get_vid_images() - Function that retrieves VID docker images
function get_vid_images {
    if [[ "$build_image" == "True" ]]; then
        _build_vid_images
    else
        pull_openecomp_image vid
    fi
    pull_docker_image mariadb:10
}

# install_vid() - Download and configure Vid source code
function install_vid {
    vid_image=`docker images | grep vid | grep latest| awk '{print $1 ":" $2}'`

    docker rm -f vid-mariadb
    docker rm -f vid-server

    run_docker_image --name vid-mariadb -e MYSQL_DATABASE=vid_openecomp -e MYSQL_USER=vidadmin -e MYSQL_PASSWORD=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U -e MYSQL_ROOT_PASSWORD=LF+tp_1WqgSY -v /opt/vid/lf_config/vid-my.cnf:/etc/mysql/my.cnf -v /opt/vid/lf_config/vid-pre-init.sql:/docker-entrypoint-initdb.d/vid-pre-init.sql -v /var/lib/mysql -d mariadb:10
    run_docker_image -e VID_MYSQL_DBNAME=vid_openecomp -e VID_MYSQL_PASS=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U --name vid-server -p 8080:8080 --link vid-mariadb:vid-mariadb-docker-instance -d $vid_image
}

# init_vid() - Function that initialize Vid services
function init_vid {
    if [[ "$clone_repo" == "True" ]]; then
        clone_repos "vid"
        if [[ "$compile_repo" == "True" ]]; then
            compile_repos "vid"
        fi
    fi

    if [[ "$skip_get_images" == "False" ]]; then
        get_vid_images
        if [[ "$skip_install" == "False" ]]; then
            install_vid
        fi
    fi
}
