#!/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 {
    #pushd ${src_folders[multicloud]}/openstack/$openstack_release
    #/opt/docker/docker-compose up -d
    #popd
    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
}
