#!/bin/bash

set -o xtrace

source /var/onap/functions
source /var/onap/ccsdk

sdnc_src_folder=$git_src_folder/openecomp/sdnc
sdnc_repos=("core" "adaptors" "northbound" "plugins" "oam")

# clone_all_sdnc_repos() - Function that clones SDNC source repo.
function clone_all_sdnc_repos {
    for dirc in ${sdnc_repos[@]}; do
        clone_repo sdnc/$dirc $sdnc_src_folder/$dirc
    done
}

# compile_all_sdnc_repos() - Function that compiles SDNC source repo.
function compile_all_sdnc_repos {
    for dirc in ${sdnc_repos[@]}; do
        if [[ "$dirc" == "core" ]]; then
            compile_src $sdnc_src_folder/core/rootpom
        fi
        compile_src $sdnc_src_folder/$dirc
    done
}

# _build_sdnc_images() - Builds SDNC images from source code
function _build_sdnc_images {
    local folder=$sdnc_src_folder/oam

    get_ccsdk_images
    install_package unzip
    clone_repo sdnc/oam $folder
    # The OAM code depends on all the SDNC repos which should be downloaded and compiled first
    if [[ "$compile_repo" != "True" ]]; then
        compile_src $folder
    fi
    for dirc in ubuntu sdnc admportal dgbuilder; do
        build_docker_image $folder/installation/$dirc
    done
}

# get_sdnc_images() - Build or retrieve necessary images
function get_sdnc_images {
    if [[ "$build_image" == "True" ]]; then
        _build_sdnc_images
    else
        pull_openecomp_image sdnc-image openecomp/sdnc-image:latest
        pull_openecomp_image admportal-sdnc-image openecomp/admportal-sdnc-image:latest
        pull_openecomp_image dgbuilder-sdnc-image openecomp/dgbuilder-sdnc-image:latest
    fi
    pull_docker_image mysql/mysql-server:5.6
}

# install_sdnc() -  Download and install SDNC services from source code
function install_sdnc {
    clone_repo sdnc/oam $sdnc_src_folder/oam
    pushd $sdnc_src_folder/oam/installation/src/main/yaml
    install_docker_compose
    /opt/docker/docker-compose up -d
    popd
}

# init_sdnc() - Function that initialize SDNC services
function init_sdnc {
    start_ODL
    if [[ "$clone_repo" == "True" ]]; then
        clone_all_sdnc_repos
        if [[ "$compile_repo" == "True" ]]; then
            compile_all_sdnc_repos
        fi
    fi
    get_sdnc_images
    install_sdnc
}
