#!/bin/bash

source /var/onap/functions

openstack_release="newton"

# _build_multicloud_images() - Function that builds docker images from source code
function _build_multicloud_images {
    install_docker
    pushd ${src_folders[multicloud]}/openstack/$openstack_release
    install_python_requirements .
    python setup.py develop
    #bash build_image.sh
    popd
}

# get_multicloud_images() -
function get_multicloud_images {
    if [[ "$build_image" == "True" ]]; then
        _build_multicloud_images
    else
        pull_onap_image multicloud/openstack-$openstack_release
    fi
}

# install_multicloud() - 
function install_multicloud {
    #run_docker_compose ${src_folders[multicloud]}/openstack/$openstack_release
    if [[ "$build_image" == "True" ]]; then
        multicloud-api --port 9003 --host 0.0.0.0 &
    else
        docker_id=`docker images | grep onap/multicloud/openstack-$openstack_release | grep latest |  awk '{print $3; exit}'`
        docker run -d -p 0.0.0.0:9003:9003 $docker_id
    fi
}

# init_multicloud() - Function that initialize Multi Cloud services
function init_multicloud {
    if [[ "$clone_repo" == "True" ]]; then
        clone_repos "multicloud"
        if [[ "$compile_repo" == "True" ]]; then
            compile_repos "multicloud"
        fi
    fi
    if [[ "$skip_get_images" == "False" ]]; then
        get_multicloud_images
        if [[ "$skip_install" == "False" ]]; then
            install_multicloud
        fi
    fi
}
