#!/bin/bash

set -o xtrace

source /var/onap/functions
source /var/onap/asserts

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 $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 $src_folder/core/rootpom
        fi
        compile_src $src_folder/$dirc
    done
}

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

    build_docker_image $folder/installation/ubuntu
    asserts_image openecomp/ubuntu-sdnc-image

    build_docker_image $folder/installation/sdnc
    asserts_image openecomp/sdnc-image

    build_docker_image $folder/installation/admportal
    asserts_image openecomp/admportal-sdnc-image

    build_docker_image $folder/installation/dgbuilder
    asserts_image openecomp/dgbuilder-sdnc-image
}

# get_sdnc_images() - Build or retrieve necessary images
function get_sdnc_images {
    if [[ "$build_image" == "True" ]]; then
        # The OAM code depends on all the SDNC repos which should be downloaded and compiled first
        if [[ "$compile_repo" == "False" ]]; then
            compile_all_sdnc_repos
        fi
        _build_sdnc_images $src_folder/oam
    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
}

# install_sdnc() -  Download and install SDNC services from source code
function install_sdnc {
    install_package unzip
    clone_repo sdnc/oam $src_folder/oam
    pushd $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
    clone_all_sdnc_repos
    if [[ "$compile_repo" == "True" ]]; then
        compile_all_sdnc_repos
    fi
    get_sdnc_images
    install_sdnc
}
