#!/bin/bash

source /var/onap/functions

# _create_config_file() - Creates a configuration yaml file for the controller
function _create_config_file {
    cat > ${src_folders[dcae]}/controller/config.yaml << EOL
ZONE: $dcae_zone
STATE: $dcae_state
DCAE-VERSION: $artifacts_version
HORIZON-URL: https://mycloud.rackspace.com/cloud/$tenant_id
KEYSTONE-URL: https://identity.api.rackspacecloud.com/v2.0
OPENSTACK-TENANT-ID: $tenant_id
OPENSTACK-TENANT-NAME: OPEN-ECOMP
OPENSTACK-REGION: $openstack_region
OPENSTACK-PRIVATE-NETWORK: $openstack_private_network_name
OPENSTACK-USER: $openstack_user
OPENSTACK-PASSWORD: $openstack_password
OPENSTACK-KEYNAME: ${key_name}${rand_str}_dcae
OPENSTACK-PUBKEY: $pub_key
     
NEXUS-URL-ROOT: $nexus_repo_root
NEXUS-USER: $nexus_username
NEXUS-PASSWORD: $nexus_password
NEXUS-URL-SNAPSHOTS: $nexus_url_snapshots
NEXUS-RAWURL: $nexus_repo
     
DOCKER-REGISTRY: $nexus_docker_repo

GIT-MR-REPO: http://gerrit.onap.org/r/dcae/demo/startup/message-router.git
EOL
}

# _build_dcae_images() Function that builds DCAE docker images from source code.
function _build_dcae_images {
    if [[ "$compile_repo" != "True" ]]; then
        compile_repos "dcae"
    fi
    build_docker_image ${src_folders[dcae]}/dmaapbc openecomp/dcae-dmaapbc
    build_docker_image ${src_folders[dcae]}/orch-dispatcher dcae/orch-dispatcher

    pushd ${src_folders[dcae]}/demo
    bash dcae-demo-controller/src/main/docker-build/build.sh
    popd

    build_docker_image ${src_folders[dcae]}/dcae-inventory
}

# get_dcae_images() - Function that retrieves or builds DCAE docker images.
function get_dcae_images {
    if [[ "$build_image" == "True" ]]; then
        _build_dcae_images
    else
        pull_openecomp_image dcae-dmaapbc openecomp/dcae-dmaapbc
        pull_openecomp_image dcae-controller
    fi
}

# install_dcae() - Function that clones and installs the DCAE controller services from source code
function install_dcae {
    pushd ${src_folders[dcae]}/demo/startup/controller
    if [[ "$build_image" == "True" ]]; then
        dcae_image=`docker images | grep dcae-controller | awk '{print $1 ":" $2}'`
        sed -i "s|DOCKER-REGISTRY/openecomp/dcae-controller:DCAE-VERSION|$dcae_image|g" docker-compose.yml
        sed -i "s|MTU|$MTU|g" docker-compose.yml
        run_docker_compose .
    else
        bash init.sh
        install_package make
        make up
    fi
    popd
    # run_docker_image -p 8080:8080 -d -v <some local directory>/config.yml:/opt/config.yml --name dcae-inventory <docker registry>/dcae-inventory:<version>
}

# init_dcae() - Function that initialize DCAE Controller services
function init_dcae {
    if [[ "$clone_repo" == "True" ]]; then
        clone_repos "dcae"
        if [[ "$compile_repo" == "True" ]]; then
            compile_repos "dcae"
        fi
    fi

    _create_config_file
    if [[ "$skip_get_images" == "False" ]]; then
        get_dcae_images
        if [[ "$skip_install" == "False" ]]; then
            install_dcae
        fi
    fi
}
