#!/bin/bash

source /var/onap/functions

# _build_msb_images() - Function that creates Microservices Docker images from source code
function _build_msb_images {
    if [[ "$compile_repo" != "True" ]]; then
        compile_repos "msb"
    fi

    build_docker_image ${src_folders[msb]}/apigateway/distributions/msb-apigateway/src/main/basedocker onap/msb/msb_base
    build_docker_image ${src_folders[msb]}/apigateway/distributions/msb-apigateway/src/main/docker onap/msb/msb_apigateway
    build_docker_image ${src_folders[msb]}/discovery/distributions/msb-discovery/src/main/docker onap/msb/msb_discovery
}

# get_msb_images() - Function that retrieves the Microservices Bus images
function get_msb_images {
    pull_docker_image "consul:0.9.3"
    if [[ "$build_image" == "True" ]]; then
        _build_msb_images
    else
        unset docker_version
        for image in base apigateway discovery; do
            pull_onap_image msb/msb_$image
        done
    fi
}

# install_msb() - Downloads and configure Microservices Bus source code
function install_msb {
    run_docker_image -d --net=host --name msb_consul consul:0.9.3
    run_docker_image -d --net=host --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery
    run_docker_image -d --net=host -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway
}

# init_msb() - Function that initialize Message Router services
function init_msb {
    if [[ "$clone_repo" == "True" ]]; then
        clone_repos "msb"
        if [[ "$compile_repo" == "True" ]]; then
            compile_repos "msb"
        fi
    fi
    if [[ "$skip_get_images" == "False" ]]; then
        get_msb_images
        if [[ "$skip_install" == "False" ]]; then
            install_msb
        fi
    fi
}
