#!/bin/bash

source /var/onap/functions

# _build_policy_images() - Function that build Policy docker images from source code
function _build_policy_images {
    compile_src ${src_folders[policy]}/docker
    pushd ${src_folders[policy]}/docker
    install_maven
    mvn prepare-package
    cp -r target/policy-pe/* policy-pe/
    cp -r target/policy-drools/* policy-drools
    install_docker
    bash docker_verify.sh
    popd
}

# get_policy_images() - Function that retrieves Policy docker images
function get_policy_images {
    if [[ "$build_image" == "True" ]]; then
        _build_policy_images
    else
        for image in db pe drools nexus; do
            pull_onap_image policy/policy-$image onap/policy/policy-$image:latest
        done
    fi
}

# install_policy() - Function that clones and installs the Policy services from source code
function install_policy {
    pushd ${src_folders[policy]}/docker
    chmod +x config/drools/drools-tweaks.sh
    echo $IP_ADDRESS > config/pe/ip_addr.txt
    install_docker_compose
    /opt/docker/docker-compose up -d
    popd
}

# init_policy() - Function that initialize Policy services
function init_policy {
    if [[ "$clone_repo" == "True" ]]; then
        clone_repos "policy"
        if [[ "$compile_repo" == "True" ]]; then
            compile_repos "policy"
        fi
    fi

    if [[ "$skip_get_images" == "False" ]]; then
        get_policy_images
        if [[ "$skip_install" == "False" ]]; then
            install_policy
        fi
    fi
}
