#!/bin/bash

#  ============LICENSE_START===============================================
#  Copyright (C) 2020 Nordix Foundation. All rights reserved.
#  ========================================================================
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
#  ============LICENSE_END=================================================
#


TC_ONELINE_DESCR="Resync of RIC via changes in the consul config or pushed config"

#App names to include in the test when running docker, space separated list
DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM NGW KUBEPROXY"

#Supported test environment profiles
SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
#Supported run modes
SUPPORTED_RUNMODES="DOCKER"

. ../common/testcase_common.sh $@

setup_testenvironment

#### TEST BEGIN ####

if [ "$PMS_VERSION" == "V2" ]; then
    TESTED_VARIANTS="CONSUL NOCONSUL"
else
    TESTED_VARIANTS="CONSUL"
fi

for consul_conf in $TESTED_VARIANTS ; do
    generate_policy_uuid

    # Clean container and start all needed containers #
    clean_environment

    start_kube_proxy

    start_policy_agent NOPROXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE

    set_agent_trace

    # Create service to be able to receive events when rics becomes available
    # Must use rest towards the agent since dmaap is not configured yet
    api_put_service 201 "ric-registration" 0 "$CR_SERVICE_APP_PATH_0/ric-registration"

    # Start one RIC of each type
    start_ric_simulators ricsim_g1 1  OSC_2.1.0
    start_ric_simulators ricsim_g2 1  STD_1.1.3
    if [ "$PMS_VERSION" == "V2" ]; then
        start_ric_simulators ricsim_g3 1  STD_2.0.0
    fi

    start_mr

    start_cr 1

    start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE

    if [ $consul_conf == "CONSUL" ]; then
        start_consul_cbs
    fi

    prepare_consul_config      NOSDNC  ".consul_config.json"

    if [ "$PMS_VERSION" == "V2" ] && [ $consul_conf == "NOCONSUL" ]; then
        api_put_configuration 200 ".consul_config.json"
        api_get_configuration 200 ".consul_config.json"
    else
        consul_config_app                  ".consul_config.json"
    fi

    if [ "$PMS_VERSION" == "V2" ]; then
        api_equal json:rics 3 300

        cr_equal 0 received_callbacks 3 120

        cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_1 ricsim_g2_1 ricsim_g3_1
    else
        api_equal json:rics 2 300
    fi

    # Add an STD RIC and check
    start_ric_simulators ricsim_g2 2  STD_1.1.3

    prepare_consul_config      NOSDNC  ".consul_config.json"
    if [ "$PMS_VERSION" == "V2" ] && [ $consul_conf == "NOCONSUL" ]; then
        api_put_configuration 200 ".consul_config.json"
        api_get_configuration 200 ".consul_config.json"
    else
        consul_config_app                  ".consul_config.json"
    fi

    if [ "$PMS_VERSION" == "V2" ]; then
        api_equal json:rics 4 120

        cr_equal 0 received_callbacks 4 120

        cr_api_check_all_sync_events 200 0 ric-registration ricsim_g2_2
    else
        api_equal json:rics 3 120
    fi

    check_policy_agent_logs


    # Remove one RIC RIC and check
    start_ric_simulators ricsim_g2 1  STD_1.1.3

    prepare_consul_config      NOSDNC  ".consul_config.json"
    if [ "$PMS_VERSION" == "V2" ] && [ $consul_conf == "NOCONSUL" ]; then
        api_put_configuration 200 ".consul_config.json"
        api_get_configuration 200 ".consul_config.json"
    else
        consul_config_app                  ".consul_config.json"
    fi

    if [ "$PMS_VERSION" == "V2" ]; then
        api_equal json:rics 3 120

        cr_equal 0 received_callbacks 4 120
    else
        api_equal json:rics 2 120
    fi

    if [ "$PMS_VERSION" == "V2" ] && [ $consul_conf == "NOCONSUL" ]; then
        api_get_configuration 200 ".consul_config.json"
    fi

    check_policy_agent_logs
    check_sdnc_logs

    store_logs          END_$consul_conf
done


#### TEST COMPLETE ####


print_result

auto_clean_environment
