From: BjornMagnussonXA Date: Mon, 7 Mar 2022 10:04:55 +0000 (+0100) Subject: Name alignment, agent to a1pms, in test env X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=d2aeca8843fe3ffca2e73dec5b64daeef0dda938;p=nonrtric.git Name alignment, agent to a1pms, in test env Possibility to set kube context for tests in remote clusters Issue-ID: NONRTRIC-728 Signed-off-by: BjornMagnussonXA Change-Id: I697853aa54798526527a4c5999bd2c2291568399 --- diff --git a/test/auto-test/FTC1.sh b/test/auto-test/FTC1.sh index 00d37581..adb2f227 100755 --- a/test/auto-test/FTC1.sh +++ b/test/auto-test/FTC1.sh @@ -18,13 +18,13 @@ # -TC_ONELINE_DESCR="Sanity test, create service and then create,update and delete a policy using http/https and Agent REST/DMAAP with/without SDNC controller" +TC_ONELINE_DESCR="Sanity test, create service and then create,update and delete a policy using http/https and A1PMS REST/DMAAP with/without SDNC controller" #App names to include in the test when running docker, space separated list -DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR DMAAPMR PA RICSIM SDNC NGW KUBEPROXY" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR DMAAPMR A1PMS RICSIM SDNC NGW KUBEPROXY" #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES="CP CR MR DMAAPMR PA RICSIM SDNC NGW KUBEPROXY " +KUBE_INCLUDED_IMAGES="CP CR MR DMAAPMR A1PMS RICSIM SDNC NGW KUBEPROXY " #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" @@ -48,14 +48,14 @@ generate_policy_uuid # Tested variants of REST/DMAAP/SDNC config TESTED_VARIANTS="REST DMAAP REST+SDNC DMAAP+SDNC" -#Test agent and simulator protocol versions (others are http only) +#Test a1pms and simulator protocol versions (others are http only) TESTED_PROTOCOLS="HTTP HTTPS" for __httpx in $TESTED_PROTOCOLS ; do for interface in $TESTED_VARIANTS ; do echo "#####################################################################" echo "#####################################################################" - echo "### Testing agent: $interface using $__httpx" + echo "### Testing a1pms: $interface using $__httpx" echo "#####################################################################" echo "#####################################################################" @@ -64,18 +64,18 @@ for __httpx in $TESTED_PROTOCOLS ; do start_kube_proxy if [ $__httpx == "HTTPS" ]; then - use_agent_rest_https + use_a1pms_rest_https else - use_agent_rest_http + use_a1pms_rest_http fi - start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE + start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE - set_agent_trace + set_a1pms_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" + # Must use rest towards the a1pms since dmaap is not configured yet + a1pms_api_put_service 201 "ric-registration" 0 "$CR_SERVICE_APP_PATH_0/ric-registration" if [ $__httpx == "HTTPS" ]; then use_cr_https @@ -85,9 +85,9 @@ for __httpx in $TESTED_PROTOCOLS ; do use_sdnc_https fi if [[ $interface = *"DMAAP"* ]]; then - use_agent_dmaap_https + use_a1pms_dmaap_https else - use_agent_rest_https + use_a1pms_rest_https fi else use_cr_http @@ -97,15 +97,15 @@ for __httpx in $TESTED_PROTOCOLS ; do use_sdnc_http fi if [[ $interface = *"DMAAP"* ]]; then - use_agent_dmaap_http + use_a1pms_dmaap_http else - use_agent_rest_http + use_a1pms_rest_http fi fi 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 + if [ "$A1PMS_VERSION" == "V2" ]; then start_ric_simulators ricsim_g3 1 STD_2.0.0 fi @@ -128,27 +128,27 @@ for __httpx in $TESTED_PROTOCOLS ; do fi if [ $RUNMODE == "KUBE" ]; then - agent_load_config ".consul_config.json" + a1pms_load_config ".consul_config.json" else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then #Temporary switch to http/https if dmaap use. Otherwise it is not possibble to push config if [ $__httpx == "HTTPS" ]; then - use_agent_rest_https + use_a1pms_rest_https else - use_agent_rest_http + use_a1pms_rest_http fi - api_put_configuration 200 ".consul_config.json" + a1pms_api_put_configuration 200 ".consul_config.json" if [ $__httpx == "HTTPS" ]; then if [[ $interface = *"DMAAP"* ]]; then - use_agent_dmaap_https + use_a1pms_dmaap_https else - use_agent_rest_https + use_a1pms_rest_https fi else if [[ $interface = *"DMAAP"* ]]; then - use_agent_dmaap_http + use_a1pms_dmaap_http else - use_agent_rest_http + use_a1pms_rest_http fi fi else @@ -161,113 +161,113 @@ for __httpx in $TESTED_PROTOCOLS ; do sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then sim_put_policy_type 201 ricsim_g3_1 STD_QOS_0_2_0 testdata/STD2/sim_qos.json - api_equal json:rics 3 300 + a1pms_equal json:rics 3 300 - api_equal json:policy-types 3 120 + a1pms_equal json:policy-types 3 120 - api_equal json:policies 0 + a1pms_equal json:policies 0 - api_equal json:policy-instances 0 + a1pms_equal json:policy-instances 0 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 + a1pms_equal json:rics 2 300 - api_equal json:policy_schemas 2 120 + a1pms_equal json:policy_schemas 2 120 - api_equal json:policy_types 2 + a1pms_equal json:policy_types 2 - api_equal json:policies 0 + a1pms_equal json:policies 0 - api_equal json:policy_ids 0 + a1pms_equal json:policy_ids 0 fi echo "############################################" echo "############## Health check ################" echo "############################################" - api_get_status 200 + a1pms_api_get_status 200 echo "############################################" echo "##### Service registry and supervision #####" echo "############################################" - api_put_service 201 "serv1" 1000 "$CR_SERVICE_APP_PATH_0/1" + a1pms_api_put_service 201 "serv1" 1000 "$CR_SERVICE_APP_PATH_0/1" - api_get_service_ids 200 "serv1" "ric-registration" + a1pms_api_get_service_ids 200 "serv1" "ric-registration" - api_put_services_keepalive 200 "serv1" + a1pms_api_put_services_keepalive 200 "serv1" echo "############################################" echo "############## RIC Repository ##############" echo "############################################" - if [ "$PMS_VERSION" == "V2" ]; then - api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0:AVAILABLE" + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0:AVAILABLE" else - api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" + a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" fi echo "############################################" echo "########### A1 Policy Management ###########" echo "############################################" - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then notificationurl=$CR_SERVICE_APP_PATH_0"/test" else notificationurl="" fi - api_put_policy 201 "serv1" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json - api_put_policy 200 "serv1" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json - if [ "$PMS_VERSION" == "V2" ]; then - api_put_policy 201 "serv1" ricsim_g3_1 STD_QOS_0_2_0 5200 true $notificationurl testdata/STD2/pi_qos_template.json - api_put_policy 200 "serv1" ricsim_g3_1 STD_QOS_0_2_0 5200 true $notificationurl testdata/STD2/pi_qos_template.json + a1pms_api_put_policy 201 "serv1" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json + a1pms_api_put_policy 200 "serv1" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_put_policy 201 "serv1" ricsim_g3_1 STD_QOS_0_2_0 5200 true $notificationurl testdata/STD2/pi_qos_template.json + a1pms_api_put_policy 200 "serv1" ricsim_g3_1 STD_QOS_0_2_0 5200 true $notificationurl testdata/STD2/pi_qos_template.json fi - api_put_policy 201 "serv1" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json - api_put_policy 200 "serv1" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json + a1pms_api_put_policy 201 "serv1" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json + a1pms_api_put_policy 200 "serv1" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policies 3 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policies 3 else - api_equal json:policies 2 + a1pms_equal json:policies 2 fi - api_delete_policy 204 5000 + a1pms_api_delete_policy 204 5000 - api_delete_policy 204 5100 + a1pms_api_delete_policy 204 5100 - if [ "$PMS_VERSION" == "V2" ]; then - api_delete_policy 204 5200 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_delete_policy 204 5200 fi - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policies 0 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policies 0 - api_equal json:policy-instances 0 + a1pms_equal json:policy-instances 0 else - api_equal json:policies 0 + a1pms_equal json:policies 0 - api_equal json:policy_ids 0 + a1pms_equal json:policy_ids 0 fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then cr_equal 0 received_callbacks 3 fi if [[ $interface = *"DMAAP"* ]]; then - if [ "$PMS_VERSION" == "V2" ]; then - VAL=14 # Number of Agent API calls over DMAAP + if [ "$A1PMS_VERSION" == "V2" ]; then + VAL=14 # Number of a1pms API calls over DMAAP else - VAL=11 # Number of Agent API calls over DMAAP + VAL=11 # Number of a1pms API calls over DMAAP fi mr_equal requests_fetched $VAL mr_equal responses_submitted $VAL @@ -281,18 +281,18 @@ for __httpx in $TESTED_PROTOCOLS ; do if [[ $interface = *"SDNC"* ]]; then sim_contains_str ricsim_g1_1 remote_hosts $SDNC_APP_NAME sim_contains_str ricsim_g2_1 remote_hosts $SDNC_APP_NAME - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then sim_contains_str ricsim_g3_1 remote_hosts $SDNC_APP_NAME fi else - sim_contains_str ricsim_g1_1 remote_hosts $POLICY_AGENT_APP_NAME - sim_contains_str ricsim_g2_1 remote_hosts $POLICY_AGENT_APP_NAME - if [ "$PMS_VERSION" == "V2" ]; then - sim_contains_str ricsim_g3_1 remote_hosts $POLICY_AGENT_APP_NAME + sim_contains_str ricsim_g1_1 remote_hosts $A1PMS_APP_NAME + sim_contains_str ricsim_g2_1 remote_hosts $A1PMS_APP_NAME + if [ "$A1PMS_VERSION" == "V2" ]; then + sim_contains_str ricsim_g3_1 remote_hosts $A1PMS_APP_NAME fi fi - check_policy_agent_logs + check_a1pms_logs if [[ $interface = *"SDNC"* ]]; then diff --git a/test/auto-test/FTC10.sh b/test/auto-test/FTC10.sh index 481f450d..35fc80be 100755 --- a/test/auto-test/FTC10.sh +++ b/test/auto-test/FTC10.sh @@ -20,10 +20,10 @@ TC_ONELINE_DESCR="Basic use case, register service, create/update policy, delete policy, de-register service using both STD and OSC interface while mixing REST and Dmaap" #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" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM NGW KUBEPROXY" #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES=" MR CR PA RICSIM CP KUBEPROXY NGW" +KUBE_INCLUDED_IMAGES=" MR CR A1PMS RICSIM CP KUBEPROXY NGW" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" @@ -47,7 +47,7 @@ generate_policy_uuid use_simulator_http use_mr_http -use_agent_rest_http +use_a1pms_rest_http clean_environment @@ -58,7 +58,7 @@ start_ric_simulators ricsim_g1 3 OSC_2.1.0 start_ric_simulators ricsim_g2 5 STD_1.1.3 -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then start_ric_simulators ricsim_g3 1 STD_2.0.0 fi @@ -67,7 +67,7 @@ start_mr start_cr 1 if [ $RUNMODE == "DOCKER" ]; then - if [[ "$PMS_FEATURE_LEVEL" != *"NOCONSUL"* ]]; then + if [[ "$A1PMS_FEATURE_LEVEL" != *"NOCONSUL"* ]]; then start_consul_cbs fi fi @@ -78,214 +78,214 @@ if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE fi -start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE +start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE -set_agent_debug +set_a1pms_debug -use_agent_rest_http +use_a1pms_rest_http prepare_consul_config NOSDNC ".consul_config.json" if [ $RUNMODE == "KUBE" ]; then - agent_load_config ".consul_config.json" + a1pms_load_config ".consul_config.json" else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then - api_put_configuration 200 ".consul_config.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + a1pms_api_put_configuration 200 ".consul_config.json" else consul_config_app ".consul_config.json" fi fi -api_get_status 200 +a1pms_api_get_status 200 sim_print ricsim_g1_1 interface sim_print ricsim_g2_1 interface -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then sim_print ricsim_g3_1 interface fi sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then sim_put_policy_type 201 ricsim_g3_1 STD_QOS_0_2_0 testdata/STD2/sim_qos.json - api_equal json:policy-types 3 300 + a1pms_equal json:policy-types 3 300 else - api_equal json:policy_types 2 300 + a1pms_equal json:policy_types 2 300 fi # Create policies -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then notificationurl=$CR_SERVICE_APP_PATH_0"/test" else notificationurl="" fi -use_agent_rest_http +use_a1pms_rest_http -api_put_service 201 "service1" 3600 "$CR_SERVICE_APP_PATH_0/1" +a1pms_api_put_service 201 "service1" 3600 "$CR_SERVICE_APP_PATH_0/1" -api_put_policy 201 "service1" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json 1 +a1pms_api_put_policy 201 "service1" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json 1 sim_equal ricsim_g1_1 num_instances 1 -use_agent_dmaap_http +use_a1pms_dmaap_http -api_put_policy 201 "service1" ricsim_g1_1 1 3000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json 1 +a1pms_api_put_policy 201 "service1" ricsim_g1_1 1 3000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json 1 sim_equal ricsim_g1_1 num_instances 2 -use_agent_rest_http +use_a1pms_rest_http -api_put_policy 201 "service1" ricsim_g2_1 NOTYPE 2100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1 +a1pms_api_put_policy 201 "service1" ricsim_g2_1 NOTYPE 2100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1 sim_equal ricsim_g2_1 num_instances 1 -use_agent_dmaap_http +use_a1pms_dmaap_http -api_put_policy 201 "service1" ricsim_g2_1 NOTYPE 3100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1 +a1pms_api_put_policy 201 "service1" ricsim_g2_1 NOTYPE 3100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1 sim_equal ricsim_g2_1 num_instances 2 -if [ "$PMS_VERSION" == "V2" ]; then - use_agent_rest_http +if [ "$A1PMS_VERSION" == "V2" ]; then + use_a1pms_rest_http - api_put_policy 201 "service1" ricsim_g3_1 STD_QOS_0_2_0 2200 true $notificationurl testdata/STD2/pi_qos_template.json 1 + a1pms_api_put_policy 201 "service1" ricsim_g3_1 STD_QOS_0_2_0 2200 true $notificationurl testdata/STD2/pi_qos_template.json 1 sim_equal ricsim_g3_1 num_instances 1 - use_agent_dmaap_http + use_a1pms_dmaap_http - api_put_policy 201 "service1" ricsim_g3_1 STD_QOS_0_2_0 3200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos_template.json 1 + a1pms_api_put_policy 201 "service1" ricsim_g3_1 STD_QOS_0_2_0 3200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos_template.json 1 sim_equal ricsim_g3_1 num_instances 2 fi #Update policies -use_agent_rest_http +use_a1pms_rest_http -api_put_service 200 "service1" 3600 "$CR_SERVICE_APP_PATH_0/1" +a1pms_api_put_service 200 "service1" 3600 "$CR_SERVICE_APP_PATH_0/1" -api_put_policy 200 "service1" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json 1 +a1pms_api_put_policy 200 "service1" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json 1 sim_equal ricsim_g1_1 num_instances 2 -use_agent_dmaap_http +use_a1pms_dmaap_http -api_put_policy 200 "service1" ricsim_g1_1 1 3000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json 1 +a1pms_api_put_policy 200 "service1" ricsim_g1_1 1 3000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json 1 sim_equal ricsim_g1_1 num_instances 2 -use_agent_rest_http +use_a1pms_rest_http -api_put_policy 200 "service1" ricsim_g2_1 NOTYPE 2100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1 +a1pms_api_put_policy 200 "service1" ricsim_g2_1 NOTYPE 2100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1 sim_equal ricsim_g2_1 num_instances 2 -use_agent_dmaap_http +use_a1pms_dmaap_http -api_put_policy 200 "service1" ricsim_g2_1 NOTYPE 3100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1 +a1pms_api_put_policy 200 "service1" ricsim_g2_1 NOTYPE 3100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1 sim_equal ricsim_g2_1 num_instances 2 -if [ "$PMS_VERSION" == "V2" ]; then - use_agent_rest_http +if [ "$A1PMS_VERSION" == "V2" ]; then + use_a1pms_rest_http - api_put_policy 200 "service1" ricsim_g3_1 STD_QOS_0_2_0 2200 true $notificationurl testdata/STD2/pi_qos_template.json 1 + a1pms_api_put_policy 200 "service1" ricsim_g3_1 STD_QOS_0_2_0 2200 true $notificationurl testdata/STD2/pi_qos_template.json 1 sim_equal ricsim_g3_1 num_instances 2 - use_agent_dmaap_http + use_a1pms_dmaap_http - api_put_policy 200 "service1" ricsim_g3_1 STD_QOS_0_2_0 3200 true $notificationurl testdata/STD2/pi_qos_template.json 1 + a1pms_api_put_policy 200 "service1" ricsim_g3_1 STD_QOS_0_2_0 3200 true $notificationurl testdata/STD2/pi_qos_template.json 1 sim_equal ricsim_g3_1 num_instances 2 fi # Check policies -if [ "$PMS_VERSION" == "V2" ]; then - api_get_policy 200 2000 testdata/OSC/pi1_template.json "service1" ricsim_g1_1 1 false $notificationurl - api_get_policy 200 3000 testdata/OSC/pi1_template.json "service1" ricsim_g1_1 1 false $notificationurl - api_get_policy 200 2100 testdata/STD/pi1_template.json "service1" ricsim_g2_1 NOTYPE false $notificationurl - api_get_policy 200 3100 testdata/STD/pi1_template.json "service1" ricsim_g2_1 NOTYPE false $notificationurl - api_get_policy 200 2200 testdata/STD2/pi_qos_template.json "service1" ricsim_g3_1 STD_QOS_0_2_0 true $notificationurl - api_get_policy 200 3200 testdata/STD2/pi_qos_template.json "service1" ricsim_g3_1 STD_QOS_0_2_0 true $notificationurl +if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_get_policy 200 2000 testdata/OSC/pi1_template.json "service1" ricsim_g1_1 1 false $notificationurl + a1pms_api_get_policy 200 3000 testdata/OSC/pi1_template.json "service1" ricsim_g1_1 1 false $notificationurl + a1pms_api_get_policy 200 2100 testdata/STD/pi1_template.json "service1" ricsim_g2_1 NOTYPE false $notificationurl + a1pms_api_get_policy 200 3100 testdata/STD/pi1_template.json "service1" ricsim_g2_1 NOTYPE false $notificationurl + a1pms_api_get_policy 200 2200 testdata/STD2/pi_qos_template.json "service1" ricsim_g3_1 STD_QOS_0_2_0 true $notificationurl + a1pms_api_get_policy 200 3200 testdata/STD2/pi_qos_template.json "service1" ricsim_g3_1 STD_QOS_0_2_0 true $notificationurl else - api_get_policy 200 2000 testdata/OSC/pi1_template.json - api_get_policy 200 3000 testdata/OSC/pi1_template.json - api_get_policy 200 2100 testdata/STD/pi1_template.json - api_get_policy 200 3100 testdata/STD/pi1_template.json + a1pms_api_get_policy 200 2000 testdata/OSC/pi1_template.json + a1pms_api_get_policy 200 3000 testdata/OSC/pi1_template.json + a1pms_api_get_policy 200 2100 testdata/STD/pi1_template.json + a1pms_api_get_policy 200 3100 testdata/STD/pi1_template.json fi sim_equal ricsim_g1_1 num_instances 2 sim_equal ricsim_g2_1 num_instances 2 -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then sim_equal ricsim_g3_1 num_instances 2 fi # Remove policies -use_agent_dmaap_http -api_delete_policy 204 2000 -use_agent_rest_http -api_delete_policy 204 3000 -use_agent_dmaap_http -api_delete_policy 204 2100 -use_agent_rest_http -api_delete_policy 204 3100 -if [ "$PMS_VERSION" == "V2" ]; then - use_agent_dmaap_http - api_delete_policy 204 2200 - use_agent_rest_http - api_delete_policy 204 3200 +use_a1pms_dmaap_http +a1pms_api_delete_policy 204 2000 +use_a1pms_rest_http +a1pms_api_delete_policy 204 3000 +use_a1pms_dmaap_http +a1pms_api_delete_policy 204 2100 +use_a1pms_rest_http +a1pms_api_delete_policy 204 3100 +if [ "$A1PMS_VERSION" == "V2" ]; then + use_a1pms_dmaap_http + a1pms_api_delete_policy 204 2200 + use_a1pms_rest_http + a1pms_api_delete_policy 204 3200 fi sim_equal ricsim_g1_1 num_instances 0 sim_equal ricsim_g2_1 num_instances 0 -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then sim_equal ricsim_g3_1 num_instances 0 fi # Check remote host access to simulator -sim_contains_str ricsim_g1_1 remote_hosts $POLICY_AGENT_APP_NAME -sim_contains_str ricsim_g2_1 remote_hosts $POLICY_AGENT_APP_NAME -if [ "$PMS_VERSION" == "V2" ]; then - sim_contains_str ricsim_g3_1 remote_hosts $POLICY_AGENT_APP_NAME +sim_contains_str ricsim_g1_1 remote_hosts $A1PMS_APP_NAME +sim_contains_str ricsim_g2_1 remote_hosts $A1PMS_APP_NAME +if [ "$A1PMS_VERSION" == "V2" ]; then + sim_contains_str ricsim_g3_1 remote_hosts $A1PMS_APP_NAME fi # Check policy removal -use_agent_rest_http -api_get_policy 404 2000 -api_get_policy 404 3000 -api_get_policy 404 2100 -api_get_policy 404 3100 - -if [ "$PMS_VERSION" == "V2" ]; then - api_get_policy 404 2200 - api_get_policy 404 3200 +use_a1pms_rest_http +a1pms_api_get_policy 404 2000 +a1pms_api_get_policy 404 3000 +a1pms_api_get_policy 404 2100 +a1pms_api_get_policy 404 3100 + +if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_get_policy 404 2200 + a1pms_api_get_policy 404 3200 fi # Remove the service -use_agent_dmaap_http -api_delete_services 204 "service1" +use_a1pms_dmaap_http +a1pms_api_delete_services 204 "service1" -api_get_services 404 "service1" +a1pms_api_get_services 404 "service1" -check_policy_agent_logs +check_a1pms_logs #### TEST COMPLETE #### diff --git a/test/auto-test/FTC100.sh b/test/auto-test/FTC100.sh index 1fafa711..55f7d824 100755 --- a/test/auto-test/FTC100.sh +++ b/test/auto-test/FTC100.sh @@ -18,13 +18,13 @@ # -TC_ONELINE_DESCR="Full agent API walkthrough using agent REST/DMAAP and with/without SDNC A1 Controller" +TC_ONELINE_DESCR="Full a1pms API walkthrough using a1pms REST/DMAAP and with/without SDNC A1 Controller" #App names to include in the test when running docker, space separated list -DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC NGW KUBEPROXY" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM SDNC NGW KUBEPROXY" #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES="CP CR MR PA RICSIM SDNC KUBEPROXY NGW" +KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC KUBEPROXY NGW" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" @@ -49,7 +49,7 @@ generate_policy_uuid # Tested variants of REST/DMAAP/SDNC config TESTED_VARIANTS="REST DMAAP REST+SDNC DMAAP+SDNC" -#Test agent and simulator protocol versions (others are http only) +#Test a1pms and simulator protocol versions (others are http only) TESTED_PROTOCOLS="HTTP HTTPS" for __httpx in $TESTED_PROTOCOLS ; do @@ -57,7 +57,7 @@ for __httpx in $TESTED_PROTOCOLS ; do echo "#####################################################################" echo "#####################################################################" - echo "### Testing agent: $interface using $__httpx" + echo "### Testing a1pms: $interface using $__httpx" echo "#####################################################################" echo "#####################################################################" @@ -68,19 +68,19 @@ for __httpx in $TESTED_PROTOCOLS ; do if [ $__httpx == "HTTPS" ]; then use_cr_https - use_agent_rest_https + use_a1pms_rest_https else - use_agent_rest_http + use_a1pms_rest_http use_cr_http fi - start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE + start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE - set_agent_debug + set_a1pms_debug # 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" + # Must use rest towards the a1pms since dmaap is not configured yet + a1pms_api_put_service 201 "ric-registration" 0 "$CR_SERVICE_APP_PATH_0/ric-registration" if [ $__httpx == "HTTPS" ]; then @@ -90,9 +90,9 @@ for __httpx in $TESTED_PROTOCOLS ; do use_sdnc_https fi if [[ $interface = *"DMAAP"* ]]; then - use_agent_dmaap_https + use_a1pms_dmaap_https else - use_agent_rest_https + use_a1pms_rest_https fi else use_simulator_http @@ -101,9 +101,9 @@ for __httpx in $TESTED_PROTOCOLS ; do use_sdnc_http fi if [[ $interface = *"DMAAP"* ]]; then - use_agent_dmaap_http + use_a1pms_dmaap_http else - use_agent_rest_http + use_a1pms_rest_http fi fi @@ -113,7 +113,7 @@ for __httpx in $TESTED_PROTOCOLS ; do sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json sim_put_policy_type 201 ricsim_g1_1 2 testdata/OSC/sim_2.json - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then start_ric_simulators ricsim_g3 1 STD_2.0.0 sim_put_policy_type 201 ricsim_g3_1 STD_QOS_0_2_0 testdata/STD2/sim_qos.json sim_put_policy_type 201 ricsim_g3_1 STD_QOS2_0.1.0 testdata/STD2/sim_qos2.json @@ -137,34 +137,34 @@ for __httpx in $TESTED_PROTOCOLS ; do fi if [ $RUNMODE == "KUBE" ]; then - agent_load_config ".consul_config.json" + a1pms_load_config ".consul_config.json" else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then #Temporary switch to http/https if dmaap use. Otherwise it is not possibble to push config if [ $__httpx == "HTTPS" ]; then - use_agent_rest_https + use_a1pms_rest_https else - use_agent_rest_http + use_a1pms_rest_http fi if [[ $interface != *"DMAAP"* ]]; then echo "{}" > ".consul_config_incorrect.json" - api_put_configuration 400 ".consul_config_incorrect.json" + a1pms_api_put_configuration 400 ".consul_config_incorrect.json" fi - api_put_configuration 200 ".consul_config.json" - api_get_configuration 200 ".consul_config.json" + a1pms_api_put_configuration 200 ".consul_config.json" + a1pms_api_get_configuration 200 ".consul_config.json" if [ $__httpx == "HTTPS" ]; then if [[ $interface = *"DMAAP"* ]]; then - use_agent_dmaap_https + use_a1pms_dmaap_https else - use_agent_rest_https + use_a1pms_rest_https fi else if [[ $interface = *"DMAAP"* ]]; then - use_agent_dmaap_http + use_a1pms_dmaap_http else - use_agent_rest_http + use_a1pms_rest_http fi fi @@ -174,27 +174,27 @@ for __httpx in $TESTED_PROTOCOLS ; do fi fi - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:rics 3 300 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:rics 3 300 - api_equal json:policy-types 5 120 + a1pms_equal json:policy-types 5 120 - api_equal json:policies 0 + a1pms_equal json:policies 0 - api_equal json:policy-instances 0 + a1pms_equal json:policy-instances 0 else - api_equal json:rics 2 300 + a1pms_equal json:rics 2 300 - api_equal json:policy_schemas 3 120 + a1pms_equal json:policy_schemas 3 120 - api_equal json:policy_types 3 + a1pms_equal json:policy_types 3 - api_equal json:policies 0 + a1pms_equal json:policies 0 - api_equal json:policy_ids 0 + a1pms_equal json:policy_ids 0 fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then 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 fi @@ -205,372 +205,372 @@ for __httpx in $TESTED_PROTOCOLS ; do echo "############## Health check ################" echo "############################################" - api_get_status 200 + a1pms_api_get_status 200 - api_get_status_root 200 + a1pms_api_get_status_root 200 echo "############################################" echo "##### Service registry and supervision #####" echo "############################################" - api_get_services 404 "service1" + a1pms_api_get_services 404 "service1" - api_put_service 201 "service1" 1000 "$CR_SERVICE_APP_PATH_0/1" + a1pms_api_put_service 201 "service1" 1000 "$CR_SERVICE_APP_PATH_0/1" - api_put_service 200 "service1" 2000 "$CR_SERVICE_APP_PATH_0/1" + a1pms_api_put_service 200 "service1" 2000 "$CR_SERVICE_APP_PATH_0/1" - api_put_service 400 "service2" -1 "$CR_SERVICE_APP_PATH_0/2" + a1pms_api_put_service 400 "service2" -1 "$CR_SERVICE_APP_PATH_0/2" - api_put_service 400 "service2" "wrong" "$CR_SERVICE_APP_PATH_0/2" + a1pms_api_put_service 400 "service2" "wrong" "$CR_SERVICE_APP_PATH_0/2" - api_put_service 400 "service2" 100 "/test" + a1pms_api_put_service 400 "service2" 100 "/test" - api_put_service 400 "service2" 100 "test-path" + a1pms_api_put_service 400 "service2" 100 "test-path" - api_put_service 201 "service2" 300 "ftp://localhost:80/test" + a1pms_api_put_service 201 "service2" 300 "ftp://localhost:80/test" - api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_APP_PATH_0/1" + a1pms_api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_APP_PATH_0/1" - api_get_service_ids 200 "service1" "service2" "ric-registration" + a1pms_api_get_service_ids 200 "service1" "service2" "ric-registration" - api_put_service 201 "service3" 5000 "$CR_SERVICE_APP_PATH_0/3" + a1pms_api_put_service 201 "service3" 5000 "$CR_SERVICE_APP_PATH_0/3" - api_get_service_ids 200 "service1" "service2" "service3" "ric-registration" + a1pms_api_get_service_ids 200 "service1" "service2" "service3" "ric-registration" - api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_APP_PATH_0/1" + a1pms_api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_APP_PATH_0/1" - api_get_services 200 NOSERVICE "service1" 2000 "$CR_SERVICE_APP_PATH_0/1" "service2" 300 "ftp://localhost:80/test" "service3" 5000 "$CR_SERVICE_APP_PATH_0/3" "ric-registration" 0 "$CR_SERVICE_APP_PATH_0/ric-registration" + a1pms_api_get_services 200 NOSERVICE "service1" 2000 "$CR_SERVICE_APP_PATH_0/1" "service2" 300 "ftp://localhost:80/test" "service3" 5000 "$CR_SERVICE_APP_PATH_0/3" "ric-registration" 0 "$CR_SERVICE_APP_PATH_0/ric-registration" - api_get_services 200 + a1pms_api_get_services 200 deviation "TR2 - Keep alive shall return 200/201 according to doc, only 200 works - test combo $interface and $__httpx" #The below should work, keept here until fixed or other decision made - #api_put_services_keepalive 201 "service1" + #a1pms_api_put_services_keepalive 201 "service1" #Using the below until decision - api_put_services_keepalive 200 "service1" + a1pms_api_put_services_keepalive 200 "service1" deviation "TR2 - Keep alive shall return 200/201 according to doc, only 200 works - test combo $interface and $__httpx" #The below should work, keept here until fixed or other decision made - #api_put_services_keepalive 201 "service3" + #a1pms_api_put_services_keepalive 201 "service3" #Using the below until decision - api_put_services_keepalive 200 "service3" + a1pms_api_put_services_keepalive 200 "service3" - api_put_services_keepalive 200 "service1" + a1pms_api_put_services_keepalive 200 "service1" - api_put_services_keepalive 200 "service3" + a1pms_api_put_services_keepalive 200 "service3" - api_put_services_keepalive 404 "service5" + a1pms_api_put_services_keepalive 404 "service5" - api_get_service_ids 200 "service1" "service2" "service3" "ric-registration" + a1pms_api_get_service_ids 200 "service1" "service2" "service3" "ric-registration" - api_delete_services 204 "service1" + a1pms_api_delete_services 204 "service1" - api_get_service_ids 200 "service2" "service3" "ric-registration" + a1pms_api_get_service_ids 200 "service2" "service3" "ric-registration" - api_put_service 201 "service1" 50 "$CR_SERVICE_APP_PATH_0/1" + a1pms_api_put_service 201 "service1" 50 "$CR_SERVICE_APP_PATH_0/1" - api_get_service_ids 200 "service1" "service2" "service3" "ric-registration" + a1pms_api_get_service_ids 200 "service1" "service2" "service3" "ric-registration" - api_delete_services 204 "service1" - api_delete_services 204 "service3" + a1pms_api_delete_services 204 "service1" + a1pms_api_delete_services 204 "service3" - api_equal json:services 2 + a1pms_equal json:services 2 - api_delete_services 204 "service2" + a1pms_api_delete_services 204 "service2" - api_equal json:services 1 + a1pms_equal json:services 1 echo "############################################" echo "############## RIC Repository ##############" echo "############################################" - if [ "$PMS_VERSION" == "V2" ]; then - api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" else - api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" + a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" fi - api_get_rics 200 1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE" + a1pms_api_get_rics 200 1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE" - api_get_rics 404 47 + a1pms_api_get_rics 404 47 - api_get_rics 404 "test" + a1pms_api_get_rics 404 "test" - if [ "$PMS_VERSION" == "V2" ]; then - api_get_ric 200 me1_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE" + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_get_ric 200 me1_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE" - api_get_ric 200 me2_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE" + a1pms_api_get_ric 200 me2_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE" - api_get_ric 200 me1_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" + a1pms_api_get_ric 200 me1_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" - api_get_ric 200 me2_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" + a1pms_api_get_ric 200 me2_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" - api_get_ric 200 me1_ricsim_g3_1 NORIC "ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" + a1pms_api_get_ric 200 me1_ricsim_g3_1 NORIC "ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" - api_get_ric 200 me2_ricsim_g3_1 NORIC "ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" + a1pms_api_get_ric 200 me2_ricsim_g3_1 NORIC "ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" - api_get_ric 200 NOME ricsim_g1_1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE" + a1pms_api_get_ric 200 NOME ricsim_g1_1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE" - api_get_ric 200 NOME ricsim_g2_1 "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" + a1pms_api_get_ric 200 NOME ricsim_g2_1 "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" - api_get_ric 200 NOME ricsim_g3_1 "ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" + a1pms_api_get_ric 200 NOME ricsim_g3_1 "ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" - api_get_ric 404 NOME test1 + a1pms_api_get_ric 404 NOME test1 - api_get_ric 404 test NORIC + a1pms_api_get_ric 404 test NORIC - api_get_ric 400 me1_ricsim_g1_1 ricsim_g1_1 + a1pms_api_get_ric 400 me1_ricsim_g1_1 ricsim_g1_1 - api_get_ric 400 me1_ricsim_g1_1 TESTRIC + a1pms_api_get_ric 400 me1_ricsim_g1_1 TESTRIC - api_get_ric 400 TESTME ricsim_g1_1 + a1pms_api_get_ric 400 TESTME ricsim_g1_1 else - api_get_ric 200 me1_ricsim_g1_1 ricsim_g1_1 + a1pms_api_get_ric 200 me1_ricsim_g1_1 ricsim_g1_1 - api_get_ric 200 me2_ricsim_g1_1 ricsim_g1_1 + a1pms_api_get_ric 200 me2_ricsim_g1_1 ricsim_g1_1 - api_get_ric 200 me1_ricsim_g2_1 ricsim_g2_1 + a1pms_api_get_ric 200 me1_ricsim_g2_1 ricsim_g2_1 - api_get_ric 200 me2_ricsim_g2_1 ricsim_g2_1 + a1pms_api_get_ric 200 me2_ricsim_g2_1 ricsim_g2_1 - api_get_ric 404 test + a1pms_api_get_ric 404 test fi echo "############################################" echo "########### A1 Policy Management ###########" echo "############################################" - if [ "$PMS_VERSION" == "V2" ]; then - deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx" + if [ "$A1PMS_VERSION" == "V2" ]; then + deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" #Behaviour accepted for now - api_get_policy_type 200 1 testdata/OSC/1-agent-modified.json - deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx" + a1pms_api_get_policy_type 200 1 testdata/OSC/1-a1pms-modified.json + deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" #Behaviour accepted for now - api_get_policy_type 200 2 testdata/OSC/2-agent-modified.json - deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx" + a1pms_api_get_policy_type 200 2 testdata/OSC/2-a1pms-modified.json + deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" #Behaviour accepted for now - api_get_policy_type 200 STD_QOS_0_2_0 testdata/STD2/qos-agent-modified.json - deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx" + a1pms_api_get_policy_type 200 STD_QOS_0_2_0 testdata/STD2/qos-a1pms-modified.json + deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" #Behaviour accepted for now - api_get_policy_type 200 STD_QOS2_0.1.0 testdata/STD2/qos2-agent-modified.json + a1pms_api_get_policy_type 200 STD_QOS2_0.1.0 testdata/STD2/qos2-a1pms-modified.json - api_get_policy_type 404 3 + a1pms_api_get_policy_type 404 3 else - deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx" + deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" #Behaviour accepted for now - api_get_policy_schema 200 1 testdata/OSC/1-agent-modified.json - deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx" + a1pms_api_get_policy_schema 200 1 testdata/OSC/1-a1pms-modified.json + deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" #Behaviour accepted for now - api_get_policy_schema 200 2 testdata/OSC/2-agent-modified.json + a1pms_api_get_policy_schema 200 2 testdata/OSC/2-a1pms-modified.json - api_get_policy_schema 404 3 + a1pms_api_get_policy_schema 404 3 fi - if [ "$PMS_VERSION" == "V2" ]; then - api_get_policy_schemas 404 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_get_policy_schemas 404 else - deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx" + deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" #Behaviour accepted for now - api_get_policy_schemas 200 NORIC testdata/OSC/1-agent-modified.json testdata/OSC/2-agent-modified.json NOFILE - deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx" + a1pms_api_get_policy_schemas 200 NORIC testdata/OSC/1-a1pms-modified.json testdata/OSC/2-a1pms-modified.json NOFILE + deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" #Behaviour accepted for now - api_get_policy_schemas 200 ricsim_g1_1 testdata/OSC/1-agent-modified.json testdata/OSC/2-agent-modified.json + a1pms_api_get_policy_schemas 200 ricsim_g1_1 testdata/OSC/1-a1pms-modified.json testdata/OSC/2-a1pms-modified.json - api_get_policy_schemas 200 ricsim_g2_1 NOFILE + a1pms_api_get_policy_schemas 200 ricsim_g2_1 NOFILE - api_get_policy_schemas 404 test + a1pms_api_get_policy_schemas 404 test fi - if [ "$PMS_VERSION" == "V2" ]; then - api_get_policy_types 200 NORIC 1 2 EMPTY STD_QOS_0_2_0 STD_QOS2_0.1.0 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_get_policy_types 200 NORIC 1 2 EMPTY STD_QOS_0_2_0 STD_QOS2_0.1.0 else - api_get_policy_types 200 NORIC 1 2 EMPTY + a1pms_api_get_policy_types 200 NORIC 1 2 EMPTY fi - api_get_policy_types 200 ricsim_g1_1 1 2 + a1pms_api_get_policy_types 200 ricsim_g1_1 1 2 - api_get_policy_types 200 ricsim_g2_1 EMPTY + a1pms_api_get_policy_types 200 ricsim_g2_1 EMPTY - if [ "$PMS_VERSION" == "V2" ]; then - api_get_policy_types 200 ricsim_g3_1 STD_QOS_0_2_0 STD_QOS2_0.1.0 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_get_policy_types 200 ricsim_g3_1 STD_QOS_0_2_0 STD_QOS2_0.1.0 fi - api_get_policy_types 404 dummy-ric + a1pms_api_get_policy_types 404 dummy-ric - api_put_service 201 "service10" 3600 "$CR_SERVICE_APP_PATH_0/1" + a1pms_api_put_service 201 "service10" 3600 "$CR_SERVICE_APP_PATH_0/1" - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then notificationurl=$CR_SERVICE_APP_PATH_0"/test" else notificationurl="" fi if [[ $interface != *"DMAAP"* ]]; then # Badly formatted json is not possible to send via dmaap - api_put_policy 400 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi_bad_template.json + a1pms_api_put_policy 400 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi_bad_template.json fi - deviation "TR10 - agent allows policy creation on unregistered service (orig problem) - test combo $interface and $__httpx" + deviation "TR10 - a1pms allows policy creation on unregistered service (orig problem) - test combo $interface and $__httpx" #Kept until decison - #api_put_policy 400 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT testdata/OSC/pi1_template.json + #a1pms_api_put_policy 400 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT testdata/OSC/pi1_template.json #Allow 201 for now - api_put_policy 201 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json + a1pms_api_put_policy 201 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json - api_put_policy 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json - api_put_policy 200 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json + a1pms_api_put_policy 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json + a1pms_api_put_policy 200 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json - api_put_policy 200 "service10" ricsim_g1_1 1 5000 true $notificationurl testdata/OSC/pi1_template.json - api_put_policy 200 "service10" ricsim_g1_1 1 5000 false $notificationurl testdata/OSC/pi1_template.json + a1pms_api_put_policy 200 "service10" ricsim_g1_1 1 5000 true $notificationurl testdata/OSC/pi1_template.json + a1pms_api_put_policy 200 "service10" ricsim_g1_1 1 5000 false $notificationurl testdata/OSC/pi1_template.json - api_put_policy 201 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json - api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json + a1pms_api_put_policy 201 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json + a1pms_api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json - api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 true $notificationurl testdata/STD/pi1_template.json - api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 false $notificationurl testdata/STD/pi1_template.json + a1pms_api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 true $notificationurl testdata/STD/pi1_template.json + a1pms_api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 false $notificationurl testdata/STD/pi1_template.json - if [ "$PMS_VERSION" == "V2" ]; then - api_put_policy 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json - api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_put_policy 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json + a1pms_api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json - api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 true $notificationurl testdata/STD2/pi_qos2_template.json - api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 false $notificationurl testdata/STD2/pi_qos2_template.json + a1pms_api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 true $notificationurl testdata/STD2/pi_qos2_template.json + a1pms_api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 false $notificationurl testdata/STD2/pi_qos2_template.json fi - api_get_policy_status 404 1 - api_get_policy_status 404 2 + a1pms_api_get_policy_status 404 1 + a1pms_api_get_policy_status 404 2 VAL='NOT IN EFFECT' - api_get_policy_status 200 5000 OSC "$VAL" "false" - api_get_policy_status 200 5100 STD "UNDEFINED" - if [ "$PMS_VERSION" == "V2" ]; then - api_get_policy_status 200 5200 STD2 EMPTY EMPTY + a1pms_api_get_policy_status 200 5000 OSC "$VAL" "false" + a1pms_api_get_policy_status 200 5100 STD "UNDEFINED" + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_get_policy_status 200 5200 STD2 EMPTY EMPTY fi - deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" + deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" #kept until decision - #api_equal json:policies 2 + #a1pms_equal json:policies 2 #Allow 3 for now - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policies 4 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policies 4 else - api_equal json:policies 3 + a1pms_equal json:policies 3 fi - deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" + deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" #kept until decision - #api_equal json:policy_ids 2 + #a1pms_equal json:policy_ids 2 #Allow 3 for now - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-instances 4 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-instances 4 else - api_equal json:policy_ids 3 + a1pms_equal json:policy_ids 3 fi - deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" + deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" #kept until decision - #api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 + #a1pms_api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 #Allow policy create with unregistered service for now - if [ "$PMS_VERSION" == "V2" ]; then - api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000 5200 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000 5200 else - api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000 + a1pms_api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000 fi - deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" + deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" #kept until decision - #api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 + #a1pms_api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 #Allow policy create with unregistered service for now - if [ "$PMS_VERSION" == "V2" ]; then - api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000 - api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100 + a1pms_api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100 - api_get_policy_ids 200 ricsim_g3_1 NOSERVICE NOTYPE 5200 + a1pms_api_get_policy_ids 200 ricsim_g3_1 NOSERVICE NOTYPE 5200 - api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100 5200 + a1pms_api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100 5200 else - api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000 + a1pms_api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000 - api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100 + a1pms_api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100 - api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100 + a1pms_api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100 fi - deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" + deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" #kept until decision - #api_get_policy_ids 200 NORIC NOSERVICE 1 5000 + #a1pms_api_get_policy_ids 200 NORIC NOSERVICE 1 5000 #Allow policy create with unregistered service for now - api_get_policy_ids 200 NORIC NOSERVICE 1 5000 2000 + a1pms_api_get_policy_ids 200 NORIC NOSERVICE 1 5000 2000 - api_get_policy_ids 200 NORIC NOSERVICE 2 NOID + a1pms_api_get_policy_ids 200 NORIC NOSERVICE 2 NOID - if [ "$PMS_VERSION" == "V2" ]; then - api_get_policy_ids 200 NORIC NOSERVICE STD_QOS2_0.1.0 5200 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_get_policy_ids 200 NORIC NOSERVICE STD_QOS2_0.1.0 5200 fi - api_get_policy_ids 200 ricsim_g2_1 NOSERVICE 1 NOID + a1pms_api_get_policy_ids 200 ricsim_g2_1 NOSERVICE 1 NOID - if [ "$PMS_VERSION" == "V2" ]; then - api_get_policy 200 5000 testdata/OSC/pi1_template.json "service10" ricsim_g1_1 1 false $notificationurl + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_get_policy 200 5000 testdata/OSC/pi1_template.json "service10" ricsim_g1_1 1 false $notificationurl - api_get_policy 200 5100 testdata/STD/pi1_template.json "service10" ricsim_g2_1 NOTYPE false $notificationurl + a1pms_api_get_policy 200 5100 testdata/STD/pi1_template.json "service10" ricsim_g2_1 NOTYPE false $notificationurl - api_get_policy 200 5200 testdata/STD2/pi_qos2_template.json "service10" ricsim_g3_1 STD_QOS2_0.1.0 false $notificationurl + a1pms_api_get_policy 200 5200 testdata/STD2/pi_qos2_template.json "service10" ricsim_g3_1 STD_QOS2_0.1.0 false $notificationurl - api_get_policies 200 ricsim_g1_1 "service10" 1 5000 ricsim_g1_1 "service10" 1 false $notificationurl testdata/OSC/pi1_template.json + a1pms_api_get_policies 200 ricsim_g1_1 "service10" 1 5000 ricsim_g1_1 "service10" 1 false $notificationurl testdata/OSC/pi1_template.json else - api_get_policy 200 5000 testdata/OSC/pi1_template.json + a1pms_api_get_policy 200 5000 testdata/OSC/pi1_template.json - api_get_policy 200 5100 testdata/STD/pi1_template.json + a1pms_api_get_policy 200 5100 testdata/STD/pi1_template.json - api_get_policies 200 ricsim_g1_1 "service10" 1 5000 ricsim_g1_1 "service10" 1 testdata/OSC/pi1_template.json + a1pms_api_get_policies 200 ricsim_g1_1 "service10" 1 5000 ricsim_g1_1 "service10" 1 testdata/OSC/pi1_template.json fi - deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" + deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" #kept until decision - #api_delete_policy 404 2000 + #a1pms_api_delete_policy 404 2000 #Allow policy create with unregistered service for now - api_delete_policy 204 2000 + a1pms_api_delete_policy 204 2000 - api_delete_policy 404 1500 + a1pms_api_delete_policy 404 1500 - api_delete_policy 204 5000 + a1pms_api_delete_policy 204 5000 - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then - api_delete_policy 204 5200 + a1pms_api_delete_policy 204 5200 fi - api_equal json:policies 1 + a1pms_equal json:policies 1 - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-instances 1 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-instances 1 else - api_equal json:policy_ids 1 + a1pms_equal json:policy_ids 1 fi - api_delete_policy 204 5100 + a1pms_api_delete_policy 204 5100 - api_equal json:policies 0 + a1pms_equal json:policies 0 - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-instances 0 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-instances 0 else - api_equal json:policy_ids 0 + a1pms_equal json:policy_ids 0 fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then cr_equal 0 received_callbacks 3 fi @@ -589,18 +589,18 @@ for __httpx in $TESTED_PROTOCOLS ; do if [[ $interface = *"SDNC"* ]]; then sim_contains_str ricsim_g1_1 remote_hosts $SDNC_APP_NAME sim_contains_str ricsim_g2_1 remote_hosts $SDNC_APP_NAME - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then sim_contains_str ricsim_g3_1 remote_hosts $SDNC_APP_NAME fi else - sim_contains_str ricsim_g1_1 remote_hosts $POLICY_AGENT_APP_NAME - sim_contains_str ricsim_g2_1 remote_hosts $POLICY_AGENT_APP_NAME - if [ "$PMS_VERSION" == "V2" ]; then - sim_contains_str ricsim_g3_1 remote_hosts $POLICY_AGENT_APP_NAME + sim_contains_str ricsim_g1_1 remote_hosts $A1PMS_APP_NAME + sim_contains_str ricsim_g2_1 remote_hosts $A1PMS_APP_NAME + if [ "$A1PMS_VERSION" == "V2" ]; then + sim_contains_str ricsim_g3_1 remote_hosts $A1PMS_APP_NAME fi fi - check_policy_agent_logs + check_a1pms_logs if [[ $interface = *"SDNC"* ]]; then check_sdnc_logs diff --git a/test/auto-test/FTC110.sh b/test/auto-test/FTC110.sh index 46a44d03..c1c744e0 100755 --- a/test/auto-test/FTC110.sh +++ b/test/auto-test/FTC110.sh @@ -21,10 +21,10 @@ TC_ONELINE_DESCR="Testing of service registration timeouts and keepalive" #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" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM NGW KUBEPROXY" #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES="CP CR MR PA RICSIM KUBEPROXY NGW" +KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM KUBEPROXY NGW" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" @@ -49,7 +49,7 @@ generate_policy_uuid use_cr_http use_simulator_http use_mr_http -use_agent_rest_http +use_a1pms_rest_http clean_environment @@ -57,7 +57,7 @@ start_kube_proxy 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 +if [ "$A1PMS_VERSION" == "V2" ]; then start_ric_simulators ricsim_g3 1 STD_2.0.0 fi @@ -71,207 +71,207 @@ if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE fi -start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE +start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE prepare_consul_config NOSDNC ".consul_config.json" if [ $RUNMODE == "KUBE" ]; then - agent_load_config ".consul_config.json" + a1pms_load_config ".consul_config.json" else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then - api_put_configuration 200 ".consul_config.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + a1pms_api_put_configuration 200 ".consul_config.json" else start_consul_cbs consul_config_app ".consul_config.json" fi fi -set_agent_debug +set_a1pms_debug mr_equal requests_submitted 0 -#Check agent alive -api_get_status 200 +#Check a1pms alive +a1pms_api_get_status 200 #Print simulator interface version sim_print ricsim_g1_1 interface sim_print ricsim_g2_1 interface -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then sim_print ricsim_g3_1 interface fi -api_put_service 201 "service1" 15 "$CR_SERVICE_APP_PATH_0/service1" +a1pms_api_put_service 201 "service1" 15 "$CR_SERVICE_APP_PATH_0/service1" -api_get_services 200 "service1" "service1" 15 "$CR_SERVICE_APP_PATH_0/service1" +a1pms_api_get_services 200 "service1" "service1" 15 "$CR_SERVICE_APP_PATH_0/service1" -api_put_service 201 "service2" 120 "$CR_SERVICE_APP_PATH_0/service2" +a1pms_api_put_service 201 "service2" 120 "$CR_SERVICE_APP_PATH_0/service2" -api_get_services 200 "service2" "service2" 120 "$CR_SERVICE_APP_PATH_0/service2" +a1pms_api_get_services 200 "service2" "service2" 120 "$CR_SERVICE_APP_PATH_0/service2" -api_put_service 200 "service1" 50 "$CR_SERVICE_APP_PATH_0/service1" -api_put_service 200 "service2" 180 "$CR_SERVICE_APP_PATH_0/service2" +a1pms_api_put_service 200 "service1" 50 "$CR_SERVICE_APP_PATH_0/service1" +a1pms_api_put_service 200 "service2" 180 "$CR_SERVICE_APP_PATH_0/service2" -api_get_services 200 "service1" "service1" 50 "$CR_SERVICE_APP_PATH_0/service1" -api_get_services 200 "service2" "service2" 180 "$CR_SERVICE_APP_PATH_0/service2" +a1pms_api_get_services 200 "service1" "service1" 50 "$CR_SERVICE_APP_PATH_0/service1" +a1pms_api_get_services 200 "service2" "service2" 180 "$CR_SERVICE_APP_PATH_0/service2" -api_get_service_ids 200 "service1" "service2" +a1pms_api_get_service_ids 200 "service1" "service2" sleep_wait 30 "Waiting for keep alive timeout" -api_get_services 200 "service1" "service1" 50 "$CR_SERVICE_APP_PATH_0/service1" -api_get_services 200 "service2" "service2" 180 "$CR_SERVICE_APP_PATH_0/service2" +a1pms_api_get_services 200 "service1" "service1" 50 "$CR_SERVICE_APP_PATH_0/service1" +a1pms_api_get_services 200 "service2" "service2" 180 "$CR_SERVICE_APP_PATH_0/service2" sleep_wait 100 "Waiting for keep alive timeout" -api_get_services 404 "service1" -api_get_services 200 "service2" "service2" 180 "$CR_SERVICE_APP_PATH_0/service2" +a1pms_api_get_services 404 "service1" +a1pms_api_get_services 200 "service2" "service2" 180 "$CR_SERVICE_APP_PATH_0/service2" -api_delete_services 204 "service2" +a1pms_api_delete_services 204 "service2" -api_get_services 404 "service1" -api_get_services 404 "service2" +a1pms_api_get_services 404 "service1" +a1pms_api_get_services 404 "service2" -api_put_service 201 "service3" 60 "$CR_SERVICE_APP_PATH_0/service3" +a1pms_api_put_service 201 "service3" 60 "$CR_SERVICE_APP_PATH_0/service3" -api_get_services 200 "service3" "service3" 60 "$CR_SERVICE_APP_PATH_0/service3" +a1pms_api_get_services 200 "service3" "service3" 60 "$CR_SERVICE_APP_PATH_0/service3" sleep_wait 30 "Waiting for keep alive timeout" -api_put_service 200 "service3" 60 "$CR_SERVICE_APP_PATH_0/service3" +a1pms_api_put_service 200 "service3" 60 "$CR_SERVICE_APP_PATH_0/service3" sleep_wait 100 "Waiting for keep alive timeout" -api_get_services 404 "service3" +a1pms_api_get_services 404 "service3" -api_put_service 201 "service4" 120 "$CR_SERVICE_APP_PATH_0/service4" +a1pms_api_put_service 201 "service4" 120 "$CR_SERVICE_APP_PATH_0/service4" sleep_wait 60 "Waiting for keep alive timeout" -api_get_services 200 "service4" "service4" 120 "$CR_SERVICE_APP_PATH_0/service4" +a1pms_api_get_services 200 "service4" "service4" 120 "$CR_SERVICE_APP_PATH_0/service4" -api_put_services_keepalive 200 "service4" +a1pms_api_put_services_keepalive 200 "service4" sleep_wait 90 "Waiting for keep alive timeout" -api_get_services 200 "service4" "service4" 120 "$CR_SERVICE_APP_PATH_0/service4" +a1pms_api_get_services 200 "service4" "service4" 120 "$CR_SERVICE_APP_PATH_0/service4" -api_delete_services 204 "service4" +a1pms_api_delete_services 204 "service4" -api_get_services 404 "service4" +a1pms_api_get_services 404 "service4" -api_get_services 404 "service1" -api_get_services 404 "service2" -api_get_services 404 "service3" +a1pms_api_get_services 404 "service1" +a1pms_api_get_services 404 "service2" +a1pms_api_get_services 404 "service3" -api_get_service_ids 200 +a1pms_api_get_service_ids 200 -api_delete_services 404 "service1" -api_delete_services 404 "service2" -api_delete_services 404 "service3" -api_delete_services 404 "service4" +a1pms_api_delete_services 404 "service1" +a1pms_api_delete_services 404 "service2" +a1pms_api_delete_services 404 "service3" +a1pms_api_delete_services 404 "service4" -api_put_services_keepalive 404 "service1" -api_put_services_keepalive 404 "service2" -api_put_services_keepalive 404 "service3" -api_put_services_keepalive 404 "service4" +a1pms_api_put_services_keepalive 404 "service1" +a1pms_api_put_services_keepalive 404 "service2" +a1pms_api_put_services_keepalive 404 "service3" +a1pms_api_put_services_keepalive 404 "service4" # Policy delete after timeout -api_put_service 201 "service10" 600 "$CR_SERVICE_APP_PATH_0/service10" +a1pms_api_put_service 201 "service10" 600 "$CR_SERVICE_APP_PATH_0/service10" sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then sim_put_policy_type 201 ricsim_g3_1 STD_QOS2_0.1.0 testdata/STD2/sim_qos2.json - api_equal json:rics 3 300 + a1pms_equal json:rics 3 300 - #api_equal json:policy_schemas 2 120 + #a1pms_equal json:policy_schemas 2 120 - api_equal json:policy-types 3 120 + a1pms_equal json:policy-types 3 120 - api_equal json:policies 0 + a1pms_equal json:policies 0 else - api_equal json:rics 2 300 + a1pms_equal json:rics 2 300 - api_equal json:policy_schemas 2 120 + a1pms_equal json:policy_schemas 2 120 - api_equal json:policy_types 2 + a1pms_equal json:policy_types 2 - api_equal json:policies 0 + a1pms_equal json:policies 0 fi -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then notificationurl=$CR_SERVICE_APP_PATH_0"/test" else notificationurl="" fi -api_put_policy 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json -api_put_policy 201 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json +a1pms_api_put_policy 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json +a1pms_api_put_policy 201 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json -if [ "$PMS_VERSION" == "V2" ]; then - api_put_policy 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json - api_equal json:policies 3 +if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_put_policy 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json + a1pms_equal json:policies 3 else - api_equal json:policies 2 + a1pms_equal json:policies 2 fi sim_equal ricsim_g1_1 num_instances 1 sim_equal ricsim_g2_1 num_instances 1 -api_put_policy 201 "service10" ricsim_g1_1 1 5001 true $notificationurl testdata/OSC/pi1_template.json -api_put_policy 201 "service10" ricsim_g2_1 NOTYPE 5101 true $notificationurl testdata/STD/pi1_template.json +a1pms_api_put_policy 201 "service10" ricsim_g1_1 1 5001 true $notificationurl testdata/OSC/pi1_template.json +a1pms_api_put_policy 201 "service10" ricsim_g2_1 NOTYPE 5101 true $notificationurl testdata/STD/pi1_template.json -if [ "$PMS_VERSION" == "V2" ]; then - api_put_policy 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5201 true $notificationurl testdata/STD2/pi_qos2_template.json - api_equal json:policies 6 +if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_api_put_policy 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5201 true $notificationurl testdata/STD2/pi_qos2_template.json + a1pms_equal json:policies 6 else - api_equal json:policies 4 + a1pms_equal json:policies 4 fi sim_equal ricsim_g1_1 num_instances 2 sim_equal ricsim_g2_1 num_instances 2 -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then sim_equal ricsim_g3_1 num_instances 2 fi sim_post_delete_instances 200 ricsim_g1_1 sim_post_delete_instances 200 ricsim_g2_1 -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then sim_post_delete_instances 200 ricsim_g3_1 fi #Wait for recreate of non transient policy -if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policies 3 180 +if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policies 3 180 else - api_equal json:policies 2 180 + a1pms_equal json:policies 2 180 fi sim_equal ricsim_g1_1 num_instances 1 sim_equal ricsim_g2_1 num_instances 1 -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then sim_equal ricsim_g3_1 num_instances 1 fi -api_put_service 200 "service10" 10 "$CR_SERVICE_APP_PATH_0/service10" +a1pms_api_put_service 200 "service10" 10 "$CR_SERVICE_APP_PATH_0/service10" #Wait for service expiry -api_equal json:policies 0 120 +a1pms_equal json:policies 0 120 sim_equal ricsim_g1_1 num_instances 0 sim_equal ricsim_g2_1 num_instances 0 -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then sim_equal ricsim_g3_1 num_instances 0 fi -api_get_service_ids 200 +a1pms_api_get_service_ids 200 mr_equal requests_submitted 0 -check_policy_agent_logs +check_a1pms_logs #### TEST COMPLETE #### diff --git a/test/auto-test/FTC1100.sh b/test/auto-test/FTC1100.sh index 265db075..ce95a774 100755 --- a/test/auto-test/FTC1100.sh +++ b/test/auto-test/FTC1100.sh @@ -76,7 +76,7 @@ if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE fi -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then start_ric_simulators ricsim_g3 4 STD_2.0.0 fi diff --git a/test/auto-test/FTC150.sh b/test/auto-test/FTC150.sh index 5219e1b3..cfb1751a 100755 --- a/test/auto-test/FTC150.sh +++ b/test/auto-test/FTC150.sh @@ -18,7 +18,7 @@ # -TC_ONELINE_DESCR="Sample tests of the SDNC A1 controller restconf API using http/https (no agent)" +TC_ONELINE_DESCR="Sample tests of the SDNC A1 controller restconf API using http/https (no a1pms)" #App names to include in the test when running docker, space separated list DOCKER_INCLUDED_IMAGES="RICSIM SDNC KUBEPROXY" @@ -45,7 +45,7 @@ setup_testenvironment generate_policy_uuid -#Test agent and simulator protocol versions (others are http only) +#Test a1pms and simulator protocol versions (others are http only) NB_TESTED_PROTOCOLS="HTTP HTTPS" SB_TESTED_PROTOCOLS="HTTP HTTPS" @@ -66,7 +66,7 @@ for __nb_httpx in $NB_TESTED_PROTOCOLS ; do 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 + if [ "$A1PMS_VERSION" == "V2" ]; then start_ric_simulators ricsim_g3 1 STD_2.0.0 fi diff --git a/test/auto-test/FTC2001.sh b/test/auto-test/FTC2001.sh index c09bbadf..6c9c27b3 100755 --- a/test/auto-test/FTC2001.sh +++ b/test/auto-test/FTC2001.sh @@ -17,13 +17,13 @@ # ============LICENSE_END================================================= # -TC_ONELINE_DESCR="Testing southbound proxy for PMS and ICS" +TC_ONELINE_DESCR="Testing southbound proxy for A1PMS and ICS" #App names to include in the test when running docker, space separated list -DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM ICS PRODSTUB HTTPPROXY NGW KUBEPROXY" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM ICS PRODSTUB HTTPPROXY NGW KUBEPROXY" #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES=" MR CR PA PRODSTUB RICSIM CP ICS HTTPPROXY KUBEPROXY NGW" +KUBE_INCLUDED_IMAGES=" MR CR A1PMS PRODSTUB RICSIM CP ICS HTTPPROXY KUBEPROXY NGW" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" @@ -47,15 +47,15 @@ setup_testenvironment ########################## use_cr_https -use_agent_rest_https +use_a1pms_rest_https use_simulator_https use_ics_rest_https use_prod_stub_https -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then notificationurl=$CR_SERVICE_APP_PATH_0"/test" else - echo "PMS VERSION 2 (V2) is required" + echo "A1PMS VERSION 2 (V2) is required" exit 1 fi @@ -69,7 +69,7 @@ start_http_proxy start_ric_simulators $RIC_SIM_PREFIX"_g3" $STD_NUM_RICS STD_2.0.0 -start_mr #Just to prevent errors in the agent log... +start_mr #Just to prevent errors in the a1pms log... start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE @@ -77,15 +77,15 @@ if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE fi -start_policy_agent PROXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE +start_a1pms PROXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE prepare_consul_config NOSDNC ".consul_config.json" if [ $RUNMODE == "KUBE" ]; then - agent_load_config ".consul_config.json" + a1pms_load_config ".consul_config.json" else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then - api_put_configuration 200 ".consul_config.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + a1pms_api_put_configuration 200 ".consul_config.json" else start_consul_cbs consul_config_app ".consul_config.json" @@ -98,11 +98,11 @@ start_prod_stub start_ics PROXY $SIM_GROUP/$ICS_COMPOSE_DIR/$ICS_CONFIG_FILE -set_agent_trace +set_a1pms_trace set_ics_debug -api_get_status 200 +a1pms_api_get_status 200 # Print the A1 version for STD 2.X for ((i=1; i<=$STD_NUM_RICS; i++)) @@ -117,32 +117,32 @@ do done #Check the number of schemas and the individual schemas in STD -api_equal json:policy-types 2 120 +a1pms_equal json:policy-types 2 120 for ((i=1; i<=$STD_NUM_RICS; i++)) do - api_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g3_"$i 2 120 + a1pms_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g3_"$i 2 120 done # Check the schemas in STD for ((i=1; i<=$STD_NUM_RICS; i++)) do - api_get_policy_type 200 STD_QOS_0_2_0 demo-testdata/STD2/qos-agent-modified.json - api_get_policy_type 200 'STD_QOS2_0.1.0' demo-testdata/STD2/qos2-agent-modified.json + a1pms_api_get_policy_type 200 STD_QOS_0_2_0 demo-testdata/STD2/qos-a1pms-modified.json + a1pms_api_get_policy_type 200 'STD_QOS2_0.1.0' demo-testdata/STD2/qos2-a1pms-modified.json done #Check the number of types -api_equal json:policy-types 2 300 +a1pms_equal json:policy-types 2 300 -api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/1" +a1pms_api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/1" # Create policies in STD for ((i=1; i<=$STD_NUM_RICS; i++)) do generate_policy_uuid - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i STD_QOS_0_2_0 $((2300+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i STD_QOS_0_2_0 $((2300+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 generate_policy_uuid - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i 'STD_QOS2_0.1.0' $((2400+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i 'STD_QOS2_0.1.0' $((2400+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 done @@ -272,7 +272,7 @@ fi cr_contains_str 0 remote_hosts $HTTP_PROXY_APP_NAME -check_policy_agent_logs +check_a1pms_logs check_ics_logs #### TEST COMPLETE #### diff --git a/test/auto-test/FTC2002.sh b/test/auto-test/FTC2002.sh index 28c8fa70..07a7a686 100755 --- a/test/auto-test/FTC2002.sh +++ b/test/auto-test/FTC2002.sh @@ -44,7 +44,7 @@ setup_testenvironment generate_policy_uuid -#Test agent and simulator protocol versions (others are http only) +#Test a1pms and simulator protocol versions (others are http only) NB_TESTED_PROTOCOLS="HTTP HTTPS" SB_TESTED_PROTOCOLS="HTTP HTTPS" @@ -72,7 +72,7 @@ for __nb_httpx in $NB_TESTED_PROTOCOLS ; do 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 + if [ "$A1PMS_VERSION" == "V2" ]; then start_ric_simulators ricsim_g3 1 STD_2.0.0 fi diff --git a/test/auto-test/FTC300.sh b/test/auto-test/FTC300.sh index 2d9e9f92..14586734 100755 --- a/test/auto-test/FTC300.sh +++ b/test/auto-test/FTC300.sh @@ -20,10 +20,10 @@ TC_ONELINE_DESCR="Resync 10000 policies using OSC and STD interface" #App names to include in the test when running docker, space separated list -DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC NGW KUBEPROXY" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM SDNC NGW KUBEPROXY" #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES="CP CR MR PA RICSIM SDNC KUBEPROXY NGW" +KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC KUBEPROXY NGW" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" @@ -47,7 +47,7 @@ generate_policy_uuid # Tested variants of REST/DMAAP/SDNC config TESTED_VARIANTS="REST DMAAP REST+SDNC DMAAP+SDNC DMAAP_BATCH DMAAP_BATCH+SDNC" -#Test agent and simulator protocol versions (others are http only) +#Test a1pms and simulator protocol versions (others are http only) TESTED_PROTOCOLS="HTTP HTTPS" for __httpx in $TESTED_PROTOCOLS ; do @@ -55,7 +55,7 @@ for __httpx in $TESTED_PROTOCOLS ; do echo "#####################################################################" echo "#####################################################################" - echo "### Testing agent: "$interface" and "$__httpx + echo "### Testing a1pms: "$interface" and "$__httpx echo "#####################################################################" echo "#####################################################################" @@ -67,9 +67,9 @@ for __httpx in $TESTED_PROTOCOLS ; do use_sdnc_https fi if [[ $interface = *"DMAAP"* ]]; then - use_agent_dmaap_https + use_a1pms_dmaap_https else - use_agent_rest_https + use_a1pms_rest_https fi else use_cr_http @@ -79,9 +79,9 @@ for __httpx in $TESTED_PROTOCOLS ; do use_sdnc_http fi if [[ $interface = *"DMAAP"* ]]; then - use_agent_dmaap_http + use_a1pms_dmaap_http else - use_agent_rest_http + use_a1pms_rest_http fi fi @@ -94,7 +94,7 @@ for __httpx in $TESTED_PROTOCOLS ; do start_ric_simulators ricsim_g2 4 STD_1.1.3 - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then start_ric_simulators ricsim_g3 4 STD_2.0.0 fi @@ -108,9 +108,9 @@ for __httpx in $TESTED_PROTOCOLS ; do start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE fi - start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE + start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE - set_agent_debug + set_a1pms_debug if [[ $interface = *"SDNC"* ]]; then start_sdnc @@ -120,27 +120,27 @@ for __httpx in $TESTED_PROTOCOLS ; do fi if [ $RUNMODE == "KUBE" ]; then - agent_load_config ".consul_config.json" + a1pms_load_config ".consul_config.json" else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then #Temporary switch to http/https if dmaap use. Otherwise it is not possibble to push config if [ $__httpx == "HTTPS" ]; then - use_agent_rest_https + use_a1pms_rest_https else - use_agent_rest_http + use_a1pms_rest_http fi - api_put_configuration 200 ".consul_config.json" + a1pms_api_put_configuration 200 ".consul_config.json" if [ $__httpx == "HTTPS" ]; then if [[ $interface = *"DMAAP"* ]]; then - use_agent_dmaap_https + use_a1pms_dmaap_https else - use_agent_rest_https + use_a1pms_rest_https fi else if [[ $interface = *"DMAAP"* ]]; then - use_agent_dmaap_http + use_a1pms_dmaap_http else - use_agent_rest_http + use_a1pms_rest_http fi fi else @@ -149,39 +149,39 @@ for __httpx in $TESTED_PROTOCOLS ; do fi fi - api_get_status 200 + a1pms_api_get_status 200 sim_print ricsim_g1_1 interface sim_print ricsim_g2_1 interface - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then sim_print ricsim_g3_1 interface fi sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 2 120 #Wait for the agent to refresh types from the simulator + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-types 2 120 #Wait for the a1pms to refresh types from the simulator else - api_equal json:policy_types 2 120 #Wait for the agent to refresh types from the simulator + a1pms_equal json:policy_types 2 120 #Wait for the a1pms to refresh types from the simulator fi - api_put_service 201 "serv1" 3600 "$CR_SERVICE_APP_PATH_0/1" + a1pms_api_put_service 201 "serv1" 3600 "$CR_SERVICE_APP_PATH_0/1" START_ID=2000 NUM_POLICIES=10000 # Must be at least 100 - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then notificationurl=$CR_SERVICE_APP_PATH_0"/test" else notificationurl="" fi if [[ $interface == *"BATCH"* ]]; then - api_put_policy_batch 201 "serv1" ricsim_g1_1 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES + a1pms_api_put_policy_batch 201 "serv1" ricsim_g1_1 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES else - api_put_policy 201 "serv1" ricsim_g1_1 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES + a1pms_api_put_policy 201 "serv1" ricsim_g1_1 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES fi sim_equal ricsim_g1_1 num_instances $NUM_POLICIES @@ -200,9 +200,9 @@ for __httpx in $TESTED_PROTOCOLS ; do START_ID2=$(($START_ID+$NUM_POLICIES)) if [[ $interface == *"BATCH"* ]]; then - api_put_policy_batch 201 "serv1" ricsim_g2_1 NOTYPE $START_ID2 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_POLICIES + a1pms_api_put_policy_batch 201 "serv1" ricsim_g2_1 NOTYPE $START_ID2 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_POLICIES else - api_put_policy 201 "serv1" ricsim_g2_1 NOTYPE $START_ID2 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_POLICIES + a1pms_api_put_policy 201 "serv1" ricsim_g2_1 NOTYPE $START_ID2 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_POLICIES fi sim_equal ricsim_g2_1 num_instances $NUM_POLICIES @@ -216,9 +216,9 @@ for __httpx in $TESTED_PROTOCOLS ; do sim_equal ricsim_g2_1 num_instances $NUM_POLICIES 300 fi - api_delete_policy 204 $(($START_ID+47)) + a1pms_api_delete_policy 204 $(($START_ID+47)) - api_delete_policy 204 $(($START_ID+$NUM_POLICIES-39)) + a1pms_api_delete_policy 204 $(($START_ID+$NUM_POLICIES-39)) sim_post_delete_instances 200 ricsim_g1_1 @@ -229,11 +229,11 @@ for __httpx in $TESTED_PROTOCOLS ; do sim_equal ricsim_g1_1 num_instances $(($NUM_POLICIES-2)) 300 fi - api_delete_policy 204 $(($START_ID2+37)) + a1pms_api_delete_policy 204 $(($START_ID2+37)) - api_delete_policy 204 $(($START_ID2+$NUM_POLICIES-93)) + a1pms_api_delete_policy 204 $(($START_ID2+$NUM_POLICIES-93)) - api_delete_policy 204 $(($START_ID2+$NUM_POLICIES-91)) + a1pms_api_delete_policy 204 $(($START_ID2+$NUM_POLICIES-91)) sim_post_delete_instances 200 ricsim_g2_1 @@ -248,14 +248,14 @@ for __httpx in $TESTED_PROTOCOLS ; do sim_equal ricsim_g2_1 num_instances $(($NUM_POLICIES-3)) 300 fi - api_equal json:policies $(($NUM_POLICIES-2+$NUM_POLICIES-3)) + a1pms_equal json:policies $(($NUM_POLICIES-2+$NUM_POLICIES-3)) if [[ $interface = *"SDNC"* ]]; then check_sdnc_logs fi - check_policy_agent_logs + check_a1pms_logs check_sdnc_logs store_logs "${__httpx}__${interface}" diff --git a/test/auto-test/FTC310.sh b/test/auto-test/FTC310.sh index 767dc4ff..c6f063a4 100755 --- a/test/auto-test/FTC310.sh +++ b/test/auto-test/FTC310.sh @@ -21,7 +21,7 @@ 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 KUBEPROXY" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM KUBEPROXY" #Ignore image in DOCKER_INCLUDED_IMAGES, KUBE_INCLUDED_IMAGES if #the image is not configured in the supplied env_file @@ -39,9 +39,9 @@ setup_testenvironment #### TEST BEGIN #### -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then TESTED_VARIANTS="CONSUL NOCONSUL" - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then TESTED_VARIANTS="NOCONSUL" fi else @@ -56,18 +56,18 @@ for consul_conf in $TESTED_VARIANTS ; do start_kube_proxy - start_policy_agent NOPROXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE + start_a1pms NOPROXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE - set_agent_trace + set_a1pms_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" + # Must use rest towards the a1pms since dmaap is not configured yet + a1pms_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 + if [ "$A1PMS_VERSION" == "V2" ]; then start_ric_simulators ricsim_g3 1 STD_2.0.0 fi @@ -83,71 +83,71 @@ for consul_conf in $TESTED_VARIANTS ; do 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" + if [ "$A1PMS_VERSION" == "V2" ] && [ $consul_conf == "NOCONSUL" ]; then + a1pms_api_put_configuration 200 ".consul_config.json" + a1pms_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 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_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 + a1pms_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" + if [ "$A1PMS_VERSION" == "V2" ] && [ $consul_conf == "NOCONSUL" ]; then + a1pms_api_put_configuration 200 ".consul_config.json" + a1pms_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 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_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 + a1pms_equal json:rics 3 120 fi - check_policy_agent_logs + check_a1pms_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" + if [ "$A1PMS_VERSION" == "V2" ] && [ $consul_conf == "NOCONSUL" ]; then + a1pms_api_put_configuration 200 ".consul_config.json" + a1pms_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 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:rics 3 120 cr_equal 0 received_callbacks 4 120 else - api_equal json:rics 2 120 + a1pms_equal json:rics 2 120 fi - if [ "$PMS_VERSION" == "V2" ] && [ $consul_conf == "NOCONSUL" ]; then - api_get_configuration 200 ".consul_config.json" + if [ "$A1PMS_VERSION" == "V2" ] && [ $consul_conf == "NOCONSUL" ]; then + a1pms_api_get_configuration 200 ".consul_config.json" fi - check_policy_agent_logs + check_a1pms_logs store_logs END_$consul_conf done diff --git a/test/auto-test/FTC350.sh b/test/auto-test/FTC350.sh index c7222457..8cee8e5d 100755 --- a/test/auto-test/FTC350.sh +++ b/test/auto-test/FTC350.sh @@ -20,10 +20,10 @@ TC_ONELINE_DESCR="Change supported policy types and reconfigure rics" #App names to include in the test when running docker, space separated list -DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC KUBEPROXY" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM SDNC KUBEPROXY" #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES="CP CR MR PA RICSIM SDNC KUBEPROXY" +KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC KUBEPROXY" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" @@ -57,7 +57,7 @@ for interface in $TESTED_VARIANTS ; do echo "#####################################################################" echo "#####################################################################" - echo "### Testing agent: "$interface + echo "### Testing a1pms: "$interface echo "#####################################################################" echo "#####################################################################" @@ -76,7 +76,7 @@ for interface in $TESTED_VARIANTS ; do start_mr if [ $RUNMODE == "DOCKER" ]; then - if [[ "$PMS_FEATURE_LEVEL" != *"NOCONSUL"* ]]; then + if [[ "$A1PMS_FEATURE_LEVEL" != *"NOCONSUL"* ]]; then start_consul_cbs fi fi @@ -98,32 +98,32 @@ for interface in $TESTED_VARIANTS ; do prepare_consul_config NOSDNC ".consul_config_all.json" fi - if [ $RUNMODE == "KUBE" ] && [[ "$PMS_FEATURE_LEVEL" == *"INITIALCONFIGMAP"* ]]; then - start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/application2.yaml + if [ $RUNMODE == "KUBE" ] && [[ "$A1PMS_FEATURE_LEVEL" == *"INITIALCONFIGMAP"* ]]; then + start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/application2.yaml else - start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE + start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE fi - set_agent_trace + set_a1pms_trace - api_get_status 200 + a1pms_api_get_status 200 # 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" + # Must use rest towards the a1pms since dmaap is not configured yet + a1pms_api_put_service 201 "ric-registration" 0 "$CR_SERVICE_APP_PATH_0/ric-registration" #Load first config if [ $RUNMODE == "KUBE" ]; then - if [[ "$PMS_FEATURE_LEVEL" == *"INITIALCONFIGMAP"* ]]; then - api_put_configuration 200 ".consul_config_initial.json" - api_get_configuration 200 ".consul_config_initial.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"INITIALCONFIGMAP"* ]]; then + a1pms_api_put_configuration 200 ".consul_config_initial.json" + a1pms_api_get_configuration 200 ".consul_config_initial.json" else - agent_load_config ".consul_config_initial.json" + a1pms_load_config ".consul_config_initial.json" fi else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then - api_put_configuration 200 ".consul_config_initial.json" - api_get_configuration 200 ".consul_config_initial.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + a1pms_api_put_configuration 200 ".consul_config_initial.json" + a1pms_api_get_configuration 200 ".consul_config_initial.json" else consul_config_app ".consul_config_initial.json" fi @@ -135,14 +135,14 @@ for interface in $TESTED_VARIANTS ; do done # All sims running but 2 are not configured in consul - api_equal json:rics 8 300 + a1pms_equal json:rics 8 300 - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then cr_equal 0 received_callbacks?id=ric-registration 8 120 cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_1 ricsim_g1_2 ricsim_g1_3 ricsim_g1_4 ricsim_g1_5 ricsim_g1_6 ricsim_g1_7 ricsim_g1_8 fi - api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:NOTYPE:???? \ + a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:NOTYPE:???? \ ricsim_g1_2:me1_ricsim_g1_2,me2_ricsim_g1_2:NOTYPE:???? \ ricsim_g1_3:me1_ricsim_g1_3,me2_ricsim_g1_3:NOTYPE:???? \ ricsim_g1_4:me1_ricsim_g1_4,me2_ricsim_g1_4:NOTYPE:???? \ @@ -181,33 +181,33 @@ for interface in $TESTED_VARIANTS ; do sim_put_policy_type 201 ricsim_g1_7 5 testdata/OSC/sim_5.json sim_put_policy_type 201 ricsim_g1_8 5 testdata/OSC/sim_5.json - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 5 120 - - echo "Check the number of types in the agent for each ric" - api_equal json:policy-types?ric_id=ricsim_g1_1 1 120 - api_equal json:policy-types?ric_id=ricsim_g1_2 2 120 - api_equal json:policy-types?ric_id=ricsim_g1_3 3 120 - api_equal json:policy-types?ric_id=ricsim_g1_4 4 120 - api_equal json:policy-types?ric_id=ricsim_g1_5 5 120 - api_equal json:policy-types?ric_id=ricsim_g1_6 4 120 - api_equal json:policy-types?ric_id=ricsim_g1_7 3 120 - api_equal json:policy-types?ric_id=ricsim_g1_8 2 120 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-types 5 120 + + echo "Check the number of types in the a1pms for each ric" + a1pms_equal json:policy-types?ric_id=ricsim_g1_1 1 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_2 2 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_3 3 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_4 4 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_5 5 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_6 4 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_7 3 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_8 2 120 else - api_equal json:policy_types 5 120 - - echo "Check the number of types in the agent for each ric" - api_equal json:policy_types?ric=ricsim_g1_1 1 120 - api_equal json:policy_types?ric=ricsim_g1_2 2 120 - api_equal json:policy_types?ric=ricsim_g1_3 3 120 - api_equal json:policy_types?ric=ricsim_g1_4 4 120 - api_equal json:policy_types?ric=ricsim_g1_5 5 120 - api_equal json:policy_types?ric=ricsim_g1_6 4 120 - api_equal json:policy_types?ric=ricsim_g1_7 3 120 - api_equal json:policy_types?ric=ricsim_g1_8 2 120 + a1pms_equal json:policy_types 5 120 + + echo "Check the number of types in the a1pms for each ric" + a1pms_equal json:policy_types?ric=ricsim_g1_1 1 120 + a1pms_equal json:policy_types?ric=ricsim_g1_2 2 120 + a1pms_equal json:policy_types?ric=ricsim_g1_3 3 120 + a1pms_equal json:policy_types?ric=ricsim_g1_4 4 120 + a1pms_equal json:policy_types?ric=ricsim_g1_5 5 120 + a1pms_equal json:policy_types?ric=ricsim_g1_6 4 120 + a1pms_equal json:policy_types?ric=ricsim_g1_7 3 120 + a1pms_equal json:policy_types?ric=ricsim_g1_8 2 120 fi - api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ + a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ ricsim_g1_2:me1_ricsim_g1_2,me2_ricsim_g1_2:1,2:???? \ ricsim_g1_3:me1_ricsim_g1_3,me2_ricsim_g1_3:1,2,3:???? \ ricsim_g1_4:me1_ricsim_g1_4,me2_ricsim_g1_4:1,2,3,4:???? \ @@ -216,70 +216,70 @@ for interface in $TESTED_VARIANTS ; do ricsim_g1_7:me1_ricsim_g1_7,me2_ricsim_g1_7:3,4,5:???? \ ricsim_g1_8:me1_ricsim_g1_8,me2_ricsim_g1_8:4,5:???? " - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then cr_equal 0 received_callbacks?id=ric-registration 16 120 cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_1 ricsim_g1_2 ricsim_g1_3 ricsim_g1_4 ricsim_g1_5 ricsim_g1_6 ricsim_g1_7 ricsim_g1_8 fi #Load config with all rics if [ $RUNMODE == "KUBE" ]; then - if [[ "$PMS_FEATURE_LEVEL" == *"INITIALCONFIGMAP"* ]]; then - api_put_configuration 200 ".consul_config_all.json" - api_get_configuration 200 ".consul_config_all.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"INITIALCONFIGMAP"* ]]; then + a1pms_api_put_configuration 200 ".consul_config_all.json" + a1pms_api_get_configuration 200 ".consul_config_all.json" else - agent_load_config ".consul_config_all.json" + a1pms_load_config ".consul_config_all.json" fi else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then - api_put_configuration 200 ".consul_config_all.json" - api_get_configuration 200 ".consul_config_all.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + a1pms_api_put_configuration 200 ".consul_config_all.json" + a1pms_api_get_configuration 200 ".consul_config_all.json" else consul_config_app ".consul_config_all.json" fi fi - api_equal json:rics 10 120 + a1pms_equal json:rics 10 120 - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then cr_equal 0 received_callbacks?id=ric-registration 18 120 cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_9 ricsim_g1_10 fi sim_put_policy_type 201 ricsim_g1_9 5 testdata/OSC/sim_5.json - if [ "$PMS_VERSION" == "V2" ]; then - - api_equal json:policy-types 5 120 - - echo "Check the number of types in the agent for each ric" - api_equal json:policy-types?ric_id=ricsim_g1_1 1 120 - api_equal json:policy-types?ric_id=ricsim_g1_2 2 120 - api_equal json:policy-types?ric_id=ricsim_g1_3 3 120 - api_equal json:policy-types?ric_id=ricsim_g1_4 4 120 - api_equal json:policy-types?ric_id=ricsim_g1_5 5 120 - api_equal json:policy-types?ric_id=ricsim_g1_6 4 120 - api_equal json:policy-types?ric_id=ricsim_g1_7 3 120 - api_equal json:policy-types?ric_id=ricsim_g1_8 2 120 - api_equal json:policy-types?ric_id=ricsim_g1_9 1 120 - api_equal json:policy-types?ric_id=ricsim_g1_10 0 120 + if [ "$A1PMS_VERSION" == "V2" ]; then + + a1pms_equal json:policy-types 5 120 + + echo "Check the number of types in the a1pms for each ric" + a1pms_equal json:policy-types?ric_id=ricsim_g1_1 1 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_2 2 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_3 3 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_4 4 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_5 5 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_6 4 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_7 3 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_8 2 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_9 1 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_10 0 120 else - api_equal json:policy_types 5 120 - - echo "Check the number of types in the agent for each ric" - api_equal json:policy_types?ric=ricsim_g1_1 1 120 - api_equal json:policy_types?ric=ricsim_g1_2 2 120 - api_equal json:policy_types?ric=ricsim_g1_3 3 120 - api_equal json:policy_types?ric=ricsim_g1_4 4 120 - api_equal json:policy_types?ric=ricsim_g1_5 5 120 - api_equal json:policy_types?ric=ricsim_g1_6 4 120 - api_equal json:policy_types?ric=ricsim_g1_7 3 120 - api_equal json:policy_types?ric=ricsim_g1_8 2 120 - api_equal json:policy_types?ric=ricsim_g1_9 1 120 - api_equal json:policy_types?ric=ricsim_g1_10 0 120 + a1pms_equal json:policy_types 5 120 + + echo "Check the number of types in the a1pms for each ric" + a1pms_equal json:policy_types?ric=ricsim_g1_1 1 120 + a1pms_equal json:policy_types?ric=ricsim_g1_2 2 120 + a1pms_equal json:policy_types?ric=ricsim_g1_3 3 120 + a1pms_equal json:policy_types?ric=ricsim_g1_4 4 120 + a1pms_equal json:policy_types?ric=ricsim_g1_5 5 120 + a1pms_equal json:policy_types?ric=ricsim_g1_6 4 120 + a1pms_equal json:policy_types?ric=ricsim_g1_7 3 120 + a1pms_equal json:policy_types?ric=ricsim_g1_8 2 120 + a1pms_equal json:policy_types?ric=ricsim_g1_9 1 120 + a1pms_equal json:policy_types?ric=ricsim_g1_10 0 120 fi - api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ + a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ ricsim_g1_2:me1_ricsim_g1_2,me2_ricsim_g1_2:1,2:???? \ ricsim_g1_3:me1_ricsim_g1_3,me2_ricsim_g1_3:1,2,3:???? \ ricsim_g1_4:me1_ricsim_g1_4,me2_ricsim_g1_4:1,2,3,4:???? \ @@ -290,22 +290,22 @@ for interface in $TESTED_VARIANTS ; do ricsim_g1_9:me1_ricsim_g1_9,me2_ricsim_g1_9:5:???? \ ricsim_g1_10:me1_ricsim_g1_10,me2_ricsim_g1_10:NOTYPE:???? " - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then cr_equal 0 received_callbacks?id=ric-registration 19 120 cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_9 fi #No policy type in sim #10 - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 5 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-types 5 else - api_equal json:policy_types 5 + a1pms_equal json:policy_types 5 fi - api_put_service 201 "serv1" 3600 "$CR_SERVICE_APP_PATH_0/serv1" + a1pms_api_put_service 201 "serv1" 3600 "$CR_SERVICE_APP_PATH_0/serv1" - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then notificationurl=$CR_SERVICE_APP_PATH_0"/test" else notificationurl="" @@ -315,57 +315,57 @@ for interface in $TESTED_VARIANTS ; do # Load config with reduced number of rics if [ $RUNMODE == "KUBE" ]; then - if [[ "$PMS_FEATURE_LEVEL" == *"INITIALCONFIGMAP"* ]]; then - api_put_configuration 200 ".consul_config_initial.json" - api_get_configuration 200 ".consul_config_initial.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"INITIALCONFIGMAP"* ]]; then + a1pms_api_put_configuration 200 ".consul_config_initial.json" + a1pms_api_get_configuration 200 ".consul_config_initial.json" else - agent_load_config ".consul_config_initial.json" + a1pms_load_config ".consul_config_initial.json" fi else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then - api_put_configuration 200 ".consul_config_initial.json" - api_get_configuration 200 ".consul_config_initial.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + a1pms_api_put_configuration 200 ".consul_config_initial.json" + a1pms_api_get_configuration 200 ".consul_config_initial.json" else consul_config_app ".consul_config_initial.json" fi fi - api_equal json:rics 8 120 + a1pms_equal json:rics 8 120 - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then cr_equal 0 received_callbacks?id=ric-registration 19 120 cr_api_check_all_sync_events 200 0 ric-registration EMPTY fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 5 120 + a1pms_equal json:policy-types 5 120 - echo "Check the number of types in the agent for each ric" - api_equal json:policy-types?ric_id=ricsim_g1_1 1 120 - api_equal json:policy-types?ric_id=ricsim_g1_2 2 120 - api_equal json:policy-types?ric_id=ricsim_g1_3 3 120 - api_equal json:policy-types?ric_id=ricsim_g1_4 4 120 - api_equal json:policy-types?ric_id=ricsim_g1_5 5 120 - api_equal json:policy-types?ric_id=ricsim_g1_6 4 120 - api_equal json:policy-types?ric_id=ricsim_g1_7 3 120 - api_equal json:policy-types?ric_id=ricsim_g1_8 2 120 + echo "Check the number of types in the a1pms for each ric" + a1pms_equal json:policy-types?ric_id=ricsim_g1_1 1 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_2 2 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_3 3 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_4 4 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_5 5 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_6 4 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_7 3 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_8 2 120 else - api_equal json:policy_types 5 120 - - echo "Check the number of types in the agent for each ric" - api_equal json:policy_types?ric=ricsim_g1_1 1 120 - api_equal json:policy_types?ric=ricsim_g1_2 2 120 - api_equal json:policy_types?ric=ricsim_g1_3 3 120 - api_equal json:policy_types?ric=ricsim_g1_4 4 120 - api_equal json:policy_types?ric=ricsim_g1_5 5 120 - api_equal json:policy_types?ric=ricsim_g1_6 4 120 - api_equal json:policy_types?ric=ricsim_g1_7 3 120 - api_equal json:policy_types?ric=ricsim_g1_8 2 120 + a1pms_equal json:policy_types 5 120 + + echo "Check the number of types in the a1pms for each ric" + a1pms_equal json:policy_types?ric=ricsim_g1_1 1 120 + a1pms_equal json:policy_types?ric=ricsim_g1_2 2 120 + a1pms_equal json:policy_types?ric=ricsim_g1_3 3 120 + a1pms_equal json:policy_types?ric=ricsim_g1_4 4 120 + a1pms_equal json:policy_types?ric=ricsim_g1_5 5 120 + a1pms_equal json:policy_types?ric=ricsim_g1_6 4 120 + a1pms_equal json:policy_types?ric=ricsim_g1_7 3 120 + a1pms_equal json:policy_types?ric=ricsim_g1_8 2 120 fi - api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ + a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ ricsim_g1_2:me1_ricsim_g1_2,me2_ricsim_g1_2:1,2:???? \ ricsim_g1_3:me1_ricsim_g1_3,me2_ricsim_g1_3:1,2,3:???? \ ricsim_g1_4:me1_ricsim_g1_4,me2_ricsim_g1_4:1,2,3,4:???? \ @@ -376,66 +376,66 @@ for interface in $TESTED_VARIANTS ; do sleep_wait 120 - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-instances 0 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-instances 0 else - api_equal json:policy_ids 0 + a1pms_equal json:policy_ids 0 fi - api_get_policy_types 404 ricsim_g1_9 + a1pms_api_get_policy_types 404 ricsim_g1_9 # Load config with all rics if [ $RUNMODE == "KUBE" ]; then - if [[ "$PMS_FEATURE_LEVEL" == *"INITIALCONFIGMAP"* ]]; then - api_put_configuration 200 ".consul_config_all.json" - api_get_configuration 200 ".consul_config_all.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"INITIALCONFIGMAP"* ]]; then + a1pms_api_put_configuration 200 ".consul_config_all.json" + a1pms_api_get_configuration 200 ".consul_config_all.json" else - agent_load_config ".consul_config_all.json" + a1pms_load_config ".consul_config_all.json" fi else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then - api_put_configuration 200 ".consul_config_all.json" - api_get_configuration 200 ".consul_config_all.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + a1pms_api_put_configuration 200 ".consul_config_all.json" + a1pms_api_get_configuration 200 ".consul_config_all.json" else consul_config_app ".consul_config_all.json" fi fi - api_equal json:rics 10 120 + a1pms_equal json:rics 10 120 - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 5 120 + a1pms_equal json:policy-types 5 120 - echo "Check the number of types in the agent for each ric" - api_equal json:policy-types?ric_id=ricsim_g1_1 1 120 - api_equal json:policy-types?ric_id=ricsim_g1_2 2 120 - api_equal json:policy-types?ric_id=ricsim_g1_3 3 120 - api_equal json:policy-types?ric_id=ricsim_g1_4 4 120 - api_equal json:policy-types?ric_id=ricsim_g1_5 5 120 - api_equal json:policy-types?ric_id=ricsim_g1_6 4 120 - api_equal json:policy-types?ric_id=ricsim_g1_7 3 120 - api_equal json:policy-types?ric_id=ricsim_g1_8 2 120 - api_equal json:policy-types?ric_id=ricsim_g1_9 1 120 - api_equal json:policy-types?ric_id=ricsim_g1_10 0 120 + echo "Check the number of types in the a1pms for each ric" + a1pms_equal json:policy-types?ric_id=ricsim_g1_1 1 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_2 2 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_3 3 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_4 4 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_5 5 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_6 4 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_7 3 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_8 2 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_9 1 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_10 0 120 else - api_equal json:policy_types 5 120 - - echo "Check the number of types in the agent for each ric" - api_equal json:policy_types?ric=ricsim_g1_1 1 120 - api_equal json:policy_types?ric=ricsim_g1_2 2 120 - api_equal json:policy_types?ric=ricsim_g1_3 3 120 - api_equal json:policy_types?ric=ricsim_g1_4 4 120 - api_equal json:policy_types?ric=ricsim_g1_5 5 120 - api_equal json:policy_types?ric=ricsim_g1_6 4 120 - api_equal json:policy_types?ric=ricsim_g1_7 3 120 - api_equal json:policy_types?ric=ricsim_g1_8 2 120 - api_equal json:policy_types?ric=ricsim_g1_9 1 120 - api_equal json:policy_types?ric=ricsim_g1_10 0 120 + a1pms_equal json:policy_types 5 120 + + echo "Check the number of types in the a1pms for each ric" + a1pms_equal json:policy_types?ric=ricsim_g1_1 1 120 + a1pms_equal json:policy_types?ric=ricsim_g1_2 2 120 + a1pms_equal json:policy_types?ric=ricsim_g1_3 3 120 + a1pms_equal json:policy_types?ric=ricsim_g1_4 4 120 + a1pms_equal json:policy_types?ric=ricsim_g1_5 5 120 + a1pms_equal json:policy_types?ric=ricsim_g1_6 4 120 + a1pms_equal json:policy_types?ric=ricsim_g1_7 3 120 + a1pms_equal json:policy_types?ric=ricsim_g1_8 2 120 + a1pms_equal json:policy_types?ric=ricsim_g1_9 1 120 + a1pms_equal json:policy_types?ric=ricsim_g1_10 0 120 fi - api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ + a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ ricsim_g1_2:me1_ricsim_g1_2,me2_ricsim_g1_2:1,2:???? \ ricsim_g1_3:me1_ricsim_g1_3,me2_ricsim_g1_3:1,2,3:???? \ ricsim_g1_4:me1_ricsim_g1_4,me2_ricsim_g1_4:1,2,3,4:???? \ @@ -448,10 +448,10 @@ for interface in $TESTED_VARIANTS ; do sleep_wait 120 - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-instances 0 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-instances 0 else - api_equal json:policy_ids 0 + a1pms_equal json:policy_ids 0 fi sim_equal ricsim_g1_9 num_instances 0 @@ -464,37 +464,37 @@ for interface in $TESTED_VARIANTS ; do sleep_wait 120 - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 5 120 + a1pms_equal json:policy-types 5 120 - api_equal json:policy-types?ric_id=ricsim_g1_1 1 120 - api_equal json:policy-types?ric_id=ricsim_g1_2 2 120 - api_equal json:policy-types?ric_id=ricsim_g1_3 3 120 - api_equal json:policy-types?ric_id=ricsim_g1_4 3 120 - api_equal json:policy-types?ric_id=ricsim_g1_5 4 120 - api_equal json:policy-types?ric_id=ricsim_g1_6 3 120 - api_equal json:policy-types?ric_id=ricsim_g1_7 2 120 - api_equal json:policy-types?ric_id=ricsim_g1_8 2 120 - api_equal json:policy-types?ric_id=ricsim_g1_9 1 120 - api_equal json:policy-types?ric_id=ricsim_g1_10 0 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_1 1 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_2 2 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_3 3 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_4 3 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_5 4 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_6 3 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_7 2 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_8 2 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_9 1 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_10 0 120 else - api_equal json:policy_types 5 120 - - api_equal json:policy_types?ric=ricsim_g1_1 1 120 - api_equal json:policy_types?ric=ricsim_g1_2 2 120 - api_equal json:policy_types?ric=ricsim_g1_3 3 120 - api_equal json:policy_types?ric=ricsim_g1_4 3 120 - api_equal json:policy_types?ric=ricsim_g1_5 4 120 - api_equal json:policy_types?ric=ricsim_g1_6 3 120 - api_equal json:policy_types?ric=ricsim_g1_7 2 120 - api_equal json:policy_types?ric=ricsim_g1_8 2 120 - api_equal json:policy_types?ric=ricsim_g1_9 1 120 - api_equal json:policy_types?ric=ricsim_g1_10 0 120 + a1pms_equal json:policy_types 5 120 + + a1pms_equal json:policy_types?ric=ricsim_g1_1 1 120 + a1pms_equal json:policy_types?ric=ricsim_g1_2 2 120 + a1pms_equal json:policy_types?ric=ricsim_g1_3 3 120 + a1pms_equal json:policy_types?ric=ricsim_g1_4 3 120 + a1pms_equal json:policy_types?ric=ricsim_g1_5 4 120 + a1pms_equal json:policy_types?ric=ricsim_g1_6 3 120 + a1pms_equal json:policy_types?ric=ricsim_g1_7 2 120 + a1pms_equal json:policy_types?ric=ricsim_g1_8 2 120 + a1pms_equal json:policy_types?ric=ricsim_g1_9 1 120 + a1pms_equal json:policy_types?ric=ricsim_g1_10 0 120 fi - api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ + a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ ricsim_g1_2:me1_ricsim_g1_2,me2_ricsim_g1_2:1,2:???? \ ricsim_g1_3:me1_ricsim_g1_3,me2_ricsim_g1_3:1,2,3:???? \ ricsim_g1_4:me1_ricsim_g1_4,me2_ricsim_g1_4:1,2,3:???? \ @@ -507,15 +507,15 @@ for interface in $TESTED_VARIANTS ; do sim_delete_policy_type 204 ricsim_g1_8 4 - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 5 120 - api_equal json:policy-types?ric_id=ricsim_g1_8 1 120 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-types 5 120 + a1pms_equal json:policy-types?ric_id=ricsim_g1_8 1 120 else - api_equal json:policy_types 5 120 - api_equal json:policy_types?ric=ricsim_g1_8 1 120 + a1pms_equal json:policy_types 5 120 + a1pms_equal json:policy_types?ric=ricsim_g1_8 1 120 fi - api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ + a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ ricsim_g1_2:me1_ricsim_g1_2,me2_ricsim_g1_2:1,2:???? \ ricsim_g1_3:me1_ricsim_g1_3,me2_ricsim_g1_3:1,2,3:???? \ ricsim_g1_4:me1_ricsim_g1_4,me2_ricsim_g1_4:1,2,3:???? \ @@ -528,7 +528,7 @@ for interface in $TESTED_VARIANTS ; do - check_policy_agent_logs + check_a1pms_logs if [[ $interface = *"SDNC"* ]]; then check_sdnc_logs fi diff --git a/test/auto-test/FTC800.sh b/test/auto-test/FTC800.sh index 3d514c4e..4f704d2b 100755 --- a/test/auto-test/FTC800.sh +++ b/test/auto-test/FTC800.sh @@ -17,13 +17,13 @@ # ============LICENSE_END================================================= # -TC_ONELINE_DESCR="Create 10000 policies in sequence using http/https and Agent REST/DMAAP with/without SDNC controller" +TC_ONELINE_DESCR="Create 10000 policies in sequence using http/https and a1pms REST/DMAAP with/without SDNC controller" #App names to include in the test when running docker, space separated list -DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC NGW KUBEPROXY" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM SDNC NGW KUBEPROXY" #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES="CP CR MR PA RICSIM SDNC KUBEPROXY NGW" +KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC KUBEPROXY NGW" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" @@ -53,7 +53,7 @@ NUM_POLICIES=10000 # Tested variants of REST/DMAAP/SDNC config TESTED_VARIANTS="NOSDNC SDNC" -#Test agent and simulator protocol versions (others are http only) +#Test a1pms and simulator protocol versions (others are http only) TESTED_PROTOCOLS="HTTP HTTPS" for __httpx in $TESTED_PROTOCOLS ; do @@ -61,7 +61,7 @@ for __httpx in $TESTED_PROTOCOLS ; do echo "#####################################################################" echo "#####################################################################" - echo "### Testing agent via $interface using $__httpx" + echo "### Testing a1pms via $interface using $__httpx" echo "#####################################################################" echo "#####################################################################" @@ -69,12 +69,12 @@ for __httpx in $TESTED_PROTOCOLS ; do use_cr_https use_simulator_https use_mr_https - use_agent_rest_https + use_a1pms_rest_https else use_cr_http use_simulator_http use_mr_http - use_agent_rest_http + use_a1pms_rest_http fi # Policy instance start id @@ -86,7 +86,7 @@ for __httpx in $TESTED_PROTOCOLS ; do 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 + if [ "$A1PMS_VERSION" == "V2" ]; then start_ric_simulators ricsim_g3 1 STD_2.0.0 fi @@ -100,14 +100,14 @@ for __httpx in $TESTED_PROTOCOLS ; do start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE fi - start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE + start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE - set_agent_debug + set_a1pms_debug mr_equal requests_submitted 0 sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then sim_put_policy_type 201 ricsim_g3_1 STD_QOS2_0.1.0 testdata/STD2/sim_qos2.json fi if [[ $interface == "SDNC" ]]; then @@ -118,121 +118,121 @@ for __httpx in $TESTED_PROTOCOLS ; do fi if [ $RUNMODE == "KUBE" ]; then - agent_load_config ".consul_config.json" + a1pms_load_config ".consul_config.json" else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then - api_put_configuration 200 ".consul_config.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + a1pms_api_put_configuration 200 ".consul_config.json" else start_consul_cbs consul_config_app ".consul_config.json" fi fi - api_get_status 200 + a1pms_api_get_status 200 sim_print ricsim_g1_1 interface sim_print ricsim_g2_1 interface - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then sim_print ricsim_g3_1 interface fi - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 3 300 #Wait for the agent to refresh types from the simulators + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-types 3 300 #Wait for the a1pms to refresh types from the simulators else - api_equal json:policy_types 2 300 #Wait for the agent to refresh types from the simulators + a1pms_equal json:policy_types 2 300 #Wait for the a1pms to refresh types from the simulators fi - api_put_service 201 "serv1" 3600 "$CR_SERVICE_APP_PATH_0/1" + a1pms_api_put_service 201 "serv1" 3600 "$CR_SERVICE_APP_PATH_0/1" - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then notificationurl=$CR_SERVICE_APP_PATH_0"/test" else notificationurl="" fi - start_timer "Create polices in OSC via agent REST and $interface using "$__httpx - api_put_policy 201 "serv1" ricsim_g1_1 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES - print_timer "Create polices in OSC via agent REST and $interface using "$__httpx + start_timer "Create polices in OSC via a1pms REST and $interface using "$__httpx + a1pms_api_put_policy 201 "serv1" ricsim_g1_1 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES + print_timer "Create polices in OSC via a1pms REST and $interface using "$__httpx sim_equal ricsim_g1_1 num_instances $NUM_POLICIES START_ID=$(($START_ID+$NUM_POLICIES)) - start_timer "Create polices in STD via agent REST and $interface using "$__httpx - api_put_policy 201 "serv1" ricsim_g2_1 NOTYPE $START_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_POLICIES - print_timer "Create polices in STD via agent REST and $interface using "$__httpx + start_timer "Create polices in STD via a1pms REST and $interface using "$__httpx + a1pms_api_put_policy 201 "serv1" ricsim_g2_1 NOTYPE $START_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_POLICIES + print_timer "Create polices in STD via a1pms REST and $interface using "$__httpx sim_equal ricsim_g2_1 num_instances $NUM_POLICIES - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then START_ID=$(($START_ID+$NUM_POLICIES)) - start_timer "Create polices in STD 2 via agent REST and $interface using "$__httpx - api_put_policy 201 "serv1" ricsim_g3_1 STD_QOS2_0.1.0 $START_ID NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json $NUM_POLICIES - print_timer "Create polices in STD via agent REST and $interface using "$__httpx + start_timer "Create polices in STD 2 via a1pms REST and $interface using "$__httpx + a1pms_api_put_policy 201 "serv1" ricsim_g3_1 STD_QOS2_0.1.0 $START_ID NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json $NUM_POLICIES + print_timer "Create polices in STD via a1pms REST and $interface using "$__httpx sim_equal ricsim_g3_1 num_instances $NUM_POLICIES fi if [ $__httpx == "HTTPS" ]; then echo "Using secure ports towards dmaap" - use_agent_dmaap_https + use_a1pms_dmaap_https else echo "Using non-secure ports towards dmaap" - use_agent_dmaap_http + use_a1pms_dmaap_http fi START_ID=$(($START_ID+$NUM_POLICIES)) - start_timer "Create polices in OSC via agent DMAAP, one by one, and $interface using "$__httpx - api_put_policy 201 "serv1" ricsim_g1_1 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES - print_timer "Create polices in OSC via agent DMAAP, one by one, and $interface using "$__httpx + start_timer "Create polices in OSC via a1pms DMAAP, one by one, and $interface using "$__httpx + a1pms_api_put_policy 201 "serv1" ricsim_g1_1 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES + print_timer "Create polices in OSC via a1pms DMAAP, one by one, and $interface using "$__httpx sim_equal ricsim_g1_1 num_instances $((2*$NUM_POLICIES)) START_ID=$(($START_ID+$NUM_POLICIES)) - start_timer "Create polices in STD via agent DMAAP, one by one, and $interface using "$__httpx - api_put_policy 201 "serv1" ricsim_g2_1 NOTYPE $START_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_POLICIES - print_timer "Create polices in STD via agent DMAAP, one by one, and $interface using "$__httpx + start_timer "Create polices in STD via a1pms DMAAP, one by one, and $interface using "$__httpx + a1pms_api_put_policy 201 "serv1" ricsim_g2_1 NOTYPE $START_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_POLICIES + print_timer "Create polices in STD via a1pms DMAAP, one by one, and $interface using "$__httpx sim_equal ricsim_g2_1 num_instances $((2*$NUM_POLICIES)) - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then START_ID=$(($START_ID+$NUM_POLICIES)) - start_timer "Create polices in STD 2 via agent DMAAP, one by one, and $interface using "$__httpx - api_put_policy 201 "serv1" ricsim_g3_1 STD_QOS2_0.1.0 $START_ID NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json $NUM_POLICIES - print_timer "Create polices in STD via agent DMAAP, one by one, and $interface using "$__httpx + start_timer "Create polices in STD 2 via a1pms DMAAP, one by one, and $interface using "$__httpx + a1pms_api_put_policy 201 "serv1" ricsim_g3_1 STD_QOS2_0.1.0 $START_ID NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json $NUM_POLICIES + print_timer "Create polices in STD via a1pms DMAAP, one by one, and $interface using "$__httpx sim_equal ricsim_g3_1 num_instances $((2*$NUM_POLICIES)) fi START_ID=$(($START_ID+$NUM_POLICIES)) - start_timer "Create polices in OSC via agent DMAAP in batch and $interface using "$__httpx - api_put_policy_batch 201 "serv1" ricsim_g1_1 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES - print_timer "Create polices in OSC via agent DMAAP in batch and $interface using "$__httpx + start_timer "Create polices in OSC via a1pms DMAAP in batch and $interface using "$__httpx + a1pms_api_put_policy_batch 201 "serv1" ricsim_g1_1 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES + print_timer "Create polices in OSC via a1pms DMAAP in batch and $interface using "$__httpx sim_equal ricsim_g1_1 num_instances $((3*$NUM_POLICIES)) START_ID=$(($START_ID+$NUM_POLICIES)) - start_timer "Create polices in STD via agent DMAAP in batch and $interface using "$__httpx - api_put_policy_batch 201 "serv1" ricsim_g2_1 NOTYPE $START_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_POLICIES - print_timer "Create polices in STD via agent DMAAP in batch and $interface using "$__httpx + start_timer "Create polices in STD via a1pms DMAAP in batch and $interface using "$__httpx + a1pms_api_put_policy_batch 201 "serv1" ricsim_g2_1 NOTYPE $START_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_POLICIES + print_timer "Create polices in STD via a1pms DMAAP in batch and $interface using "$__httpx sim_equal ricsim_g2_1 num_instances $((3*$NUM_POLICIES)) - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then START_ID=$(($START_ID+$NUM_POLICIES)) - start_timer "Create polices in STD via agent DMAAP in batch and $interface using "$__httpx - api_put_policy_batch 201 "serv1" ricsim_g3_1 STD_QOS2_0.1.0 $START_ID NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json $NUM_POLICIES - print_timer "Create polices in STD via agent DMAAP in batch and $interface using "$__httpx + start_timer "Create polices in STD via a1pms DMAAP in batch and $interface using "$__httpx + a1pms_api_put_policy_batch 201 "serv1" ricsim_g3_1 STD_QOS2_0.1.0 $START_ID NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json $NUM_POLICIES + print_timer "Create polices in STD via a1pms DMAAP in batch and $interface using "$__httpx sim_equal ricsim_g3_1 num_instances $((3*$NUM_POLICIES)) fi @@ -240,18 +240,18 @@ for __httpx in $TESTED_PROTOCOLS ; do if [ $interface == "SDNC" ]; then sim_contains_str ricsim_g1_1 remote_hosts $SDNC_APP_NAME sim_contains_str ricsim_g2_1 remote_hosts $SDNC_APP_NAME - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then sim_contains_str ricsim_g3_1 remote_hosts $SDNC_APP_NAME fi else - sim_contains_str ricsim_g1_1 remote_hosts $POLICY_AGENT_APP_NAME - sim_contains_str ricsim_g2_1 remote_hosts $POLICY_AGENT_APP_NAME - if [ "$PMS_VERSION" == "V2" ]; then - sim_contains_str ricsim_g3_1 remote_hosts $POLICY_AGENT_APP_NAME + sim_contains_str ricsim_g1_1 remote_hosts $A1PMS_APP_NAME + sim_contains_str ricsim_g2_1 remote_hosts $A1PMS_APP_NAME + if [ "$A1PMS_VERSION" == "V2" ]; then + sim_contains_str ricsim_g3_1 remote_hosts $A1PMS_APP_NAME fi fi - check_policy_agent_logs + check_a1pms_logs if [[ $interface = *"SDNC"* ]]; then check_sdnc_logs fi diff --git a/test/auto-test/FTC805.sh b/test/auto-test/FTC805.sh index a9268a20..00aa525e 100755 --- a/test/auto-test/FTC805.sh +++ b/test/auto-test/FTC805.sh @@ -17,13 +17,13 @@ # ============LICENSE_END================================================= # -TC_ONELINE_DESCR="PMS Create 10000 policies and restart, test polices persistency" +TC_ONELINE_DESCR="A1PMS Create 10000 policies and restart, test polices persistency" #App names to include in the test when running docker, space separated list -DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR PA RICSIM SDNC NGW KUBEPROXY" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR A1PMS RICSIM SDNC NGW KUBEPROXY" #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES="CP CR PA RICSIM SDNC KUBEPROXY NGW" +KUBE_INCLUDED_IMAGES="CP CR A1PMS RICSIM SDNC KUBEPROXY NGW" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" @@ -49,7 +49,7 @@ setup_testenvironment # Tested variants of REST/DMAAP/SDNC config TESTED_VARIANTS="REST" -#Test agent and simulator protocol versions (others are http only) +#Test a1pms and simulator protocol versions (others are http only) TESTED_PROTOCOLS="HTTP" NUM_RICS=5 @@ -58,7 +58,7 @@ NUM_POLICIES_PER_RIC=2000 generate_policy_uuid -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then notificationurl=$CR_SERVICE_APP_PATH_0"/test" else notificationurl="" @@ -69,7 +69,7 @@ for __httpx in $TESTED_PROTOCOLS ; do echo "#####################################################################" echo "#####################################################################" - echo "### Testing agent: "$interface" and "$__httpx + echo "### Testing a1pms: "$interface" and "$__httpx echo "#####################################################################" echo "#####################################################################" @@ -79,14 +79,14 @@ for __httpx in $TESTED_PROTOCOLS ; do if [[ $interface = *"SDNC"* ]]; then use_sdnc_https fi - use_agent_rest_https + use_a1pms_rest_https else use_cr_http use_simulator_http if [[ $interface = *"SDNC"* ]]; then use_sdnc_http fi - use_agent_rest_http + use_a1pms_rest_http fi # Clean container and start all needed containers # @@ -102,9 +102,9 @@ for __httpx in $TESTED_PROTOCOLS ; do start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE fi - start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE + start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE - set_agent_debug + set_a1pms_debug if [[ $interface = *"SDNC"* ]]; then start_sdnc @@ -114,10 +114,10 @@ for __httpx in $TESTED_PROTOCOLS ; do fi if [ $RUNMODE == "KUBE" ]; then - agent_load_config ".consul_config.json" + a1pms_load_config ".consul_config.json" else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then - api_put_configuration 200 ".consul_config.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + a1pms_api_put_configuration 200 ".consul_config.json" else start_consul_cbs consul_config_app ".consul_config.json" @@ -126,7 +126,7 @@ for __httpx in $TESTED_PROTOCOLS ; do start_cr 1 - api_get_status 200 + a1pms_api_get_status 200 for ((i=1; i<=$NUM_RICS; i++)) do @@ -139,21 +139,21 @@ for __httpx in $TESTED_PROTOCOLS ; do sim_put_policy_type 201 ricsim_g1_$i STD_QOS_0_2_0 testdata/STD2/sim_qos.json done - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 1 300 #Wait for the agent to refresh types from the simulator + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-types 1 300 #Wait for the a1pms to refresh types from the simulator else - api_equal json:policy_types 1 300 #Wait for the agent to refresh types from the simulator + a1pms_equal json:policy_types 1 300 #Wait for the a1pms to refresh types from the simulator fi - api_put_service 201 "serv1" 0 "$CR_SERVICE_APP_PATH_0/1" + a1pms_api_put_service 201 "serv1" 0 "$CR_SERVICE_APP_PATH_0/1" - echo "Check the number of types in the agent for each ric is 1" + echo "Check the number of types in the a1pms for each ric is 1" for ((i=1; i<=$NUM_RICS; i++)) do - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-types?ric_id=ricsim_g1_$i 1 120 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-types?ric_id=ricsim_g1_$i 1 120 else - api_equal json:policy_types?ric=ricsim_g1_$i 1 120 + a1pms_equal json:policy_types?ric=ricsim_g1_$i 1 120 fi done @@ -161,29 +161,29 @@ for __httpx in $TESTED_PROTOCOLS ; do start_timer "Create $((NUM_POLICIES_PER_RIC*$NUM_RICS)) polices over $interface using "$__httpx - api_put_policy_parallel 201 "serv1" ricsim_g1_ $NUM_RICS STD_QOS_0_2_0 $START_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_POLICIES_PER_RIC 7 + a1pms_api_put_policy_parallel 201 "serv1" ricsim_g1_ $NUM_RICS STD_QOS_0_2_0 $START_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_POLICIES_PER_RIC 7 print_timer "Create $((NUM_POLICIES_PER_RIC*$NUM_RICS)) polices over $interface using "$__httpx INSTANCES=$(($NUM_RICS*$NUM_POLICIES_PER_RIC)) - api_equal json:policies $INSTANCES + a1pms_equal json:policies $INSTANCES for ((i=1; i<=$NUM_RICS; i++)) do sim_equal ricsim_g1_$i num_instances $NUM_POLICIES_PER_RIC done - api_get_services 200 "serv1" "serv1" 0 "$CR_SERVICE_APP_PATH_0/1" + a1pms_api_get_services 200 "serv1" "serv1" 0 "$CR_SERVICE_APP_PATH_0/1" - stop_policy_agent + stop_a1pms - start_stopped_policy_agent + start_stopped_a1pms - set_agent_debug + set_a1pms_debug - api_equal json:policies $INSTANCES 500 + a1pms_equal json:policies $INSTANCES 500 - stop_policy_agent + stop_a1pms for ((i=1; i<=$NUM_RICS; i++)) do @@ -195,13 +195,13 @@ for __httpx in $TESTED_PROTOCOLS ; do sim_equal ricsim_g1_$i num_instances 0 done - start_stopped_policy_agent + start_stopped_a1pms - set_agent_debug + set_a1pms_debug start_timer "Restore $((NUM_POLICIES_PER_RIC*$NUM_RICS)) polices after restart over $interface using "$__httpx - api_equal json:policies $INSTANCES 500 + a1pms_equal json:policies $INSTANCES 500 for ((i=1; i<=$NUM_RICS; i++)) do @@ -210,28 +210,28 @@ for __httpx in $TESTED_PROTOCOLS ; do print_timer "Restore $((NUM_POLICIES_PER_RIC*$NUM_RICS)) polices after restart over $interface using "$__httpx - api_get_services 200 "serv1" "serv1" 0 "$CR_SERVICE_APP_PATH_0/1" + a1pms_api_get_services 200 "serv1" "serv1" 0 "$CR_SERVICE_APP_PATH_0/1" start_timer "Delete $((NUM_POLICIES_PER_RIC*$NUM_RICS)) polices over $interface using "$__httpx - api_delete_policy_parallel 204 $NUM_RICS $START_ID $NUM_POLICIES_PER_RIC 7 + a1pms_api_delete_policy_parallel 204 $NUM_RICS $START_ID $NUM_POLICIES_PER_RIC 7 print_timer "Delete $((NUM_POLICIES_PER_RIC*$NUM_RICS)) polices over $interface using "$__httpx - api_equal json:policies 0 + a1pms_equal json:policies 0 for ((i=1; i<=$NUM_RICS; i++)) do sim_equal ricsim_g1_$i num_instances 0 done - stop_policy_agent + stop_a1pms - start_stopped_policy_agent + start_stopped_a1pms - set_agent_debug + set_a1pms_debug - api_equal json:policies 0 + a1pms_equal json:policies 0 for ((i=1; i<=$NUM_RICS; i++)) do @@ -240,9 +240,9 @@ for __httpx in $TESTED_PROTOCOLS ; do sleep_wait 200 - api_get_services 200 "serv1" "serv1" 0 "$CR_SERVICE_APP_PATH_0/1" + a1pms_api_get_services 200 "serv1" "serv1" 0 "$CR_SERVICE_APP_PATH_0/1" - api_equal json:policies 0 + a1pms_equal json:policies 0 for ((i=1; i<=$NUM_RICS; i++)) do @@ -254,11 +254,11 @@ for __httpx in $TESTED_PROTOCOLS ; do if [ $interface == "REST+SDNC" ]; then sim_contains_str ricsim_g1_$i remote_hosts $SDNC_APP_NAME else - sim_contains_str ricsim_g1_$i remote_hosts $POLICY_AGENT_APP_NAME + sim_contains_str ricsim_g1_$i remote_hosts $A1PMS_APP_NAME fi done - check_policy_agent_logs + check_a1pms_logs if [[ $interface = *"SDNC"* ]]; then check_sdnc_logs fi diff --git a/test/auto-test/FTC810.sh b/test/auto-test/FTC810.sh index 83e1be79..89c347ac 100755 --- a/test/auto-test/FTC810.sh +++ b/test/auto-test/FTC810.sh @@ -17,13 +17,13 @@ # ============LICENSE_END================================================= # -TC_ONELINE_DESCR="Repeatedly create and delete policies in each RICs for 24h (or configured number of days). Via agent REST/DMAAP/DMAAP_BATCH and SDNC using http or https" +TC_ONELINE_DESCR="Repeatedly create and delete policies in each RICs for 24h (or configured number of days). Via a1pms REST/DMAAP/DMAAP_BATCH and SDNC using http or https" #App names to include in the test when running docker, space separated list -DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC NGW KUBEPROXY" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM SDNC NGW KUBEPROXY" #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES="CP CR MR PA RICSIM SDNC KUBEPROXY NGW" +KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC KUBEPROXY NGW" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" @@ -50,7 +50,7 @@ generate_policy_uuid # Number of RICs per interface type (OSC and STD) NUM_RICS=30 -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then NUM_RICS=20 # 3 A1 interfaces test, less sims per interface. total sims will be same fi @@ -68,12 +68,12 @@ HTTPX=HTTPS if [ $HTTPX == "HTTP" ]; then use_cr_http - use_agent_rest_http + use_a1pms_rest_http use_sdnc_http use_simulator_http else use_cr_https - use_agent_rest_https + use_a1pms_rest_https use_sdnc_https use_simulator_https fi @@ -82,7 +82,7 @@ start_ric_simulators ricsim_g1 $NUM_RICS OSC_2.1.0 start_ric_simulators ricsim_g2 $NUM_RICS STD_1.1.3 -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then start_ric_simulators ricsim_g3 $NUM_RICS STD_2.0.0 fi @@ -96,15 +96,15 @@ if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE fi -start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE +start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE prepare_consul_config SDNC ".consul_config.json" if [ $RUNMODE == "KUBE" ]; then - agent_load_config ".consul_config.json" + a1pms_load_config ".consul_config.json" else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then - api_put_configuration 200 ".consul_config.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + a1pms_api_put_configuration 200 ".consul_config.json" else start_consul_cbs consul_config_app ".consul_config.json" @@ -114,7 +114,7 @@ fi start_sdnc -api_get_status 200 +a1pms_api_get_status 200 echo "Print the interface for group 1 simulators, shall be OSC" for ((i=1; i<=$NUM_RICS; i++)) @@ -128,7 +128,7 @@ do sim_print ricsim_g2_$i interface done -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then echo "Print the interface for group 2 simulators, shall be STD 2" for ((i=1; i<=$NUM_RICS; i++)) do @@ -142,7 +142,7 @@ do sim_put_policy_type 201 ricsim_g1_$i 1 testdata/OSC/sim_1.json done -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then echo "Load policy type in group 3 simulators" for ((i=1; i<=$NUM_RICS; i++)) do @@ -162,7 +162,7 @@ do sim_equal ricsim_g2_$i num_instances 0 done -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then echo "Check the number of instances in group 3 simulators, shall be 0" for ((i=1; i<=$NUM_RICS; i++)) do @@ -170,35 +170,35 @@ if [ "$PMS_VERSION" == "V2" ]; then done fi -echo "Wait for the agent to refresh types from the simulator" -if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 3 300 +echo "Wait for the a1pms to refresh types from the simulator" +if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-types 3 300 else - api_equal json:policy_types 2 300 + a1pms_equal json:policy_types 2 300 fi -echo "Check the number of types in the agent for each ric is 1" +echo "Check the number of types in the a1pms for each ric is 1" for ((i=1; i<=$NUM_RICS; i++)) do - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-types?ric_id=ricsim_g1_$i 1 120 - api_equal json:policy-types?ric_id=ricsim_g3_$i 1 120 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-types?ric_id=ricsim_g1_$i 1 120 + a1pms_equal json:policy-types?ric_id=ricsim_g3_$i 1 120 else - api_equal json:policy_types?ric=ricsim_g1_$i 1 120 + a1pms_equal json:policy_types?ric=ricsim_g1_$i 1 120 fi done echo "Register a service" -api_put_service 201 "serv1" 0 "$CR_SERVICE_APP_PATH_0/1" +a1pms_api_put_service 201 "serv1" 0 "$CR_SERVICE_APP_PATH_0/1" TEST_DURATION=$((24*3600*$DAYS)) TEST_START=$SECONDS -AGENT_INTERFACES="REST REST_PARALLEL DMAAP DMAAP-BATCH" +A1PMS_INTERFACES="REST REST_PARALLEL DMAAP DMAAP-BATCH" MR_MESSAGES=0 -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then notificationurl=$CR_SERVICE_APP_PATH_0"/test" else notificationurl="" @@ -212,25 +212,25 @@ while [ $(($SECONDS-$TEST_START)) -lt $TEST_DURATION ]; do echo "#########################################################################################################" echo "" - for interface in $AGENT_INTERFACES ; do + for interface in $A1PMS_INTERFACES ; do echo "############################################" - echo "## Testing using agent interface: $interface ##" + echo "## Testing using a1pms interface: $interface ##" echo "############################################" if [ $interface == "REST" ] || [ $interface == "REST_PARALLEL" ]; then if [ $HTTPX == "HTTP" ]; then - use_agent_rest_http + use_a1pms_rest_http else - use_agent_rest_https + use_a1pms_rest_https fi else if [ $HTTPX == "HTTPS" ]; then echo "Using secure ports towards dmaap" - use_agent_dmaap_https + use_a1pms_dmaap_https else echo "Using non-secure ports towards dmaap" - use_agent_dmaap_http + use_a1pms_dmaap_http fi fi @@ -238,14 +238,14 @@ while [ $(($SECONDS-$TEST_START)) -lt $TEST_DURATION ]; do INSTANCE_ID=200000 INSTANCES=0 if [ $interface == "REST_PARALLEL" ]; then - api_put_policy_parallel 201 "serv1" ricsim_g1_ $NUM_RICS 1 $INSTANCE_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_INSTANCES 3 + a1pms_api_put_policy_parallel 201 "serv1" ricsim_g1_ $NUM_RICS 1 $INSTANCE_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_INSTANCES 3 fi for ((i=1; i<=$NUM_RICS; i++)) do if [ $interface == "DMAAP-BATCH" ]; then - api_put_policy_batch 201 "serv1" ricsim_g1_$i 1 $INSTANCE_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_INSTANCES + a1pms_api_put_policy_batch 201 "serv1" ricsim_g1_$i 1 $INSTANCE_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_INSTANCES elif [ $interface == "DMAAP" ] || [ $interface == "REST" ]; then - api_put_policy 201 "serv1" ricsim_g1_$i 1 $INSTANCE_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_INSTANCES + a1pms_api_put_policy 201 "serv1" ricsim_g1_$i 1 $INSTANCE_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_INSTANCES fi if [ $interface == "DMAAP" ] || [ $interface == "DMAAP-BATCH" ]; then MR_MESSAGES=$(($MR_MESSAGES+$NUM_INSTANCES)) @@ -255,22 +255,22 @@ while [ $(($SECONDS-$TEST_START)) -lt $TEST_DURATION ]; do INSTANCES=$(($INSTANCES+$NUM_INSTANCES)) done - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-instances $INSTANCES + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-instances $INSTANCES else - api_equal json:policy_ids $INSTANCES + a1pms_equal json:policy_ids $INSTANCES fi echo "Create $NUM_INSTANCES instances in each STD RIC" if [ $interface == "REST_PARALLEL" ]; then - api_put_policy_parallel 201 "serv1" ricsim_g2_ $NUM_RICS NOTYPE $INSTANCE_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_INSTANCES 3 + a1pms_api_put_policy_parallel 201 "serv1" ricsim_g2_ $NUM_RICS NOTYPE $INSTANCE_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_INSTANCES 3 fi for ((i=1; i<=$NUM_RICS; i++)) do if [ $interface == "DMAAP-BATCH" ]; then - api_put_policy_batch 201 "serv1" ricsim_g2_$i NOTYPE $INSTANCE_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_INSTANCES + a1pms_api_put_policy_batch 201 "serv1" ricsim_g2_$i NOTYPE $INSTANCE_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_INSTANCES elif [ $interface == "DMAAP" ] || [ $interface == "REST" ]; then - api_put_policy 201 "serv1" ricsim_g2_$i NOTYPE $INSTANCE_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_INSTANCES + a1pms_api_put_policy 201 "serv1" ricsim_g2_$i NOTYPE $INSTANCE_ID NOTRANSIENT $notificationurl testdata/STD/pi1_template.json $NUM_INSTANCES fi if [ $interface == "DMAAP" ] || [ $interface == "DMAAP-BATCH" ]; then MR_MESSAGES=$(($MR_MESSAGES+$NUM_INSTANCES)) @@ -280,23 +280,23 @@ while [ $(($SECONDS-$TEST_START)) -lt $TEST_DURATION ]; do INSTANCES=$(($INSTANCES+$NUM_INSTANCES)) done - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-instances $INSTANCES + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-instances $INSTANCES else - api_equal json:policy_ids $INSTANCES + a1pms_equal json:policy_ids $INSTANCES fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then echo "Create $NUM_INSTANCES instances in each STD 2 RIC" if [ $interface == "REST_PARALLEL" ]; then - api_put_policy_parallel 201 "serv1" ricsim_g3_ $NUM_RICS STD_QOS2_0.1.0 $INSTANCE_ID NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json $NUM_INSTANCES 3 + a1pms_api_put_policy_parallel 201 "serv1" ricsim_g3_ $NUM_RICS STD_QOS2_0.1.0 $INSTANCE_ID NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json $NUM_INSTANCES 3 fi for ((i=1; i<=$NUM_RICS; i++)) do if [ $interface == "DMAAP-BATCH" ]; then - api_put_policy_batch 201 "serv1" ricsim_g3_$i STD_QOS2_0.1.0 $INSTANCE_ID NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json $NUM_INSTANCES + a1pms_api_put_policy_batch 201 "serv1" ricsim_g3_$i STD_QOS2_0.1.0 $INSTANCE_ID NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json $NUM_INSTANCES elif [ $interface == "DMAAP" ] || [ $interface == "REST" ]; then - api_put_policy 201 "serv1" ricsim_g3_$i STD_QOS2_0.1.0 $INSTANCE_ID NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json $NUM_INSTANCES + a1pms_api_put_policy 201 "serv1" ricsim_g3_$i STD_QOS2_0.1.0 $INSTANCE_ID NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json $NUM_INSTANCES fi if [ $interface == "DMAAP" ] || [ $interface == "DMAAP-BATCH" ]; then MR_MESSAGES=$(($MR_MESSAGES+$NUM_INSTANCES)) @@ -306,10 +306,10 @@ while [ $(($SECONDS-$TEST_START)) -lt $TEST_DURATION ]; do INSTANCES=$(($INSTANCES+$NUM_INSTANCES)) done - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-instances $INSTANCES + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-instances $INSTANCES else - api_equal json:policy_ids $INSTANCES + a1pms_equal json:policy_ids $INSTANCES fi fi @@ -318,14 +318,14 @@ while [ $(($SECONDS-$TEST_START)) -lt $TEST_DURATION ]; do INSTANCE_ID=200000 if [ $interface == "REST_PARALLEL" ]; then - api_delete_policy_parallel 204 $NUM_RICS $INSTANCE_ID $NUM_INSTANCES 3 + a1pms_api_delete_policy_parallel 204 $NUM_RICS $INSTANCE_ID $NUM_INSTANCES 3 fi for ((i=1; i<=$NUM_RICS; i++)) do if [ $interface == "DMAAP-BATCH" ]; then - api_delete_policy_batch 204 $INSTANCE_ID $NUM_INSTANCES + a1pms_api_delete_policy_batch 204 $INSTANCE_ID $NUM_INSTANCES elif [ $interface == "DMAAP" ] || [ $interface == "REST" ]; then - api_delete_policy 204 $INSTANCE_ID $NUM_INSTANCES + a1pms_api_delete_policy 204 $INSTANCE_ID $NUM_INSTANCES fi if [ $interface == "DMAAP" ] || [ $interface == "DMAAP-BATCH" ]; then MR_MESSAGES=$(($MR_MESSAGES+$NUM_INSTANCES)) @@ -335,23 +335,23 @@ while [ $(($SECONDS-$TEST_START)) -lt $TEST_DURATION ]; do INSTANCE_ID=$(($INSTANCE_ID+$NUM_INSTANCES)) done - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-instances $INSTANCES + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-instances $INSTANCES else - api_equal json:policy_ids $INSTANCES + a1pms_equal json:policy_ids $INSTANCES fi echo "Delete all instances in each STD RIC" if [ $interface == "REST_PARALLEL" ]; then - api_delete_policy_parallel 204 $NUM_RICS $INSTANCE_ID $NUM_INSTANCES 3 + a1pms_api_delete_policy_parallel 204 $NUM_RICS $INSTANCE_ID $NUM_INSTANCES 3 fi for ((i=1; i<=$NUM_RICS; i++)) do if [ $interface == "DMAAP-BATCH" ]; then - api_delete_policy_batch 204 $INSTANCE_ID $NUM_INSTANCES + a1pms_api_delete_policy_batch 204 $INSTANCE_ID $NUM_INSTANCES elif [ $interface == "DMAAP" ] || [ $interface == "REST" ]; then - api_delete_policy 204 $INSTANCE_ID $NUM_INSTANCES + a1pms_api_delete_policy 204 $INSTANCE_ID $NUM_INSTANCES fi if [ $interface == "DMAAP" ] || [ $interface == "DMAAP-BATCH" ]; then MR_MESSAGES=$(($MR_MESSAGES+$NUM_INSTANCES)) @@ -361,24 +361,24 @@ while [ $(($SECONDS-$TEST_START)) -lt $TEST_DURATION ]; do INSTANCE_ID=$(($INSTANCE_ID+$NUM_INSTANCES)) done - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-instances $INSTANCES + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-instances $INSTANCES else - api_equal json:policy_ids $INSTANCES + a1pms_equal json:policy_ids $INSTANCES fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then echo "Delete all instances in each STD 2 RIC" if [ $interface == "REST_PARALLEL" ]; then - api_delete_policy_parallel 204 $NUM_RICS $INSTANCE_ID $NUM_INSTANCES 3 + a1pms_api_delete_policy_parallel 204 $NUM_RICS $INSTANCE_ID $NUM_INSTANCES 3 fi for ((i=1; i<=$NUM_RICS; i++)) do if [ $interface == "DMAAP-BATCH" ]; then - api_delete_policy_batch 204 $INSTANCE_ID $NUM_INSTANCES + a1pms_api_delete_policy_batch 204 $INSTANCE_ID $NUM_INSTANCES elif [ $interface == "DMAAP" ] || [ $interface == "REST" ]; then - api_delete_policy 204 $INSTANCE_ID $NUM_INSTANCES + a1pms_api_delete_policy 204 $INSTANCE_ID $NUM_INSTANCES fi if [ $interface == "DMAAP" ] || [ $interface == "DMAAP-BATCH" ]; then MR_MESSAGES=$(($MR_MESSAGES+$NUM_INSTANCES)) @@ -388,10 +388,10 @@ while [ $(($SECONDS-$TEST_START)) -lt $TEST_DURATION ]; do INSTANCE_ID=$(($INSTANCE_ID+$NUM_INSTANCES)) done - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-instances $INSTANCES + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-instances $INSTANCES else - api_equal json:policy_ids $INSTANCES + a1pms_equal json:policy_ids $INSTANCES fi fi @@ -408,7 +408,7 @@ while [ $(($SECONDS-$TEST_START)) -lt $TEST_DURATION ]; do sim_contains_str ricsim_g1_$i remote_hosts $SDNC_APP_NAME sim_contains_str ricsim_g2_$i remote_hosts $SDNC_APP_NAME - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then sim_contains_str ricsim_g3_$i remote_hosts $SDNC_APP_NAME fi done @@ -417,7 +417,7 @@ while [ $(($SECONDS-$TEST_START)) -lt $TEST_DURATION ]; do done -check_policy_agent_logs +check_a1pms_logs check_sdnc_logs #### TEST COMPLETE #### diff --git a/test/auto-test/FTC850.sh b/test/auto-test/FTC850.sh index f9f5be32..52456caa 100755 --- a/test/auto-test/FTC850.sh +++ b/test/auto-test/FTC850.sh @@ -20,10 +20,10 @@ TC_ONELINE_DESCR="Create/delete policies in parallel over a number of rics using a number of child process" #App names to include in the test when running docker, space separated list -DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC NGW KUBEPROXY" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM SDNC NGW KUBEPROXY" #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES="CP CR MR PA RICSIM SDNC KUBEPROXY NGW" +KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC KUBEPROXY NGW" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" @@ -49,7 +49,7 @@ setup_testenvironment # Tested variants of REST/DMAAP/SDNC config TESTED_VARIANTS="REST REST+SDNC" -#Test agent and simulator protocol versions (others are http only) +#Test a1pms and simulator protocol versions (others are http only) TESTED_PROTOCOLS="HTTP HTTPS" NUM_RICS=20 @@ -57,7 +57,7 @@ NUM_POLICIES_PER_RIC=500 generate_policy_uuid -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then notificationurl=$CR_SERVICE_APP_PATH_0"/test" else notificationurl="" @@ -68,7 +68,7 @@ for __httpx in $TESTED_PROTOCOLS ; do echo "#####################################################################" echo "#####################################################################" - echo "### Testing agent: "$interface" and "$__httpx + echo "### Testing a1pms: "$interface" and "$__httpx echo "#####################################################################" echo "#####################################################################" @@ -79,7 +79,7 @@ for __httpx in $TESTED_PROTOCOLS ; do if [[ $interface = *"SDNC"* ]]; then use_sdnc_https fi - use_agent_rest_https + use_a1pms_rest_https else use_cr_http use_simulator_http @@ -87,7 +87,7 @@ for __httpx in $TESTED_PROTOCOLS ; do if [[ $interface = *"SDNC"* ]]; then use_sdnc_http fi - use_agent_rest_http + use_a1pms_rest_http fi # Clean container and start all needed containers # @@ -103,9 +103,9 @@ for __httpx in $TESTED_PROTOCOLS ; do start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE fi - start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE + start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE - set_agent_debug + set_a1pms_debug if [[ $interface = *"SDNC"* ]]; then start_sdnc @@ -115,21 +115,21 @@ for __httpx in $TESTED_PROTOCOLS ; do fi if [ $RUNMODE == "KUBE" ]; then - agent_load_config ".consul_config.json" + a1pms_load_config ".consul_config.json" else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then - api_put_configuration 200 ".consul_config.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + a1pms_api_put_configuration 200 ".consul_config.json" else start_consul_cbs consul_config_app ".consul_config.json" fi fi - start_mr # Not used, but removes error messages from the agent log + start_mr # Not used, but removes error messages from the a1pms log start_cr 1 - api_get_status 200 + a1pms_api_get_status 200 for ((i=1; i<=$NUM_RICS; i++)) do @@ -142,21 +142,21 @@ for __httpx in $TESTED_PROTOCOLS ; do sim_put_policy_type 201 ricsim_g1_$i 1 testdata/OSC/sim_1.json done - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 1 300 #Wait for the agent to refresh types from the simulator + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-types 1 300 #Wait for the a1pms to refresh types from the simulator else - api_equal json:policy_types 1 300 #Wait for the agent to refresh types from the simulator + a1pms_equal json:policy_types 1 300 #Wait for the a1pms to refresh types from the simulator fi - api_put_service 201 "serv1" 600 "$CR_SERVICE_APP_PATH_0/1" + a1pms_api_put_service 201 "serv1" 600 "$CR_SERVICE_APP_PATH_0/1" - echo "Check the number of types in the agent for each ric is 1" + echo "Check the number of types in the a1pms for each ric is 1" for ((i=1; i<=$NUM_RICS; i++)) do - if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-types?ric_id=ricsim_g1_$i 1 120 + if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-types?ric_id=ricsim_g1_$i 1 120 else - api_equal json:policy_types?ric=ricsim_g1_$i 1 120 + a1pms_equal json:policy_types?ric=ricsim_g1_$i 1 120 fi done @@ -164,12 +164,12 @@ for __httpx in $TESTED_PROTOCOLS ; do start_timer "Create $((NUM_POLICIES_PER_RIC*$NUM_RICS)) polices over $interface using "$__httpx - api_put_policy_parallel 201 "serv1" ricsim_g1_ $NUM_RICS 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES_PER_RIC 7 + a1pms_api_put_policy_parallel 201 "serv1" ricsim_g1_ $NUM_RICS 1 $START_ID NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json $NUM_POLICIES_PER_RIC 7 print_timer "Create $((NUM_POLICIES_PER_RIC*$NUM_RICS)) polices over $interface using "$__httpx INSTANCES=$(($NUM_RICS*$NUM_POLICIES_PER_RIC)) - api_equal json:policies $INSTANCES + a1pms_equal json:policies $INSTANCES for ((i=1; i<=$NUM_RICS; i++)) do @@ -178,11 +178,11 @@ for __httpx in $TESTED_PROTOCOLS ; do start_timer "Delete $((NUM_POLICIES_PER_RIC*$NUM_RICS)) polices over $interface using "$__httpx - api_delete_policy_parallel 204 $NUM_RICS $START_ID $NUM_POLICIES_PER_RIC 7 + a1pms_api_delete_policy_parallel 204 $NUM_RICS $START_ID $NUM_POLICIES_PER_RIC 7 print_timer "Delete $((NUM_POLICIES_PER_RIC*$NUM_RICS)) polices over $interface using "$__httpx - api_equal json:policies 0 + a1pms_equal json:policies 0 for ((i=1; i<=$NUM_RICS; i++)) do @@ -194,11 +194,11 @@ for __httpx in $TESTED_PROTOCOLS ; do if [ $interface == "REST+SDNC" ]; then sim_contains_str ricsim_g1_$i remote_hosts $SDNC_APP_NAME else - sim_contains_str ricsim_g1_$i remote_hosts $POLICY_AGENT_APP_NAME + sim_contains_str ricsim_g1_$i remote_hosts $A1PMS_APP_NAME fi done - check_policy_agent_logs + check_a1pms_logs if [[ $interface = *"SDNC"* ]]; then check_sdnc_logs fi diff --git a/test/auto-test/FTC900.sh b/test/auto-test/FTC900.sh index f76d21e4..db21152c 100755 --- a/test/auto-test/FTC900.sh +++ b/test/auto-test/FTC900.sh @@ -20,10 +20,10 @@ TC_ONELINE_DESCR="Preparation for test of the Control Panel and the Health Check app - populating a number of ric simulators with types and instances" #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" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM NGW KUBEPROXY" #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES="CP CR MR PA RICSIM KUBEPROXY NGW" +KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM KUBEPROXY NGW" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" @@ -54,11 +54,11 @@ start_ric_simulators $RIC_SIM_PREFIX"_g1" $OSC_NUM_RICS OSC_2.1.0 start_ric_simulators $RIC_SIM_PREFIX"_g2" $STD_NUM_RICS STD_1.1.3 -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then start_ric_simulators $RIC_SIM_PREFIX"_g3" $STD_NUM_RICS STD_2.0.0 fi -start_mr #Just to prevent errors in the agent log... +start_mr #Just to prevent errors in the a1pms log... start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE @@ -66,24 +66,24 @@ if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE fi -start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE +start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE -use_agent_rest_http +use_a1pms_rest_http prepare_consul_config NOSDNC ".consul_config.json" if [ $RUNMODE == "KUBE" ]; then - agent_load_config ".consul_config.json" + a1pms_load_config ".consul_config.json" else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then - api_put_configuration 200 ".consul_config.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + a1pms_api_put_configuration 200 ".consul_config.json" else start_consul_cbs consul_config_app ".consul_config.json" fi fi -api_get_status 200 +a1pms_api_get_status 200 # Print the A1 version for OSC for ((i=1; i<=$OSC_NUM_RICS; i++)) @@ -98,7 +98,7 @@ do sim_print $RIC_SIM_PREFIX"_g2_"$i interface done -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then # Print the A1 version for STD 2.X for ((i=1; i<=$STD_NUM_RICS; i++)) do @@ -116,39 +116,39 @@ done #Check the number of schemas and the individual schemas in OSC -if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 4 300 +if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-types 4 300 for ((i=1; i<=$OSC_NUM_RICS; i++)) do - api_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g1_"$i 3 120 + a1pms_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g1_"$i 3 120 done # Check the schemas in OSC for ((i=1; i<=$OSC_NUM_RICS; i++)) do - api_get_policy_type 200 2 testdata/OSC/hw-agent-modified.json - api_get_policy_type 200 100 testdata/OSC/qos-agent-modified.json - api_get_policy_type 200 20008 testdata/OSC/tsa-agent-modified.json + a1pms_api_get_policy_type 200 2 testdata/OSC/hw-a1pms-modified.json + a1pms_api_get_policy_type 200 100 testdata/OSC/qos-a1pms-modified.json + a1pms_api_get_policy_type 200 20008 testdata/OSC/tsa-a1pms-modified.json done else - api_equal json:policy_types 4 300 + a1pms_equal json:policy_types 4 300 for ((i=1; i<=$OSC_NUM_RICS; i++)) do - api_equal json:policy_types?ric=$RIC_SIM_PREFIX"_g1_"$i 3 120 + a1pms_equal json:policy_types?ric=$RIC_SIM_PREFIX"_g1_"$i 3 120 done # Check the schemas in OSC for ((i=1; i<=$OSC_NUM_RICS; i++)) do - api_get_policy_schema 200 2 testdata/OSC/hw-agent-modified.json - api_get_policy_schema 200 100 testdata/OSC/qos-agent-modified.json - api_get_policy_schema 200 20008 testdata/OSC/tsa-agent-modified.json + a1pms_api_get_policy_schema 200 2 testdata/OSC/hw-a1pms-modified.json + a1pms_api_get_policy_schema 200 100 testdata/OSC/qos-a1pms-modified.json + a1pms_api_get_policy_schema 200 20008 testdata/OSC/tsa-a1pms-modified.json done fi -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then # Load the polictypes in std for ((i=1; i<=$STD_NUM_RICS; i++)) @@ -158,27 +158,27 @@ if [ "$PMS_VERSION" == "V2" ]; then done #Check the number of schemas and the individual schemas in STD - api_equal json:policy-types 6 120 + a1pms_equal json:policy-types 6 120 for ((i=1; i<=$STD_NUM_RICS; i++)) do - api_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g3_"$i 2 120 + a1pms_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g3_"$i 2 120 done # Check the schemas in STD for ((i=1; i<=$STD_NUM_RICS; i++)) do - api_get_policy_type 200 STD_QOS_0_2_0 demo-testdata/STD2/qos-agent-modified.json - api_get_policy_type 200 'STD_QOS2_0.1.0' demo-testdata/STD2/qos2-agent-modified.json + a1pms_api_get_policy_type 200 STD_QOS_0_2_0 demo-testdata/STD2/qos-a1pms-modified.json + a1pms_api_get_policy_type 200 'STD_QOS2_0.1.0' demo-testdata/STD2/qos2-a1pms-modified.json done fi # Create policies -use_agent_rest_http +use_a1pms_rest_http -api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/1" +a1pms_api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/1" -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then notificationurl=$CR_SERVICE_APP_PATH_0"/test" else notificationurl="" @@ -188,11 +188,11 @@ fi for ((i=1; i<=$OSC_NUM_RICS; i++)) do generate_policy_uuid - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 2 $((2000+$i)) NOTRANSIENT $notificationurl testdata/OSC/pihw_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 2 $((2000+$i)) NOTRANSIENT $notificationurl testdata/OSC/pihw_template.json 1 generate_policy_uuid - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 100 $((3000+$i)) NOTRANSIENT $notificationurl testdata/OSC/piqos_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 100 $((3000+$i)) NOTRANSIENT $notificationurl testdata/OSC/piqos_template.json 1 generate_policy_uuid - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 20008 $((4000+$i)) NOTRANSIENT $notificationurl testdata/OSC/pitsa_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 20008 $((4000+$i)) NOTRANSIENT $notificationurl testdata/OSC/pitsa_template.json 1 done @@ -207,12 +207,12 @@ done for ((i=1; i<=$STD_NUM_RICS; i++)) do generate_policy_uuid - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g2_"$i NOTYPE $((2100+$i)) NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1 - if [ "$PMS_VERSION" == "V2" ]; then + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g2_"$i NOTYPE $((2100+$i)) NOTRANSIENT $notificationurl testdata/STD/pi1_template.json 1 + if [ "$A1PMS_VERSION" == "V2" ]; then generate_policy_uuid - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i STD_QOS_0_2_0 $((2300+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i STD_QOS_0_2_0 $((2300+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 generate_policy_uuid - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i 'STD_QOS2_0.1.0' $((2400+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i 'STD_QOS2_0.1.0' $((2400+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 fi done @@ -221,12 +221,12 @@ done for ((i=1; i<=$STD_NUM_RICS; i++)) do sim_equal $RIC_SIM_PREFIX"_g2_"$i num_instances 1 - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then sim_equal $RIC_SIM_PREFIX"_g3_"$i num_instances 2 fi done -check_policy_agent_logs +check_a1pms_logs #### TEST COMPLETE #### diff --git a/test/auto-test/FTC_HELM_E_RELEASE.sh b/test/auto-test/FTC_HELM_E_RELEASE.sh index 0f7e30a0..c54cb4ff 100755 --- a/test/auto-test/FTC_HELM_E_RELEASE.sh +++ b/test/auto-test/FTC_HELM_E_RELEASE.sh @@ -27,7 +27,7 @@ DOCKER_INCLUDED_IMAGES="" # Not used - KUBE only test script #App names to include in the test when running kubernetes, space separated list KUBE_INCLUDED_IMAGES=" MR DMAAPMR CR PRODSTUB KUBEPROXY KAFKAPC" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list -KUBE_PRESTARTED_IMAGES=" PA RICSIM CP ICS RC SDNC DMAAPMED DMAAPADP" +KUBE_PRESTARTED_IMAGES=" A1PMS RICSIM CP ICS RC SDNC DMAAPMED DMAAPADP" #Ignore image in DOCKER_INCLUDED_IMAGES, KUBE_INCLUDED_IMAGES if #the image is not configured in the supplied env_file @@ -47,7 +47,7 @@ setup_testenvironment use_mr_https use_cr_https -use_agent_rest_https +use_a1pms_rest_https use_sdnc_https use_simulator_https use_ics_rest_https @@ -66,8 +66,8 @@ echo -e "$RED CHECK WHY RC HTTPS DOES NOT WORK $ERED" ###############################use_control_panel_https use_control_panel_http -if [ "$PMS_VERSION" == "V1" ]; then - echo "PMS VERSION 2 (V2) is required" +if [ "$A1PMS_VERSION" == "V1" ]; then + echo "A1PMS VERSION 2 (V2) is required" exit 1 fi @@ -75,7 +75,7 @@ clean_environment ics_kube_pvc_reset -pms_kube_pvc_reset +a1pms_kube_pvc_reset start_kube_proxy @@ -109,7 +109,7 @@ start_control_panel start_sdnc -start_policy_agent +start_a1pms start_cr 1 @@ -121,7 +121,7 @@ set_ics_trace start_rapp_catalogue -set_agent_trace +set_a1pms_trace #### Test RAPP Catalogue #### @@ -134,7 +134,7 @@ rapp_cat_api_get_services 200 "Emergency-response-app" v1 "Emergency-response-ap #Check the number of services rc_equal json:services 1 -api_get_status 200 +a1_a1pms_api_get_status 200 #### Test Policy Management Service #### @@ -170,7 +170,7 @@ do done #Check the number of schemas -api_equal json:policy-types 1 +a1pms_equal json:policy-types 1 # Load the polictypes in STD 2 for ((i=0; i<$STD_NUM_RICS; i++)) @@ -187,72 +187,72 @@ do done # Check that all rics are synced in -api_equal json:rics 6 300 +a1pms_equal json:rics 6 300 #Check the number of schemas and the individual schemas -api_equal json:policy-types 5 300 +a1pms_equal json:policy-types 5 300 for ((i=0; i<$STD_NUM_RICS; i++)) do ricid=$((3+$i)) - api_equal json:policy-types?ric_id=ric$ricid 1 120 + a1pms_equal json:policy-types?ric_id=ric$ricid 1 120 done for ((i=0; i<$STD_NUM_RICS; i++)) do ricid=$((5+$i)) - api_equal json:policy-types?ric_id=ric$ricid 2 120 + a1pms_equal json:policy-types?ric_id=ric$ricid 2 120 done for ((i=0; i<$OSC_NUM_RICS; i++)) do ricid=$((1+$i)) - api_equal json:policy-types?ric_id=ric$ricid 2 120 + a1pms_equal json:policy-types?ric_id=ric$ricid 2 120 done #Check the schemas in STD 2 for ((i=0; i<$OSC_NUM_RICS; i++)) do ricid=$((5+$i)) - api_get_policy_type 200 STD_QOS_0_2_0 testdata/STD2/qos-agent-modified.json - api_get_policy_type 200 STD_QOS2_0.1.0 testdata/STD2/qos2-agent-modified.json + a1_a1pms_api_get_policy_type 200 STD_QOS_0_2_0 testdata/STD2/qos-a1pms-modified.json + a1_a1pms_api_get_policy_type 200 STD_QOS2_0.1.0 testdata/STD2/qos2-a1pms-modified.json done # Check the schemas in OSC for ((i=0; i<$OSC_NUM_RICS; i++)) do - api_get_policy_type 200 1 testdata/OSC/1-agent-modified.json - api_get_policy_type 200 2 testdata/OSC/2-agent-modified.json + a1_a1pms_api_get_policy_type 200 1 testdata/OSC/1-a1pms-modified.json + a1_a1pms_api_get_policy_type 200 2 testdata/OSC/2-a1pms-modified.json done -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 5 120 + a1pms_equal json:policy-types 5 120 - api_equal json:policies 0 + a1pms_equal json:policies 0 - api_equal json:policy-instances 0 + a1pms_equal json:policy-instances 0 else - api_equal json:policy_schemas 5 120 + a1pms_equal json:policy_schemas 5 120 - api_equal json:policy_types 5 + a1pms_equal json:policy_types 5 - api_equal json:policies 0 + a1pms_equal json:policies 0 - api_equal json:policy_ids 0 + a1pms_equal json:policy_ids 0 fi -api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/ER-app" +a1pms_api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/ER-app" # Create policies in STD for ((i=0; i<$STD_NUM_RICS; i++)) do ricid=$((3+$i)) generate_policy_uuid - api_put_policy 201 "Emergency-response-app" ric$ricid NOTYPE $((1100+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid NOTYPE $((1100+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD/pi1_template.json 1 generate_policy_uuid - api_put_policy 201 "Emergency-response-app" ric$ricid NOTYPE $((1200+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid NOTYPE $((1200+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD/pi1_template.json 1 done #Create policies in STD 2 @@ -260,9 +260,9 @@ for ((i=0; i<$STD_NUM_RICS; i++)) do ricid=$((5+$i)) generate_policy_uuid - api_put_policy 201 "Emergency-response-app" ric$ricid STD_QOS_0_2_0 $((2100+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD2/pi_qos_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid STD_QOS_0_2_0 $((2100+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD2/pi_qos_template.json 1 generate_policy_uuid - api_put_policy 201 "Emergency-response-app" ric$ricid STD_QOS2_0.1.0 $((2200+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD2/pi_qos2_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid STD_QOS2_0.1.0 $((2200+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"std2" testdata/STD2/pi_qos2_template.json 1 done # Create policies in OSC @@ -270,9 +270,9 @@ for ((i=0; i<$OSC_NUM_RICS; i++)) do ricid=$((1+$i)) generate_policy_uuid - api_put_policy 201 "Emergency-response-app" ric$ricid 1 $((3100+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"osc" testdata/OSC/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid 1 $((3100+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"osc" testdata/OSC/pi1_template.json 1 generate_policy_uuid - api_put_policy 201 "Emergency-response-app" ric$ricid 2 $((3200+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"osc" testdata/OSC/pi2_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" ric$ricid 2 $((3200+$i)) NOTRANSIENT $CR_SERVICE_APP_PATH_0/"osc" testdata/OSC/pi2_template.json 1 done @@ -289,30 +289,30 @@ do sim_equal "a1-sim-osc-"$i num_instances 2 done -stop_policy_agent +stop_a1pms -start_stopped_policy_agent +start_stopped_a1pms -# Check PMS state after restart +# Check A1PMS state after restart sleep_wait 200 -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 5 120 + a1pms_equal json:policy-types 5 120 - api_equal json:policies 12 + a1pms_equal json:policies 12 - api_equal json:policy-instances 12 + a1pms_equal json:policy-instances 12 else - api_equal json:policy_schemas 5 120 + a1pms_equal json:policy_schemas 5 120 - api_equal json:policy_types 5 + a1pms_equal json:policy_types 5 - api_equal json:policies 12 + a1pms_equal json:policies 12 - api_equal json:policy_ids 12 + a1pms_equal json:policy_ids 12 fi # Check the number of policies in STD and STD2 @@ -486,7 +486,7 @@ else ics_api_a1_get_job_status 200 job2 DISABLED fi -check_policy_agent_logs +check_a1pms_logs check_ics_logs check_sdnc_logs diff --git a/test/auto-test/ONAP_UC.sh b/test/auto-test/ONAP_UC.sh index 7ddff001..078e59c8 100755 --- a/test/auto-test/ONAP_UC.sh +++ b/test/auto-test/ONAP_UC.sh @@ -20,10 +20,10 @@ TC_ONELINE_DESCR="ONAP Use case REQ-626" #App names to include in the test when running docker, space separated list -DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR DMAAPMR PA RICSIM SDNC NGW KUBEPROXY" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR DMAAPMR A1PMS RICSIM SDNC NGW KUBEPROXY" #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES="CP CR MR DMAAPMR PA RICSIM SDNC KUBEPROXY NGW" +KUBE_INCLUDED_IMAGES="CP CR MR DMAAPMR A1PMS RICSIM SDNC KUBEPROXY NGW" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" @@ -47,15 +47,15 @@ setup_testenvironment ########################## use_cr_https -use_agent_rest_https +use_a1pms_rest_https use_sdnc_https use_simulator_https use_mr_https - -if [ "$PMS_VERSION" == "V2" ]; then +__httpx="HTTPS" +if [ "$A1PMS_VERSION" == "V2" ]; then notificationurl=$CR_SERVICE_APP_PATH_0"/test" else - echo "Version V2 of PMS is needed, exiting..." + echo "Version V2 of A1PMS is needed, exiting..." exit 1 fi @@ -67,7 +67,7 @@ for interface in $TESTED_VARIANTS ; do echo "#####################################################################" echo "#####################################################################" - echo "### Testing agent: $interface using https" + echo "### Testing a1pms: $interface using https" echo "#####################################################################" echo "#####################################################################" @@ -76,9 +76,9 @@ for interface in $TESTED_VARIANTS ; do start_kube_proxy if [[ $interface = *"DMAAP"* ]]; then - use_agent_dmaap_https + use_a1pms_dmaap_https else - use_agent_rest_https + use_a1pms_rest_https fi OSC_NUM_RICS=1 @@ -106,32 +106,32 @@ for interface in $TESTED_VARIANTS ; do prepare_consul_config NOSDNC ".consul_config.json" fi - start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE + start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE - set_agent_trace + set_a1pms_trace if [ $RUNMODE == "KUBE" ]; then - agent_load_config ".consul_config.json" + a1pms_load_config ".consul_config.json" else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then #Temporary switch to http/https if dmaap use. Otherwise it is not possibble to push config if [ $__httpx == "HTTPS" ]; then - use_agent_rest_https + use_a1pms_rest_https else - use_agent_rest_http + use_a1pms_rest_http fi - api_put_configuration 200 ".consul_config.json" + a1pms_api_put_configuration 200 ".consul_config.json" if [ $__httpx == "HTTPS" ]; then if [[ $interface = *"DMAAP"* ]]; then - use_agent_dmaap_https + use_a1pms_dmaap_https else - use_agent_rest_https + use_a1pms_rest_https fi else if [[ $interface = *"DMAAP"* ]]; then - use_agent_dmaap_http + use_a1pms_dmaap_http else - use_agent_rest_http + use_a1pms_rest_http fi fi else @@ -141,9 +141,9 @@ for interface in $TESTED_VARIANTS ; do fi # Check that all rics are synced in - api_equal json:rics 3 300 + a1pms_equal json:rics 3 300 - api_get_status 200 + a1pms_api_get_status 200 # Print the A1 version for OSC for ((i=1; i<=$OSC_NUM_RICS; i++)) @@ -176,18 +176,18 @@ for interface in $TESTED_VARIANTS ; do done #Check the number of schemas and the individual schemas in OSC - api_equal json:policy-types 3 300 + a1pms_equal json:policy-types 3 300 for ((i=1; i<=$OSC_NUM_RICS; i++)) do - api_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g1_"$i 2 120 + a1pms_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g1_"$i 2 120 done # Check the schemas in OSC for ((i=1; i<=$OSC_NUM_RICS; i++)) do - api_get_policy_type 200 100 demo-testdata/OSC/qos-agent-modified.json - api_get_policy_type 200 20008 demo-testdata/OSC/tsa-agent-modified.json + a1pms_api_get_policy_type 200 100 demo-testdata/OSC/qos-a1pms-modified.json + a1pms_api_get_policy_type 200 20008 demo-testdata/OSC/tsa-a1pms-modified.json done @@ -199,37 +199,37 @@ for interface in $TESTED_VARIANTS ; do done #Check the number of schemas and the individual schemas in STD - api_equal json:policy-types 5 120 + a1pms_equal json:policy-types 5 120 for ((i=1; i<=$STD_NUM_RICS; i++)) do - api_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g3_"$i 2 120 + a1pms_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g3_"$i 2 120 done # Check the schemas in STD for ((i=1; i<=$STD_NUM_RICS; i++)) do - api_get_policy_type 200 STD_QOS_0_2_0 demo-testdata/STD2/qos-agent-modified.json - api_get_policy_type 200 'STD_QOS2_0.1.0' demo-testdata/STD2/qos2-agent-modified.json + a1pms_api_get_policy_type 200 STD_QOS_0_2_0 demo-testdata/STD2/qos-a1pms-modified.json + a1pms_api_get_policy_type 200 'STD_QOS2_0.1.0' demo-testdata/STD2/qos2-a1pms-modified.json done #Check the number of types - api_equal json:policy-types 5 120 + a1pms_equal json:policy-types 5 120 ################################################################# ## REQ: A1 Policy Type / Instance Operations ################################################################# # Create policies - use_agent_rest_http + use_a1pms_rest_http - api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/1" + a1pms_api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/1" # Create policies in OSC for ((i=1; i<=$OSC_NUM_RICS; i++)) do - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 100 $((3000+$i)) NOTRANSIENT $notificationurl demo-testdata/OSC/piqos_template.json 1 - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 20008 $((4000+$i)) NOTRANSIENT $notificationurl demo-testdata/OSC/pitsa_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 100 $((3000+$i)) NOTRANSIENT $notificationurl demo-testdata/OSC/piqos_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 20008 $((4000+$i)) NOTRANSIENT $notificationurl demo-testdata/OSC/pitsa_template.json 1 done @@ -243,9 +243,9 @@ for interface in $TESTED_VARIANTS ; do # Create policies in STD for ((i=1; i<=$STD_NUM_RICS; i++)) do - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g2_"$i NOTYPE $((2100+$i)) NOTRANSIENT $notificationurl demo-testdata/STD/pi1_template.json 1 - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i STD_QOS_0_2_0 $((2300+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i 'STD_QOS2_0.1.0' $((2400+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g2_"$i NOTYPE $((2100+$i)) NOTRANSIENT $notificationurl demo-testdata/STD/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i STD_QOS_0_2_0 $((2300+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i 'STD_QOS2_0.1.0' $((2400+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 done @@ -263,24 +263,24 @@ for interface in $TESTED_VARIANTS ; do # Check status STD for ((i=1; i<=$STD_NUM_RICS; i++)) do - api_get_policy_status 200 $((2100+$i)) STD "UNDEFINED" - api_get_policy_status 200 $((2300+$i)) STD2 EMPTY EMPTY - api_get_policy_status 200 $((2400+$i)) STD2 EMPTY EMPTY + a1pms_api_get_policy_status 200 $((2100+$i)) STD "UNDEFINED" + a1pms_api_get_policy_status 200 $((2300+$i)) STD2 EMPTY EMPTY + a1pms_api_get_policy_status 200 $((2400+$i)) STD2 EMPTY EMPTY done # Check status OSC VAL='NOT IN EFFECT' for ((i=1; i<=$OSC_NUM_RICS; i++)) do - api_get_policy_status 200 $((3000+$i)) OSC "$VAL" "false" - api_get_policy_status 200 $((4000+$i)) OSC "$VAL" "false" + a1pms_api_get_policy_status 200 $((3000+$i)) OSC "$VAL" "false" + a1pms_api_get_policy_status 200 $((4000+$i)) OSC "$VAL" "false" done # Note: Status callback is not tested since this callback (http POST) is made from the # ricsim directly to the receiver of the status, i.e. the status does NOT - # pass through PMS + # pass through A1PMS - check_policy_agent_logs + check_a1pms_logs if [[ $interface = *"SDNC"* ]]; then check_sdnc_logs diff --git a/test/auto-test/PM_DEMO.sh b/test/auto-test/PM_DEMO.sh index f0ade77c..d80dd6dc 100755 --- a/test/auto-test/PM_DEMO.sh +++ b/test/auto-test/PM_DEMO.sh @@ -20,10 +20,10 @@ TC_ONELINE_DESCR="Preparation demo setup - populating a number of ric simulators with types and instances" #App names to include in the test when running docker, space separated list -DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC NGW KUBEPROXY" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM SDNC NGW KUBEPROXY" #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES="CP CR MR PA RICSIM SDNC KUBEPROXY NGW" +KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC KUBEPROXY NGW" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" @@ -47,11 +47,11 @@ setup_testenvironment ########################## use_cr_https -use_agent_rest_https +use_a1pms_rest_https use_sdnc_https use_simulator_https -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then notificationurl=$CR_SERVICE_APP_PATH_0"/test" else notificationurl="" @@ -68,11 +68,11 @@ start_ric_simulators $RIC_SIM_PREFIX"_g1" $OSC_NUM_RICS OSC_2.1.0 start_ric_simulators $RIC_SIM_PREFIX"_g2" $STD_NUM_RICS STD_1.1.3 -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then start_ric_simulators $RIC_SIM_PREFIX"_g3" $STD_NUM_RICS STD_2.0.0 fi -start_mr #Just to prevent errors in the agent log... +start_mr #Just to prevent errors in the a1pms log... start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE @@ -82,24 +82,24 @@ fi start_sdnc -start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE +start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE -set_agent_trace +set_a1pms_trace prepare_consul_config SDNC ".consul_config.json" if [ $RUNMODE == "KUBE" ]; then - agent_load_config ".consul_config.json" + a1pms_load_config ".consul_config.json" else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then - api_put_configuration 200 ".consul_config.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + a1pms_api_put_configuration 200 ".consul_config.json" else start_consul_cbs consul_config_app ".consul_config.json" fi fi -api_get_status 200 +a1pms_api_get_status 200 # Print the A1 version for OSC for ((i=1; i<=$OSC_NUM_RICS; i++)) @@ -114,7 +114,7 @@ do sim_print $RIC_SIM_PREFIX"_g2_"$i interface done -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then # Print the A1 version for STD 2.X for ((i=1; i<=$STD_NUM_RICS; i++)) do @@ -132,41 +132,41 @@ done #Check the number of schemas and the individual schemas in OSC -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 3 300 + a1pms_equal json:policy-types 3 300 for ((i=1; i<=$OSC_NUM_RICS; i++)) do - api_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g1_"$i 2 120 + a1pms_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g1_"$i 2 120 done # Check the schemas in OSC for ((i=1; i<=$OSC_NUM_RICS; i++)) do - api_get_policy_type 200 100 demo-testdata/OSC/qos-agent-modified.json - api_get_policy_type 200 20008 demo-testdata/OSC/tsa-agent-modified.json + a1pms_api_get_policy_type 200 100 demo-testdata/OSC/qos-a1pms-modified.json + a1pms_api_get_policy_type 200 20008 demo-testdata/OSC/tsa-a1pms-modified.json done else - api_equal json:policy_types 3 300 + a1pms_equal json:policy_types 3 300 for ((i=1; i<=$OSC_NUM_RICS; i++)) do - api_equal json:policy_types?ric=$RIC_SIM_PREFIX"_g1_"$i 2 120 + a1pms_equal json:policy_types?ric=$RIC_SIM_PREFIX"_g1_"$i 2 120 done # Check the schemas in OSC for ((i=1; i<=$OSC_NUM_RICS; i++)) do - api_get_policy_schema 200 100 demo-testdata/OSC/qos-agent-modified.json - api_get_policy_schema 200 20008 demo-testdata/OSC/tsa-agent-modified.json + a1pms_api_get_policy_schema 200 100 demo-testdata/OSC/qos-a1pms-modified.json + a1pms_api_get_policy_schema 200 20008 demo-testdata/OSC/tsa-a1pms-modified.json done fi -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then # Load the polictypes in std for ((i=1; i<=$STD_NUM_RICS; i++)) @@ -176,41 +176,41 @@ if [ "$PMS_VERSION" == "V2" ]; then done #Check the number of schemas and the individual schemas in STD - api_equal json:policy-types 5 120 + a1pms_equal json:policy-types 5 120 for ((i=1; i<=$STD_NUM_RICS; i++)) do - api_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g3_"$i 2 120 + a1pms_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g3_"$i 2 120 done # Check the schemas in STD for ((i=1; i<=$STD_NUM_RICS; i++)) do - api_get_policy_type 200 STD_QOS_0_2_0 demo-testdata/STD2/qos-agent-modified.json - api_get_policy_type 200 'STD_QOS2_0.1.0' demo-testdata/STD2/qos2-agent-modified.json + a1pms_api_get_policy_type 200 STD_QOS_0_2_0 demo-testdata/STD2/qos-a1pms-modified.json + a1pms_api_get_policy_type 200 'STD_QOS2_0.1.0' demo-testdata/STD2/qos2-a1pms-modified.json done fi #Check the number of types -if [ "$PMS_VERSION" == "V2" ]; then - api_equal json:policy-types 5 120 +if [ "$A1PMS_VERSION" == "V2" ]; then + a1pms_equal json:policy-types 5 120 else - api_equal json:policy_types 3 120 + a1pms_equal json:policy_types 3 120 fi # Create policies -use_agent_rest_http +use_a1pms_rest_http -api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/1" +a1pms_api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/1" # Create policies in OSC for ((i=1; i<=$OSC_NUM_RICS; i++)) do generate_policy_uuid - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 100 $((3000+$i)) NOTRANSIENT $notificationurl demo-testdata/OSC/piqos_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 100 $((3000+$i)) NOTRANSIENT $notificationurl demo-testdata/OSC/piqos_template.json 1 generate_policy_uuid - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 20008 $((4000+$i)) NOTRANSIENT $notificationurl demo-testdata/OSC/pitsa_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 20008 $((4000+$i)) NOTRANSIENT $notificationurl demo-testdata/OSC/pitsa_template.json 1 done @@ -225,12 +225,12 @@ done for ((i=1; i<=$STD_NUM_RICS; i++)) do generate_policy_uuid - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g2_"$i NOTYPE $((2100+$i)) NOTRANSIENT $notificationurl demo-testdata/STD/pi1_template.json 1 - if [ "$PMS_VERSION" == "V2" ]; then + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g2_"$i NOTYPE $((2100+$i)) NOTRANSIENT $notificationurl demo-testdata/STD/pi1_template.json 1 + if [ "$A1PMS_VERSION" == "V2" ]; then generate_policy_uuid - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i STD_QOS_0_2_0 $((2300+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i STD_QOS_0_2_0 $((2300+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 generate_policy_uuid - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i 'STD_QOS2_0.1.0' $((2400+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i 'STD_QOS2_0.1.0' $((2400+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 fi done @@ -239,12 +239,12 @@ done for ((i=1; i<=$STD_NUM_RICS; i++)) do sim_equal $RIC_SIM_PREFIX"_g2_"$i num_instances 1 - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then sim_equal $RIC_SIM_PREFIX"_g3_"$i num_instances 2 fi done -check_policy_agent_logs +check_a1pms_logs check_sdnc_logs #### TEST COMPLETE #### diff --git a/test/auto-test/PM_EI_DEMO.sh b/test/auto-test/PM_EI_DEMO.sh index a917032d..a67e7e07 100755 --- a/test/auto-test/PM_EI_DEMO.sh +++ b/test/auto-test/PM_EI_DEMO.sh @@ -20,10 +20,10 @@ TC_ONELINE_DESCR="Preparation demo setup - policy management and information information" #App names to include in the test when running docker, space separated list -DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC ICS PRODSTUB RC HTTPPROXY KUBEPROXY NGW" +DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM SDNC ICS PRODSTUB RC HTTPPROXY KUBEPROXY NGW" #App names to include in the test when running kubernetes, space separated list -KUBE_INCLUDED_IMAGES=" MR CR PA RC PRODSTUB RICSIM CP ICS SDNC HTTPPROXY KUBEPROXY NGW" +KUBE_INCLUDED_IMAGES=" MR CR A1PMS RC PRODSTUB RICSIM CP ICS SDNC HTTPPROXY KUBEPROXY NGW" #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list KUBE_PRESTARTED_IMAGES="" @@ -47,7 +47,7 @@ setup_testenvironment ########################## use_cr_https -use_agent_rest_https +use_a1pms_rest_https use_sdnc_https use_simulator_https use_ics_rest_https @@ -59,10 +59,10 @@ else fi -if [ "$PMS_VERSION" == "V2" ]; then +if [ "$A1PMS_VERSION" == "V2" ]; then notificationurl=$CR_SERVICE_APP_PATH_0"/test" else - echo "PMS VERSION 2 (V2) is required" + echo "A1PMS VERSION 2 (V2) is required" exit 1 fi @@ -76,7 +76,7 @@ STD_NUM_RICS=2 start_ric_simulators $RIC_SIM_PREFIX"_g3" $STD_NUM_RICS STD_2.0.0 -start_mr #Just to prevent errors in the agent log... +start_mr #Just to prevent errors in the a1pms log... start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE @@ -84,17 +84,17 @@ if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE fi -start_sdnc # Comment this line to run PMS with proxy +start_sdnc # Comment this line to run A1PMS with proxy -start_policy_agent PROXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE +start_a1pms PROXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE -prepare_consul_config SDNC ".consul_config.json" #Change to NOSDNC if running PMS with proxy +prepare_consul_config SDNC ".consul_config.json" #Change to NOSDNC if running A1PMS with proxy if [ $RUNMODE == "KUBE" ]; then - agent_load_config ".consul_config.json" + a1pms_load_config ".consul_config.json" else - if [[ "$PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then - api_put_configuration 200 ".consul_config.json" + if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then + a1pms_api_put_configuration 200 ".consul_config.json" else start_consul_cbs consul_config_app ".consul_config.json" @@ -109,7 +109,7 @@ start_ics PROXY $SIM_GROUP/$ICS_COMPOSE_DIR/$ICS_CONFIG_FILE start_rapp_catalogue -set_agent_trace +set_a1pms_trace set_ics_trace @@ -124,7 +124,7 @@ rapp_cat_api_put_service 201 "Emergency-response-app" v1 "Emergency-response-app rapp_cat_api_get_services 200 "Emergency-response-app" v1 "Emergency-response-app" "Emergency-response-app" -api_get_status 200 +a1pms_api_get_status 200 # Print the A1 version for STD 2.X for ((i=1; i<=$STD_NUM_RICS; i++)) @@ -139,32 +139,32 @@ do done #Check the number of schemas and the individual schemas in STD -api_equal json:policy-types 2 120 +a1pms_equal json:policy-types 2 120 for ((i=1; i<=$STD_NUM_RICS; i++)) do - api_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g3_"$i 2 120 + a1pms_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g3_"$i 2 120 done # Check the schemas in STD for ((i=1; i<=$STD_NUM_RICS; i++)) do - api_get_policy_type 200 STD_QOS_0_2_0 demo-testdata/STD2/qos-agent-modified.json - api_get_policy_type 200 'STD_QOS2_0.1.0' demo-testdata/STD2/qos2-agent-modified.json + a1pms_api_get_policy_type 200 STD_QOS_0_2_0 demo-testdata/STD2/qos-a1pms-modified.json + a1pms_api_get_policy_type 200 'STD_QOS2_0.1.0' demo-testdata/STD2/qos2-a1pms-modified.json done #Check the number of types -api_equal json:policy-types 2 300 +a1pms_equal json:policy-types 2 300 -api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/1" +a1pms_api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/1" # Create policies in STD for ((i=1; i<=$STD_NUM_RICS; i++)) do generate_policy_uuid - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i STD_QOS_0_2_0 $((2300+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i STD_QOS_0_2_0 $((2300+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 generate_policy_uuid - api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i 'STD_QOS2_0.1.0' $((2400+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 + a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i 'STD_QOS2_0.1.0' $((2400+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 done @@ -259,7 +259,7 @@ else fi fi -check_policy_agent_logs +check_a1pms_logs check_ics_logs check_sdnc_logs diff --git a/test/auto-test/README.md b/test/auto-test/README.md index a6eab40a..d29c752d 100644 --- a/test/auto-test/README.md +++ b/test/auto-test/README.md @@ -88,15 +88,15 @@ ONAP ISTANBUL The test script are number using these basic categories where 0-999 are releated to the policy managment and 1000-1999 are related to information management. 2000-2999 are for southbound http proxy. There are also demo test cases that test more or less all components. These test scripts does not use the numbering scheme below. The numbering in each series corresponds to the following groupings -1-99 - Basic sanity tests, PMS +1-99 - Basic sanity tests, A1PMS -100-199 - API tests, PMS +100-199 - API tests, A1PMS -300-399 - Config changes and sync, PMS +300-399 - Config changes and sync, A1PMS -800-899 - Stability and capacity test, PMS +800-899 - Stability and capacity test, A1PMS -900-999 - Misc test, PMS +900-999 - Misc test, A1PMS 11XX - ICS API Tests diff --git a/test/auto-test/Suite-aegis.sh b/test/auto-test/Suite-aegis.sh index e7a5a51f..ddb1f083 100755 --- a/test/auto-test/Suite-aegis.sh +++ b/test/auto-test/Suite-aegis.sh @@ -17,7 +17,7 @@ # ============LICENSE_END================================================= # -TS_ONELINE_DESCR="Test suite - PMS endpoint aegis image testing. Agent REST, DMAAP and SNDC controller resconf" +TS_ONELINE_DESCR="Test suite - A1PMS endpoint aegis image testing. a1pms REST, DMAAP and SNDC controller resconf" . ../common/testsuite_common.sh diff --git a/test/auto-test/Suite-policy-all.sh b/test/auto-test/Suite-policy-all.sh index c032d2d8..017f9816 100755 --- a/test/auto-test/Suite-policy-all.sh +++ b/test/auto-test/Suite-policy-all.sh @@ -17,7 +17,7 @@ # ============LICENSE_END================================================= # -TS_ONELINE_DESCR="Test suite - all test cases except the stab test(s)" +TS_ONELINE_DESCR="Test suite - all test cases for a1pms except the stab test(s)" . ../common/testsuite_common.sh diff --git a/test/auto-test/Suite-policy-interfaces.sh b/test/auto-test/Suite-policy-interfaces.sh index afa3b668..f9baedff 100755 --- a/test/auto-test/Suite-policy-interfaces.sh +++ b/test/auto-test/Suite-policy-interfaces.sh @@ -17,7 +17,7 @@ # ============LICENSE_END================================================= # -TS_ONELINE_DESCR="Test suite - interface testing. Agent REST, DMAAP and SNDC controller resconf" +TS_ONELINE_DESCR="Test suite - interface testing. A1PMS REST, DMAAP and SNDC controller resconf" . ../common/testsuite_common.sh diff --git a/test/auto-test/demo-testdata/OSC/hw-agent-modified.json b/test/auto-test/demo-testdata/OSC/hw-a1pms-modified.json similarity index 100% rename from test/auto-test/demo-testdata/OSC/hw-agent-modified.json rename to test/auto-test/demo-testdata/OSC/hw-a1pms-modified.json diff --git a/test/auto-test/demo-testdata/OSC/qos-agent-modified.json b/test/auto-test/demo-testdata/OSC/qos-a1pms-modified.json similarity index 100% rename from test/auto-test/demo-testdata/OSC/qos-agent-modified.json rename to test/auto-test/demo-testdata/OSC/qos-a1pms-modified.json diff --git a/test/auto-test/demo-testdata/OSC/tsa-agent-modified.json b/test/auto-test/demo-testdata/OSC/tsa-a1pms-modified.json similarity index 100% rename from test/auto-test/demo-testdata/OSC/tsa-agent-modified.json rename to test/auto-test/demo-testdata/OSC/tsa-a1pms-modified.json diff --git a/test/auto-test/demo-testdata/STD2/qos-agent-modified.json b/test/auto-test/demo-testdata/STD2/qos-a1pms-modified.json similarity index 100% rename from test/auto-test/demo-testdata/STD2/qos-agent-modified.json rename to test/auto-test/demo-testdata/STD2/qos-a1pms-modified.json diff --git a/test/auto-test/demo-testdata/STD2/qos2-agent-modified.json b/test/auto-test/demo-testdata/STD2/qos2-a1pms-modified.json similarity index 100% rename from test/auto-test/demo-testdata/STD2/qos2-agent-modified.json rename to test/auto-test/demo-testdata/STD2/qos2-a1pms-modified.json diff --git a/test/auto-test/override_aegis_pms.sh b/test/auto-test/override_aegis_a1pms.sh similarity index 92% rename from test/auto-test/override_aegis_pms.sh rename to test/auto-test/override_aegis_a1pms.sh index 1c0ea01e..4fef6d53 100644 --- a/test/auto-test/override_aegis_pms.sh +++ b/test/auto-test/override_aegis_a1pms.sh @@ -18,4 +18,4 @@ # Override file for running the e-release helm recipe including all components -POLICY_AGENT_IMAGE_BASE="aegis-onap-docker-local.artifactory.est.tech/onap/ccsdk-oran-a1policymanagementservice" +A1PMS_IMAGE_BASE="aegis-onap-docker-local.artifactory.est.tech/onap/ccsdk-oran-a1policymanagementservice" diff --git a/test/auto-test/override_ftc_helm_e_release.sh b/test/auto-test/override_ftc_helm_e_release.sh index 67edcb70..90866c2f 100644 --- a/test/auto-test/override_ftc_helm_e_release.sh +++ b/test/auto-test/override_ftc_helm_e_release.sh @@ -26,8 +26,8 @@ RIC_SIM_COMMON_SVC_NAME="a1-sim" ICS_EXTERNAL_PORT=9082 ICS_EXTERNAL_SECURE_PORT=9083 -POLICY_AGENT_EXTERNAL_PORT=9080 -POLICY_AGENT_EXTERNAL_SECURE_PORT=9081 +A1PMS_EXTERNAL_PORT=9080 +A1PMS_EXTERNAL_SECURE_PORT=9081 SDNC_EXTERNAL_PORT=8282 SDNC_EXTERNAL_SECURE_PORT=8383 diff --git a/test/auto-test/testdata/OSC/1-agent-modified.json b/test/auto-test/testdata/OSC/1-a1pms-modified.json similarity index 100% rename from test/auto-test/testdata/OSC/1-agent-modified.json rename to test/auto-test/testdata/OSC/1-a1pms-modified.json diff --git a/test/auto-test/testdata/OSC/2-agent-modified.json b/test/auto-test/testdata/OSC/2-a1pms-modified.json similarity index 100% rename from test/auto-test/testdata/OSC/2-agent-modified.json rename to test/auto-test/testdata/OSC/2-a1pms-modified.json diff --git a/test/auto-test/testdata/OSC/3-agent-modified.json b/test/auto-test/testdata/OSC/3-a1pms-modified.json similarity index 100% rename from test/auto-test/testdata/OSC/3-agent-modified.json rename to test/auto-test/testdata/OSC/3-a1pms-modified.json diff --git a/test/auto-test/testdata/OSC/4-agent-modified.json b/test/auto-test/testdata/OSC/4-a1pms-modified.json similarity index 100% rename from test/auto-test/testdata/OSC/4-agent-modified.json rename to test/auto-test/testdata/OSC/4-a1pms-modified.json diff --git a/test/auto-test/testdata/OSC/5-agent-modified.json b/test/auto-test/testdata/OSC/5-a1pms-modified.json similarity index 100% rename from test/auto-test/testdata/OSC/5-agent-modified.json rename to test/auto-test/testdata/OSC/5-a1pms-modified.json diff --git a/test/auto-test/testdata/OSC/hw-agent-modified.json b/test/auto-test/testdata/OSC/hw-a1pms-modified.json similarity index 100% rename from test/auto-test/testdata/OSC/hw-agent-modified.json rename to test/auto-test/testdata/OSC/hw-a1pms-modified.json diff --git a/test/auto-test/testdata/OSC/qos-agent-modified.json b/test/auto-test/testdata/OSC/qos-a1pms-modified.json similarity index 100% rename from test/auto-test/testdata/OSC/qos-agent-modified.json rename to test/auto-test/testdata/OSC/qos-a1pms-modified.json diff --git a/test/auto-test/testdata/OSC/tsa-agent-modified.json b/test/auto-test/testdata/OSC/tsa-a1pms-modified.json similarity index 100% rename from test/auto-test/testdata/OSC/tsa-agent-modified.json rename to test/auto-test/testdata/OSC/tsa-a1pms-modified.json diff --git a/test/auto-test/testdata/STD2/qos-agent-modified.json b/test/auto-test/testdata/STD2/qos-a1pms-modified.json similarity index 100% rename from test/auto-test/testdata/STD2/qos-agent-modified.json rename to test/auto-test/testdata/STD2/qos-a1pms-modified.json diff --git a/test/auto-test/testdata/STD2/qos2-agent-modified.json b/test/auto-test/testdata/STD2/qos2-a1pms-modified.json similarity index 100% rename from test/auto-test/testdata/STD2/qos2-agent-modified.json rename to test/auto-test/testdata/STD2/qos2-a1pms-modified.json diff --git a/test/auto-test/utils/pa-logviewer.sh b/test/auto-test/utils/pa-logviewer.sh deleted file mode 100755 index 562bbea2..00000000 --- a/test/auto-test/utils/pa-logviewer.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env 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================================================= -# - -#Setup trace on - -curl http://localhost:8081/actuator/loggers/org.oransc.policyagent.clients.AsyncRestClient -X POST -H 'Content-Type: application/json' -d '{"configuredLevel":"debug"}' - -docker logs -f policy-agent-container \ No newline at end of file diff --git a/test/common/README.md b/test/common/README.md index e179f30e..fcb33b3a 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -6,7 +6,7 @@ Some of the scripts can also be used for other kinds of tests, for example basic ## Overview for common test scripts and files ## `api_curl.sh` \ -A common curl based function for the agent and ics apis. Also partly used for the Callback receiver and RAPP Catalogue apis. +A common curl based function for the a1pms and ics apis. Also partly used for the Callback receiver and RAPP Catalogue apis. `cbs_api_function.sh` \ All functions are implemented in `consul_api_function.sh`. @@ -89,8 +89,8 @@ Contains functions for managing the MR Stub and the Dmaap Message Router `ngw_api_functions.sh` \ Contains functions for managing the Non-RT RIC Gateway -`pa_api_functions.sh` \ -Contains functions for adapting towards the Policy Management Service (PMS) API, also via dmaap (using a message-router stub interface) +`a1pms_api_functions.sh` \ +Contains functions for adapting towards the Policy Management Service (A1PMS) API, also via dmaap (using a message-router stub interface) `prodstub_api_functions.sh` \ Contains functions for adapting towards the Producer stub interface - simulates a producer. @@ -333,7 +333,7 @@ Delete a chart in chartmusem ## Function: consul_config_app ## -Function to load a json config from a file into consul for the Policy Agent +Function to load a json config from a file into consul for the A1PMS | arg list | |--| @@ -1990,9 +1990,9 @@ Start the the gateway container in docker or kube depending on start mode |--| | None | -## Function: gateway_pms_get_status ## +## Function: gateway_a1pms_get_status ## -Sample test of pms api (status) +Sample test of a1pms api (status) Only response code tested - not payload | arg list | |--| @@ -2014,44 +2014,44 @@ Only response code tested - not payload | --------- | ----------- | | `` | Expected http response code | -# Description of functions in pa_api_functions.sh # +# Description of functions in a1pms_api_functions.sh # ## General ## -Both PMS version 1 and 2 are supported. The version is controlled by the env variable `$PMS_VERSION` set in the test env file. +Both A1PMS version 1 and 2 are supported. The version is controlled by the env variable `$A1PMS_VERSION` set in the test env file. For api function in version 2, an url prefix is added if configured. -## Function: use_agent_rest_http ## +## Function: use_a1pms_rest_http ## -Use http for all API calls to the Policy Agent. This is the default. +Use http for all API calls to the A1PMS. This is the default. | arg list | |--| | None | -## Function: use_agent_rest_https ## +## Function: use_a1pms_rest_https ## -Use https for all API calls to the Policy Agent. +Use https for all API calls to the A1PMS. | arg list | |--| | None | -## Function: use_agent_dmaap_http ## +## Function: use_a1pms_dmaap_http ## -Send and recieve all API calls to the Policy Agent over Dmaap via the MR over http. +Send and recieve all API calls to the A1PMS over Dmaap via the MR over http. | arg list | |--| | None | -## Function: use_agent_dmaap_https ## +## Function: use_a1pms_dmaap_https ## -Send and recieve all API callss to the Policy Agent over Dmaap via the MR over https. +Send and recieve all API callss to the A1PMS over Dmaap via the MR over https. | arg list | |--| | None | -## Function: start_policy_agent ## +## Function: start_a1pms ## -Start the Policy Agent container or corresponding kube resources depending on docker/kube mode. +Start the A1PMS container or corresponding kube resources depending on docker/kube mode. | arg list | |--| | `` | @@ -2065,16 +2065,16 @@ Start the Policy Agent container or corresponding kube resources depending on do | ``| Path to application.yaml | | `` | Optional path to application_configuration.json | -## Function: stop_policy_agent ## +## Function: stop_a1pms ## -Stop the pms container (docker) or scale it to zero (kubernetes). +Stop the a1pms container (docker) or scale it to zero (kubernetes). | arg list | |--| | None | -## Function: start_stopped_policy_agent ## +## Function: start_stopped_a1pms ## -Start a previousely stopped pms container (docker) or scale it to 1 (kubernetes). +Start a previousely stopped a1pms container (docker) or scale it to 1 (kubernetes). | arg list | |--| | None | @@ -2092,7 +2092,7 @@ Function to prepare a Consul config based on the previously configured (and star | `NOSDNC` | Configure without controller | | `` | The path to the json output file containing the prepared config. This file is used in 'consul_config_app' | -## Function: agent_load_config ## +## Function: a1pms_load_config ## Load the config into a config map (kubernetes only). | arg list | @@ -2103,37 +2103,37 @@ Load the config into a config map (kubernetes only). | --------- | ----------- | | `` | Path to application_configuration.json | -## Function: set_agent_debug ## +## Function: set_a1pms_debug ## -Configure the Policy Agent log on debug level. The Policy Agent must be running. +Configure the A1PMS log on debug level. The A1PMS must be running. | arg list | |--| | None | -## Function: set_agent_trace ## +## Function: set_a1pms_trace ## -Configure the Policy Agent log on trace level. The Policy Agent must be running. +Configure the A1PMS log on trace level. The A1PMS must be running. | arg list | |--| | None | -## Function: use_agent_retries ## +## Function: use_a1pms_retries ## -Configure the Policy Agent to make upto 5 retries if an API calls return any of the specified http return codes. +Configure the A1PMS to make upto 5 retries if an API calls return any of the specified http return codes. | arg list | |--| | `[]*` | -## Function: check_policy_agent_logs ## +## Function: check_a1pms_logs ## -Check the Policy Agent log for any warnings and errors and print the count of each. +Check the A1PMS log for any warnings and errors and print the count of each. | arg list | |--| | None | -## Function: api_equal ## +## Function: a1pms_equal ## -Tests if the array length of a json array in the Policy Agent simulator is equal to a target value. +Tests if the array length of a json array in the A1PMS simulator is equal to a target value. Without the timeout, the test sets pass or fail immediately depending on if the array length is equal to the target or not. With the timeout, the test waits up to the timeout seconds before setting pass or fail depending on if the array length becomes equal to the target value or not. See the 'cr' dir for more details. @@ -2148,7 +2148,7 @@ See the 'cr' dir for more details. | `` | Target value for the length | | `` | Max time to wait for the length to reach the target value | -## Function: api_get_policies ## +## Function: a1pms_api_get_policies ## Test of GET '/policies' or V2 GET '/v2/policy-instances' and optional check of the array of returned policies. To test the response code only, provide the response code parameter as well as the following three parameters. @@ -2178,7 +2178,7 @@ To also test the response payload add the 'NOID' for an expected empty array or | `notification-url` | Url for notifications | | `` | Path to the template file for the policy (same template used when creating the policy) | -## Function: api_get_policy ## +## Function: a1pms_api_get_policy ## Test of GET '/policy' or V2 GET '/v2/policies/{policy_id}' and optional check of the returned json payload. To test the the response code only, provide the expected response code and policy id. @@ -2204,7 +2204,7 @@ To test the contents of the returned json payload, add a path to the template fi | `transient` | Transient, true or false | | `notification-url` | Url for notifications | -## Function: api_put_policy ## +## Function: a1pms_api_put_policy ## Test of PUT '/policy' or V2 PUT '/policies'. If more than one policy shall be created, add a count value to indicate the number of policies to create. Note that if more than one policy shall be created the provided policy-id must be numerical (will be used as the starting id). @@ -2230,15 +2230,15 @@ If more than one policy shall be created, add a count value to indicate the numb | `` | Path to the template file for the policy | | `` | An optional count (default is 1). If a value greater than 1 is given, the policy ids will use the given policy id as the first id and add 1 to that id for each new policy | -## Function: api_put_policy_batch ## +## Function: a1pms_api_put_policy_batch ## -This tests the same as function 'api_put_policy' except that all put requests are sent to dmaap in one go and then the responses are polled one by one. -If the agent api is not configured to use dmaap (see 'use_agent_dmaap', 'use_agent_rest_http' and 'use_agent_rest_https'), an error message is printed. -For arg list and parameters, see 'api_put_policy'. +This tests the same as function 'a1pms_api_put_policy' except that all put requests are sent to dmaap in one go and then the responses are polled one by one. +If the a1pms api is not configured to use dmaap (see 'use_a1pms_dmaap', 'use_a1pms_rest_http' and 'use_a1pms_rest_https'), an error message is printed. +For arg list and parameters, see 'a1pms_api_put_policy'. -## Function: api_put_policy_parallel ## +## Function: a1pms_api_put_policy_parallel ## -This tests the same as function 'api_put_policy' except that the policy create is spread out over a number of processes and it only uses the agent rest API. The total number of policies created is determined by the product of the parameters 'number-of-rics' and 'count'. The parameter 'number-of-threads' shall be selected to be not evenly divisible by the product of the parameters 'number-of-rics' and 'count' - this is to ensure that one process does not handle the creation of all the policies in one ric. +This tests the same as function 'a1pms_api_put_policy' except that the policy create is spread out over a number of processes and it only uses the a1pms rest API. The total number of policies created is determined by the product of the parameters 'number-of-rics' and 'count'. The parameter 'number-of-threads' shall be selected to be not evenly divisible by the product of the parameters 'number-of-rics' and 'count' - this is to ensure that one process does not handle the creation of all the policies in one ric. | arg list | |--| @@ -2262,7 +2262,7 @@ This tests the same as function 'api_put_policy' except that the policy create i | `` | Number of policies per ric | | `` | Number of threads (processes) to run in parallel | -## Function: api_delete_policy ## +## Function: a1pms_api_delete_policy ## This tests the DELETE '/policy' or V2 DELETE '/v2/policies/{policy_id}'. Removes the indicated policy or a 'count' number of policies starting with 'policy-id' as the first id. @@ -2276,15 +2276,15 @@ This tests the DELETE '/policy' or V2 DELETE '/v2/policies/{policy_id}'. Removes | `` | Id of the policy | | `` | An optional count of policies to delete. The 'policy-id' will be the first id to be deleted. | -## Function: api_delete_policy_batch ## +## Function: a1pms_api_delete_policy_batch ## -This tests the same as function 'api_delete_policy' except that all delete requests are sent to dmaap in one go and then the responses are polled one by one. -If the agent api is not configured to used dmaap (see 'use_agent_dmaap', 'use_agent_rest_http' and 'use_agent_rest_https'), an error message is printed. -For arg list and parameters, see 'api_delete_policy'. +This tests the same as function 'a1pms_api_delete_policy' except that all delete requests are sent to dmaap in one go and then the responses are polled one by one. +If the a1pms api is not configured to used dmaap (see 'use_a1pms_dmaap', 'use_a1pms_rest_http' and 'use_a1pms_rest_https'), an error message is printed. +For arg list and parameters, see 'a1pms_api_delete_policy'. -## Function: api_delete_policy_parallel ## +## Function: a1pms_api_delete_policy_parallel ## -This tests the same as function 'api_delete_policy' except that the policy delete is spread out over a number of processes and it only uses the agent rest API. The total number of policies deleted is determined by the product of the parameters 'number-of-rics' and 'count'. The parameter 'number-of-threads' shall be selected to be not evenly divisible by the product of the parameters 'number-of-rics' and 'count' - this is to ensure that one process does not handle the deletion of all the policies in one ric. +This tests the same as function 'a1pms_api_delete_policy' except that the policy delete is spread out over a number of processes and it only uses the a1pms rest API. The total number of policies deleted is determined by the product of the parameters 'number-of-rics' and 'count'. The parameter 'number-of-threads' shall be selected to be not evenly divisible by the product of the parameters 'number-of-rics' and 'count' - this is to ensure that one process does not handle the deletion of all the policies in one ric. | arg list | |--| @@ -2299,7 +2299,7 @@ This tests the same as function 'api_delete_policy' except that the policy delet | `` | Number of policies per ric | | `` | Number of threads (processes) to run in parallel | -## Function: api_get_policy_ids ## +## Function: a1pms_api_get_policy_ids ## Test of GET '/policy_ids' or V2 GET '/v2/policies'. To test response code only, provide the response code parameter as well as the following three parameters. @@ -2321,7 +2321,7 @@ To also test the response payload add the 'NOID' for an expected empty array or | `NOID` | Indicator that no policy id is provided - indicate empty list of policies| | `` | Id of the policy | -## Function: api_get_policy_schema ## +## Function: a1pms_api_get_policy_schema ## Test of V2 GET '/v2/policy-types/{policyTypeId}' and optional check of the returned json schema. To test the response code only, provide the expected response code and policy type id. @@ -2337,7 +2337,7 @@ To test the contents of the returned json schema, add a path to a schema file to | `` | Id of the policy type | | `` | Path to the schema file for the policy type | -## Function: api_get_policy_schema ## +## Function: a1pms_api_get_policy_schema ## Test of GET '/policy_schema' and optional check of the returned json schema. To test the response code only, provide the expected response code and policy type id. @@ -2353,7 +2353,7 @@ To test the contents of the returned json schema, add a path to a schema file to | `` | Id of the policy type | | `` | Path to the schema file for the policy type | -## Function: api_get_policy_schemas ## +## Function: a1pms_api_get_policy_schemas ## Test of GET '/policy_schemas' and optional check of the returned json schemas. To test the response code only, provide the expected response code and ric id (or NORIC if no ric is given). @@ -2371,7 +2371,7 @@ To test the contents of the returned json schema, add a path to a schema file to | `` | Path to the schema file for the policy type | | `NOFILE` | Indicate the template for an empty type | -## Function: api_get_policy_status ## +## Function: a1pms_api_get_policy_status ## Test of GET '/policy_status' or V2 GET '/policies/{policy_id}/status'. @@ -2392,7 +2392,7 @@ Test of GET '/policy_status' or V2 GET '/policies/{policy_id}/status'. | `` | Instance status | | `` | Deleted status, true or false | -## Function: api_get_policy_types ## +## Function: a1pms_api_get_policy_types ## Test of GET '/policy_types' or V2 GET '/v2/policy-types' and optional check of the returned ids. To test the response code only, provide the expected response code and ric id (or NORIC if no ric is given). @@ -2410,7 +2410,7 @@ To test the contents of the returned json payload, add the list of expected poli | `` | Id of the policy type | | `EMPTY` | Indicate the empty type | -## Function: api_get_status ## +## Function: a1pms_api_get_status ## Test of GET /status or V2 GET /status @@ -2422,7 +2422,7 @@ Test of GET /status or V2 GET /status | --------- | ----------- | | `` | Expected http response code | -## Function: api_get_ric ## +## Function: a1pms_api_get_ric ## Test of GET '/ric' or V2 GET '/v2/rics/ric' To test the response code only, provide the expected response code and managed element id. @@ -2445,7 +2445,7 @@ To test the returned ric id, provide the expected ric id. | `NORIC` | Indicator no RIC | | `string-of-ricinfo` | String of ric info | -## Function: api_get_rics ## +## Function: a1pms_api_get_rics ## Test of GET '/rics' or V2 GET '/v2/rics' and optional check of the returned json payload (ricinfo). To test the response code only, provide the expected response code and policy type id (or NOTYPE if no type is given). @@ -2464,7 +2464,7 @@ Example
` = "ricsim_g1_1:me1_ricsim_g1_1,m | `NOTYPE>` | No type given | | `` | A space separated string of ric info - needs to be quoted | -## Function: api_put_service ## +## Function: a1pms_api_put_service ## Test of PUT '/service' or V2 PUT '/service'. | arg list | @@ -2478,7 +2478,7 @@ Test of PUT '/service' or V2 PUT '/service'. | `` | Timeout value | | `` | Callback url | -## Function: api_get_services ## +## Function: a1pms_api_get_services ## Test of GET '/service' or V2 GET '/v2/services' and optional check of the returned json payload. To test only the response code, omit all parameters except the expected response code. @@ -2497,7 +2497,7 @@ To test the returned json, provide the parameters after the response code. | `` | Callback url | | `NOSERVICE` | Indicator of no target service name | -## Function: api_get_service_ids ## +## Function: a1pms_api_get_service_ids ## Test of GET '/services' or V2 GET /'v2/services'. Only check of service ids. @@ -2510,7 +2510,7 @@ Test of GET '/services' or V2 GET /'v2/services'. Only check of service ids. | `` | Expected http response code | | `` | Service name | -## Function: api_delete_services ## +## Function: a1pms_api_delete_services ## Test of DELETE '/services' or V2 DELETE '/v2/services/{serviceId}' @@ -2523,7 +2523,7 @@ Test of DELETE '/services' or V2 DELETE '/v2/services/{serviceId}' | `` | Expected http response code | | `` | Service name | -## Function: api_put_services_keepalive ## +## Function: a1pms_api_put_services_keepalive ## Test of PUT '/services/keepalive' or V2 PUT '/v2/services/{service_id}/keepalive' @@ -2536,7 +2536,7 @@ Test of PUT '/services/keepalive' or V2 PUT '/v2/services/{service_id}/keepalive | `` | Expected http response code | | `` | Service name | -## Function: api_put_configuration ## +## Function: a1pms_api_put_configuration ## Test of PUT '/v2/configuration' @@ -2549,7 +2549,7 @@ Test of PUT '/v2/configuration' | `` | Expected http response code | | `` | Path json config file | -## Function: api_get_configuration ## +## Function: a1pms_api_get_configuration ## Test of GET '/v2/configuration' @@ -2562,7 +2562,7 @@ Test of GET '/v2/configuration' | `` | Expected http response code | | `` | Path json config file to compare the retrieved config with | -## Function: pms_kube_pvc_reset ## +## Function: a1pms_kube_pvc_reset ## Admin reset to remove all policies and services All types and instances etc are removed - types and instances in a1 sims need to be removed separately NOTE - only works in kubernetes and the pod should not be running diff --git a/test/common/pa_api_functions.sh b/test/common/a1pms_api_functions.sh similarity index 75% rename from test/common/pa_api_functions.sh rename to test/common/a1pms_api_functions.sh index dd4af662..f5397171 100644 --- a/test/common/pa_api_functions.sh +++ b/test/common/a1pms_api_functions.sh @@ -17,15 +17,15 @@ # ============LICENSE_END================================================= # -# This is a script that contains management and test functions for Policy Agent +# This is a script that contains management and test functions for A1PMS ################ Test engine functions ################ # Create the image var used during the test # arg: (selects staging, snapshot, release etc) # is present only for images with staging, snapshot,release tags -__PA_imagesetup() { - __check_and_create_image_var PA "POLICY_AGENT_IMAGE" "POLICY_AGENT_IMAGE_BASE" "POLICY_AGENT_IMAGE_TAG" $1 "$POLICY_AGENT_DISPLAY_NAME" +__A1PMS_imagesetup() { + __check_and_create_image_var A1PMS "A1PMS_IMAGE" "A1PMS_IMAGE_BASE" "A1PMS_IMAGE_TAG" $1 "$A1PMS_DISPLAY_NAME" } # Pull image from remote repo or use locally built image @@ -33,79 +33,79 @@ __PA_imagesetup() { # Shall be used for images allowing overriding. For example use a local image when test is started to use released images # Shall be used for images that does not allow overriding # Both var may contain: 'remote', 'remote-remove' or 'local' -__PA_imagepull() { - __check_and_pull_image $1 "$POLICY_AGENT_DISPLAY_NAME" $POLICY_AGENT_APP_NAME POLICY_AGENT_IMAGE +__A1PMS_imagepull() { + __check_and_pull_image $1 "$A1PMS_DISPLAY_NAME" $A1PMS_APP_NAME A1PMS_IMAGE } # Build image (only for simulator or interfaces stubs owned by the test environment) # arg: (selects staging, snapshot, release etc) # is present only for images with staging, snapshot,release tags -__PA_imagebuild() { - echo -e $RED" Image for app PA shall never be built"$ERED +__A1PMS_imagebuild() { + echo -e $RED" Image for app A1PMS shall never be built"$ERED } # Generate a string for each included image using the app display name and a docker images format string # If a custom image repo is used then also the source image from the local repo is listed # arg: -__PA_image_data() { - echo -e "$POLICY_AGENT_DISPLAY_NAME\t$(docker images --format $1 $POLICY_AGENT_IMAGE)" >> $2 - if [ ! -z "$POLICY_AGENT_IMAGE_SOURCE" ]; then - echo -e "-- source image --\t$(docker images --format $1 $POLICY_AGENT_IMAGE_SOURCE)" >> $2 +__A1PMS_image_data() { + echo -e "$A1PMS_DISPLAY_NAME\t$(docker images --format $1 $A1PMS_IMAGE)" >> $2 + if [ ! -z "$A1PMS_IMAGE_SOURCE" ]; then + echo -e "-- source image --\t$(docker images --format $1 $A1PMS_IMAGE_SOURCE)" >> $2 fi } # Scale kubernetes resources to zero # All resources shall be ordered to be scaled to 0, if relevant. If not relevant to scale, then do no action. # This function is called for apps fully managed by the test script -__PA_kube_scale_zero() { - __kube_scale_all_resources $KUBE_NONRTRIC_NAMESPACE autotest PA +__A1PMS_kube_scale_zero() { + __kube_scale_all_resources $KUBE_NONRTRIC_NAMESPACE autotest A1PMS } # Scale kubernetes resources to zero and wait until this has been accomplished, if relevant. If not relevant to scale, then do no action. # This function is called for prestarted apps not managed by the test script. -__PA_kube_scale_zero_and_wait() { +__A1PMS_kube_scale_zero_and_wait() { __kube_scale_and_wait_all_resources $KUBE_NONRTRIC_NAMESPACE app "$KUBE_NONRTRIC_NAMESPACE"-policymanagementservice } # Delete all kube resouces for the app # This function is called for apps managed by the test script. -__PA_kube_delete_all() { - __kube_delete_all_resources $KUBE_NONRTRIC_NAMESPACE autotest PA +__A1PMS_kube_delete_all() { + __kube_delete_all_resources $KUBE_NONRTRIC_NAMESPACE autotest A1PMS } # Store docker logs # This function is called for apps managed by the test script. # args: -__PA_store_docker_logs() { +__A1PMS_store_docker_logs() { if [ $RUNMODE == "KUBE" ]; then - kubectl $KUBECONF logs -l "autotest=PA" -n $KUBE_NONRTRIC_NAMESPACE --tail=-1 > $1$2_policy-agent.log 2>&1 + kubectl $KUBECONF logs -l "autotest=A1PMS" -n $KUBE_NONRTRIC_NAMESPACE --tail=-1 > $1$2_a1pms.log 2>&1 else - docker logs $POLICY_AGENT_APP_NAME > $1$2_policy-agent.log 2>&1 + docker logs $A1PMS_APP_NAME > $1$2_a1pms.log 2>&1 fi } # Initial setup of protocol, host and ports # This function is called for apps managed by the test script. # args: - -__PA_initial_setup() { - use_agent_rest_http +__A1PMS_initial_setup() { + use_a1pms_rest_http } # Set app short-name, app name and namespace for logging runtime statistics of kubernets pods or docker containers # For docker, the namespace shall be excluded # This function is called for apps managed by the test script as well as for prestarted apps. # args: - -__PA_statisics_setup() { +__A1PMS_statisics_setup() { if [ $RUNMODE == "KUBE" ]; then - echo "PA $POLICY_AGENT_APP_NAME $KUBE_NONRTRIC_NAMESPACE" + echo "A1PMS $A1PMS_APP_NAME $KUBE_NONRTRIC_NAMESPACE" else - echo "PA $POLICY_AGENT_APP_NAME" + echo "A1PMS $A1PMS_APP_NAME" fi } # Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied # args: - -__PA_test_requirements() { +__A1PMS_test_requirements() { : } @@ -113,227 +113,227 @@ __PA_test_requirements() { ####################################################### ########################### -### Policy Agents functions +### A1PMSs functions ########################### -# Set http as the protocol to use for all communication to the Policy Agent +# Set http as the protocol to use for all communication to the A1PMS # args: - # (Function for test scripts) -use_agent_rest_http() { - __agent_set_protocoll "http" $POLICY_AGENT_INTERNAL_PORT $POLICY_AGENT_EXTERNAL_PORT +use_a1pms_rest_http() { + __a1pms_set_protocoll "http" $A1PMS_INTERNAL_PORT $A1PMS_EXTERNAL_PORT } -# Set https as the protocol to use for all communication to the Policy Agent +# Set https as the protocol to use for all communication to the A1PMS # args: - # (Function for test scripts) -use_agent_rest_https() { - __agent_set_protocoll "https" $POLICY_AGENT_INTERNAL_SECURE_PORT $POLICY_AGENT_EXTERNAL_SECURE_PORT +use_a1pms_rest_https() { + __a1pms_set_protocoll "https" $A1PMS_INTERNAL_SECURE_PORT $A1PMS_EXTERNAL_SECURE_PORT } -# All calls to the agent will be directed to the agent dmaap interface over http from now on +# All calls to the a1pms will be directed to the a1pms dmaap interface over http from now on # args: - # (Function for test scripts) -use_agent_dmaap_http() { - echo -e $BOLD"$POLICY_AGENT_DISPLAY_NAME dmaap protocol setting"$EBOLD - echo -e " Using $BOLD http $EBOLD and $BOLD DMAAP $EBOLD towards the agent" - PA_ADAPTER_TYPE="MR-HTTP" +use_a1pms_dmaap_http() { + echo -e $BOLD"$A1PMS_DISPLAY_NAME dmaap protocol setting"$EBOLD + echo -e " Using $BOLD http $EBOLD and $BOLD DMAAP $EBOLD towards the a1pms" + A1PMS_ADAPTER_TYPE="MR-HTTP" echo "" } -# All calls to the agent will be directed to the agent dmaap interface over https from now on +# All calls to the a1pms will be directed to the a1pms dmaap interface over https from now on # args: - # (Function for test scripts) -use_agent_dmaap_https() { - echo -e $BOLD"$POLICY_AGENT_DISPLAY_NAME dmaap protocol setting"$EBOLD - echo -e " Using $BOLD https $EBOLD and $BOLD DMAAP $EBOLD towards the agent" +use_a1pms_dmaap_https() { + echo -e $BOLD"$A1PMS_DISPLAY_NAME dmaap protocol setting"$EBOLD + echo -e " Using $BOLD https $EBOLD and $BOLD DMAAP $EBOLD towards the a1pms" echo -e $YELLOW" Setting http instead of https - MR only uses http"$EYELLOW - PA_ADAPTER_TYPE="MR-HTTPS" + A1PMS_ADAPTER_TYPE="MR-HTTPS" echo "" } # Setup paths to svc/container for internal and external access # args: -__agent_set_protocoll() { - echo -e $BOLD"$POLICY_AGENT_DISPLAY_NAME protocol setting"$EBOLD - echo -e " Using $BOLD $1 $EBOLD towards $POLICY_AGENT_DISPLAY_NAME" +__a1pms_set_protocoll() { + echo -e $BOLD"$A1PMS_DISPLAY_NAME protocol setting"$EBOLD + echo -e " Using $BOLD $1 $EBOLD towards $A1PMS_DISPLAY_NAME" ## Access to Dmaap adapter - PA_SERVICE_PATH=$1"://"$POLICY_AGENT_APP_NAME":"$2 # docker access, container->container and script->container via proxy + A1PMS_SERVICE_PATH=$1"://"$A1PMS_APP_NAME":"$2 # docker access, container->container and script->container via proxy if [ $RUNMODE == "KUBE" ]; then - PA_SERVICE_PATH=$1"://"$POLICY_AGENT_APP_NAME.$KUBE_NONRTRIC_NAMESPACE":"$3 # kube access, pod->svc and script->svc via proxy + A1PMS_SERVICE_PATH=$1"://"$A1PMS_APP_NAME.$KUBE_NONRTRIC_NAMESPACE":"$3 # kube access, pod->svc and script->svc via proxy fi - # PA_ADAPTER used for switching between REST and DMAAP (only REST supported currently) - PA_ADAPTER_TYPE="REST" - PA_ADAPTER=$PA_SERVICE_PATH + # A1PMS_ADAPTER used for switching between REST and DMAAP (only REST supported currently) + A1PMS_ADAPTER_TYPE="REST" + A1PMS_ADAPTER=$A1PMS_SERVICE_PATH echo "" } -# Make curl retries towards the agent for http response codes set in this env var, space separated list of codes -AGENT_RETRY_CODES="" +# Make curl retries towards the a1pms for http response codes set in this env var, space separated list of codes +A1PMS_RETRY_CODES="" #Save first worker node the pod is started on -__PA_WORKER_NODE="" +__A1PMS_WORKER_NODE="" # Export env vars for config files, docker compose and kube resources # args: PROXY|NOPROXY -__export_agent_vars() { +__export_a1pms_vars() { - export POLICY_AGENT_APP_NAME - export POLICY_AGENT_APP_NAME_ALIAS - export POLICY_AGENT_DISPLAY_NAME + export A1PMS_APP_NAME + export A1PMS_APP_NAME_ALIAS + export A1PMS_DISPLAY_NAME export KUBE_NONRTRIC_NAMESPACE - export POLICY_AGENT_IMAGE - export POLICY_AGENT_INTERNAL_PORT - export POLICY_AGENT_INTERNAL_SECURE_PORT - export POLICY_AGENT_EXTERNAL_PORT - export POLICY_AGENT_EXTERNAL_SECURE_PORT - export POLICY_AGENT_CONFIG_MOUNT_PATH - export POLICY_AGENT_DATA_MOUNT_PATH - export POLICY_AGENT_CONFIG_CONFIGMAP_NAME=$POLICY_AGENT_APP_NAME"-config" - export POLICY_AGENT_DATA_CONFIGMAP_NAME=$POLICY_AGENT_APP_NAME"-data" - export POLICY_AGENT_PKG_NAME + export A1PMS_IMAGE + export A1PMS_INTERNAL_PORT + export A1PMS_INTERNAL_SECURE_PORT + export A1PMS_EXTERNAL_PORT + export A1PMS_EXTERNAL_SECURE_PORT + export A1PMS_CONFIG_MOUNT_PATH + export A1PMS_DATA_MOUNT_PATH + export A1PMS_CONFIG_CONFIGMAP_NAME=$A1PMS_APP_NAME"-config" + export A1PMS_DATA_CONFIGMAP_NAME=$A1PMS_APP_NAME"-data" + export A1PMS_PKG_NAME export CONSUL_HOST export CONSUL_INTERNAL_PORT export CONFIG_BINDING_SERVICE - export POLICY_AGENT_CONFIG_KEY + export A1PMS_CONFIG_KEY export DOCKER_SIM_NWNAME - export POLICY_AGENT_HOST_MNT_DIR - export POLICY_AGENT_CONFIG_FILE + export A1PMS_HOST_MNT_DIR + export A1PMS_CONFIG_FILE - export POLICY_AGENT_DATA_PV_NAME=$POLICY_AGENT_APP_NAME"-pv" - export POLICY_AGENT_DATA_PVC_NAME=$POLICY_AGENT_APP_NAME"-pvc" + export A1PMS_DATA_PV_NAME=$A1PMS_APP_NAME"-pv" + export A1PMS_DATA_PVC_NAME=$A1PMS_APP_NAME"-pvc" ##Create a unique path for the pv each time to prevent a previous volume to be reused - export POLICY_AGENT_PV_PATH="padata-"$(date +%s) - export POLICY_AGENT_CONTAINER_MNT_DIR + export A1PMS_PV_PATH="a1pmsdata-"$(date +%s) + export A1PMS_CONTAINER_MNT_DIR export HOST_PATH_BASE_DIR if [ $1 == "PROXY" ]; then - export AGENT_HTTP_PROXY_CONFIG_PORT=$HTTP_PROXY_CONFIG_PORT #Set if proxy is started - export AGENT_HTTP_PROXY_CONFIG_HOST_NAME=$HTTP_PROXY_CONFIG_HOST_NAME #Set if proxy is started - if [ $AGENT_HTTP_PROXY_CONFIG_PORT -eq 0 ] || [ -z "$AGENT_HTTP_PROXY_CONFIG_HOST_NAME" ]; then + export A1PMS_HTTP_PROXY_CONFIG_PORT=$HTTP_PROXY_CONFIG_PORT #Set if proxy is started + export A1PMS_HTTP_PROXY_CONFIG_HOST_NAME=$HTTP_PROXY_CONFIG_HOST_NAME #Set if proxy is started + if [ $A1PMS_HTTP_PROXY_CONFIG_PORT -eq 0 ] || [ -z "$A1PMS_HTTP_PROXY_CONFIG_HOST_NAME" ]; then echo -e $YELLOW" Warning: HTTP PROXY will not be configured, proxy app not started"$EYELLOW else echo " Configured with http proxy" fi else - export AGENT_HTTP_PROXY_CONFIG_PORT=0 - export AGENT_HTTP_PROXY_CONFIG_HOST_NAME="" + export A1PMS_HTTP_PROXY_CONFIG_PORT=0 + export A1PMS_HTTP_PROXY_CONFIG_HOST_NAME="" echo " Configured without http proxy" fi } -# Start the policy agent +# Start the ms # args: (docker) PROXY|NOPROXY # args: (kube) PROXY|NOPROXY [ ] # (Function for test scripts) -start_policy_agent() { - echo -e $BOLD"Starting $POLICY_AGENT_DISPLAY_NAME"$EBOLD +start_a1pms() { + echo -e $BOLD"Starting $A1PMS_DISPLAY_NAME"$EBOLD if [ $RUNMODE == "KUBE" ]; then # Check if app shall be fully managed by the test script - __check_included_image "PA" + __check_included_image "A1PMS" retcode_i=$? # Check if app shall only be used by the testscipt - __check_prestarted_image "PA" + __check_prestarted_image "A1PMS" retcode_p=$? if [ $retcode_i -ne 0 ] && [ $retcode_p -ne 0 ]; then - echo -e $RED"The $POLICY_AGENT_APP_NAME app is not included as managed nor prestarted in this test script"$ERED - echo -e $RED"The $POLICY_AGENT_APP_NAME will not be started"$ERED + echo -e $RED"The $A1PMS_APP_NAME app is not included as managed nor prestarted in this test script"$ERED + echo -e $RED"The $A1PMS_APP_NAME will not be started"$ERED exit fi if [ $retcode_i -eq 0 ] && [ $retcode_p -eq 0 ]; then - echo -e $RED"The $POLICY_AGENT_APP_NAME app is included both as managed and prestarted in this test script"$ERED - echo -e $RED"The $POLICY_AGENT_APP_NAME will not be started"$ERED + echo -e $RED"The $A1PMS_APP_NAME app is included both as managed and prestarted in this test script"$ERED + echo -e $RED"The $A1PMS_APP_NAME will not be started"$ERED exit fi if [ $retcode_p -eq 0 ]; then - echo -e " Using existing $POLICY_AGENT_APP_NAME deployment and service" - echo " Setting $POLICY_AGENT_APP_NAME replicas=1" - res_type=$(__kube_get_resource_type $POLICY_AGENT_APP_NAME $KUBE_NONRTRIC_NAMESPACE) - __kube_scale $res_type $POLICY_AGENT_APP_NAME $KUBE_NONRTRIC_NAMESPACE 1 + echo -e " Using existing $A1PMS_APP_NAME deployment and service" + echo " Setting $A1PMS_APP_NAME replicas=1" + res_type=$(__kube_get_resource_type $A1PMS_APP_NAME $KUBE_NONRTRIC_NAMESPACE) + __kube_scale $res_type $A1PMS_APP_NAME $KUBE_NONRTRIC_NAMESPACE 1 fi if [ $retcode_i -eq 0 ]; then - echo -e " Creating $POLICY_AGENT_APP_NAME app and expose service" + echo -e " Creating $A1PMS_APP_NAME app and expose service" #Check if nonrtric namespace exists, if not create it __kube_create_namespace $KUBE_NONRTRIC_NAMESPACE - __export_agent_vars $1 + __export_a1pms_vars $1 # Create config map for config - configfile=$PWD/tmp/$POLICY_AGENT_CONFIG_FILE + configfile=$PWD/tmp/$A1PMS_CONFIG_FILE cp $2 $configfile - output_yaml=$PWD/tmp/pa_cfc.yaml - __kube_create_configmap $POLICY_AGENT_CONFIG_CONFIGMAP_NAME $KUBE_NONRTRIC_NAMESPACE autotest PA $configfile $output_yaml + output_yaml=$PWD/tmp/a1pms-cfc.yaml + __kube_create_configmap $A1PMS_CONFIG_CONFIGMAP_NAME $KUBE_NONRTRIC_NAMESPACE autotest A1PMS $configfile $output_yaml # Create config map for data - data_json=$PWD/tmp/$POLICY_AGENT_DATA_FILE + data_json=$PWD/tmp/$A1PMS_DATA_FILE if [ $# -lt 3 ]; then #create empty dummy file echo "{}" > $data_json else cp $3 $data_json fi - output_yaml=$PWD/tmp/pa_cfd.yaml - __kube_create_configmap $POLICY_AGENT_DATA_CONFIGMAP_NAME $KUBE_NONRTRIC_NAMESPACE autotest PA $data_json $output_yaml + output_yaml=$PWD/tmp/a1pms-cfd.yaml + __kube_create_configmap $A1PMS_DATA_CONFIGMAP_NAME $KUBE_NONRTRIC_NAMESPACE autotest A1PMS $data_json $output_yaml ## Create pv - input_yaml=$SIM_GROUP"/"$POLICY_AGENT_COMPOSE_DIR"/"pv.yaml - output_yaml=$PWD/tmp/pa_pv.yaml - __kube_create_instance pv $POLICY_AGENT_APP_NAME $input_yaml $output_yaml + input_yaml=$SIM_GROUP"/"$A1PMS_COMPOSE_DIR"/"pv.yaml + output_yaml=$PWD/tmp/a1pms-pv.yaml + __kube_create_instance pv $A1PMS_APP_NAME $input_yaml $output_yaml ## Create pvc - input_yaml=$SIM_GROUP"/"$POLICY_AGENT_COMPOSE_DIR"/"pvc.yaml - output_yaml=$PWD/tmp/pa_pvc.yaml - __kube_create_instance pvc $POLICY_AGENT_APP_NAME $input_yaml $output_yaml + input_yaml=$SIM_GROUP"/"$A1PMS_COMPOSE_DIR"/"pvc.yaml + output_yaml=$PWD/tmp/a1pms-pvc.yaml + __kube_create_instance pvc $A1PMS_APP_NAME $input_yaml $output_yaml # Create service - input_yaml=$SIM_GROUP"/"$POLICY_AGENT_COMPOSE_DIR"/"svc.yaml - output_yaml=$PWD/tmp/pa_svc.yaml - __kube_create_instance service $POLICY_AGENT_APP_NAME $input_yaml $output_yaml + input_yaml=$SIM_GROUP"/"$A1PMS_COMPOSE_DIR"/"svc.yaml + output_yaml=$PWD/tmp/a1pmssvc.yaml + __kube_create_instance service $A1PMS_APP_NAME $input_yaml $output_yaml # Create app - input_yaml=$SIM_GROUP"/"$POLICY_AGENT_COMPOSE_DIR"/"app.yaml - output_yaml=$PWD/tmp/pa_app.yaml - __kube_create_instance app $POLICY_AGENT_APP_NAME $input_yaml $output_yaml + input_yaml=$SIM_GROUP"/"$A1PMS_COMPOSE_DIR"/"app.yaml + output_yaml=$PWD/tmp/a1pmsapp.yaml + __kube_create_instance app $A1PMS_APP_NAME $input_yaml $output_yaml fi # Keep the initial worker node in case the pod need to be "restarted" - must be made to the same node due to a volume mounted on the host if [ $retcode_i -eq 0 ]; then - __PA_WORKER_NODE=$(kubectl $KUBECONF get pod -l "autotest=PA" -n $KUBE_NONRTRIC_NAMESPACE -o jsonpath='{.items[*].spec.nodeName}') - if [ -z "$__PA_WORKER_NODE" ]; then - echo -e $YELLOW" Cannot find worker node for pod for $POLICY_AGENT_APP_NAME, persistency may not work"$EYELLOW + __A1PMS_WORKER_NODE=$(kubectl $KUBECONF get pod -l "autotest=A1PMS" -n $KUBE_NONRTRIC_NAMESPACE -o jsonpath='{.items[*].spec.nodeName}') + if [ -z "$__A1PMS_WORKER_NODE" ]; then + echo -e $YELLOW" Cannot find worker node for pod for $A1PMS_APP_NAME, persistency may not work"$EYELLOW fi else - echo -e $YELLOW" Persistency may not work for app $POLICY_AGENT_APP_NAME in multi-worker node config when running it as a prestarted app"$EYELLOW + echo -e $YELLOW" Persistency may not work for app $A1PMS_APP_NAME in multi-worker node config when running it as a prestarted app"$EYELLOW fi - __check_service_start $POLICY_AGENT_APP_NAME $PA_SERVICE_PATH$POLICY_AGENT_ALIVE_URL + __check_service_start $A1PMS_APP_NAME $A1PMS_SERVICE_PATH$A1PMS_ALIVE_URL else - __check_included_image 'PA' + __check_included_image 'A1PMS' if [ $? -eq 1 ]; then - echo -e $RED"The Policy Agent app is not included in this test script"$ERED - echo -e $RED"The Policy Agent will not be started"$ERED + echo -e $RED"The A1PMS app is not included in this test script"$ERED + echo -e $RED"The A1PMS will not be started"$ERED exit fi curdir=$PWD cd $SIM_GROUP - cd policy_agent - cd $POLICY_AGENT_HOST_MNT_DIR + cd a1pms + cd $A1PMS_HOST_MNT_DIR #cd .. if [ -d db ]; then if [ "$(ls -A $DIR)" ]; then @@ -349,39 +349,39 @@ start_policy_agent() { fi cd $curdir - __export_agent_vars $1 + __export_a1pms_vars $1 - dest_file=$SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_HOST_MNT_DIR/application.yaml + dest_file=$SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_HOST_MNT_DIR/application.yaml envsubst < $2 > $dest_file - __start_container $POLICY_AGENT_COMPOSE_DIR "" NODOCKERARGS 1 $POLICY_AGENT_APP_NAME + __start_container $A1PMS_COMPOSE_DIR "" NODOCKERARGS 1 $A1PMS_APP_NAME - __check_service_start $POLICY_AGENT_APP_NAME $PA_SERVICE_PATH$POLICY_AGENT_ALIVE_URL + __check_service_start $A1PMS_APP_NAME $A1PMS_SERVICE_PATH$A1PMS_ALIVE_URL fi - __collect_endpoint_stats_image_info "PMS" $POLICY_AGENT_IMAGE + __collect_endpoint_stats_image_info "A1PMS" $A1PMS_IMAGE echo "" return 0 } -# Stop the policy agent +# Stop the a1pms # args: - # args: - # (Function for test scripts) -stop_policy_agent() { - echo -e $BOLD"Stopping $POLICY_AGENT_DISPLAY_NAME"$EBOLD +stop_a1pms() { + echo -e $BOLD"Stopping $A1PMS_DISPLAY_NAME"$EBOLD if [ $RUNMODE == "KUBE" ]; then - __check_prestarted_image "PA" + __check_prestarted_image "A1PMS" if [ $? -eq 0 ]; then - echo -e $YELLOW" Persistency may not work for app $POLICY_AGENT_APP_NAME in multi-worker node config when running it as a prestarted app"$EYELLOW - res_type=$(__kube_get_resource_type $POLICY_AGENT_APP_NAME $KUBE_NONRTRIC_NAMESPACE) - __kube_scale $res_type $POLICY_AGENT_APP_NAME $KUBE_NONRTRIC_NAMESPACE 0 + echo -e $YELLOW" Persistency may not work for app $A1PMS_APP_NAME in multi-worker node config when running it as a prestarted app"$EYELLOW + res_type=$(__kube_get_resource_type $A1PMS_APP_NAME $KUBE_NONRTRIC_NAMESPACE) + __kube_scale $res_type $A1PMS_APP_NAME $KUBE_NONRTRIC_NAMESPACE 0 return 0 fi - __kube_scale_all_resources $KUBE_NONRTRIC_NAMESPACE autotest PA + __kube_scale_all_resources $KUBE_NONRTRIC_NAMESPACE autotest A1PMS echo " Deleting the replica set - a new will be started when the app is started" tmp=$(kubectl $KUBECONF delete rs -n $KUBE_NONRTRIC_NAMESPACE -l "autotest=PA") if [ $? -ne 0 ]; then @@ -390,9 +390,9 @@ stop_policy_agent() { return 1 fi else - docker stop $POLICY_AGENT_APP_NAME &> ./tmp/.dockererr + docker stop $A1PMS_APP_NAME &> ./tmp/.dockererr if [ $? -ne 0 ]; then - __print_err "Could not stop $POLICY_AGENT_APP_NAME" $@ + __print_err "Could not stop $A1PMS_APP_NAME" $@ cat ./tmp/.dockererr ((RES_CONF_FAIL++)) return 1 @@ -403,48 +403,48 @@ stop_policy_agent() { return 0 } -# Start a previously stopped policy agent +# Start a previously stopped a1pms # args: - # (Function for test scripts) -start_stopped_policy_agent() { - echo -e $BOLD"Starting (the previously stopped) $POLICY_AGENT_DISPLAY_NAME"$EBOLD +start_stopped_a1pms() { + echo -e $BOLD"Starting (the previously stopped) $A1PMS_DISPLAY_NAME"$EBOLD if [ $RUNMODE == "KUBE" ]; then - __check_prestarted_image "PA" + __check_prestarted_image "A1PMS" if [ $? -eq 0 ]; then - echo -e $YELLOW" Persistency may not work for app $POLICY_AGENT_APP_NAME in multi-worker node config when running it as a prestarted app"$EYELLOW - res_type=$(__kube_get_resource_type $POLICY_AGENT_APP_NAME $KUBE_NONRTRIC_NAMESPACE) - __kube_scale $res_type $POLICY_AGENT_APP_NAME $KUBE_NONRTRIC_NAMESPACE 1 - __check_service_start $POLICY_AGENT_APP_NAME $PA_SERVICE_PATH$POLICY_AGENT_ALIVE_URL + echo -e $YELLOW" Persistency may not work for app $A1PMS_APP_NAME in multi-worker node config when running it as a prestarted app"$EYELLOW + res_type=$(__kube_get_resource_type $A1PMS_APP_NAME $KUBE_NONRTRIC_NAMESPACE) + __kube_scale $res_type $A1PMS_APP_NAME $KUBE_NONRTRIC_NAMESPACE 1 + __check_service_start $A1PMS_APP_NAME $A1PMS_SERVICE_PATH$A1PMS_ALIVE_URL return 0 fi - # Tie the PMS to the same worker node it was initially started on - # A PVC of type hostPath is mounted to PMS, for persistent storage, so the PMS must always be on the node which mounted the volume - if [ -z "$__PA_WORKER_NODE" ]; then + # Tie the A1PMS to the same worker node it was initially started on + # A PVC of type hostPath is mounted to A1PMS, for persistent storage, so the A1PMS must always be on the node which mounted the volume + if [ -z "$__A1PMS_WORKER_NODE" ]; then echo -e $RED" No initial worker node found for pod "$RED ((RES_CONF_FAIL++)) return 1 else - echo -e $BOLD" Setting nodeSelector kubernetes.io/hostname=$__PA_WORKER_NODE to deployment for $POLICY_AGENT_APP_NAME. Pod will always run on this worker node: $__PA_WORKER_NODE"$BOLD + echo -e $BOLD" Setting nodeSelector kubernetes.io/hostname=$__A1PMS_WORKER_NODE to deployment for $A1PMS_APP_NAME. Pod will always run on this worker node: $__A1PMS_WORKER_NODE"$BOLD echo -e $BOLD" The mounted volume is mounted as hostPath and only available on that worker node."$BOLD - tmp=$(kubectl $KUBECONF patch deployment $POLICY_AGENT_APP_NAME -n $KUBE_NONRTRIC_NAMESPACE --patch '{"spec": {"template": {"spec": {"nodeSelector": {"kubernetes.io/hostname": "'$__PA_WORKER_NODE'"}}}}}') + tmp=$(kubectl $KUBECONF patch deployment $A1PMS_APP_NAME -n $KUBE_NONRTRIC_NAMESPACE --patch '{"spec": {"template": {"spec": {"nodeSelector": {"kubernetes.io/hostname": "'$__A1PMS_WORKER_NODE'"}}}}}') if [ $? -ne 0 ]; then - echo -e $YELLOW" Cannot set nodeSelector to deployment for $POLICY_AGENT_APP_NAME, persistency may not work"$EYELLOW + echo -e $YELLOW" Cannot set nodeSelector to deployment for $A1PMS_APP_NAME, persistency may not work"$EYELLOW fi - __kube_scale deployment $POLICY_AGENT_APP_NAME $KUBE_NONRTRIC_NAMESPACE 1 + __kube_scale deployment $A1PMS_APP_NAME $KUBE_NONRTRIC_NAMESPACE 1 fi else - docker start $POLICY_AGENT_APP_NAME &> ./tmp/.dockererr + docker start $A1PMS_APP_NAME &> ./tmp/.dockererr if [ $? -ne 0 ]; then - __print_err "Could not start (the stopped) $POLICY_AGENT_APP_NAME" $@ + __print_err "Could not start (the stopped) $A1PMS_APP_NAME" $@ cat ./tmp/.dockererr ((RES_CONF_FAIL++)) return 1 fi fi - __check_service_start $POLICY_AGENT_APP_NAME $PA_SERVICE_PATH$POLICY_AGENT_ALIVE_URL + __check_service_start $A1PMS_APP_NAME $A1PMS_SERVICE_PATH$A1PMS_ALIVE_URL if [ $? -ne 0 ]; then return 1 fi @@ -459,7 +459,7 @@ start_stopped_policy_agent() { prepare_consul_config() { echo -e $BOLD"Prepare Consul config"$EBOLD - echo " Writing consul config for "$POLICY_AGENT_APP_NAME" to file: "$2 + echo " Writing consul config for "$A1PMS_APP_NAME" to file: "$2 if [ $# != 2 ]; then ((RES_CONF_FAIL++)) @@ -574,23 +574,23 @@ prepare_consul_config() { echo "" } -# Load the the appl config for the agent into a config map -agent_load_config() { - echo -e $BOLD"Agent - load config from "$EBOLD$1 - data_json=$PWD/tmp/$POLICY_AGENT_DATA_FILE +# Load the the appl config for the a1pms into a config map +a1pms_load_config() { + echo -e $BOLD"A1PMS - load config from "$EBOLD$1 + data_json=$PWD/tmp/$A1PMS_DATA_FILE cp $1 $data_json - output_yaml=$PWD/tmp/pa_cfd.yaml - __kube_create_configmap $POLICY_AGENT_APP_NAME"-data" $KUBE_NONRTRIC_NAMESPACE autotest PA $data_json $output_yaml + output_yaml=$PWD/tmp/a1pms-cfd.yaml + __kube_create_configmap $A1PMS_APP_NAME"-data" $KUBE_NONRTRIC_NAMESPACE autotest A1PMS $data_json $output_yaml echo "" } -# Turn on debug level tracing in the agent +# Turn on debug level tracing in the a1pms # args: - # (Function for test scripts) -set_agent_debug() { - echo -e $BOLD"Setting agent debug logging"$EBOLD - curlString="$PA_SERVICE_PATH$POLICY_AGENT_ACTUATOR -X POST -H Content-Type:application/json -d {\"configuredLevel\":\"debug\"}" +set_a1pms_debug() { + echo -e $BOLD"Setting a1pms debug logging"$EBOLD + curlString="$A1PMS_SERVICE_PATH$A1PMS_ACTUATOR -X POST -H Content-Type:application/json -d {\"configuredLevel\":\"debug\"}" result=$(__do_curl "$curlString") if [ $? -ne 0 ]; then __print_err "could not set debug mode" $@ @@ -601,12 +601,12 @@ set_agent_debug() { return 0 } -# Turn on trace level tracing in the agent +# Turn on trace level tracing in the a1pms # args: - # (Function for test scripts) -set_agent_trace() { - echo -e $BOLD"Setting agent trace logging"$EBOLD - curlString="$PA_SERVICE_PATH$POLICY_AGENT_ACTUATOR -X POST -H Content-Type:application/json -d {\"configuredLevel\":\"trace\"}" +set_a1pms_trace() { + echo -e $BOLD"Setting a1pms trace logging"$EBOLD + curlString="$A1PMS_SERVICE_PATH$A1PMS_ACTUATOR -X POST -H Content-Type:application/json -d {\"configuredLevel\":\"trace\"}" result=$(__do_curl "$curlString") if [ $? -ne 0 ]; then __print_err "could not set trace mode" $@ @@ -617,39 +617,39 @@ set_agent_trace() { return 0 } -# Perform curl retries when making direct call to the agent for the specified http response codes +# Perform curl retries when making direct call to the a1pms for the specified http response codes # Speace separated list of http response codes # args: []* -use_agent_retries() { - echo -e $BOLD"Do curl retries to the agent REST inteface for these response codes:$@"$EBOLD +use_a1pms_retries() { + echo -e $BOLD"Do curl retries to the a1pms REST inteface for these response codes:$@"$EBOLD AGENT_RETRY_CODES=$@ echo "" return } -# Check the agent logs for WARNINGs and ERRORs +# Check the a1pms logs for WARNINGs and ERRORs # args: - # (Function for test scripts) -check_policy_agent_logs() { - __check_container_logs "Policy Agent" $POLICY_AGENT_APP_NAME $POLICY_AGENT_LOGPATH WARN ERR +check_a1pms_logs() { + __check_container_logs "A1PMS" $A1PMS_APP_NAME $A1PMS_LOGPATH WARN ERR } ######################################################### #### Test case functions A1 Policy management service ######################################################### -# This function compare the size, towards a target value, of a json array returned from of the Policy Agent. +# This function compare the size, towards a target value, of a json array returned from of the A1PMS. # This is done immediately by setting PASS or FAIL or wait up to and optional timeout before setting PASS or FAIL # args: json: [> $HTTPLOG if [ $# -eq 2 ] || [ $# -eq 3 ]; then if [[ $1 == "json:"* ]]; then - if [ "$PMS_VERSION" == "V2" ]; then - __var_test "Policy Agent" $PA_SERVICE_PATH$PMS_API_PREFIX"/v2/" $1 "=" $2 $3 + if [ "$A1PMS_VERSION" == "V2" ]; then + __var_test "A1PMS" $A1PMS_SERVICE_PATH$A1PMS_API_PREFIX"/v2/" $1 "=" $2 $3 else - __var_test "Policy Agent" $PA_SERVICE_PATH"/" $1 "=" $2 $3 + __var_test "A1PMS" $A1PMS_SERVICE_PATH"/" $1 "=" $2 $3 fi return 0 fi @@ -662,10 +662,10 @@ api_equal() { # args: |NORIC |NOSERVICE |NOTYPE [ NOID | [ EMPTY| ]*] # args(V2): |NORIC |NOSERVICE |NOTYPE [ NOID | [ EMPTY| ]*] # (Function for test scripts) -api_get_policies() { +a1pms_api_get_policies() { __log_test_start $@ - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then paramError=0 variableParams=$(($#-4)) if [ $# -lt 4 ]; then @@ -698,7 +698,7 @@ api_get_policies() { fi queryparams="" - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then if [ $2 != "NORIC" ]; then queryparams="?ric_id="$2 fi @@ -718,7 +718,7 @@ api_get_policies() { fi query="/v2/policy-instances"$queryparams - res="$(__do_curl_to_api PA GET $query)" + res="$(__do_curl_to_api A1PMS GET $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -783,7 +783,7 @@ api_get_policies() { fi query="/policies"$queryparams - res="$(__do_curl_to_api PA GET $query)" + res="$(__do_curl_to_api A1PMS GET $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -827,7 +827,7 @@ api_get_policies() { fi fi fi - __collect_endpoint_stats "PMS" 00 "GET" $PMS_API_PREFIX"/v2/policy-instances" $status + __collect_endpoint_stats "A1PMS" 00 "GET" $A1PMS_API_PREFIX"/v2/policy-instances" $status __log_test_pass return 0 @@ -839,11 +839,11 @@ api_get_policies() { # args(V2): [ |NOTYPE |NOURL ] # (Function for test scripts) -api_get_policy() { +a1pms_api_get_policy() { __log_test_start $@ - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then if [ $# -ne 2 ] && [ $# -ne 8 ]; then __print_err " [ |NOTYPE |NOURL ]" $@ return 1 @@ -856,7 +856,7 @@ api_get_policy() { fi query="/policy?id=$UUID$2" fi - res="$(__do_curl_to_api PA GET $query)" + res="$(__do_curl_to_api A1PMS GET $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -864,7 +864,7 @@ api_get_policy() { return 1 fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then if [ $# -eq 8 ]; then #Create a policy json to compare with @@ -909,7 +909,7 @@ api_get_policy() { fi fi - __collect_endpoint_stats "PMS" 01 "GET" $PMS_API_PREFIX"/v2/policies/{policy_id}" $status + __collect_endpoint_stats "A1PMS" 01 "GET" $A1PMS_API_PREFIX"/v2/policies/{policy_id}" $status __log_test_pass return 0 } @@ -918,10 +918,10 @@ api_get_policy() { # args: |NOTYPE |NOTRANSIENT [] # args(V2): |NOTYPE |NOTRANSIENT |NOURL [] # (Function for test scripts) -api_put_policy() { +a1pms_api_put_policy() { __log_test_start $@ - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then if [ $# -lt 8 ] || [ $# -gt 9 ]; then __print_err " |NOTYPE |NOTRANSIENT |NOURL []" $@ return 1 @@ -941,7 +941,7 @@ api_put_policy() { pid=$5 trans=$6 - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then noti=$7 temp=$8 if [ $# -eq 9 ]; then @@ -955,7 +955,7 @@ api_put_policy() { fi while [ $count -lt $max ]; do - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then query="/v2/policies" @@ -990,7 +990,7 @@ api_put_policy() { file="./tmp/.p.json" sed 's/XXX/'${pid}'/g' $temp > $file fi - res="$(__do_curl_to_api PA PUT $query $file)" + res="$(__do_curl_to_api A1PMS PUT $query $file)" status=${res:${#res}-3} echo -ne " Executing "$count"("$max")${SAMELINE}" if [ $status -ne $1 ]; then @@ -1002,7 +1002,7 @@ api_put_policy() { let count=$count+1 echo -ne " Executed "$count"("$max")${SAMELINE}" done - __collect_endpoint_stats "PMS" 02 "PUT" $PMS_API_PREFIX"/v2/policies" $status $max + __collect_endpoint_stats "A1PMS" 02 "PUT" $A1PMS_API_PREFIX"/v2/policies" $status $max echo "" __log_test_pass @@ -1014,10 +1014,10 @@ api_put_policy() { # args(V2): |NOTYPE |NOURL [] # (Function for test scripts) -api_put_policy_batch() { +a1pms_api_put_policy_batch() { __log_test_start $@ - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then if [ $# -lt 8 ] || [ $# -gt 9 ]; then __print_err " |NOTYPE |NOURL []" $@ return 1 @@ -1036,7 +1036,7 @@ api_put_policy_batch() { pt=$4 pid=$5 trans=$6 - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then noti=$7 temp=$8 if [ $# -eq 9 ]; then @@ -1051,7 +1051,7 @@ api_put_policy_batch() { ARR="" while [ $count -lt $max ]; do - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then query="/v2/policies" inputJson="\"ric_id\":\"$ric\",\"policy_id\":\"$UUID$pid\",\"service_id\":\"$serv\"" @@ -1084,7 +1084,7 @@ api_put_policy_batch() { file="./tmp/.p.json" sed 's/XXX/'${pid}'/g' $temp > $file fi - res="$(__do_curl_to_api PA PUT_BATCH $query $file)" + res="$(__do_curl_to_api A1PMS PUT_BATCH $query $file)" status=${res:${#res}-3} echo -ne " Requesting(batch) "$count"("$max")${SAMELINE}" @@ -1104,7 +1104,7 @@ api_put_policy_batch() { count=0 for cid in $ARR; do - res="$(__do_curl_to_api PA RESPONSE $cid)" + res="$(__do_curl_to_api A1PMS RESPONSE $cid)" status=${res:${#res}-3} echo -ne " Accepting(batch) "$count"("$max")${SAMELINE}" @@ -1117,7 +1117,7 @@ api_put_policy_batch() { let count=$count+1 echo -ne " Accepted(batch) "$count"("$max")${SAMELINE}" done - __collect_endpoint_stats "PMS" 02 "PUT" $PMS_API_PREFIX"/v2/policies" $1 $max + __collect_endpoint_stats "A1PMS" 02 "PUT" $A1PMS_API_PREFIX"/v2/policies" $1 $max echo "" @@ -1129,10 +1129,10 @@ api_put_policy_batch() { # args: # args(V2): |NOURL # (Function for test scripts) -api_put_policy_parallel() { +a1pms_api_put_policy_parallel() { __log_test_start $@ - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then if [ $# -ne 11 ]; then __print_err " |NOURL " $@ return 1 @@ -1150,7 +1150,7 @@ api_put_policy_parallel() { type=$1; shift; start_id=$1; shift; transient=$1; shift; - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then noti=$1; shift; else noti="" @@ -1159,16 +1159,16 @@ api_put_policy_parallel() { count=$1; shift; pids=$1; shift; - #if [ $PA_ADAPTER != $RESTBASE ] && [ $PA_ADAPTER != $RESTBASE_SECURE ]; then - if [ $PA_ADAPTER_TYPE != "REST" ]; then - echo " Info - api_put_policy_parallel uses only the agent REST interface - create over dmaap in parallel is not supported" - echo " Info - will execute over agent REST" + #if [ $A1PMS_ADAPTER != $RESTBASE ] && [ $A1PMS_ADAPTER != $RESTBASE_SECURE ]; then + if [ $A1PMS_ADAPTER_TYPE != "REST" ]; then + echo " Info - a1pms_api_put_policy_parallel uses only the a1pms REST interface - create over dmaap in parallel is not supported" + echo " Info - will execute over a1pms REST" fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then if [ $serv == "NOSERVICE" ]; then serv="" fi - query="$PMS_API_PREFIX/v2/policies" + query="$A1PMS_API_PREFIX/v2/policies" else if [ $serv == "NOSERVICE" ]; then serv="" @@ -1184,7 +1184,7 @@ api_put_policy_parallel() { fi fi - urlbase=${PA_ADAPTER}${query} + urlbase=${A1PMS_ADAPTER}${query} httpproxy="NOPROXY" if [ ! -z "$KUBE_PROXY_PATH" ]; then @@ -1198,7 +1198,7 @@ api_put_policy_parallel() { uuid="NOUUID" fi echo "" > "./tmp/.pid${i}.res.txt" - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then echo $resp_code $urlbase $ric_base $num_rics $uuid $start_id $serv $type $transient $noti $template $count $pids $i $httpproxy > "./tmp/.pid${i}.txt" else echo $resp_code $urlbase $ric_base $num_rics $uuid $start_id $template $count $pids $i $httpproxy > "./tmp/.pid${i}.txt" @@ -1229,7 +1229,7 @@ api_put_policy_parallel() { fi done if [ -z $msg ]; then - __collect_endpoint_stats "PMS" 02 "PUT" $PMS_API_PREFIX"/v2/policies" $resp_code $(($count*$num_rics)) + __collect_endpoint_stats "A1PMS" 02 "PUT" $A1PMS_API_PREFIX"/v2/policies" $resp_code $(($count*$num_rics)) __log_test_pass " $(($count*$num_rics)) policy request(s) executed" return 0 fi @@ -1241,7 +1241,7 @@ api_put_policy_parallel() { # API Test function: DELETE /policy and V2 DELETE /v2/policies/{policy_id} # args: [count] # (Function for test scripts) -api_delete_policy() { +a1pms_api_delete_policy() { __log_test_start $@ if [ $# -lt 2 ] || [ $# -gt 3 ]; then @@ -1259,12 +1259,12 @@ api_delete_policy() { pid=$2 while [ $count -lt $max ]; do - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then query="/v2/policies/"$UUID$pid else query="/policy?id="$UUID$pid fi - res="$(__do_curl_to_api PA DELETE $query)" + res="$(__do_curl_to_api A1PMS DELETE $query)" status=${res:${#res}-3} echo -ne " Executing "$count"("$max")${SAMELINE}" @@ -1278,7 +1278,7 @@ api_delete_policy() { let count=$count+1 echo -ne " Executed "$count"("$max")${SAMELINE}" done - __collect_endpoint_stats "PMS" 03 "DELETE" $PMS_API_PREFIX"/v2/policies/{policy_id}" $status $max + __collect_endpoint_stats "A1PMS" 03 "DELETE" $A1PMS_API_PREFIX"/v2/policies/{policy_id}" $status $max echo "" __log_test_pass @@ -1288,7 +1288,7 @@ api_delete_policy() { # API Test function: DELETE /policy and V2 DELETE /v2/policies/{policy_id}, to run in batch # args: [count] # (Function for test scripts) -api_delete_policy_batch() { +a1pms_api_delete_policy_batch() { __log_test_start $@ if [ $# -lt 2 ] || [ $# -gt 3 ]; then @@ -1306,12 +1306,12 @@ api_delete_policy_batch() { pid=$2 ARR="" while [ $count -lt $max ]; do - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then query="/v2/policies/"$UUID$pid else query="/policy?id="$UUID$pid fi - res="$(__do_curl_to_api PA DELETE_BATCH $query)" + res="$(__do_curl_to_api A1PMS DELETE_BATCH $query)" status=${res:${#res}-3} echo -ne " Requesting(batch) "$count"("$max")${SAMELINE}" @@ -1332,7 +1332,7 @@ api_delete_policy_batch() { count=0 for cid in $ARR; do - res="$(__do_curl_to_api PA RESPONSE $cid)" + res="$(__do_curl_to_api A1PMS RESPONSE $cid)" status=${res:${#res}-3} echo -ne " Deleting(batch) "$count"("$max")${SAMELINE}" @@ -1345,7 +1345,7 @@ api_delete_policy_batch() { let count=$count+1 echo -ne " Deleted(batch) "$count"("$max")${SAMELINE}" done - __collect_endpoint_stats "PMS" 03 "DELETE" $PMS_API_PREFIX"/v2/policies/{policy_id}" $1 $max + __collect_endpoint_stats "A1PMS" 03 "DELETE" $A1PMS_API_PREFIX"/v2/policies/{policy_id}" $1 $max echo "" @@ -1356,7 +1356,7 @@ api_delete_policy_batch() { # API Test function: DELETE /policy and V2 DELETE /v2/policies/{policy_id}, to run in i parallel for a number of rics # args: # (Function for test scripts) -api_delete_policy_parallel() { +a1pms_api_delete_policy_parallel() { __log_test_start $@ if [ $# -ne 5 ]; then @@ -1369,19 +1369,19 @@ api_delete_policy_parallel() { count=$1; shift; pids=$1; shift; - #if [ $PA_ADAPTER != $RESTBASE ] && [ $PA_ADAPTER != $RESTBASE_SECURE ]; then - if [ $PA_ADAPTER_TYPE != "REST" ]; then - echo " Info - api_delete_policy_parallel uses only the agent REST interface - create over dmaap in parallel is not supported" - echo " Info - will execute over agent REST" + #if [ $A1PMS_ADAPTER != $RESTBASE ] && [ $A1PMS_ADAPTER != $RESTBASE_SECURE ]; then + if [ $A1PMS_ADAPTER_TYPE != "REST" ]; then + echo " Info - a1pms_api_delete_policy_parallel uses only the a1pms REST interface - create over dmaap in parallel is not supported" + echo " Info - will execute over a1pms REST" fi - if [ "$PMS_VERSION" == "V2" ]; then - query="$PMS_API_PREFIX/v2/policies/" + if [ "$A1PMS_VERSION" == "V2" ]; then + query="$A1PMS_API_PREFIX/v2/policies/" else query="/policy" fi - urlbase=${PA_ADAPTER}${query} + urlbase=${A1PMS_ADAPTER}${query} httpproxy="NOPROXY" if [ ! -z "$KUBE_PROXY_PATH" ]; then @@ -1422,7 +1422,7 @@ api_delete_policy_parallel() { fi done if [ -z $msg ]; then - __collect_endpoint_stats "PMS" 03 "DELETE" $PMS_API_PREFIX"/v2/policies/{policy_id}" $resp_code $(($count*$num_rics)) + __collect_endpoint_stats "A1PMS" 03 "DELETE" $A1PMS_API_PREFIX"/v2/policies/{policy_id}" $resp_code $(($count*$num_rics)) __log_test_pass " $(($count*$num_rics)) policy request(s) executed" return 0 fi @@ -1434,7 +1434,7 @@ api_delete_policy_parallel() { # API Test function: GET /policy_ids and V2 GET /v2/policies # args: |NORIC |NOSERVICE |NOTYPE ([> $HTTPLOG @@ -1522,7 +1522,7 @@ api_get_policy_ids() { fi fi - __collect_endpoint_stats "PMS" 04 "GET" $PMS_API_PREFIX"/v2/policies" $status + __collect_endpoint_stats "A1PMS" 04 "GET" $A1PMS_API_PREFIX"/v2/policies" $status __log_test_pass return 0 } @@ -1530,10 +1530,10 @@ api_get_policy_ids() { # API Test function: V2 GET /v2/policy-types/{policyTypeId} # args(V2): [] # (Function for test scripts) -api_get_policy_type() { +a1pms_api_get_policy_type() { __log_test_start $@ - if [ "$PMS_VERSION" != "V2" ]; then + if [ "$A1PMS_VERSION" != "V2" ]; then __log_test_fail_not_supported return 1 fi @@ -1544,7 +1544,7 @@ api_get_policy_type() { fi query="/v2/policy-types/$2" - res="$(__do_curl_to_api PA GET $query)" + res="$(__do_curl_to_api A1PMS GET $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -1567,7 +1567,7 @@ api_get_policy_type() { fi fi - __collect_endpoint_stats "PMS" 05 "GET" $PMS_API_PREFIX"/v2/policy-types/{policyTypeId}" $status + __collect_endpoint_stats "A1PMS" 05 "GET" $A1PMS_API_PREFIX"/v2/policy-types/{policyTypeId}" $status __log_test_pass return 0 } @@ -1575,10 +1575,10 @@ api_get_policy_type() { # API Test function: GET /policy_schema # args: [] # (Function for test scripts) -api_get_policy_schema() { +a1pms_api_get_policy_schema() { __log_test_start $@ - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then __log_test_fail_not_supported return 1 fi @@ -1588,7 +1588,7 @@ api_get_policy_schema() { return 1 fi query="/policy_schema?id=$2" - res="$(__do_curl_to_api PA GET $query)" + res="$(__do_curl_to_api A1PMS GET $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -1611,7 +1611,7 @@ api_get_policy_schema() { fi fi - __collect_endpoint_stats "PMS" 06 "GET" $PMS_API_PREFIX"/v2/policy_schema" $status + __collect_endpoint_stats "A1PMS" 06 "GET" $A1PMS_API_PREFIX"/v2/policy_schema" $status __log_test_pass return 0 } @@ -1620,10 +1620,10 @@ api_get_policy_schema() { # args: |NORIC [|NOFILE]* # args(V2): # (Function for test scripts) -api_get_policy_schemas() { +a1pms_api_get_policy_schemas() { __log_test_start $@ - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then if [ $# -ne 1 ]; then __print_err "" $@ return 1 @@ -1634,7 +1634,7 @@ api_get_policy_schemas() { return 1 fi fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then query="/v2/policy-schemas" else query="/policy_schemas" @@ -1643,7 +1643,7 @@ api_get_policy_schemas() { fi fi - res="$(__do_curl_to_api PA GET $query)" + res="$(__do_curl_to_api A1PMS GET $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -1667,7 +1667,7 @@ api_get_policy_schemas() { done targetJson=$targetJson"]" - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then targetJson="{\"policy_schemas\": $targetJson }" fi echo "TARGET JSON: $targetJson" >> $HTTPLOG @@ -1679,7 +1679,7 @@ api_get_policy_schemas() { fi fi - __collect_endpoint_stats "PMS" 07 "GET" $PMS_API_PREFIX"/v2/policy-schemas" $status + __collect_endpoint_stats "A1PMS" 07 "GET" $A1PMS_API_PREFIX"/v2/policy-schemas" $status __log_test_pass return 0 } @@ -1687,7 +1687,7 @@ api_get_policy_schemas() { # API Test function: GET /policy_status and V2 GET /policies/{policy_id}/status # arg: [ (STD|STD2 |EMPTY [|EMPTY])|(OSC ) ] # (Function for test scripts) -api_get_policy_status() { +a1pms_api_get_policy_status() { __log_test_start $@ if [ $# -lt 2 ] || [ $# -gt 5 ]; then @@ -1729,14 +1729,14 @@ api_get_policy_status() { return 1 fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then query="/v2/policies/$UUID$2/status" targetJson="{\"last_modified\":\"????\",\"status\":$targetJson}" else query="/policy_status?id="$UUID$2 fi - res="$(__do_curl_to_api PA GET $query)" + res="$(__do_curl_to_api A1PMS GET $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -1753,7 +1753,7 @@ api_get_policy_status() { return 1 fi fi - __collect_endpoint_stats "PMS" 08 "GET" $PMS_API_PREFIX"/v2/policies/{policy_id}/status" $status + __collect_endpoint_stats "A1PMS" 08 "GET" $A1PMS_API_PREFIX"/v2/policies/{policy_id}/status" $status __log_test_pass return 0 } @@ -1761,7 +1761,7 @@ api_get_policy_status() { # API Test function: GET /policy_types and V2 GET /v2/policy-types # args: [|NORIC [|EMPTY []*]] # (Function for test scripts) -api_get_policy_types() { +a1pms_api_get_policy_types() { __log_test_start $@ if [ $# -lt 1 ]; then @@ -1769,7 +1769,7 @@ api_get_policy_types() { return 1 fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then if [ $# -eq 1 ]; then query="/v2/policy-types" elif [ $2 == "NORIC" ]; then @@ -1787,7 +1787,7 @@ api_get_policy_types() { fi fi - res="$(__do_curl_to_api PA GET $query)" + res="$(__do_curl_to_api A1PMS GET $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -1810,7 +1810,7 @@ api_get_policy_types() { done targetJson=$targetJson"]" - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then targetJson="{\"policytype_ids\": $targetJson }" fi echo "TARGET JSON: $targetJson" >> $HTTPLOG @@ -1822,7 +1822,7 @@ api_get_policy_types() { fi fi - __collect_endpoint_stats "PMS" 09 "GET" $PMS_API_PREFIX"/v2/policy-types" $status + __collect_endpoint_stats "A1PMS" 09 "GET" $A1PMS_API_PREFIX"/v2/policy-types" $status __log_test_pass return 0 } @@ -1834,18 +1834,18 @@ api_get_policy_types() { # API Test function: GET /status and V2 GET /status # args: # (Function for test scripts) -api_get_status() { +a1pms_api_get_status() { __log_test_start $@ if [ $# -ne 1 ]; then __print_err "" $@ return 1 fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then query="/v2/status" else query="/status" fi - res="$(__do_curl_to_api PA GET $query)" + res="$(__do_curl_to_api A1PMS GET $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -1853,7 +1853,7 @@ api_get_status() { return 1 fi - __collect_endpoint_stats "PMS" 10 "GET" $PMS_API_PREFIX"/v2/status" $status + __collect_endpoint_stats "A1PMS" 10 "GET" $A1PMS_API_PREFIX"/v2/status" $status __log_test_pass return 0 } @@ -1861,17 +1861,17 @@ api_get_status() { # API Test function: GET /status (root) without api prefix # args: # (Function for test scripts) -api_get_status_root() { +a1pms_api_get_status_root() { __log_test_start $@ if [ $# -ne 1 ]; then __print_err "" $@ return 1 fi query="/status" - TMP_PREFIX=$PMS_API_PREFIX - PMS_API_PREFIX="" - res="$(__do_curl_to_api PA GET $query)" - PMS_API_PREFIX=$TMP_PREFIX + TMP_PREFIX=$A1PMS_API_PREFIX + A1PMS_API_PREFIX="" + res="$(__do_curl_to_api A1PMS GET $query)" + A1PMS_API_PREFIX=$TMP_PREFIX status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -1879,7 +1879,7 @@ api_get_status_root() { return 1 fi - __collect_endpoint_stats "PMS" 19 "GET" "/status" $status + __collect_endpoint_stats "A1PMS" 19 "GET" "/status" $status __log_test_pass return 0 } @@ -1896,10 +1896,10 @@ api_get_status_root() { # (Function for test scripts) -api_get_ric() { +a1pms_api_get_ric() { __log_test_start $@ - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then if [ $# -lt 3 ]; then __print_err " |NOME | [string-of-ricinfo>]" $@ return 1 @@ -1917,7 +1917,7 @@ api_get_ric() { fi query="/v2/rics/ric"$search - res="$(__do_curl_to_api PA GET $query)" + res="$(__do_curl_to_api A1PMS GET $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -1950,7 +1950,7 @@ api_get_ric() { query="/ric?managedElementId="$2 - res="$(__do_curl_to_api PA GET $query)" + res="$(__do_curl_to_api A1PMS GET $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -1967,7 +1967,7 @@ api_get_ric() { fi fi - __collect_endpoint_stats "PMS" 11 "GET" $PMS_API_PREFIX"/v2/rics/ric" $status + __collect_endpoint_stats "A1PMS" 11 "GET" $A1PMS_API_PREFIX"/v2/rics/ric" $status __log_test_pass return 0 } @@ -1977,7 +1977,7 @@ api_get_ric() { # example of = "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2,4 ricsim_g1_1:me2_........." # format of ric-info: :: # (Function for test scripts) -api_get_rics() { +a1pms_api_get_rics() { __log_test_start $@ if [ $# -lt 2 ]; then @@ -1985,7 +1985,7 @@ api_get_rics() { return 1 fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then query="/v2/rics" if [ $2 != "NOTYPE" ]; then query="/v2/rics?policytype_id="$2 @@ -1997,7 +1997,7 @@ api_get_rics() { fi fi - res="$(__do_curl_to_api PA GET $query)" + res="$(__do_curl_to_api A1PMS GET $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -2007,7 +2007,7 @@ api_get_rics() { if [ $# -gt 2 ]; then body=${res:0:${#res}-3} - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then res=$(python3 ../common/create_rics_json.py "./tmp/.tmp_rics.json" "V2" "$3" ) else res=$(python3 ../common/create_rics_json.py "./tmp/.tmp_rics.json" "V1" "$3" ) @@ -2018,7 +2018,7 @@ api_get_rics() { fi targetJson=$(<./tmp/.tmp_rics.json) - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then targetJson="{\"rics\": $targetJson }" fi echo "TARGET JSON: $targetJson" >> $HTTPLOG @@ -2029,7 +2029,7 @@ api_get_rics() { fi fi - __collect_endpoint_stats "PMS" 12 "GET" $PMS_API_PREFIX"/v2/rics" $status + __collect_endpoint_stats "A1PMS" 12 "GET" $A1PMS_API_PREFIX"/v2/rics" $status __log_test_pass return 0 } @@ -2041,14 +2041,14 @@ api_get_rics() { # API test function: PUT /service and V2 PUT /service # args: # (Function for test scripts) -api_put_service() { +a1pms_api_put_service() { __log_test_start $@ if [ $# -ne 4 ]; then __print_err " " $@ return 1 fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then query="/v2/services" json="{\"callback_url\": \""$4"\",\"keep_alive_interval_seconds\": \""$3"\",\"service_id\": \""$2"\"}" else @@ -2058,7 +2058,7 @@ api_put_service() { file="./tmp/.tmp.json" echo "$json" > $file - res="$(__do_curl_to_api PA PUT $query $file)" + res="$(__do_curl_to_api A1PMS PUT $query $file)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -2066,7 +2066,7 @@ api_put_service() { return 1 fi - __collect_endpoint_stats "PMS" 13 "PUT" $PMS_API_PREFIX"/v2/service" $status + __collect_endpoint_stats "A1PMS" 13 "PUT" $A1PMS_API_PREFIX"/v2/service" $status __log_test_pass return 0 } @@ -2074,7 +2074,7 @@ api_put_service() { # API test function: GET /services and V2 GET /v2/services #args: [ ( ) | (NOSERVICE [ ]* )] # (Function for test scripts) -api_get_services() { +a1pms_api_get_services() { __log_test_start $@ #Number of accepted parameters: 1, 2, 4, 7, 10, 13,... paramError=1 @@ -2096,7 +2096,7 @@ api_get_services() { return 1 fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then query="/v2/services" if [ $# -gt 1 ] && [ $2 != "NOSERVICE" ]; then @@ -2109,7 +2109,7 @@ api_get_services() { query="/services?name="$2 fi fi - res="$(__do_curl_to_api PA GET $query)" + res="$(__do_curl_to_api A1PMS GET $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -2131,7 +2131,7 @@ api_get_services() { targetJson=$targetJson"," fi # timeSinceLastActivitySeconds value cannot be checked since value varies - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then targetJson=$targetJson"{\"service_id\": \""$servicename"\",\"keep_alive_interval_seconds\": "$timeout",\"time_since_last_activity_seconds\":\"????\",\"callback_url\": \""$callback"\"}" else targetJson=$targetJson"{\"serviceName\": \""$servicename"\",\"keepAliveIntervalSeconds\": "$timeout",\"timeSinceLastActivitySeconds\":\"????\",\"callbackUrl\": \""$callback"\"}" @@ -2139,7 +2139,7 @@ api_get_services() { let cntr=cntr+3 done targetJson=$targetJson"]" - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then targetJson="{\"service_list\": $targetJson }" fi echo "TARGET JSON: $targetJson" >> $HTTPLOG @@ -2150,7 +2150,7 @@ api_get_services() { fi fi - __collect_endpoint_stats "PMS" 14 "GET" $PMS_API_PREFIX"/v2/services" $status + __collect_endpoint_stats "A1PMS" 14 "GET" $A1PMS_API_PREFIX"/v2/services" $status __log_test_pass return 0 } @@ -2158,7 +2158,7 @@ api_get_services() { # API test function: GET /services V2 GET /v2/services - (only checking service names) # args: []*" # (Function for test scripts) -api_get_service_ids() { +a1pms_api_get_service_ids() { __log_test_start $@ if [ $# -lt 1 ]; then @@ -2166,12 +2166,12 @@ api_get_service_ids() { return 1 fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then query="/v2/services" else query="/services" fi - res="$(__do_curl_to_api PA GET $query)" + res="$(__do_curl_to_api A1PMS GET $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -2185,7 +2185,7 @@ api_get_service_ids() { if [ "$targetJson" != "[" ]; then targetJson=$targetJson"," fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then targetJson=$targetJson"{\"callback_url\":\"????\",\"keep_alive_interval_seconds\":\"????\",\"service_id\":\""$rapp"\",\"time_since_last_activity_seconds\":\"????\"}" else targetJson=$targetJson"{\"callbackUrl\":\"????\",\"keepAliveIntervalSeconds\":\"????\",\"serviceName\":\""$rapp"\",\"timeSinceLastActivitySeconds\":\"????\"}" @@ -2193,7 +2193,7 @@ api_get_service_ids() { done targetJson=$targetJson"]" - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then targetJson="{\"service_list\": $targetJson }" fi echo "TARGET JSON: $targetJson" >> $HTTPLOG @@ -2204,7 +2204,7 @@ api_get_service_ids() { return 1 fi - __collect_endpoint_stats "PMS" 14 "GET" $PMS_API_PREFIX"/v2/services" $status + __collect_endpoint_stats "A1PMS" 14 "GET" $A1PMS_API_PREFIX"/v2/services" $status __log_test_pass return 0 } @@ -2212,19 +2212,19 @@ api_get_service_ids() { # API test function: DELETE /services and V2 DELETE /v2/services/{serviceId} # args: # (Function for test scripts) -api_delete_services() { +a1pms_api_delete_services() { __log_test_start $@ if [ $# -ne 2 ]; then __print_err " " $@ return 1 fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then query="/v2/services/"$2 else query="/services?name="$2 fi - res="$(__do_curl_to_api PA DELETE $query)" + res="$(__do_curl_to_api A1PMS DELETE $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -2232,7 +2232,7 @@ api_delete_services() { return 1 fi - __collect_endpoint_stats "PMS" 15 "DELETE" $PMS_API_PREFIX"/v2/services/{serviceId}" $status + __collect_endpoint_stats "A1PMS" 15 "DELETE" $A1PMS_API_PREFIX"/v2/services/{serviceId}" $status __log_test_pass return 0 } @@ -2240,20 +2240,20 @@ api_delete_services() { # API test function: PUT /services/keepalive and V2 PUT /v2/services/{service_id}/keepalive # args: # (Function for test scripts) -api_put_services_keepalive() { +a1pms_api_put_services_keepalive() { __log_test_start $@ if [ $# -ne 2 ]; then __print_err " " $@ return 1 fi - if [ "$PMS_VERSION" == "V2" ]; then + if [ "$A1PMS_VERSION" == "V2" ]; then query="/v2/services/$2/keepalive" else query="/services/keepalive?name="$2 fi - res="$(__do_curl_to_api PA PUT $query)" + res="$(__do_curl_to_api A1PMS PUT $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -2261,7 +2261,7 @@ api_put_services_keepalive() { return 1 fi - __collect_endpoint_stats "PMS" 16 "PUT" $PMS_API_PREFIX"/v2/services/{service_id}/keepalive" $status + __collect_endpoint_stats "A1PMS" 16 "PUT" $A1PMS_API_PREFIX"/v2/services/{service_id}/keepalive" $status __log_test_pass return 0 } @@ -2273,10 +2273,10 @@ api_put_services_keepalive() { # API Test function: PUT /v2/configuration # args: # (Function for test scripts) -api_put_configuration() { +a1pms_api_put_configuration() { __log_test_start $@ - if [ "$PMS_VERSION" != "V2" ]; then + if [ "$A1PMS_VERSION" != "V2" ]; then __log_test_fail_not_supported return 1 fi @@ -2296,7 +2296,7 @@ api_put_configuration() { file="./tmp/.config.json" echo $inputJson > $file query="/v2/configuration" - res="$(__do_curl_to_api PA PUT $query $file)" + res="$(__do_curl_to_api A1PMS PUT $query $file)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -2304,7 +2304,7 @@ api_put_configuration() { return 1 fi - __collect_endpoint_stats "PMS" 17 "PUT" $PMS_API_PREFIX"/v2/configuration" $status + __collect_endpoint_stats "A1PMS" 17 "PUT" $A1PMS_API_PREFIX"/v2/configuration" $status __log_test_pass return 0 } @@ -2312,10 +2312,10 @@ api_put_configuration() { # API Test function: GET /v2/configuration # args: [] # (Function for test scripts) -api_get_configuration() { +a1pms_api_get_configuration() { __log_test_start $@ - if [ "$PMS_VERSION" != "V2" ]; then + if [ "$A1PMS_VERSION" != "V2" ]; then __log_test_fail_not_supported return 1 fi @@ -2330,7 +2330,7 @@ api_get_configuration() { fi query="/v2/configuration" - res="$(__do_curl_to_api PA GET $query)" + res="$(__do_curl_to_api A1PMS GET $query)" status=${res:${#res}-3} if [ $status -ne $1 ]; then @@ -2353,7 +2353,7 @@ api_get_configuration() { fi fi - __collect_endpoint_stats "PMS" 18 "GET" $PMS_API_PREFIX"/v2/configuration" $status + __collect_endpoint_stats "A1PMS" 18 "GET" $A1PMS_API_PREFIX"/v2/configuration" $status __log_test_pass return 0 } @@ -2368,7 +2368,7 @@ api_get_configuration() { # args: - # (Function for test scripts) -pms_kube_pvc_reset() { +a1pms_kube_pvc_reset() { __log_test_start $@ pvc_name=$(kubectl $KUBECONF get pvc -n $KUBE_NONRTRIC_NAMESPACE --no-headers -o custom-columns=":metadata.name" | grep policy) @@ -2376,7 +2376,7 @@ pms_kube_pvc_reset() { pvc_name=policymanagementservice-vardata-pvc fi echo " Trying to reset pvc: "$pvc_name - __kube_clean_pvc $POLICY_AGENT_APP_NAME $KUBE_NONRTRIC_NAMESPACE $pvc_name $POLICY_AGENT_CONTAINER_MNT_DIR + __kube_clean_pvc $A1PMS_APP_NAME $KUBE_NONRTRIC_NAMESPACE $pvc_name $A1PMS_CONTAINER_MNT_DIR __log_test_pass return 0 diff --git a/test/common/api_curl.sh b/test/common/api_curl.sh index 85794f85..e99f5791 100644 --- a/test/common/api_curl.sh +++ b/test/common/api_curl.sh @@ -17,13 +17,13 @@ # ============LICENSE_END================================================= # -# Generic function to query the agent/ICS via the REST or DMAAP interface. -# Used by all other agent/ICS api test functions +# Generic function to query the A1PMS/ICS via the REST or DMAAP interface. +# Used by all other A1PMS/ICS api test functions # If operation sufffix is '_BATCH' the the send and get response is split in two sequences, # one for sending the requests and one for receiving the response # but only when using the DMAAP interface # REST or DMAAP is controlled of the base url of $XX_ADAPTER -# arg: (PA|ICS|CR|RC GET|PUT|POST|DELETE|GET_BATCH|PUT_BATCH|POST_BATCH|DELETE_BATCH | [ [mime-type]]) | (PA|ICS RESPONSE ) +# arg: (A1PMS|ICS|CR|RC GET|PUT|POST|DELETE|GET_BATCH|PUT_BATCH|POST_BATCH|DELETE_BATCH | [ [mime-type]]) | (A1PMS|ICS RESPONSE ) # Default mime type for file is application/json unless specified in parameter mime-type # (Not for test scripts) __do_curl_to_api() { @@ -42,12 +42,12 @@ __do_curl_to_api() { input_url=$3 fname=$4 if [ $# -gt 0 ]; then - if [ $1 == "PA" ]; then - __ADAPTER=$PA_ADAPTER - __ADAPTER_TYPE=$PA_ADAPTER_TYPE - __RETRY_CODES=$AGENT_RETRY_CODES - if [ $PMS_VERSION != "V1" ]; then - input_url=$PMS_API_PREFIX$3 + if [ $1 == "A1PMS" ]; then + __ADAPTER=$A1PMS_ADAPTER + __ADAPTER_TYPE=$A1PMS_ADAPTER_TYPE + __RETRY_CODES=$A1PMS_RETRY_CODES + if [ $A1PMS_VERSION != "V1" ]; then + input_url=$A1PMS_API_PREFIX$3 fi elif [ $1 == "ICS" ]; then __ADAPTER=$ICS_ADAPTER @@ -154,7 +154,7 @@ __do_curl_to_api() { if [ $paramError -eq 1 ]; then ((RES_CONF_FAIL++)) echo "-Incorrect number of parameters to __do_curl_to_api " $@ >> $HTTPLOG - echo "-Expected: (PA|ICS GET|PUT|POST|DELETE|GET_BATCH|PUT_BATCH|POST_BATCH|DELETE_BATCH [ [mime-type]]) | (PA|ICS RESPONSE )" >> $HTTPLOG + echo "-Expected: (A1PMS|ICS GET|PUT|POST|DELETE|GET_BATCH|PUT_BATCH|POST_BATCH|DELETE_BATCH [ [mime-type]]) | (A1PMS|ICS RESPONSE )" >> $HTTPLOG echo "-Returning response 000" >> $HTTPLOG echo "-000" return 1 @@ -250,7 +250,7 @@ __do_curl_to_api() { echo " RESP: "$res >> $HTTPLOG status=${res:${#res}-3} TS=$SECONDS - # wait of the reply from the agent/ICS... + # wait of the reply from the A1PMS/ICS... while [ $status -eq 204 ]; do if [ $(($SECONDS - $TS)) -gt 90 ]; then echo " RETCODE: (timeout after 90s)" >> $HTTPLOG diff --git a/test/common/clean_kube.sh b/test/common/clean_kube.sh index f0bdfe67..f25d52c5 100755 --- a/test/common/clean_kube.sh +++ b/test/common/clean_kube.sh @@ -86,7 +86,7 @@ __kube_wait_for_zero_count() { __kube_delete_all_resources() { echo " Delete all in namespace $1 ..." namespace=$1 - resources="deployments replicaset statefulset services pods configmaps pvc serviceaccounts" + resources="deployments replicaset statefulset services pods configmaps pvc serviceaccounts secrets" for restype in $resources; do result=$(kubectl $KUBECONF get $restype -n $namespace -o jsonpath='{.items[?(@.metadata.labels.autotest)].metadata.name}') if [ $? -eq 0 ] && [ ! -z "$result" ]; then @@ -115,7 +115,7 @@ __kube_delete_all_pv() { __kube_wait_for_delete() { echo " Wait for delete in namespace $1 ..." namespace=$1 - resources="deployments replicaset statefulset services pods configmaps pvc " + resources="deployments replicaset statefulset services pods configmaps pvc secrets" for restype in $resources; do result=$(kubectl $KUBECONF get $restype -n $namespace -o jsonpath='{.items[?(@.metadata.labels.autotest)].metadata.name}') if [ $? -eq 0 ] && [ ! -z "$result" ]; then @@ -173,7 +173,7 @@ __kube_wait_for_delete_pv() { echo "Will remove all kube resources marked with label 'autotest'" print_usage() { - echo "Usage: clean_kube.sh [--kubeconfig ]" + echo "Usage: clean_kube.sh [--kubeconfig ] | [--kubecontext ]" } if [ $# -eq 0 ]; then @@ -189,6 +189,13 @@ elif [ $# -eq 2 ]; then exit fi KUBECONF="--kubeconfig $2" + elif [ $1 == "--kubecontext" ]; then + if [ -z $2 ]; then + echo "No context found for --kubecontext" + print_usage + exit + fi + KUBECONF="--context $2" else print_usage exit diff --git a/test/common/clean_kube_ns.sh b/test/common/clean_kube_ns.sh index 807a88a8..34a998f8 100755 --- a/test/common/clean_kube_ns.sh +++ b/test/common/clean_kube_ns.sh @@ -33,7 +33,7 @@ KUBECONF="" echo "Will remove all kube namespaces marked with label 'autotest'" print_usage() { - echo "Usage: clean_kube_ns.sh [--kubeconfig ]" + echo "Usage: clean_kube_ns.sh [--kubeconfig ] | [--kubecontext ]" } if [ $# -eq 0 ]; then @@ -49,6 +49,13 @@ elif [ $# -eq 2 ]; then exit fi KUBECONF="--kubeconfig $2" + elif [ $1 == "--kubecontext" ]; then + if [ -z $2 ]; then + echo "No context found for --kubecontext" + print_usage + exit + fi + KUBECONF="--context $2" else print_usage exit diff --git a/test/common/consul_api_functions.sh b/test/common/consul_api_functions.sh index 5adb1144..221124b7 100644 --- a/test/common/consul_api_functions.sh +++ b/test/common/consul_api_functions.sh @@ -146,7 +146,7 @@ __CBS_store_docker_logs() { : else docker logs $CBS_APP_NAME > $1$2_cbs.log 2>&1 - body="$(__do_curl $LOCALHOST_HTTP:$CBS_EXTERNAL_PORT/service_component_all/$POLICY_AGENT_APP_NAME)" + body="$(__do_curl $LOCALHOST_HTTP:$CBS_EXTERNAL_PORT/service_component_all/$A1PMS_APP_NAME)" echo "$body" > $1$2_consul_config.json 2>&1 fi } @@ -199,7 +199,7 @@ __CBS_test_requirements() { ### Consul functions #################### -# Function to load config from a file into consul for the Policy Agent +# Function to load config from a file into consul for the a1pms # arg: # (Function for test scripts) consul_config_app() { @@ -212,9 +212,9 @@ consul_config_app() { exit 1 fi - echo " Loading config for "$POLICY_AGENT_APP_NAME" from "$1 + echo " Loading config for "$A1PMS_APP_NAME" from "$1 - curlString="$CONSUL_SERVICE_PATH/v1/kv/${POLICY_AGENT_CONFIG_KEY}?dc=dc1 -X PUT -H Accept:application/json -H Content-Type:application/json -H X-Requested-With:XMLHttpRequest --data-binary @"$1 + curlString="$CONSUL_SERVICE_PATH/v1/kv/${A1PMS_CONFIG_KEY}?dc=dc1 -X PUT -H Accept:application/json -H Content-Type:application/json -H X-Requested-With:XMLHttpRequest --data-binary @"$1 result=$(__do_curl "$curlString") if [ $? -ne 0 ]; then @@ -222,7 +222,7 @@ consul_config_app() { ((RES_CONF_FAIL++)) return 1 fi - body="$(__do_curl $CBS_SERVICE_PATH/service_component_all/$POLICY_AGENT_CONFIG_KEY)" + body="$(__do_curl $CBS_SERVICE_PATH/service_component_all/$A1PMS_CONFIG_KEY)" echo $body > "./tmp/.output"$1 if [ $? -ne 0 ]; then diff --git a/test/common/cp_api_functions.sh b/test/common/cp_api_functions.sh index f9f689a7..9d32c370 100644 --- a/test/common/cp_api_functions.sh +++ b/test/common/cp_api_functions.sh @@ -172,14 +172,14 @@ __control_panel_export_vars() { export NRT_GATEWAY_APP_NAME export NRT_GATEWAY_EXTERNAL_PORT - export POLICY_AGENT_EXTERNAL_SECURE_PORT + export A1PMS_EXTERNAL_SECURE_PORT export ICS_EXTERNAL_SECURE_PORT if [ $RUNMODE == "KUBE" ]; then export NGW_DOMAIN_NAME=$NRT_GATEWAY_APP_NAME.$KUBE_NONRTRIC_NAMESPACE.svc.cluster.local # suffix needed for nginx name resolution export CP_NGINX_RESOLVER=$CONTROL_PANEL_NGINX_KUBE_RESOLVER else - export POLICY_AGENT_DOMAIN_NAME=$POLICY_AGENT_APP_NAME + export A1PMS_DOMAIN_NAME=$A1PMS_APP_NAME export ICS_DOMAIN_NAME=$ICS_APP_NAME export NGW_DOMAIN_NAME=$NRT_GATEWAY_APP_NAME @@ -276,7 +276,7 @@ start_control_panel() { dest_file=$SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_HOST_MNT_DIR/$CONTROL_PANEL_CONFIG_FILE - envsubst '${NGW_DOMAIN_NAME},${CP_NGINX_RESOLVER},${NRT_GATEWAY_EXTERNAL_PORT},${POLICY_AGENT_EXTERNAL_SECURE_PORT},${ICS_EXTERNAL_SECURE_PORT},${POLICY_AGENT_DOMAIN_NAME},${ICS_DOMAIN_NAME},${CONTROL_PANEL_PATH_POLICY_PREFIX},${CONTROL_PANEL_PATH_ICS_PREFIX} ,${CONTROL_PANEL_PATH_ICS_PREFIX2}' < $1 > $dest_file + envsubst '${NGW_DOMAIN_NAME},${CP_NGINX_RESOLVER},${NRT_GATEWAY_EXTERNAL_PORT},${A1PMS_EXTERNAL_SECURE_PORT},${ICS_EXTERNAL_SECURE_PORT},${A1PMS_DOMAIN_NAME},${ICS_DOMAIN_NAME},${CONTROL_PANEL_PATH_POLICY_PREFIX},${CONTROL_PANEL_PATH_ICS_PREFIX} ,${CONTROL_PANEL_PATH_ICS_PREFIX2}' < $1 > $dest_file __start_container $CONTROL_PANEL_COMPOSE_DIR "" NODOCKERARGS 1 $CONTROL_PANEL_APP_NAME diff --git a/test/common/cr_api_functions.sh b/test/common/cr_api_functions.sh index 45ed1fb5..e80ad16b 100644 --- a/test/common/cr_api_functions.sh +++ b/test/common/cr_api_functions.sh @@ -454,13 +454,13 @@ cr_delay_callback() { return 0 } -# CR API: Check the contents of all current ric sync events for one id from PMS +# CR API: Check the contents of all current ric sync events for one id from A1PMS # [ EMPTY | ( )+ ] # (Function for test scripts) cr_api_check_all_sync_events() { __log_test_start $@ - if [ "$PMS_VERSION" != "V2" ]; then + if [ "$A1PMS_VERSION" != "V2" ]; then __log_test_fail_not_supported return 1 fi diff --git a/test/common/ics_api_functions.sh b/test/common/ics_api_functions.sh index a18bf729..0df2ae41 100644 --- a/test/common/ics_api_functions.sh +++ b/test/common/ics_api_functions.sh @@ -396,13 +396,13 @@ start_stopped_ics() { fi # Tie the ICS to the same worker node it was initially started on - # A PVC of type hostPath is mounted to PMS, for persistent storage, so the PMS must always be on the node which mounted the volume + # A PVC of type hostPath is mounted to A1PMS, for persistent storage, so the A1PMS must always be on the node which mounted the volume if [ -z "$__ICS_WORKER_NODE" ]; then echo -e $RED" No initial worker node found for pod "$RED ((RES_CONF_FAIL++)) return 1 else - echo -e $BOLD" Setting nodeSelector kubernetes.io/hostname=$__ICS_WORKER_NODE to deployment for $ICS_APP_NAME. Pod will always run on this worker node: $__PA_WORKER_NODE"$BOLD + echo -e $BOLD" Setting nodeSelector kubernetes.io/hostname=$__ICS_WORKER_NODE to deployment for $ICS_APP_NAME. Pod will always run on this worker node: $__ICS_WORKER_NODE"$BOLD echo -e $BOLD" The mounted volume is mounted as hostPath and only available on that worker node."$BOLD tmp=$(kubectl $KUBECONF patch deployment $ICS_APP_NAME -n $KUBE_NONRTRIC_NAMESPACE --patch '{"spec": {"template": {"spec": {"nodeSelector": {"kubernetes.io/hostname": "'$__ICS_WORKER_NODE'"}}}}}') if [ $? -ne 0 ]; then diff --git a/test/common/kubeproxy_api_functions.sh b/test/common/kubeproxy_api_functions.sh index 8fbccf0c..6448185b 100644 --- a/test/common/kubeproxy_api_functions.sh +++ b/test/common/kubeproxy_api_functions.sh @@ -247,47 +247,86 @@ start_kube_proxy() { echo " Retrieving host and ports for service..." - #Finding host of the proxy + # #Keeping this old code for reference + # #Finding host of the proxy + # echo " Trying to find svc hostname..." + # CLUSTER_KUBE_PROXY_HOST=$(__kube_cmd_with_timeout "kubectl $KUBECONF get svc $KUBE_PROXY_APP_NAME -n $KUBE_SIM_NAMESPACE -o jsonpath={.status.loadBalancer.ingress[0].hostname}") + + + # if [ "$CLUSTER_KUBE_PROXY_HOST" == "localhost" ]; then + # #Local host found + # echo -e $YELLOW" The test environment svc $KUBE_PROXY_APP_NAME host is: $CLUSTER_KUBE_PROXY_HOST"$EYELLOW + # CLUSTER_KUBE_PROXY_HOST="127.0.0.1" + # else + # if [ -z "$CLUSTER_KUBE_PROXY_HOST" ]; then + # #Host of proxy not found, trying to find the ip.... + # echo " Trying to find svc ip..." + # CLUSTER_KUBE_PROXY_HOST=$(__kube_cmd_with_timeout "kubectl $KUBECONF get svc $KUBE_PROXY_APP_NAME -n $KUBE_SIM_NAMESPACE -o jsonpath={.status.loadBalancer.ingress[0].ip}") + # if [ ! -z "$CLUSTER_KUBE_PROXY_HOST" ]; then + # #Host ip found + # echo -e $YELLOW" The test environment svc $KUBE_PROXY_APP_NAME ip is: $CLUSTER_KUBE_PROXY_HOST."$EYELLOW + # fi + # else + # #Host or ip of proxy found + # echo -e $YELLOW" The test environment host/ip is: $CLUSTER_KUBE_PROXY_HOST."$EYELLOW + # fi + # fi + + # PORT_KEY_PREFIX="" + # if [ $KUBE_PROXY_HTTPX == "https" ]; then + # PORT_KEY_PREFIX="s" #add suffix to port key name to get https ports + # fi + # if [ -z "$CLUSTER_KUBE_PROXY_HOST" ]; then + # #Host/ip of proxy not found, try to use the cluster and the nodeports of the proxy + # CLUSTER_KUBE_PROXY_HOST=$(kubectl $KUBECONF config view -o jsonpath={.clusters[0].cluster.server} | awk -F[/:] '{print $4}') + # echo -e $YELLOW" The test environment cluster ip is: $CLUSTER_KUBE_PROXY_HOST."$EYELLOW + # CLUSTER_KUBE_PROXY_PORT=$(__kube_get_service_nodeport $KUBE_PROXY_APP_NAME $KUBE_SIM_NAMESPACE "http$PORT_KEY_PREFIX") # port for proxy access + # KUBE_PROXY_WEB_NODEPORT=$(__kube_get_service_nodeport $KUBE_PROXY_APP_NAME $KUBE_SIM_NAMESPACE "web$PORT_KEY_PREFIX") # web port, only for alive test + # echo " Cluster ip/host, cluster http$PORT_KEY_PREFIX nodeport, cluster web$PORT_KEY_PREFIX nodeport: $CLUSTER_KUBE_PROXY_HOST $CLUSTER_KUBE_PROXY_PORT $KUBE_PROXY_WEB_NODEPORT" + # else + # #Find the service ports of the proxy + # CLUSTER_KUBE_PROXY_PORT=$(__kube_get_service_port $KUBE_PROXY_APP_NAME $KUBE_SIM_NAMESPACE "http$PORT_KEY_PREFIX") # port for proxy access + # KUBE_PROXY_WEB_NODEPORT=$(__kube_get_service_port $KUBE_PROXY_APP_NAME $KUBE_SIM_NAMESPACE "web$PORT_KEY_PREFIX") # web port, only for alive test + # echo " Proxy ip/host, proxy http$PORT_KEY_PREFIX port, proxy web$PORT_KEY_PREFIX port: $CLUSTER_KUBE_PROXY_HOST $CLUSTER_KUBE_PROXY_PORT $KUBE_PROXY_WEB_NODEPORT" + # fi + # #End of old code + + ########### New method to find host/ip to cluster/proxy + # Basic principle if the ip/host of the svc for the proxy is found - use the proxy service ports towards that ip/host of the proxy. + # If proxy ip/host is not found then find the cluster ip/host and use the proxy nodeports towards that ip/host of the cluster + + #Finding host/ip of the proxy echo " Trying to find svc hostname..." CLUSTER_KUBE_PROXY_HOST=$(__kube_cmd_with_timeout "kubectl $KUBECONF get svc $KUBE_PROXY_APP_NAME -n $KUBE_SIM_NAMESPACE -o jsonpath={.status.loadBalancer.ingress[0].hostname}") - - - if [ "$CLUSTER_KUBE_PROXY_HOST" == "localhost" ]; then - #Local host found - echo -e $YELLOW" The test environment svc $KUBE_PROXY_APP_NAME host is: $CLUSTER_KUBE_PROXY_HOST"$EYELLOW - CLUSTER_KUBE_PROXY_HOST="127.0.0.1" - else - if [ -z "$CLUSTER_KUBE_PROXY_HOST" ]; then - #Host of proxy not found, trying to find the ip.... - echo " Trying to find svc ip..." - CLUSTER_KUBE_PROXY_HOST=$(__kube_cmd_with_timeout "kubectl $KUBECONF get svc $KUBE_PROXY_APP_NAME -n $KUBE_SIM_NAMESPACE -o jsonpath={.status.loadBalancer.ingress[0].ip}") - if [ ! -z "$CLUSTER_KUBE_PROXY_HOST" ]; then - #Host ip found - echo -e $YELLOW" The test environment svc $KUBE_PROXY_APP_NAME ip is: $CLUSTER_KUBE_PROXY_HOST."$EYELLOW - fi - else - #Host or ip of proxy found - echo -e $YELLOW" The test environment host/ip is: $CLUSTER_KUBE_PROXY_HOST."$EYELLOW - fi + if [ -z "$CLUSTER_KUBE_PROXY_HOST" ]; then + #Host of proxy not found, trying to find the ip.... + echo " Svc hostname not found, trying to find svc ip..." + CLUSTER_KUBE_PROXY_HOST=$(__kube_cmd_with_timeout "kubectl $KUBECONF get svc $KUBE_PROXY_APP_NAME -n $KUBE_SIM_NAMESPACE -o jsonpath={.status.loadBalancer.ingress[0].ip}") fi - PORT_KEY_PREFIX="" if [ $KUBE_PROXY_HTTPX == "https" ]; then PORT_KEY_PREFIX="s" #add suffix to port key name to get https ports fi + if [ -z "$CLUSTER_KUBE_PROXY_HOST" ]; then - #Host/ip of proxy not found, try to use the cluster and the nodeports of the proxy - CLUSTER_KUBE_PROXY_HOST=$(kubectl $KUBECONF config view -o jsonpath={.clusters[0].cluster.server} | awk -F[/:] '{print $4}') - echo -e $YELLOW" The test environment cluster ip is: $CLUSTER_KUBE_PROXY_HOST."$EYELLOW + #Finding host/ip of the cluster + echo " Nor svc hostname or ip found, trying to find cluster host/ip from context..." + __current_context=$(kubectl $KUBECONF config current-context) + __cluster_name=$(kubectl $KUBECONF config view -o "jsonpath={.contexts[?(@.name=='"$__current_context"')].context.cluster}") + __cluster_server=$(kubectl $KUBECONF config view -o "jsonpath={.clusters[?(@.name=='"$__cluster_name"')].cluster.server}") + CLUSTER_KUBE_PROXY_HOST=$(echo $__cluster_server | awk -F[/:] '{print $4}') + + echo -e $YELLOW" The test environment cluster: $CLUSTER_KUBE_PROXY_HOST."$EYELLOW CLUSTER_KUBE_PROXY_PORT=$(__kube_get_service_nodeport $KUBE_PROXY_APP_NAME $KUBE_SIM_NAMESPACE "http$PORT_KEY_PREFIX") # port for proxy access KUBE_PROXY_WEB_NODEPORT=$(__kube_get_service_nodeport $KUBE_PROXY_APP_NAME $KUBE_SIM_NAMESPACE "web$PORT_KEY_PREFIX") # web port, only for alive test echo " Cluster ip/host, cluster http$PORT_KEY_PREFIX nodeport, cluster web$PORT_KEY_PREFIX nodeport: $CLUSTER_KUBE_PROXY_HOST $CLUSTER_KUBE_PROXY_PORT $KUBE_PROXY_WEB_NODEPORT" else - #Find the service ports of the proxy + echo -e $YELLOW" The test environment proxy: $CLUSTER_KUBE_PROXY_HOST."$EYELLOW CLUSTER_KUBE_PROXY_PORT=$(__kube_get_service_port $KUBE_PROXY_APP_NAME $KUBE_SIM_NAMESPACE "http$PORT_KEY_PREFIX") # port for proxy access KUBE_PROXY_WEB_NODEPORT=$(__kube_get_service_port $KUBE_PROXY_APP_NAME $KUBE_SIM_NAMESPACE "web$PORT_KEY_PREFIX") # web port, only for alive test echo " Proxy ip/host, proxy http$PORT_KEY_PREFIX port, proxy web$PORT_KEY_PREFIX port: $CLUSTER_KUBE_PROXY_HOST $CLUSTER_KUBE_PROXY_PORT $KUBE_PROXY_WEB_NODEPORT" fi + ########### End of new method KUBE_PROXY_WEB_PATH=$KUBE_PROXY_HTTPX"://"$CLUSTER_KUBE_PROXY_HOST":"$KUBE_PROXY_WEB_NODEPORT diff --git a/test/common/mr_api_functions.sh b/test/common/mr_api_functions.sh index 458070e0..977c3da8 100755 --- a/test/common/mr_api_functions.sh +++ b/test/common/mr_api_functions.sh @@ -316,7 +316,7 @@ __mr_set_protocoll() { MR_ZOOKEEPER_SERVICE_PATH=$MR_ZOOKEEPER_APP_NAME":"$MR_ZOOKEEPER_PORT fi - # For directing calls from script to e.g.PMS via message rounter + # For directing calls from script to e.g.A1PMS via message rounter # These cases shall always go though the mr-stub MR_ADAPTER_HTTP="http://"$MR_STUB_APP_NAME":"$2 MR_ADAPTER_HTTPS="https://"$MR_STUB_APP_NAME":"$4 @@ -345,7 +345,7 @@ __mr_set_protocoll() { MR_ZOOKEEPER_SERVICE_PATH=$MR_ZOOKEEPER_APP_NAME"."$KUBE_ONAP_NAMESPACE":"$MR_ZOOKEEPER_PORT fi - # For directing calls from script to e.g.PMS, via message rounter + # For directing calls from script to e.g.A1PMS, via message rounter # These calls shall always go though the mr-stub MR_ADAPTER_HTTP="http://"$MR_STUB_APP_NAME.$KUBE_ONAP_NAMESPACE":"$3 MR_ADAPTER_HTTPS="https://"$MR_STUB_APP_NAME.$KUBE_ONAP_NAMESPACE":"$5 diff --git a/test/common/ngw_api_functions.sh b/test/common/ngw_api_functions.sh index 1886ad8d..a1e61453 100644 --- a/test/common/ngw_api_functions.sh +++ b/test/common/ngw_api_functions.sh @@ -204,12 +204,12 @@ __gateway_export_vars() { export NRT_GATEWAY_COMPOSE_DIR if [ $RUNMODE == "KUBE" ]; then - export POLICY_AGENT_EXTERNAL_SECURE_PORT + export A1PMS_EXTERNAL_SECURE_PORT export ICS_EXTERNAL_SECURE_PORT - export POLICY_AGENT_DOMAIN_NAME=$POLICY_AGENT_APP_NAME.$KUBE_NONRTRIC_NAMESPACE + export A1PMS_DOMAIN_NAME=$A1PMS_APP_NAME.$KUBE_NONRTRIC_NAMESPACE export ICS_DOMAIN_NAME=$ICS_APP_NAME.$KUBE_NONRTRIC_NAMESPACE else - export POLICY_AGENT_DOMAIN_NAME=$POLICY_AGENT_APP_NAME + export A1PMS_DOMAIN_NAME=$A1PMS_APP_NAME export ICS_DOMAIN_NAME=$ICS_APP_NAME fi } @@ -303,16 +303,16 @@ start_gateway() { } -# API Test function: V2 GET /status towards PMS +# API Test function: V2 GET /status towards A1PMS # args: # (Function for test scripts) -gateway_pms_get_status() { +gateway_a1pms_get_status() { __log_test_start $@ if [ $# -ne 1 ]; then __print_err "" $@ return 1 fi - query=$PMS_API_PREFIX"/v2/status" + query=$A1PMS_API_PREFIX"/v2/status" res="$(__do_curl_to_api NGW GET $query)" status=${res:${#res}-3} diff --git a/test/common/ricsim_api_functions.sh b/test/common/ricsim_api_functions.sh index 01e193dd..46235634 100644 --- a/test/common/ricsim_api_functions.sh +++ b/test/common/ricsim_api_functions.sh @@ -241,7 +241,7 @@ start_ric_simulators() { export RIC_SIM_INTERNAL_PORT export RIC_SIM_INTERNAL_SECURE_PORT - echo -e " Creating $POLICY_AGENT_APP_NAME app and expose service" + echo -e " Creating $A1PMS_APP_NAME app and expose service" #Check if nonrtric namespace exists, if not create it __kube_create_namespace $KUBE_A1SIM_NAMESPACE diff --git a/test/common/sdnc_api_functions.sh b/test/common/sdnc_api_functions.sh index 55a6a15d..bab9474f 100644 --- a/test/common/sdnc_api_functions.sh +++ b/test/common/sdnc_api_functions.sh @@ -248,7 +248,7 @@ start_sdnc() { __check_included_image 'SDNC' if [ $? -eq 1 ]; then echo -e $RED"The SDNC A1 Controller app is not included in this test script"$ERED - echo -e $RED"The Policy Agent will not be started"$ERED + echo -e $RED"The A1PMS will not be started"$ERED exit fi @@ -313,7 +313,7 @@ start_stopped_sdnc() { return 0 } -# Check the agent logs for WARNINGs and ERRORs +# Check the sdnc logs for WARNINGs and ERRORs # args: - # (Function for test scripts) check_sdnc_logs() { diff --git a/test/common/test_env-onap-guilin.sh b/test/common/test_env-onap-guilin.sh index 012716b8..320600f6 100755 --- a/test/common/test_env-onap-guilin.sh +++ b/test/common/test_env-onap-guilin.sh @@ -41,7 +41,7 @@ NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO # NOTE: One environment variable containing the image name and tag is create by the test script # for each image from the env variables below. # The variable is created by removing the suffix "_BASE" from the base image variable name. -# Example: POLICY_AGENT_IMAGE_BASE -> POLICY_AGENT_IMAGE +# Example: A1PMS_IMAGE_BASE -> A1PMS_IMAGE # This var will point to the local or remote image depending on cmd line arguments. # In addition, the repo and the image tag version are selected from the list of image tags based on the cmd line argurment. # For images built by the script, only tag #1 shall be specified @@ -58,12 +58,12 @@ NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO # 7 XXX_PROXY: other images, not produced by the project: : -# Policy Agent image and tags -POLICY_AGENT_IMAGE_BASE="onap/ccsdk-oran-a1policymanagementservice" -POLICY_AGENT_IMAGE_TAG_LOCAL="1.0.2-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.2-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE="1.0.2-SNAPSHOT" #Will use snapshot repo -POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="1.0.2" +# A1PMS image and tags +A1PMS_IMAGE_BASE="onap/ccsdk-oran-a1policymanagementservice" +A1PMS_IMAGE_TAG_LOCAL="1.0.2-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.2-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE="1.0.2-SNAPSHOT" #Will use snapshot repo +A1PMS_IMAGE_TAG_REMOTE_RELEASE="1.0.2" # Tag for guilin branch @@ -144,7 +144,7 @@ PVC_CLEANER_IMAGE_TAG_REMOTE_PROXY="20.10" #No local image for pvc cleaner, remote image always used # List of app short names produced by the project -PROJECT_IMAGES_APP_NAMES="PA SDNC" +PROJECT_IMAGES_APP_NAMES="A1PMS SDNC" # List of app short names which images pulled from ORAN ORAN_IMAGES_APP_NAMES="CP RICSIM" @@ -165,30 +165,30 @@ KUBE_A1SIM_NAMESPACE="a1-sim" # Namespace for a1-p si KUBE_ONAP_NAMESPACE="onap" # Namespace for onap (only message router) KUBE_SDNC_NAMESPACE="onap" # Namespace for sdnc -POLICY_AGENT_EXTERNAL_PORT=8081 # Policy Agent container external port (host -> container) -POLICY_AGENT_INTERNAL_PORT=8081 # Policy Agent container internal port (container -> container) -POLICY_AGENT_EXTERNAL_SECURE_PORT=8433 # Policy Agent container external secure port (host -> container) -POLICY_AGENT_INTERNAL_SECURE_PORT=8433 # Policy Agent container internal secure port (container -> container) -POLICY_AGENT_APIS="V1" # Supported northbound api versions -PMS_VERSION="V1" # Tested version of northbound API -PMS_API_PREFIX="" # api url prefix, only for V2 - -POLICY_AGENT_APP_NAME="policymanagementservice" # Name for Policy Agent container -POLICY_AGENT_DISPLAY_NAME="Policy Management Service" -POLICY_AGENT_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host -POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the Policy Agent container -POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel -POLICY_AGENT_CONFIG_KEY="policy-agent" # Key for consul config -POLICY_AGENT_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice" # Java base package name -POLICY_AGENT_ACTUATOR="/actuator/loggers/$POLICY_AGENT_PKG_NAME" # Url for trace/debug -POLICY_AGENT_ALIVE_URL="/status" # Base path for alive check -POLICY_AGENT_COMPOSE_DIR="policy_agent" # Dir in simulator_group for docker-compose -POLICY_AGENT_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file -POLICY_AGENT_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file -POLICY_AGENT_CONFIG_FILE="application.yaml" # Container config file name -POLICY_AGENT_DATA_FILE="application_configuration.json" # Container data file name -POLICY_AGENT_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container -PMS_FEATURE_LEVEL="" # Space separated list of features +A1PMS_EXTERNAL_PORT=8081 # A1PMS container external port (host -> container) +A1PMS_INTERNAL_PORT=8081 # A1PMS container internal port (container -> container) +A1PMS_EXTERNAL_SECURE_PORT=8433 # A1PMS container external secure port (host -> container) +A1PMS_INTERNAL_SECURE_PORT=8433 # A1PMS container internal secure port (container -> container) +A1PMS_APIS="V1" # Supported northbound api versions +A1PMS_VERSION="V1" # Tested version of northbound API +A1PMS_API_PREFIX="" # api url prefix, only for V2 + +A1PMS_APP_NAME="policymanagementservice" # Name for A1PMS container +A1PMS_DISPLAY_NAME="Policy Management Service" +A1PMS_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host +A1PMS_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the A1PMS container +A1PMS_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel +A1PMS_CONFIG_KEY="policy-agent" # Key for consul config +A1PMS_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice" # Java base package name +A1PMS_ACTUATOR="/actuator/loggers/$A1PMS_PKG_NAME" # Url for trace/debug +A1PMS_ALIVE_URL="/status" # Base path for alive check +A1PMS_COMPOSE_DIR="a1pms" # Dir in simulator_group for docker-compose +A1PMS_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file +A1PMS_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file +A1PMS_CONFIG_FILE="application.yaml" # Container config file name +A1PMS_DATA_FILE="application_configuration.json" # Container data file name +A1PMS_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container +A1PMS_FEATURE_LEVEL="" # Space separated list of features MR_DMAAP_APP_NAME="message-router" # Name for the Dmaap MR MR_STUB_APP_NAME="mr-stub" # Name of the MR stub diff --git a/test/common/test_env-onap-honolulu.sh b/test/common/test_env-onap-honolulu.sh index c9643a89..a583c80f 100755 --- a/test/common/test_env-onap-honolulu.sh +++ b/test/common/test_env-onap-honolulu.sh @@ -41,7 +41,7 @@ NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO # NOTE: One environment variable containing the image name and tag is create by the test script # for each image from the env variables below. # The variable is created by removing the suffix "_BASE" from the base image variable name. -# Example: POLICY_AGENT_IMAGE_BASE -> POLICY_AGENT_IMAGE +# Example: A1PMS_IMAGE_BASE -> A1PMS_IMAGE # This var will point to the local or remote image depending on cmd line arguments. # In addition, the repo and the image tag version are selected from the list of image tags based on the cmd line argurment. # For images built by the script, only tag #1 shall be specified @@ -59,7 +59,7 @@ NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO ############################################################################# # Note: -# The imgage tags for pms and sdnc are updated AFTER the release. +# The imgage tags for a1pms and sdnc are updated AFTER the release. # This means that the latest staging/snapshot images for these two components have # version one step (0.0.1 - bug-level) higher than the # latest release image version. @@ -67,12 +67,12 @@ NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO # This is only applicable for ONAP images ############################################################################# -# Policy Agent image and tags -POLICY_AGENT_IMAGE_BASE="onap/ccsdk-oran-a1policymanagementservice" -POLICY_AGENT_IMAGE_TAG_LOCAL="1.1.2-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.2-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE="1.1.2-STAGING-latest" #Will use snapshot repo -POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="1.1.1" +# A1PMS image and tags +A1PMS_IMAGE_BASE="onap/ccsdk-oran-a1policymanagementservice" +A1PMS_IMAGE_TAG_LOCAL="1.1.2-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.2-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE="1.1.2-STAGING-latest" #Will use snapshot repo +A1PMS_IMAGE_TAG_REMOTE_RELEASE="1.1.1" # SDNC A1 Controller remote image and tag SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image" @@ -167,7 +167,7 @@ PVC_CLEANER_IMAGE_TAG_REMOTE_PROXY="20.10" #No local image for pvc cleaner, remote image always used # List of app short names produced by the project -PROJECT_IMAGES_APP_NAMES="PA SDNC" +PROJECT_IMAGES_APP_NAMES="A1PMS SDNC" # List of app short names which images pulled from ORAN ORAN_IMAGES_APP_NAMES="CP ICS RICSIM RC" @@ -189,30 +189,30 @@ KUBE_A1SIM_NAMESPACE="a1-sim" # Namespace for a1-p si KUBE_ONAP_NAMESPACE="onap" # Namespace for onap (only message router) KUBE_SDNC_NAMESPACE="onap" # Namespace for sdnc -POLICY_AGENT_EXTERNAL_PORT=8081 # Policy Agent container external port (host -> container) -POLICY_AGENT_INTERNAL_PORT=8081 # Policy Agent container internal port (container -> container) -POLICY_AGENT_EXTERNAL_SECURE_PORT=8433 # Policy Agent container external secure port (host -> container) -POLICY_AGENT_INTERNAL_SECURE_PORT=8433 # Policy Agent container internal secure port (container -> container) -POLICY_AGENT_APIS="V1 V2" # Supported northbound api versions -PMS_VERSION="V2" # Tested version of northbound API -PMS_API_PREFIX="/a1-policy" # api url prefix, only for V2. Shall contain leading "/" - -POLICY_AGENT_APP_NAME="policymanagementservice" # Name for Policy Agent container -POLICY_AGENT_DISPLAY_NAME="Policy Management Service" -POLICY_AGENT_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host -POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the Policy Agent container -POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel -POLICY_AGENT_CONFIG_KEY="policy-agent" # Key for consul config -POLICY_AGENT_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice" # Java base package name -POLICY_AGENT_ACTUATOR="/actuator/loggers/$POLICY_AGENT_PKG_NAME" # Url for trace/debug -POLICY_AGENT_ALIVE_URL="$PMS_API_PREFIX/v2/status" # Base path for alive check -POLICY_AGENT_COMPOSE_DIR="policy_agent" # Dir in simulator_group for docker-compose -POLICY_AGENT_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file -POLICY_AGENT_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file -POLICY_AGENT_CONFIG_FILE="application.yaml" # Container config file name -POLICY_AGENT_DATA_FILE="application_configuration.json" # Container data file name -POLICY_AGENT_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container -PMS_FEATURE_LEVEL="" # Space separated list of features +A1PMS_EXTERNAL_PORT=8081 # A1PMS container external port (host -> container) +A1PMS_INTERNAL_PORT=8081 # A1PMS container internal port (container -> container) +A1PMS_EXTERNAL_SECURE_PORT=8433 # A1PMS container external secure port (host -> container) +A1PMS_INTERNAL_SECURE_PORT=8433 # A1PMS container internal secure port (container -> container) +A1PMS_APIS="V1 V2" # Supported northbound api versions +A1PMS_VERSION="V2" # Tested version of northbound API +A1PMS_API_PREFIX="/a1-policy" # api url prefix, only for V2. Shall contain leading "/" + +A1PMS_APP_NAME="policymanagementservice" # Name for A1PMS container +A1PMS_DISPLAY_NAME="Policy Management Service" +A1PMS_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host +A1PMS_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the A1PMS container +A1PMS_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel +A1PMS_CONFIG_KEY="policy-agent" # Key for consul config +A1PMS_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice" # Java base package name +A1PMS_ACTUATOR="/actuator/loggers/$A1PMS_PKG_NAME" # Url for trace/debug +A1PMS_ALIVE_URL="$A1PMS_API_PREFIX/v2/status" # Base path for alive check +A1PMS_COMPOSE_DIR="a1pms" # Dir in simulator_group for docker-compose +A1PMS_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file +A1PMS_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file +A1PMS_CONFIG_FILE="application.yaml" # Container config file name +A1PMS_DATA_FILE="application_configuration.json" # Container data file name +A1PMS_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container +A1PMS_FEATURE_LEVEL="" # Space separated list of features ICS_APP_NAME="informationservice" # Name for ICS container ICS_DISPLAY_NAME="Enrichment Coordinator Service" # Display name for ICS container diff --git a/test/common/test_env-onap-istanbul.sh b/test/common/test_env-onap-istanbul.sh index 89dc68b9..7e1c7556 100644 --- a/test/common/test_env-onap-istanbul.sh +++ b/test/common/test_env-onap-istanbul.sh @@ -41,7 +41,7 @@ NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO # NOTE: One environment variable containing the image name and tag is create by the test script # for each image from the env variables below. # The variable is created by removing the suffix "_BASE" from the base image variable name. -# Example: POLICY_AGENT_IMAGE_BASE -> POLICY_AGENT_IMAGE +# Example: A1PMS_IMAGE_BASE -> A1PMS_IMAGE # This var will point to the local or remote image depending on cmd line arguments. # In addition, the repo and the image tag version are selected from the list of image tags based on the cmd line argurment. # For images built by the script, only tag #1 shall be specified @@ -59,7 +59,7 @@ NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO ############################################################################# # Note: -# The imgage tags for pms and sdnc are updated AFTER the release. +# The imgage tags for a1pms and sdnc are updated AFTER the release. # This means that the latest staging/snapshot images for these two components have # version one step (0.0.1 - bug-level) higher than the # latest release image version. @@ -67,12 +67,12 @@ NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO # This is only applicable for ONAP images ############################################################################# -# Policy Agent image and tags -POLICY_AGENT_IMAGE_BASE="onap/ccsdk-oran-a1policymanagementservice" -POLICY_AGENT_IMAGE_TAG_LOCAL="1.2.6-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="1.2.6-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE="1.2.6-STAGING-latest" #Will use snapshot repo -POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="1.2.5" +# A1PMS image and tags +A1PMS_IMAGE_BASE="onap/ccsdk-oran-a1policymanagementservice" +A1PMS_IMAGE_TAG_LOCAL="1.2.6-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE_SNAPSHOT="1.2.6-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE="1.2.6-STAGING-latest" #Will use snapshot repo +A1PMS_IMAGE_TAG_REMOTE_RELEASE="1.2.5" # SDNC A1 Controller remote image and tag SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image" @@ -170,7 +170,7 @@ PVC_CLEANER_IMAGE_TAG_REMOTE_PROXY="20.10" #No local image for pvc cleaner, remote image always used # List of app short names produced by the project -PROJECT_IMAGES_APP_NAMES="PA SDNC" +PROJECT_IMAGES_APP_NAMES="A1PMS SDNC" # List of app short names which images pulled from ORAN ORAN_IMAGES_APP_NAMES="CP ICS RICSIM RC NGW" @@ -192,30 +192,30 @@ KUBE_A1SIM_NAMESPACE="a1-sim" # Namespace for a1-p si KUBE_ONAP_NAMESPACE="onap" # Namespace for onap (only message router) KUBE_SDNC_NAMESPACE="onap" # Namespace for sdnc -POLICY_AGENT_EXTERNAL_PORT=8081 # Policy Agent container external port (host -> container) -POLICY_AGENT_INTERNAL_PORT=8081 # Policy Agent container internal port (container -> container) -POLICY_AGENT_EXTERNAL_SECURE_PORT=8433 # Policy Agent container external secure port (host -> container) -POLICY_AGENT_INTERNAL_SECURE_PORT=8433 # Policy Agent container internal secure port (container -> container) -POLICY_AGENT_APIS="V1 V2" # Supported northbound api versions -PMS_VERSION="V2" # Tested version of northbound API -PMS_API_PREFIX="/a1-policy" # api url prefix, only for V2. Shall contain leading "/" - -POLICY_AGENT_APP_NAME="policymanagementservice" # Name for Policy Agent container -POLICY_AGENT_DISPLAY_NAME="Policy Management Service" -POLICY_AGENT_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host -POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the Policy Agent container -POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel -POLICY_AGENT_CONFIG_KEY="policy-agent" # Key for consul config -POLICY_AGENT_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice" # Java base package name -POLICY_AGENT_ACTUATOR="/actuator/loggers/$POLICY_AGENT_PKG_NAME" # Url for trace/debug -POLICY_AGENT_ALIVE_URL="$PMS_API_PREFIX/v2/status" # Base path for alive check -POLICY_AGENT_COMPOSE_DIR="policy_agent" # Dir in simulator_group for docker-compose -POLICY_AGENT_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file -POLICY_AGENT_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file -POLICY_AGENT_CONFIG_FILE="application.yaml" # Container config file name -POLICY_AGENT_DATA_FILE="application_configuration.json" # Container data file name -POLICY_AGENT_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container -PMS_FEATURE_LEVEL="" # Space separated list of features +A1PMS_EXTERNAL_PORT=8081 # A1PMS container external port (host -> container) +A1PMS_INTERNAL_PORT=8081 # A1PMS container internal port (container -> container) +A1PMS_EXTERNAL_SECURE_PORT=8433 # A1PMS container external secure port (host -> container) +A1PMS_INTERNAL_SECURE_PORT=8433 # A1PMS container internal secure port (container -> container) +A1PMS_APIS="V1 V2" # Supported northbound api versions +A1PMS_VERSION="V2" # Tested version of northbound API +A1PMS_API_PREFIX="/a1-policy" # api url prefix, only for V2. Shall contain leading "/" + +A1PMS_APP_NAME="policymanagementservice" # Name for A1PMS container +A1PMS_DISPLAY_NAME="Policy Management Service" +A1PMS_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host +A1PMS_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the A1PMS container +A1PMS_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel +A1PMS_CONFIG_KEY="policy-agent" # Key for consul config +A1PMS_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice" # Java base package name +A1PMS_ACTUATOR="/actuator/loggers/$A1PMS_PKG_NAME" # Url for trace/debug +A1PMS_ALIVE_URL="$A1PMS_API_PREFIX/v2/status" # Base path for alive check +A1PMS_COMPOSE_DIR="a1pms" # Dir in simulator_group for docker-compose +A1PMS_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file +A1PMS_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file +A1PMS_CONFIG_FILE="application.yaml" # Container config file name +A1PMS_DATA_FILE="application_configuration.json" # Container data file name +A1PMS_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container +A1PMS_FEATURE_LEVEL="" # Space separated list of features ICS_APP_NAME="informationservice" # Name for ICS container ICS_DISPLAY_NAME="Enrichment Coordinator Service" # Display name for ICS container diff --git a/test/common/test_env-onap-jakarta.sh b/test/common/test_env-onap-jakarta.sh index 0910ce73..0824cc17 100644 --- a/test/common/test_env-onap-jakarta.sh +++ b/test/common/test_env-onap-jakarta.sh @@ -41,7 +41,7 @@ NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO # NOTE: One environment variable containing the image name and tag is create by the test script # for each image from the env variables below. # The variable is created by removing the suffix "_BASE" from the base image variable name. -# Example: POLICY_AGENT_IMAGE_BASE -> POLICY_AGENT_IMAGE +# Example: A1PMS_IMAGE_BASE -> A1PMS_IMAGE # This var will point to the local or remote image depending on cmd line arguments. # In addition, the repo and the image tag version are selected from the list of image tags based on the cmd line argurment. # For images built by the script, only tag #1 shall be specified @@ -59,7 +59,7 @@ NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO ############################################################################# # Note: -# The imgage tags for pms and sdnc are updated AFTER the release. +# The imgage tags for a1pms and sdnc are updated AFTER the release. # This means that the latest staging/snapshot images for these two components have # version one step (0.0.1 - bug-level) higher than the # latest release image version. @@ -67,12 +67,12 @@ NEXUS_RELEASE_REPO_ONAP=$NEXUS_RELEASE_REPO # This is only applicable for ONAP images ############################################################################# -# Policy Agent image and tags -POLICY_AGENT_IMAGE_BASE="onap/ccsdk-oran-a1policymanagementservice" -POLICY_AGENT_IMAGE_TAG_LOCAL="1.3.0-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="1.3.0-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE="1.3.0-STAGING-latest" #Will use snapshot repo -POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="1.3.0" +# A1PMS image and tags +A1PMS_IMAGE_BASE="onap/ccsdk-oran-a1policymanagementservice" +A1PMS_IMAGE_TAG_LOCAL="1.3.0-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE_SNAPSHOT="1.3.0-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE="1.3.0-STAGING-latest" #Will use snapshot repo +A1PMS_IMAGE_TAG_REMOTE_RELEASE="1.3.0" # SDNC A1 Controller remote image and tag SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image" @@ -157,7 +157,7 @@ PVC_CLEANER_IMAGE_TAG_REMOTE_PROXY="20.10" #No local image for pvc cleaner, remote image always used # List of app short names produced by the project -PROJECT_IMAGES_APP_NAMES="PA SDNC" +PROJECT_IMAGES_APP_NAMES="A1PMS SDNC" # List of app short names which images pulled from ORAN ORAN_IMAGES_APP_NAMES="CP ICS RICSIM RC NGW" @@ -179,30 +179,30 @@ KUBE_A1SIM_NAMESPACE="a1-sim" # Namespace for a1-p si KUBE_ONAP_NAMESPACE="onap" # Namespace for onap (only message router) KUBE_SDNC_NAMESPACE="onap" # Namespace for sdnc -POLICY_AGENT_EXTERNAL_PORT=8081 # Policy Agent container external port (host -> container) -POLICY_AGENT_INTERNAL_PORT=8081 # Policy Agent container internal port (container -> container) -POLICY_AGENT_EXTERNAL_SECURE_PORT=8433 # Policy Agent container external secure port (host -> container) -POLICY_AGENT_INTERNAL_SECURE_PORT=8433 # Policy Agent container internal secure port (container -> container) -POLICY_AGENT_APIS="V1 V2" # Supported northbound api versions -PMS_VERSION="V2" # Tested version of northbound API -PMS_API_PREFIX="/a1-policy" # api url prefix, only for V2. Shall contain leading "/" - -POLICY_AGENT_APP_NAME="policymanagementservice" # Name for Policy Agent container -POLICY_AGENT_DISPLAY_NAME="Policy Management Service" -POLICY_AGENT_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host -POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the Policy Agent container -POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel -POLICY_AGENT_CONFIG_KEY="policy-agent" # Key for consul config -POLICY_AGENT_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice" # Java base package name -POLICY_AGENT_ACTUATOR="/actuator/loggers/$POLICY_AGENT_PKG_NAME" # Url for trace/debug -POLICY_AGENT_ALIVE_URL="$PMS_API_PREFIX/v2/status" # Base path for alive check -POLICY_AGENT_COMPOSE_DIR="policy_agent" # Dir in simulator_group for docker-compose -POLICY_AGENT_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file -POLICY_AGENT_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file -POLICY_AGENT_CONFIG_FILE="application.yaml" # Container config file name -POLICY_AGENT_DATA_FILE="application_configuration.json" # Container data file name -POLICY_AGENT_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container -PMS_FEATURE_LEVEL="NOCONSUL INITIALCONFIGMAP" # Space separated list of features +A1PMS_EXTERNAL_PORT=8081 # A1PMS container external port (host -> container) +A1PMS_INTERNAL_PORT=8081 # A1PMS container internal port (container -> container) +A1PMS_EXTERNAL_SECURE_PORT=8433 # A1PMS container external secure port (host -> container) +A1PMS_INTERNAL_SECURE_PORT=8433 # A1PMS container internal secure port (container -> container) +A1PMS_APIS="V1 V2" # Supported northbound api versions +A1PMS_VERSION="V2" # Tested version of northbound API +A1PMS_API_PREFIX="/a1-policy" # api url prefix, only for V2. Shall contain leading "/" + +A1PMS_APP_NAME="policymanagementservice" # Name for A1PMS container +A1PMS_DISPLAY_NAME="Policy Management Service" +A1PMS_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host +A1PMS_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the A1PMS container +A1PMS_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel +A1PMS_CONFIG_KEY="policy-agent" # Key for consul config +A1PMS_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice" # Java base package name +A1PMS_ACTUATOR="/actuator/loggers/$A1PMS_PKG_NAME" # Url for trace/debug +A1PMS_ALIVE_URL="$A1PMS_API_PREFIX/v2/status" # Base path for alive check +A1PMS_COMPOSE_DIR="a1pms" # Dir in simulator_group for docker-compose +A1PMS_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file +A1PMS_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file +A1PMS_CONFIG_FILE="application.yaml" # Container config file name +A1PMS_DATA_FILE="application_configuration.json" # Container data file name +A1PMS_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container +A1PMS_FEATURE_LEVEL="NOCONSUL INITIALCONFIGMAP" # Space separated list of features ICS_APP_NAME="informationservice" # Name for ICS container ICS_DISPLAY_NAME="Enrichment Coordinator Service" # Display name for ICS container diff --git a/test/common/test_env-oran-cherry.sh b/test/common/test_env-oran-cherry.sh index d794e693..311ab146 100755 --- a/test/common/test_env-oran-cherry.sh +++ b/test/common/test_env-oran-cherry.sh @@ -41,7 +41,7 @@ NEXUS_RELEASE_REPO_ORAN=$NEXUS_RELEASE_REPO # NOTE: One environment variable containing the image name and tag is create by the test script # for each image from the env variables below. # The variable is created by removing the suffix "_BASE" from the base image variable name. -# Example: POLICY_AGENT_IMAGE_BASE -> POLICY_AGENT_IMAGE +# Example: A1PMS_IMAGE_BASE -> A1PMS_IMAGE # This var will point to the local or remote image depending on cmd line arguments. # In addition, the repo and the image tag version are selected from the list of image tags based on the cmd line argurment. # For images built by the script, only tag #1 shall be specified @@ -58,12 +58,12 @@ NEXUS_RELEASE_REPO_ORAN=$NEXUS_RELEASE_REPO # 7 XXX_PROXY: other images, not produced by the project: : -# Policy Agent base image and tags -POLICY_AGENT_IMAGE_BASE="o-ran-sc/nonrtric-policy-agent" -POLICY_AGENT_IMAGE_TAG_LOCAL="2.1.1-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="2.1.1-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE="2.1.1" -POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="2.1.1" +# A1PMS base image and tags +A1PMS_IMAGE_BASE="o-ran-sc/nonrtric-policy-agent" +A1PMS_IMAGE_TAG_LOCAL="2.1.1-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE_SNAPSHOT="2.1.1-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE="2.1.1" +A1PMS_IMAGE_TAG_REMOTE_RELEASE="2.1.1" # ICS image and tags ICS_IMAGE_BASE="o-ran-sc/nonrtric-enrichment-coordinator-service" @@ -171,7 +171,7 @@ PVC_CLEANER_IMAGE_TAG_REMOTE_PROXY="20.10" #No local image for pvc cleaner, remote image always used # List of app short names produced by the project -PROJECT_IMAGES_APP_NAMES="PA ICS CP SDNC RC RICSIM" +PROJECT_IMAGES_APP_NAMES="A1PMS ICS CP SDNC RC RICSIM" # List of app short names which images pulled from ORAN ORAN_IMAGES_APP_NAMES="" # Not used @@ -192,30 +192,30 @@ KUBE_A1SIM_NAMESPACE="a1-sim" # Namespace for a1-p si KUBE_ONAP_NAMESPACE="onap" # Namespace for onap (only message router) KUBE_SDNC_NAMESPACE="onap" # Namespace for sdnc -POLICY_AGENT_EXTERNAL_PORT=8081 # Policy Agent container external port (host -> container) -POLICY_AGENT_INTERNAL_PORT=8081 # Policy Agent container internal port (container -> container) -POLICY_AGENT_EXTERNAL_SECURE_PORT=8433 # Policy Agent container external secure port (host -> container) -POLICY_AGENT_INTERNAL_SECURE_PORT=8433 # Policy Agent container internal secure port (container -> container) -POLICY_AGENT_APIS="V1 V2" # Supported northbound api versions -PMS_VERSION="V2" # Tested version of northbound API -PMS_API_PREFIX="/a1-policy" # api url prefix, only for V2 - -POLICY_AGENT_APP_NAME="policymanagementservice" # Name for Policy Agent container -POLICY_AGENT_DISPLAY_NAME="Policy Management Service" -POLICY_AGENT_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host -POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the Policy Agent container -POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel -POLICY_AGENT_CONFIG_KEY="policy-agent" # Key for consul config -POLICY_AGENT_PKG_NAME="org.oransc.policyagent" # Java base package name -POLICY_AGENT_ACTUATOR="/actuator/loggers/$POLICY_AGENT_PKG_NAME" # Url for trace/debug -POLICY_AGENT_ALIVE_URL=$PMS_API_PREFIX"/v2/status" # Base path for alive check -POLICY_AGENT_COMPOSE_DIR="policy_agent" # Dir in simulator_group for docker-compose -POLICY_AGENT_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file -POLICY_AGENT_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file -POLICY_AGENT_CONFIG_FILE="application.yaml" # Container config file name -POLICY_AGENT_DATA_FILE="application_configuration.json" # Container data file name -POLICY_AGENT_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container -PMS_FEATURE_LEVEL="" # Space separated list of features +A1PMS_EXTERNAL_PORT=8081 # A1PMS container external port (host -> container) +A1PMS_INTERNAL_PORT=8081 # A1PMS container internal port (container -> container) +A1PMS_EXTERNAL_SECURE_PORT=8433 # A1PMS container external secure port (host -> container) +A1PMS_INTERNAL_SECURE_PORT=8433 # A1PMS container internal secure port (container -> container) +A1PMS_APIS="V1 V2" # Supported northbound api versions +A1PMS_VERSION="V2" # Tested version of northbound API +A1PMS_API_PREFIX="/a1-policy" # api url prefix, only for V2 + +A1PMS_APP_NAME="policymanagementservice" # Name for A1PMS container +A1PMS_DISPLAY_NAME="Policy Management Service" +A1PMS_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host +A1PMS_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the A1PMS container +A1PMS_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel +A1PMS_CONFIG_KEY="policy-agent" # Key for consul config +A1PMS_PKG_NAME="org.oransc.policyagent" # Java base package name +A1PMS_ACTUATOR="/actuator/loggers/$A1PMS_PKG_NAME" # Url for trace/debug +A1PMS_ALIVE_URL=$A1PMS_API_PREFIX"/v2/status" # Base path for alive check +A1PMS_COMPOSE_DIR="a1pms" # Dir in simulator_group for docker-compose +A1PMS_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file +A1PMS_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file +A1PMS_CONFIG_FILE="application.yaml" # Container config file name +A1PMS_DATA_FILE="application_configuration.json" # Container data file name +A1PMS_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container +A1PMS_FEATURE_LEVEL="" # Space separated list of features ICS_APP_NAME="informationservice" # Name for ICS container ICS_DISPLAY_NAME="Enrichment Coordinator Service" # Display name for ICS container diff --git a/test/common/test_env-oran-d-release.sh b/test/common/test_env-oran-d-release.sh index a4f725c5..1f735950 100755 --- a/test/common/test_env-oran-d-release.sh +++ b/test/common/test_env-oran-d-release.sh @@ -41,7 +41,7 @@ NEXUS_RELEASE_REPO_ORAN=$NEXUS_RELEASE_REPO # NOTE: One environment variable containing the image name and tag is create by the test script # for each image from the env variables below. # The variable is created by removing the suffix "_BASE" from the base image variable name. -# Example: POLICY_AGENT_IMAGE_BASE -> POLICY_AGENT_IMAGE +# Example: A1PMS_IMAGE_BASE -> A1PMS_IMAGE # This var will point to the local or remote image depending on cmd line arguments. # In addition, the repo and the image tag version are selected from the list of image tags based on the cmd line argurment. # For images built by the script, only tag #1 shall be specified @@ -58,12 +58,12 @@ NEXUS_RELEASE_REPO_ORAN=$NEXUS_RELEASE_REPO # 7 XXX_PROXY: other images, not produced by the project: : -# Policy Agent base image and tags -POLICY_AGENT_IMAGE_BASE="o-ran-sc/nonrtric-policy-agent" -POLICY_AGENT_IMAGE_TAG_LOCAL="2.2.1-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="2.2.1-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE="2.2.1" -POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="2.2.1" +# A1PMS base image and tags +A1PMS_IMAGE_BASE="o-ran-sc/nonrtric-policy-agent" +A1PMS_IMAGE_TAG_LOCAL="2.2.1-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE_SNAPSHOT="2.2.1-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE="2.2.1" +A1PMS_IMAGE_TAG_REMOTE_RELEASE="2.2.1" # ICS image and tags ICS_IMAGE_BASE="o-ran-sc/nonrtric-enrichment-coordinator-service" @@ -190,7 +190,7 @@ PVC_CLEANER_IMAGE_TAG_REMOTE_PROXY="20.10" #No local image for pvc cleaner, remote image always used # List of app short names produced by the project -PROJECT_IMAGES_APP_NAMES="PA ICS CP RC RICSIM NGW" # Add SDNC here if oran image is used +PROJECT_IMAGES_APP_NAMES="A1PMS ICS CP RC RICSIM NGW" # Add SDNC here if oran image is used # List of app short names which images pulled from ORAN ORAN_IMAGES_APP_NAMES="" # Not used @@ -211,30 +211,30 @@ KUBE_A1SIM_NAMESPACE="a1-sim" # Namespace for a1-p si KUBE_ONAP_NAMESPACE="onap" # Namespace for onap (only message router) KUBE_SDNC_NAMESPACE="onap" # Namespace for sdnc -POLICY_AGENT_EXTERNAL_PORT=8081 # Policy Agent container external port (host -> container) -POLICY_AGENT_INTERNAL_PORT=8081 # Policy Agent container internal port (container -> container) -POLICY_AGENT_EXTERNAL_SECURE_PORT=8433 # Policy Agent container external secure port (host -> container) -POLICY_AGENT_INTERNAL_SECURE_PORT=8433 # Policy Agent container internal secure port (container -> container) -POLICY_AGENT_APIS="V1 V2" # Supported northbound api versions -PMS_VERSION="V2" # Tested version of northbound API -PMS_API_PREFIX="/a1-policy" # api url prefix, only for V2 - -POLICY_AGENT_APP_NAME="policymanagementservice" # Name for Policy Agent container -POLICY_AGENT_DISPLAY_NAME="Policy Management Service" -POLICY_AGENT_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host -POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the Policy Agent container -POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel -POLICY_AGENT_CONFIG_KEY="policy-agent" # Key for consul config -POLICY_AGENT_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice" # Java base package name -POLICY_AGENT_ACTUATOR="/actuator/loggers/$POLICY_AGENT_PKG_NAME" # Url for trace/debug -POLICY_AGENT_ALIVE_URL="$PMS_API_PREFIX/v2/status" # Base path for alive check -POLICY_AGENT_COMPOSE_DIR="policy_agent" # Dir in simulator_group for docker-compose -POLICY_AGENT_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file -POLICY_AGENT_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file -POLICY_AGENT_CONFIG_FILE="application.yaml" # Container config file name -POLICY_AGENT_DATA_FILE="application_configuration.json" # Container data file name -POLICY_AGENT_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container -PMS_FEATURE_LEVEL="" # Space separated list of features +A1PMS_EXTERNAL_PORT=8081 # A1PMS container external port (host -> container) +A1PMS_INTERNAL_PORT=8081 # A1PMS container internal port (container -> container) +A1PMS_EXTERNAL_SECURE_PORT=8433 # A1PMS container external secure port (host -> container) +A1PMS_INTERNAL_SECURE_PORT=8433 # A1PMS container internal secure port (container -> container) +A1PMS_APIS="V1 V2" # Supported northbound api versions +A1PMS_VERSION="V2" # Tested version of northbound API +A1PMS_API_PREFIX="/a1-policy" # api url prefix, only for V2 + +A1PMS_APP_NAME="policymanagementservice" # Name for A1PMS container +A1PMS_DISPLAY_NAME="Policy Management Service" +A1PMS_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host +A1PMS_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the A1PMS container +A1PMS_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel +A1PMS_CONFIG_KEY="policy-agent" # Key for consul config +A1PMS_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice" # Java base package name +A1PMS_ACTUATOR="/actuator/loggers/$A1PMS_PKG_NAME" # Url for trace/debug +A1PMS_ALIVE_URL="$A1PMS_API_PREFIX/v2/status" # Base path for alive check +A1PMS_COMPOSE_DIR="a1pms" # Dir in simulator_group for docker-compose +A1PMS_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file +A1PMS_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file +A1PMS_CONFIG_FILE="application.yaml" # Container config file name +A1PMS_DATA_FILE="application_configuration.json" # Container data file name +A1PMS_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container +A1PMS_FEATURE_LEVEL="" # Space separated list of features ICS_APP_NAME="informationservice" # Name for ICS container ICS_DISPLAY_NAME="Enrichment Coordinator Service" # Display name for ICS container diff --git a/test/common/test_env-oran-e-release.sh b/test/common/test_env-oran-e-release.sh index f48ae6f0..dbddca1f 100755 --- a/test/common/test_env-oran-e-release.sh +++ b/test/common/test_env-oran-e-release.sh @@ -41,7 +41,7 @@ NEXUS_RELEASE_REPO_ORAN=$NEXUS_RELEASE_REPO # NOTE: One environment variable containing the image name and tag is create by the test script # for each image from the env variables below. # The variable is created by removing the suffix "_BASE" from the base image variable name. -# Example: POLICY_AGENT_IMAGE_BASE -> POLICY_AGENT_IMAGE +# Example: A1PMS_IMAGE_BASE -> A1PMS_IMAGE # This var will point to the local or remote image depending on cmd line arguments. # In addition, the repo and the image tag version are selected from the list of image tags based on the cmd line argurment. # For images built by the script, only tag #1 shall be specified @@ -58,12 +58,12 @@ NEXUS_RELEASE_REPO_ORAN=$NEXUS_RELEASE_REPO # 7 XXX_PROXY: other images, not produced by the project: : -# Policy Agent base image and tags -POLICY_AGENT_IMAGE_BASE="o-ran-sc/nonrtric-a1-policy-management-service" -POLICY_AGENT_IMAGE_TAG_LOCAL="2.3.1-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="2.3.1-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE="2.3.1" -POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="2.3.1" +# A1PMS base image and tags +A1PMS_IMAGE_BASE="o-ran-sc/nonrtric-a1-policy-management-service" +A1PMS_IMAGE_TAG_LOCAL="2.3.1-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE_SNAPSHOT="2.3.1-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE="2.3.1" +A1PMS_IMAGE_TAG_REMOTE_RELEASE="2.3.1" # ICS image and tags ICS_IMAGE_BASE="o-ran-sc/nonrtric-information-coordinator-service" @@ -220,7 +220,7 @@ CHART_MUS_IMAGE_TAG_REMOTE_OTHER="v0.13.1" #No local image for chart museum, remote image always used # List of app short names produced by the project -PROJECT_IMAGES_APP_NAMES="PA ICS CP RC RICSIM NGW DMAAPADP DMAAPMED HELMMANAGER" # Add SDNC here if oran image is used +PROJECT_IMAGES_APP_NAMES="A1PMS ICS CP RC RICSIM NGW DMAAPADP DMAAPMED HELMMANAGER" # Add SDNC here if oran image is used # List of app short names which images pulled from ORAN ORAN_IMAGES_APP_NAMES="" # Not used @@ -254,30 +254,30 @@ KUBE_A1SIM_NAMESPACE="a1-sim" # Namespace for a1-p si KUBE_ONAP_NAMESPACE="onap" # Namespace for onap (only message router) KUBE_SDNC_NAMESPACE="onap" # Namespace for sdnc -POLICY_AGENT_EXTERNAL_PORT=8081 # Policy Agent container external port (host -> container) -POLICY_AGENT_INTERNAL_PORT=8081 # Policy Agent container internal port (container -> container) -POLICY_AGENT_EXTERNAL_SECURE_PORT=8433 # Policy Agent container external secure port (host -> container) -POLICY_AGENT_INTERNAL_SECURE_PORT=8433 # Policy Agent container internal secure port (container -> container) -POLICY_AGENT_APIS="V1 V2" # Supported northbound api versions -PMS_VERSION="V2" # Tested version of northbound API -PMS_API_PREFIX="/a1-policy" # api url prefix, only for V2 - -POLICY_AGENT_APP_NAME="policymanagementservice" # Name for Policy Agent container -POLICY_AGENT_DISPLAY_NAME="Policy Management Service" -POLICY_AGENT_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host -POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the Policy Agent container -POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel -POLICY_AGENT_CONFIG_KEY="policy-agent" # Key for consul config -POLICY_AGENT_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice" # Java base package name -POLICY_AGENT_ACTUATOR="/actuator/loggers/$POLICY_AGENT_PKG_NAME" # Url for trace/debug -POLICY_AGENT_ALIVE_URL="$PMS_API_PREFIX/v2/status" # Base path for alive check -POLICY_AGENT_COMPOSE_DIR="policy_agent" # Dir in simulator_group for docker-compose -POLICY_AGENT_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file -POLICY_AGENT_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file -POLICY_AGENT_CONFIG_FILE="application.yaml" # Container config file name -POLICY_AGENT_DATA_FILE="application_configuration.json" # Container data file name -POLICY_AGENT_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container -PMS_FEATURE_LEVEL="" # Space separated list of features +A1PMS_EXTERNAL_PORT=8081 # A1PMS container external port (host -> container) +A1PMS_INTERNAL_PORT=8081 # A1PMS container internal port (container -> container) +A1PMS_EXTERNAL_SECURE_PORT=8433 # A1PMS container external secure port (host -> container) +A1PMS_INTERNAL_SECURE_PORT=8433 # A1PMS container internal secure port (container -> container) +A1PMS_APIS="V1 V2" # Supported northbound api versions +A1PMS_VERSION="V2" # Tested version of northbound API +A1PMS_API_PREFIX="/a1-policy" # api url prefix, only for V2 + +A1PMS_APP_NAME="policymanagementservice" # Name for A1PMS container +A1PMS_DISPLAY_NAME="Policy Management Service" +A1PMS_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host +A1PMS_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the A1PMS container +A1PMS_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel +A1PMS_CONFIG_KEY="policy-agent" # Key for consul config +A1PMS_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice" # Java base package name +A1PMS_ACTUATOR="/actuator/loggers/$A1PMS_PKG_NAME" # Url for trace/debug +A1PMS_ALIVE_URL="$A1PMS_API_PREFIX/v2/status" # Base path for alive check +A1PMS_COMPOSE_DIR="a1pms" # Dir in simulator_group for docker-compose +A1PMS_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file +A1PMS_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file +A1PMS_CONFIG_FILE="application.yaml" # Container config file name +A1PMS_DATA_FILE="application_configuration.json" # Container data file name +A1PMS_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container +A1PMS_FEATURE_LEVEL="" # Space separated list of features ICS_APP_NAME="informationservice" # Name for ICS container ICS_DISPLAY_NAME="Information Coordinator Service" # Display name for ICS container diff --git a/test/common/test_env-oran-f-release.sh b/test/common/test_env-oran-f-release.sh index 8051d709..eb266344 100755 --- a/test/common/test_env-oran-f-release.sh +++ b/test/common/test_env-oran-f-release.sh @@ -41,7 +41,7 @@ NEXUS_RELEASE_REPO_ORAN=$NEXUS_RELEASE_REPO # NOTE: One environment variable containing the image name and tag is create by the test script # for each image from the env variables below. # The variable is created by removing the suffix "_BASE" from the base image variable name. -# Example: POLICY_AGENT_IMAGE_BASE -> POLICY_AGENT_IMAGE +# Example: A1PMS_IMAGE_BASE -> A1PMS_IMAGE # This var will point to the local or remote image depending on cmd line arguments. # In addition, the repo and the image tag version are selected from the list of image tags based on the cmd line argurment. # For images built by the script, only tag #1 shall be specified @@ -58,12 +58,12 @@ NEXUS_RELEASE_REPO_ORAN=$NEXUS_RELEASE_REPO # 7 XXX_PROXY: other images, not produced by the project: : -# Policy Agent base image and tags -POLICY_AGENT_IMAGE_BASE="o-ran-sc/nonrtric-a1-policy-management-service" -POLICY_AGENT_IMAGE_TAG_LOCAL="2.4.0-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="2.4.0-SNAPSHOT" -POLICY_AGENT_IMAGE_TAG_REMOTE="2.4.0" -POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="2.4.0" +# A1PMS base image and tags +A1PMS_IMAGE_BASE="o-ran-sc/nonrtric-a1-policy-management-service" +A1PMS_IMAGE_TAG_LOCAL="2.4.0-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE_SNAPSHOT="2.4.0-SNAPSHOT" +A1PMS_IMAGE_TAG_REMOTE="2.4.0" +A1PMS_IMAGE_TAG_REMOTE_RELEASE="2.4.0" # ICS image and tags ICS_IMAGE_BASE="o-ran-sc/nonrtric-information-coordinator-service" @@ -208,7 +208,7 @@ CHART_MUS_IMAGE_TAG_REMOTE_OTHER="v0.13.1" #No local image for chart museum, remote image always used # List of app short names produced by the project -PROJECT_IMAGES_APP_NAMES="PA ICS CP RC RICSIM NGW DMAAPADP DMAAPMED HELMMANAGER" # Add SDNC here if oran image is used +PROJECT_IMAGES_APP_NAMES="A1PMS ICS CP RC RICSIM NGW DMAAPADP DMAAPMED HELMMANAGER" # Add SDNC here if oran image is used # List of app short names which images pulled from ORAN ORAN_IMAGES_APP_NAMES="" # Not used @@ -242,30 +242,30 @@ KUBE_A1SIM_NAMESPACE="a1-sim" # Namespace for a1-p si KUBE_ONAP_NAMESPACE="onap" # Namespace for onap (only message router) KUBE_SDNC_NAMESPACE="onap" # Namespace for sdnc -POLICY_AGENT_EXTERNAL_PORT=8081 # Policy Agent container external port (host -> container) -POLICY_AGENT_INTERNAL_PORT=8081 # Policy Agent container internal port (container -> container) -POLICY_AGENT_EXTERNAL_SECURE_PORT=8433 # Policy Agent container external secure port (host -> container) -POLICY_AGENT_INTERNAL_SECURE_PORT=8433 # Policy Agent container internal secure port (container -> container) -POLICY_AGENT_APIS="V1 V2" # Supported northbound api versions -PMS_VERSION="V2" # Tested version of northbound API -PMS_API_PREFIX="/a1-policy" # api url prefix, only for V2 - -POLICY_AGENT_APP_NAME="policymanagementservice" # Name for Policy Agent container -POLICY_AGENT_DISPLAY_NAME="Policy Management Service" -POLICY_AGENT_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host -POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the Policy Agent container -POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel -POLICY_AGENT_CONFIG_KEY="policy-agent" # Key for consul config -POLICY_AGENT_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice" # Java base package name -POLICY_AGENT_ACTUATOR="/actuator/loggers/$POLICY_AGENT_PKG_NAME" # Url for trace/debug -POLICY_AGENT_ALIVE_URL="$PMS_API_PREFIX/v2/status" # Base path for alive check -POLICY_AGENT_COMPOSE_DIR="policy_agent" # Dir in simulator_group for docker-compose -POLICY_AGENT_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file -POLICY_AGENT_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file -POLICY_AGENT_CONFIG_FILE="application.yaml" # Container config file name -POLICY_AGENT_DATA_FILE="application_configuration.json" # Container data file name -POLICY_AGENT_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container -PMS_FEATURE_LEVEL="NOCONSUL INITIALCONFIGMAP" # Space separated list of features +A1PMS_EXTERNAL_PORT=8081 # A1PMS container external port (host -> container) +A1PMS_INTERNAL_PORT=8081 # A1PMS container internal port (container -> container) +A1PMS_EXTERNAL_SECURE_PORT=8433 # A1PMS container external secure port (host -> container) +A1PMS_INTERNAL_SECURE_PORT=8433 # A1PMS container internal secure port (container -> container) +A1PMS_APIS="V1 V2" # Supported northbound api versions +A1PMS_VERSION="V2" # Tested version of northbound API +A1PMS_API_PREFIX="/a1-policy" # api url prefix, only for V2 + +A1PMS_APP_NAME="policymanagementservice" # Name for A1PMS container +A1PMS_DISPLAY_NAME="Policy Management Service" +A1PMS_HOST_MNT_DIR="./mnt" # Mounted dir, relative to compose file, on the host +A1PMS_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the A1PMS container +A1PMS_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel +A1PMS_CONFIG_KEY="policy-agent" # Key for consul config +A1PMS_PKG_NAME="org.onap.ccsdk.oran.a1policymanagementservice" # Java base package name +A1PMS_ACTUATOR="/actuator/loggers/$A1PMS_PKG_NAME" # Url for trace/debug +A1PMS_ALIVE_URL="$A1PMS_API_PREFIX/v2/status" # Base path for alive check +A1PMS_COMPOSE_DIR="a1pms" # Dir in simulator_group for docker-compose +A1PMS_CONFIG_MOUNT_PATH="/opt/app/policy-agent/config" # Path in container for config file +A1PMS_DATA_MOUNT_PATH="/opt/app/policy-agent/data" # Path in container for data file +A1PMS_CONFIG_FILE="application.yaml" # Container config file name +A1PMS_DATA_FILE="application_configuration.json" # Container data file name +A1PMS_CONTAINER_MNT_DIR="/var/policy-management-service" # Mounted dir in the container +A1PMS_FEATURE_LEVEL="NOCONSUL INITIALCONFIGMAP" # Space separated list of features ICS_APP_NAME="informationservice" # Name for ICS container ICS_DISPLAY_NAME="Information Coordinator Service" # Display name for ICS container diff --git a/test/common/testcase_common.sh b/test/common/testcase_common.sh index 66e6dfac..d16ee6ec 100755 --- a/test/common/testcase_common.sh +++ b/test/common/testcase_common.sh @@ -30,6 +30,7 @@ __print_args() { echo " [--repo-policy local|remote] [--cluster-timeout ] [--print-stats]" echo " [--override ] [--pre-clean] [--gen-stats] [--delete-namespaces]" echo " [--delete-containers] [--endpoint-stats] [--kubeconfig ] [--host-path-dir ]" + echo " [--kubecontext ]" } if [ $# -eq 1 ] && [ "$1" == "help" ]; then @@ -66,6 +67,7 @@ if [ $# -eq 1 ] && [ "$1" == "help" ]; then echo "--endpoint-stats - Collect endpoint statistics" echo "--kubeconfig - Configure kubectl to use cluster specific cluster config file" echo "--host-path-dir - (Base-)path on local-hostmounted to all VMs (nodes), for hostpath volumes in kube" + echo "--kubecontext - Configure kubectl to use a certain context, e.g 'minikube'" echo "" echo "List of app short names supported: "$APP_SHORT_NAMES exit 0 @@ -101,11 +103,6 @@ TEST_ENV_VAR_FILE_OVERRIDE="" echo "Test case started as: ${BASH_SOURCE[$i+1]} "$@ -#Localhost constants -LOCALHOST_NAME="localhost" -LOCALHOST_HTTP="http://localhost" -LOCALHOST_HTTPS="https://localhost" - # Var to hold 'auto' in case containers shall be stopped when test case ends AUTO_CLEAN="" @@ -268,7 +265,7 @@ DELETE_KUBE_NAMESPACES=0 #Var to control if containers shall be delete before test setup DELETE_CONTAINERS=0 -#Var to configure kubectl from a config file. +#Var to configure kubectl from a config file or context KUBECONF="" #Var pointing to dir mounted to each kubernetes node (master and workers) @@ -450,7 +447,7 @@ __collect_endpoint_stats_image_info() { return fi ENDPOINT_STAT_FILE=$TESTLOGS/$ATC/imageinfo_$ATC_$1".log" - echo $POLICY_AGENT_IMAGE > $ENDPOINT_STAT_FILE + echo $A1PMS_IMAGE > $ENDPOINT_STAT_FILE } #Var for measuring execution time @@ -833,10 +830,17 @@ while [ $paramerror -eq 0 ] && [ $foundparm -eq 0 ]; do fi else if [ -f $1 ]; then - KUBECONF="--kubeconfig $1" - echo "Option set - Kubeconfig path: "$1 - shift; - foundparm=0 + if [ ! -z "$KUBECONF" ]; then + paramerror=1 + if [ -z "$paramerror_str" ]; then + paramerror_str="Only one of --kubeconfig/--kubecontext can be set" + fi + else + KUBECONF="--kubeconfig $1" + echo "Option set - Kubeconfig path: "$1 + shift; + foundparm=0 + fi else paramerror=1 if [ -z "$paramerror_str" ]; then @@ -846,6 +850,29 @@ while [ $paramerror -eq 0 ] && [ $foundparm -eq 0 ]; do fi fi fi + if [ $paramerror -eq 0 ]; then + if [ "$1" == "--kubecontext" ]; then + shift; + if [ -z "$1" ]; then + paramerror=1 + if [ -z "$paramerror_str" ]; then + paramerror_str="No context-name found for : '--kubecontext'" + fi + else + if [ ! -z "$KUBECONF" ]; then + paramerror=1 + if [ -z "$paramerror_str" ]; then + paramerror_str="Only one of --kubeconfig or --kubecontext can be set" + fi + else + KUBECONF="--context $1" + echo "Option set - Kubecontext name: "$1 + shift; + foundparm=0 + fi + fi + fi + fi if [ $paramerror -eq 0 ]; then if [ "$1" == "--host-path-dir" ]; then shift; @@ -878,6 +905,14 @@ if [ $paramerror -eq 1 ]; then exit 1 fi +#Localhost constants +LOCALHOST_NAME="localhost" +# if [ ! -z "$DOCKER_HOST" ]; then +# LOCALHOST_NAME=$(echo $DOCKER_HOST | awk -F[/:] '{print $4}' ) +# fi +LOCALHOST_HTTP="http://$LOCALHOST_NAME" +LOCALHOST_HTTPS="https://$LOCALHOST_NAME" + # sourcing the selected env variables for the test case if [ -f "$TEST_ENV_VAR_FILE" ]; then echo -e $BOLD"Sourcing env vars from: "$TEST_ENV_VAR_FILE$EBOLD @@ -1022,27 +1057,25 @@ fi echo " docker is installed and using versions:" echo " $(docker version --format 'Client version {{.Client.Version}} Server version {{.Server.Version}}')" -tmp=$(which docker-compose) -if [ $? -ne 0 ] || [ -z "$tmp" ]; then - if [ $RUNMODE == "DOCKER" ]; then +if [ $RUNMODE == "DOCKER" ]; then + tmp=$(which docker-compose) + if [ $? -ne 0 ] || [ -z "$tmp" ]; then echo -e $RED"docker-compose is required to run the test environment, pls install"$ERED exit 1 + else + tmp=$(docker-compose version --short) + echo " docker-compose installed and using version $tmp" + if [[ "$tmp" == *'v2'* ]]; then + DOCKER_COMPOSE_VERION="V2" + fi fi fi -tmp=$(docker-compose version --short) -echo " docker-compose installed and using version $tmp" -if [[ "$tmp" == *'v2'* ]]; then - DOCKER_COMPOSE_VERION="V2" -fi - -tmp=$(which kubectl) -if [ $? -ne 0 ] || [ -z tmp ]; then - if [ $RUNMODE == "KUBE" ]; then +if [ $RUNMODE == "KUBE" ]; then + tmp=$(which kubectl) + if [ $? -ne 0 ] || [ -z tmp ]; then echo -e $RED"kubectl is required to run the test environment in kubernetes mode, pls install"$ERED exit 1 - fi -else - if [ $RUNMODE == "KUBE" ]; then + else echo " kubectl is installed and using versions:" echo $(kubectl $KUBECONF version --short=true) | indent2 res=$(kubectl $KUBECONF cluster-info 2>&1) @@ -1743,8 +1776,8 @@ setup_testenvironment() { echo -e " Pulling remote snapshot or staging images my in some case result in pulling newer image versions outside the control of the test engine" export KUBE_IMAGE_PULL_POLICY="Always" fi - CLUSTER_IP=$(kubectl $KUBECONF config view -o jsonpath={.clusters[0].cluster.server} | awk -F[/:] '{print $4}') - echo -e $YELLOW" The cluster hostname/ip is: $CLUSTER_IP"$EYELLOW + #CLUSTER_IP=$(kubectl $KUBECONF config view -o jsonpath={.clusters[0].cluster.server} | awk -F[/:] '{print $4}') + #echo -e $YELLOW" The cluster hostname/ip is: $CLUSTER_IP"$EYELLOW echo "=================================================================================" echo "=================================================================================" @@ -2260,7 +2293,7 @@ __kube_delete_all_resources() { namespace=$1 labelname=$2 labelid=$3 - resources="deployments replicaset statefulset services pods configmaps persistentvolumeclaims persistentvolumes serviceaccounts clusterrolebindings" + resources="deployments replicaset statefulset services pods configmaps persistentvolumeclaims persistentvolumes serviceaccounts clusterrolebindings secrets" deleted_resourcetypes="" for restype in $resources; do ns_flag="-n $namespace" @@ -2343,7 +2376,7 @@ __kube_create_namespace() { echo " Message: $(<./tmp/kubeerr)" return 1 else - kubectl $KUBECONF label ns $1 autotest=engine + kubectl $KUBECONF label ns $1 autotest=engine > /dev/null echo -e " Creating namespace $1 $GREEN$BOLD OK $EBOLD$EGREEN" fi else @@ -2640,14 +2673,14 @@ clean_environment() { __clean_kube if [ $PRE_CLEAN -eq 1 ]; then echo " Cleaning docker resouces to free up resources, may take time..." - ../common/clean_docker.sh 2>&1 /dev/null + ../common/clean_docker.sh 2>&1 > /dev/null echo "" fi else __clean_containers if [ $PRE_CLEAN -eq 1 ]; then echo " Cleaning kubernetes resouces to free up resources, may take time..." - ../common/clean_kube.sh $KUBECONF 2>&1 /dev/null + ../common/clean_kube.sh $KUBECONF 2>&1 > /dev/null echo "" fi fi @@ -2824,7 +2857,7 @@ __check_service_start() { echo -ne " Container $BOLD${appname}$EBOLD starting${SAMELINE}" - pa_st=false + a1pmsst=false echo -ne " Waiting for ${ENTITY} ${appname} service status...${SAMELINE}" TSTART=$SECONDS loop_ctr=0 @@ -2837,7 +2870,7 @@ __check_service_start() { fi echo -ne " Waiting for {ENTITY} $BOLD${appname}$EBOLD service status on ${3}, result: $result${SAMELINE}" echo -ne " The ${ENTITY} $BOLD${appname}$EBOLD$GREEN is alive$EGREEN, responds to service status:$GREEN $result $EGREEN on ${url} after $(($SECONDS-$TSTART)) seconds" - pa_st=true + a1pmsst=true break else TS_TMP=$SECONDS @@ -2853,7 +2886,7 @@ __check_service_start() { let loop_ctr=loop_ctr+1 done - if [ "$pa_st" = "false" ]; then + if [ "$a1pmsst" = "false" ]; then ((RES_CONF_FAIL++)) echo -e $RED" The ${ENTITY} ${appname} did not respond to service status on ${url} in $(($SECONDS-$TSTART)) seconds"$ERED return 1 @@ -2885,7 +2918,7 @@ __check_container_logs() { #tmp=$(docker ps | grep $appname) tmp=$(docker ps -q --filter name=$appname) #get the container id - if [ -z "$tmp" ]; then #Only check logs for running Policy Agent apps + if [ -z "$tmp" ]; then #Only check logs for running A1PMS apps echo " "$dispname" is not running, no check made" return fi diff --git a/test/common/testengine_config.sh b/test/common/testengine_config.sh index aed9226f..367ad680 100644 --- a/test/common/testengine_config.sh +++ b/test/common/testengine_config.sh @@ -18,13 +18,13 @@ # # List of short names for all supported apps, including simulators etc -APP_SHORT_NAMES="PA ICS SDNC CP NGW RC RICSIM HTTPPROXY CBS CONSUL DMAAPMR MR CR PRODSTUB KUBEPROXY DMAAPMED DMAAPADP PVCCLEANER KAFKAPC CHARTMUS HELMMANAGER LOCALHELM" +APP_SHORT_NAMES="A1PMS ICS SDNC CP NGW RC RICSIM HTTPPROXY CBS CONSUL DMAAPMR MR CR PRODSTUB KUBEPROXY DMAAPMED DMAAPADP PVCCLEANER KAFKAPC CHARTMUS HELMMANAGER LOCALHELM" # List of available apps that built and released of the project -PROJECT_IMAGES="PA ICS SDNC CP NGW RICSIM RC DMAAPMED DMAAPADP HELMMANAGER" +PROJECT_IMAGES="A1PMS ICS SDNC CP NGW RICSIM RC DMAAPMED DMAAPADP HELMMANAGER" # List of available apps to override with local or remote staging/snapshot/release image -AVAILABLE_IMAGES_OVERRIDE="PA ICS SDNC CP NGW RICSIM RC DMAAPMED DMAAPADP HELMMANAGER" +AVAILABLE_IMAGES_OVERRIDE="A1PMS ICS SDNC CP NGW RICSIM RC DMAAPMED DMAAPADP HELMMANAGER" # List of available apps where the image is built by the test environment LOCAL_IMAGE_BUILD="MR CR PRODSTUB KUBEPROXY HTTPPROXY KAFKAPC" diff --git a/test/cr/README.md b/test/cr/README.md index 55c5cc5e..a745529d 100644 --- a/test/cr/README.md +++ b/test/cr/README.md @@ -1,8 +1,8 @@ # callback receiver - a stub interface to receive callbacks The callback receiver is intended for function tests to simulate a RAPP. -The callback receiver exposes the read and write urls, used by the agent, as configured in service. -The callback receiver receives notifications from PMS when synchronization happens between PMS and RICs. However, the callback receiver can be uses to receive any json payload from any source. +The callback receiver exposes the read and write urls, used by the a1pms, as configured in service. +The callback receiver receives notifications from A1PMS when synchronization happens between A1PMS and RICs. However, the callback receiver can be uses to receive any json payload from any source. ## Ports and certificates @@ -23,7 +23,7 @@ The control interface can be used by any test script. The following REST operations are available: >Send a message to CR
-This method puts a request message from PMS to notify that sychronization between PMS and certain RIC happens.
+This method puts a request message from A1PMS to notify that sychronization between A1PMS and certain RIC happens.
```URI and payload, (PUT or POST): /callbacks/ ```
```response: OK 200 or 500 for other errors``` @@ -77,7 +77,7 @@ eg: In 'docker-compose.yml', use field: >```volumes: - ./certificate:/usr/src/app/cert:ro``` -The script ```cr-build-start.sh``` do the above two steps in one go. This starts the callback-receiver container in stand-alone mode for basic test.
If the callback-receiver should be executed manually with the agent, replace docker run with this command to connect to the docker network with the correct service name (--name shall be aligned with the other components, i.e. the host named given in all callback urls). +The script ```cr-build-start.sh``` do the above two steps in one go. This starts the callback-receiver container in stand-alone mode for basic test.
If the callback-receiver should be executed manually with the a1pms, replace docker run with this command to connect to the docker network with the correct service name (--name shall be aligned with the other components, i.e. the host named given in all callback urls). >```docker run --rm -it -p 8090:8090 -p 8091:8091 --network nonrtric-docker-net --name callback-receiver callback-receiver``` >Start the image on http only
diff --git a/test/jenkins/run_test.sh b/test/jenkins/run_test.sh index 3f000c76..bcf99cda 100755 --- a/test/jenkins/run_test.sh +++ b/test/jenkins/run_test.sh @@ -33,7 +33,7 @@ clean_docker(){ # Run auto-test scripts cd ../auto-test/ clean_docker -bash FTC10.sh remote auto-clean --env-file ../common/test_env-oran-master.sh --use-local-image PA SDNC +bash FTC10.sh remote auto-clean --env-file ../common/test_env-oran-master.sh --use-local-image A1PMS SDNC echo "--> run_integration.sh END" diff --git a/test/mrstub/README.md b/test/mrstub/README.md index 171b4f43..202c1e5d 100644 --- a/test/mrstub/README.md +++ b/test/mrstub/README.md @@ -1,7 +1,7 @@ -# mrstub - stub interface to interact with the policy agent over Dmaap +# mrstub - stub interface to interact with the A1PMS over Dmaap The mrstub is intended for function tests to simulate a message router. -The mrstub exposes the read and write urls, used by the agent, as configured in consul. +The mrstub exposes the read and write urls, used by the a1pms, as configured in consul. In addition, request messages can be fed to the mrstub and the response messages can be read by polling. ## Ports and certificates @@ -37,7 +37,7 @@ The control interface can be used by any test script. The following REST operations are available: >Send a message to MR
-This method puts a request message in the queue for the agent to pick up. The returned correlationId (auto generated by the mrstub) is used when polling for the reposone message of this particular request.
+This method puts a request message in the queue for the a1pms to pick up. The returned correlationId (auto generated by the mrstub) is used when polling for the reposone message of this particular request.
```URI and parameters (GET): /send-request?operation=&url=```

```response: (http 200) or 400 for parameter error or 500 for other errors``` @@ -49,10 +49,10 @@ The method is for polling of messages, returns immediately containing the receiv >Metrics - counters
There are a number of counters that can be read to monitor the message processing. Do a http GET on any of the current counters and an integer value will be returned with http response code 200. ```/counter/requests_submitted``` - The total number of requests sent from the application
-```/counter/requests_fetched``` - The total number of requests picked up by the agent
-```/counter/responses_submitted``` - The total number of responses written by the agent
+```/counter/requests_fetched``` - The total number of requests picked up by the a1pms
+```/counter/responses_submitted``` - The total number of responses written by the a1pms
```/counter/responses_fetched``` - The total number of responses picked up by the application
-```/counter/current_requests``` - The current number of requests waiting to be picked up by the agent
+```/counter/current_requests``` - The current number of requests waiting to be picked up by the a1pms
```/counter/current_responses``` - The current number of responses waiting to be picked up by the application
### Build and start diff --git a/test/mrstub/app/main.py b/test/mrstub/app/main.py index 75364354..9ad75e67 100644 --- a/test/mrstub/app/main.py +++ b/test/mrstub/app/main.py @@ -58,8 +58,8 @@ cntr_msg_responses_fetched=0 # Request and response constants ORU_WRITE_URL="/events/unauthenticated.SEC_FAULT_OUTPUT" ORU_READ_URL="/events/unauthenticated.SEC_FAULT_OUTPUT/users/test/" -AGENT_WRITE_URL="/events/A1-POLICY-AGENT-WRITE" -AGENT_READ_URL="/events/A1-POLICY-AGENT-READ/users/policy-agent" +A1PMS_WRITE_URL="/events/A1-POLICY-AGENT-WRITE" +A1PMS_READ_URL="/events/A1-POLICY-AGENT-READ/users/policy-agent" APP_WRITE_URL="/send-request" APP_READ_URL="/receive-response" MIME_TEXT="text/plain" @@ -75,7 +75,7 @@ uploader_thread=None downloader_thread=None generic_uploader_thread=None -# Function to upload PMS messages to dmaap +# Function to upload A1PMS messages to dmaap def dmaap_uploader(): global msg_requests global cntr_msg_requests_fetched @@ -109,7 +109,7 @@ def dmaap_uploader(): sleep(0.01) -# Function to download PMS messages from dmaap +# Function to download A1PMS messages from dmaap def dmaap_downloader(): global msg_responses global cntr_msg_responses_submitted @@ -202,7 +202,7 @@ def index(): return 'OK', 200 -# Helper function to create a Dmaap PMS request message +# Helper function to create a Dmaap A1PMS request message # args : # response: json formatted string of a complete Dmaap message def create_message(operation, correlation_id, payload, url): @@ -216,7 +216,7 @@ def create_message(operation, correlation_id, payload, url): ### MR-stub interface, for MR control -# Send a PMS message to MR +# Send a A1PMS message to MR # URI and parameters (PUT or POST): /send-request?operation=&url= # response: (http 200) o4 400 for parameter error or 500 for other errors @app.route(APP_WRITE_URL, @@ -257,7 +257,7 @@ def sendrequest(): print(APP_WRITE_URL+"-"+CAUGHT_EXCEPTION+" "+str(e) + " "+traceback.format_exc()) return Response(SERVER_ERROR+" "+str(e), status=500, mimetype=MIME_TEXT) -# Receive a PMS message response for MR for the included correlation id +# Receive a A1PMS message response for MR for the included correlation id # URI and parameter, (GET): /receive-response?correlationid= # response: 200 or empty 204 or other errors 500 @app.route(APP_READ_URL, @@ -288,10 +288,10 @@ def receiveresponse(): ### Dmaap interface ### -# Read PMS messages stream. URI according to agent configuration. +# Read A1PMS messages stream. URI according to agent configuration. # URI, (GET): /events/A1-POLICY-AGENT-READ/users/policy-agent # response: 200 , or 500 for other errors -@app.route(AGENT_READ_URL, +@app.route(A1PMS_READ_URL, methods=['GET']) def events_read(): global msg_requests @@ -333,10 +333,10 @@ def events_read(): cntr_msg_requests_fetched += 1 cntr=cntr+1 msgs='['+msgs+']' - print(AGENT_READ_URL+" MSGs: "+json.dumps(json.loads(msgs), indent=2)) + print(A1PMS_READ_URL+" MSGs: "+json.dumps(json.loads(msgs), indent=2)) return Response(msgs, status=200, mimetype=MIME_JSON) except Exception as e: - print(AGENT_READ_URL+"-"+CAUGHT_EXCEPTION+" "+str(e) + " "+traceback.format_exc()) + print(A1PMS_READ_URL+"-"+CAUGHT_EXCEPTION+" "+str(e) + " "+traceback.format_exc()) return Response(SERVER_ERROR+" "+str(e), status=500, mimetype=MIME_TEXT) sleep(0.025) # sleep 25 milliseconds current_time=int(round(time.time() * 1000)) @@ -344,10 +344,10 @@ def events_read(): print("timeout: "+str(timeout)+", start_time: "+str(start_time)+", current_time: "+str(current_time)) return Response("[]", status=200, mimetype=MIME_JSON) -# Write PMS messages stream. URI according to agent configuration. +# Write A1PMS messages stream. URI according to agent configuration. # URI and payload, (PUT or POST): /events/A1-POLICY-AGENT-WRITE # response: OK 200 or 400 for missing json parameters, 500 for other errors -@app.route(AGENT_WRITE_URL, +@app.route(A1PMS_WRITE_URL, methods=['PUT','POST']) def events_write(): global msg_responses @@ -357,10 +357,10 @@ def events_write(): return Response('Url not available when running as mrstub frontend', status=404, mimetype=MIME_TEXT) with lock: - print("AGENT_WRITE_URL lock") + print("A1PMS_WRITE_URL lock") try: answer=request.json - print(AGENT_WRITE_URL+ " json=" + json.dumps(answer, indent=2)) + print(A1PMS_WRITE_URL+ " json=" + json.dumps(answer, indent=2)) if isinstance(answer, dict): #Create a an array if the answer is a dict (single message) answer_list=[] @@ -370,15 +370,15 @@ def events_write(): for item in answer: cid=item['correlationId'] if (cid is None): - print(AGENT_WRITE_URL+" parameter 'correlatonid' missing") + print(A1PMS_WRITE_URL+" parameter 'correlatonid' missing") return Response('Parameter missing in json', status=400, mimetype=MIME_TEXT) msg=item['message'] if (msg is None): - print(AGENT_WRITE_URL+" parameter 'msgs' missing") + print(A1PMS_WRITE_URL+" parameter 'msgs' missing") return Response('Parameter >message> missing in json', status=400, mimetype=MIME_TEXT) status=item['status'] if (status is None): - print(AGENT_WRITE_URL+" parameter 'status' missing") + print(A1PMS_WRITE_URL+" parameter 'status' missing") return Response('Parameter missing in json', status=400, mimetype=MIME_TEXT) if isinstance(msg, list) or isinstance(msg, dict): msg_str=json.dumps(msg)+status[0:3] @@ -386,9 +386,9 @@ def events_write(): msg_str=msg+status[0:3] msg_responses[cid]=msg_str cntr_msg_responses_submitted += 1 - print(AGENT_WRITE_URL+ " msg+status (correlationid="+cid+") :" + str(msg_str)) + print(A1PMS_WRITE_URL+ " msg+status (correlationid="+cid+") :" + str(msg_str)) except Exception as e: - print(AGENT_WRITE_URL+"-"+CAUGHT_EXCEPTION+" "+str(e) + " "+traceback.format_exc()) + print(A1PMS_WRITE_URL+"-"+CAUGHT_EXCEPTION+" "+str(e) + " "+traceback.format_exc()) return Response('{"message": "' + SERVER_ERROR + ' ' + str(e) + '","status":"500"}', status=200, mimetype=MIME_JSON) return Response('{}', status=200, mimetype=MIME_JSON) diff --git a/test/prodstub/README.md b/test/prodstub/README.md index 116469fd..60a190b0 100644 --- a/test/prodstub/README.md +++ b/test/prodstub/README.md @@ -136,7 +136,7 @@ eg: In 'docker-compose.yml', use field:
>```volumes: - ./certificate:/usr/src/app/cert:ro``` -The script ```prodstub-build-start.sh``` do the build and docker run in one go. This starts the stub container in stand-alone mode for basic test.
If the producer-stub should be executed manually with the agent, replace docker run with this command to connect to the docker network with the correct service name (--name shall be the same as configured in consul for the read and write streams). +The script ```prodstub-build-start.sh``` do the build and docker run in one go. This starts the stub container in stand-alone mode for basic test.
If the producer-stub should be executed manually with the a1pms, replace docker run with this command to connect to the docker network with the correct service name (--name shall be the same as configured in consul for the read and write streams). ```docker run --rm -it -p 8092:8092 -p 8093:8093 --name producer-stub producer-stub``` ### Basic test diff --git a/test/simulator-group/policy_agent/.gitignore b/test/simulator-group/a1pms/.gitignore similarity index 100% rename from test/simulator-group/policy_agent/.gitignore rename to test/simulator-group/a1pms/.gitignore diff --git a/test/simulator-group/a1pms/app.yaml b/test/simulator-group/a1pms/app.yaml new file mode 100644 index 00000000..b53f22ad --- /dev/null +++ b/test/simulator-group/a1pms/app.yaml @@ -0,0 +1,53 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: $A1PMS_APP_NAME + namespace: $KUBE_NONRTRIC_NAMESPACE + labels: + run: $A1PMS_APP_NAME + autotest: A1PMS +spec: + replicas: 1 + selector: + matchLabels: + run: $A1PMS_APP_NAME + template: + metadata: + labels: + run: $A1PMS_APP_NAME + autotest: A1PMS + spec: + securityContext: + runAsUser: 0 +# Need to run as root to be able to store files in dir mounted as a hostPath volume + containers: + - name: $A1PMS_APP_NAME + image: $A1PMS_IMAGE + imagePullPolicy: $KUBE_IMAGE_PULL_POLICY + ports: + - name: http + containerPort: $A1PMS_INTERNAL_PORT + - name: https + containerPort: $A1PMS_INTERNAL_SECURE_PORT + volumeMounts: + - mountPath: $A1PMS_CONFIG_MOUNT_PATH + name: a1pms-conf-name + - mountPath: $A1PMS_CONTAINER_MNT_DIR + name: a1pms-pv-data-name + - mountPath: $A1PMS_DATA_MOUNT_PATH + name: a1pms-data-name + volumes: + - configMap: + defaultMode: 420 + name: $A1PMS_CONFIG_CONFIGMAP_NAME + name: a1pms-conf-name + - configMap: + defaultMode: 420 + name: $A1PMS_DATA_CONFIGMAP_NAME + name: a1pms-data-name + - persistentVolumeClaim: + claimName: $A1PMS_DATA_PVC_NAME + name: a1pms-pv-data-name +# Selector will be set when pod is started first time + nodeSelector: + diff --git a/test/simulator-group/policy_agent/application.yaml b/test/simulator-group/a1pms/application.yaml similarity index 95% rename from test/simulator-group/policy_agent/application.yaml rename to test/simulator-group/a1pms/application.yaml index 275ad3f2..b9286b6f 100644 --- a/test/simulator-group/policy_agent/application.yaml +++ b/test/simulator-group/a1pms/application.yaml @@ -35,7 +35,7 @@ logging: org.springframework: ERROR org.springframework.data: ERROR org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR - ${POLICY_AGENT_PKG_NAME}: INFO + ${A1PMS_PKG_NAME}: INFO file: /var/log/policy-agent/application.log server: @@ -66,6 +66,6 @@ app: trust-store: /opt/app/policy-agent/etc/cert/truststore.jks # Configuration of usage of HTTP Proxy for the southbound accesses. # The HTTP proxy (if configured) will only be used for accessing NearRT RIC:s - http.proxy-host: $AGENT_HTTP_PROXY_CONFIG_HOST_NAME - http.proxy-port: $AGENT_HTTP_PROXY_CONFIG_PORT + http.proxy-host: $A1PMS_HTTP_PROXY_CONFIG_HOST_NAME + http.proxy-port: $A1PMS_HTTP_PROXY_CONFIG_PORT http.proxy-type: HTTP diff --git a/test/simulator-group/policy_agent/application2.yaml b/test/simulator-group/a1pms/application2.yaml similarity index 95% rename from test/simulator-group/policy_agent/application2.yaml rename to test/simulator-group/a1pms/application2.yaml index 05c5db12..18a92e0e 100644 --- a/test/simulator-group/policy_agent/application2.yaml +++ b/test/simulator-group/a1pms/application2.yaml @@ -35,7 +35,7 @@ logging: org.springframework: ERROR org.springframework.data: ERROR org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR - ${POLICY_AGENT_PKG_NAME}: INFO + ${A1PMS_PKG_NAME}: INFO file: /var/log/policy-agent/application.log server: @@ -66,6 +66,6 @@ app: trust-store: /opt/app/policy-agent/etc/cert/truststore.jks # Configuration of usage of HTTP Proxy for the southbound accesses. # The HTTP proxy (if configured) will only be used for accessing NearRT RIC:s - http.proxy-host: $AGENT_HTTP_PROXY_CONFIG_HOST_NAME - http.proxy-port: $AGENT_HTTP_PROXY_CONFIG_PORT + http.proxy-host: $A1PMS_HTTP_PROXY_CONFIG_HOST_NAME + http.proxy-port: $A1PMS_HTTP_PROXY_CONFIG_PORT http.proxy-type: HTTP diff --git a/test/simulator-group/policy_agent/docker-compose.yml b/test/simulator-group/a1pms/docker-compose.yml similarity index 66% rename from test/simulator-group/policy_agent/docker-compose.yml rename to test/simulator-group/a1pms/docker-compose.yml index 4b42b42e..61a9d7e0 100644 --- a/test/simulator-group/policy_agent/docker-compose.yml +++ b/test/simulator-group/a1pms/docker-compose.yml @@ -20,24 +20,24 @@ networks: external: true name: ${DOCKER_SIM_NWNAME} services: - policy-agent: - image: ${POLICY_AGENT_IMAGE} - container_name: ${POLICY_AGENT_APP_NAME} + a1pms: + image: ${A1PMS_IMAGE} + container_name: ${A1PMS_APP_NAME} networks: default: aliases: - - ${POLICY_AGENT_APP_NAME_ALIAS} + - ${A1PMS_APP_NAME_ALIAS} ports: - - ${POLICY_AGENT_EXTERNAL_PORT}:${POLICY_AGENT_INTERNAL_PORT} - - ${POLICY_AGENT_EXTERNAL_SECURE_PORT}:${POLICY_AGENT_INTERNAL_SECURE_PORT} + - ${A1PMS_EXTERNAL_PORT}:${A1PMS_INTERNAL_PORT} + - ${A1PMS_EXTERNAL_SECURE_PORT}:${A1PMS_INTERNAL_SECURE_PORT} environment: - CONSUL_HOST=${CONSUL_HOST} - CONSUL_PORT=${CONSUL_INTERNAL_PORT} - CONFIG_BINDING_SERVICE=${CONFIG_BINDING_SERVICE} - - HOSTNAME=${POLICY_AGENT_CONFIG_KEY} + - HOSTNAME=${A1PMS_CONFIG_KEY} volumes: - - ${POLICY_AGENT_HOST_MNT_DIR}/$POLICY_AGENT_CONFIG_FILE:${POLICY_AGENT_CONFIG_MOUNT_PATH}/$POLICY_AGENT_CONFIG_FILE - - ${POLICY_AGENT_HOST_MNT_DIR}/db:${POLICY_AGENT_CONTAINER_MNT_DIR} + - ${A1PMS_HOST_MNT_DIR}/$A1PMS_CONFIG_FILE:${A1PMS_CONFIG_MOUNT_PATH}/$A1PMS_CONFIG_FILE + - ${A1PMS_HOST_MNT_DIR}/db:${A1PMS_CONTAINER_MNT_DIR} labels: - - "nrttest_app=PA" - - "nrttest_dp=${POLICY_AGENT_DISPLAY_NAME}" + - "nrttest_app=A1PMS" + - "nrttest_dp=${A1PMS_DISPLAY_NAME}" diff --git a/test/simulator-group/policy_agent/pv.yaml b/test/simulator-group/a1pms/pv.yaml similarity index 57% rename from test/simulator-group/policy_agent/pv.yaml rename to test/simulator-group/a1pms/pv.yaml index eeed4a08..89c5b6eb 100644 --- a/test/simulator-group/policy_agent/pv.yaml +++ b/test/simulator-group/a1pms/pv.yaml @@ -1,18 +1,18 @@ apiVersion: v1 kind: PersistentVolume metadata: - name: $POLICY_AGENT_DATA_PV_NAME + name: $A1PMS_DATA_PV_NAME annotations: pv.beta.kubernetes.io/gid: "999" labels: - run: $POLICY_AGENT_APP_NAME - autotest: PA + run: $A1PMS_APP_NAME + autotest: A1PMS spec: - storageClassName: pa-standard + storageClassName: a1pms-standard capacity: storage: 1Mi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Delete hostPath: - path: "$HOST_PATH_BASE_DIR/$POLICY_AGENT_PV_PATH" + path: "$HOST_PATH_BASE_DIR/$A1PMS_PV_PATH" diff --git a/test/simulator-group/policy_agent/pvc.yaml b/test/simulator-group/a1pms/pvc.yaml similarity index 64% rename from test/simulator-group/policy_agent/pvc.yaml rename to test/simulator-group/a1pms/pvc.yaml index a62e1308..2c5ab990 100644 --- a/test/simulator-group/policy_agent/pvc.yaml +++ b/test/simulator-group/a1pms/pvc.yaml @@ -1,16 +1,16 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: $POLICY_AGENT_DATA_PVC_NAME + name: $A1PMS_DATA_PVC_NAME namespace: $KUBE_NONRTRIC_NAMESPACE labels: - run: $POLICY_AGENT_APP_NAME - autotest: PA + run: $A1PMS_APP_NAME + autotest: A1PMS spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Mi - storageClassName: pa-standard + storageClassName: a1pms-standard volumeMode: Filesystem diff --git a/test/simulator-group/a1pms/svc.yaml b/test/simulator-group/a1pms/svc.yaml new file mode 100644 index 00000000..bcbf9061 --- /dev/null +++ b/test/simulator-group/a1pms/svc.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Service +metadata: + name: $A1PMS_APP_NAME + namespace: $KUBE_NONRTRIC_NAMESPACE + labels: + run: $A1PMS_APP_NAME + autotest: A1PMS +spec: + type: ClusterIP + ports: + - port: $A1PMS_EXTERNAL_PORT + targetPort: $A1PMS_INTERNAL_PORT + protocol: TCP + name: http + - port: $A1PMS_EXTERNAL_SECURE_PORT + targetPort: $A1PMS_INTERNAL_SECURE_PORT + protocol: TCP + name: https + selector: + run: $A1PMS_APP_NAME \ No newline at end of file diff --git a/test/simulator-group/consul_cbs/consul/cbs_config.hcl b/test/simulator-group/consul_cbs/consul/cbs_config.hcl index 004fb1d8..bd24ad4f 100644 --- a/test/simulator-group/consul_cbs/consul/cbs_config.hcl +++ b/test/simulator-group/consul_cbs/consul/cbs_config.hcl @@ -21,7 +21,7 @@ service { # Name for CBS in consul, env var CONFIG_BINDING_SERVICE - # should be passed to Policy Agent app with this value + # should be passed to A1PMS app with this value Name = "config-binding-service" # Host name where CBS is running Address = "config-binding-service" diff --git a/test/simulator-group/control_panel/application.properties b/test/simulator-group/control_panel/application.properties index 1af026ea..288699c2 100644 --- a/test/simulator-group/control_panel/application.properties +++ b/test/simulator-group/control_panel/application.properties @@ -20,7 +20,7 @@ server.ssl.key-store = classpath:keystore.jks server.ssl.key-password = ericsson_kwdjfhw server.http.port = 8080 # https api -policycontroller.url.prefix = https://${POLICY_AGENT_DOMAIN_NAME}:${POLICY_AGENT_EXTERNAL_SECURE_PORT} +policycontroller.url.prefix = https://${A1PMS_DOMAIN_NAME}:${A1PMS_EXTERNAL_SECURE_PORT} userfile = users.json portalapi.decryptor = org.oransc.portal.nonrtric.controlpanel.portalapi.PortalSdkDecryptorAes diff --git a/test/simulator-group/ngw/application.yaml b/test/simulator-group/ngw/application.yaml index f87389c0..92fcf498 100644 --- a/test/simulator-group/ngw/application.yaml +++ b/test/simulator-group/ngw/application.yaml @@ -27,7 +27,7 @@ spring: wiretap: true routes: - id: A1-Policy - uri: https://${POLICY_AGENT_DOMAIN_NAME}:${POLICY_AGENT_EXTERNAL_SECURE_PORT} + uri: https://${A1PMS_DOMAIN_NAME}:${A1PMS_EXTERNAL_SECURE_PORT} predicates: - Path=/a1-policy/** - id: A1-EI diff --git a/test/simulator-group/policy_agent/app.yaml b/test/simulator-group/policy_agent/app.yaml deleted file mode 100644 index 3f1fcfe3..00000000 --- a/test/simulator-group/policy_agent/app.yaml +++ /dev/null @@ -1,53 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: $POLICY_AGENT_APP_NAME - namespace: $KUBE_NONRTRIC_NAMESPACE - labels: - run: $POLICY_AGENT_APP_NAME - autotest: PA -spec: - replicas: 1 - selector: - matchLabels: - run: $POLICY_AGENT_APP_NAME - template: - metadata: - labels: - run: $POLICY_AGENT_APP_NAME - autotest: PA - spec: - securityContext: - runAsUser: 0 -# Need to run as root to be able to store files in dir mounted as a hostPath volume - containers: - - name: $POLICY_AGENT_APP_NAME - image: $POLICY_AGENT_IMAGE - imagePullPolicy: $KUBE_IMAGE_PULL_POLICY - ports: - - name: http - containerPort: $POLICY_AGENT_INTERNAL_PORT - - name: https - containerPort: $POLICY_AGENT_INTERNAL_SECURE_PORT - volumeMounts: - - mountPath: $POLICY_AGENT_CONFIG_MOUNT_PATH - name: pa-conf-name - - mountPath: $POLICY_AGENT_CONTAINER_MNT_DIR - name: pa-pv-data-name - - mountPath: $POLICY_AGENT_DATA_MOUNT_PATH - name: pa-data-name - volumes: - - configMap: - defaultMode: 420 - name: $POLICY_AGENT_CONFIG_CONFIGMAP_NAME - name: pa-conf-name - - configMap: - defaultMode: 420 - name: $POLICY_AGENT_DATA_CONFIGMAP_NAME - name: pa-data-name - - persistentVolumeClaim: - claimName: $POLICY_AGENT_DATA_PVC_NAME - name: pa-pv-data-name -# Selector will be set when pod is started first time - nodeSelector: - diff --git a/test/simulator-group/policy_agent/mnt/.gitignore b/test/simulator-group/policy_agent/mnt/.gitignore deleted file mode 100644 index 72e8ffc0..00000000 --- a/test/simulator-group/policy_agent/mnt/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/test/simulator-group/policy_agent/svc.yaml b/test/simulator-group/policy_agent/svc.yaml deleted file mode 100644 index 0a9eca93..00000000 --- a/test/simulator-group/policy_agent/svc.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: $POLICY_AGENT_APP_NAME - namespace: $KUBE_NONRTRIC_NAMESPACE - labels: - run: $POLICY_AGENT_APP_NAME - autotest: PA -spec: - type: ClusterIP - ports: - - port: $POLICY_AGENT_EXTERNAL_PORT - targetPort: $POLICY_AGENT_INTERNAL_PORT - protocol: TCP - name: http - - port: $POLICY_AGENT_EXTERNAL_SECURE_PORT - targetPort: $POLICY_AGENT_INTERNAL_SECURE_PORT - protocol: TCP - name: https - selector: - run: $POLICY_AGENT_APP_NAME \ No newline at end of file diff --git a/test/simulator-group/sim-monitor.js b/test/simulator-group/sim-monitor.js index 5b854149..f993410f 100644 --- a/test/simulator-group/sim-monitor.js +++ b/test/simulator-group/sim-monitor.js @@ -17,12 +17,12 @@ # */ -// Sim mon server - query the agent and the simulators for counters and other data +// Sim mon server - query the a1pms and the simulators for counters and other data // Presents a web page on localhost:9999/mon var LOCALHOST="http://127.0.0.1:" var MRSTUB_PORT="3905" -var AGENT_PORT="8081" +var A1PMS_PORT="8081" var CR_PORT="8090" var ICS_PORT="8083" var PRODSTUB_PORT="8092" @@ -161,7 +161,7 @@ function clearFlag(flag) { //Status variables, for parameters values fetched from other simulators var mr1="", mr2="", mr3="", mr4="", mr5="", mr6=""; -//Status variables for agent +//Status variables for a1pms var ag1="" var ag2="" var ag3="" @@ -219,7 +219,7 @@ var ricbasename="ricsim" var rc_services="" -var pmsprefix="" +var a1pmsprefix="" function fetchAllMetrics_pol() { @@ -354,15 +354,15 @@ function fetchAllMetrics_pol() { clearFlag("cr3") }); } - //Agent - more get metrics from the agent + //A1PMS - more get metrics from the a1pms if (checkFunctionFlag("ag1")) { - getSimCtr(LOCALHOST+AGENT_PORT+"/status", 0, function(data, idx) { + getSimCtr(LOCALHOST+A1PMS_PORT+"/status", 0, function(data, idx) { ag1 = data; clearFlag("ag1") }); } if (checkFunctionFlag("ag2")) { - getSimCtr(LOCALHOST+AGENT_PORT+"/services", 0, function(data, idx) { + getSimCtr(LOCALHOST+A1PMS_PORT+"/services", 0, function(data, idx) { ag2=""; try { var jd=JSON.parse(data); @@ -380,7 +380,7 @@ function fetchAllMetrics_pol() { }); } if (checkFunctionFlag("ag3")) { - getSimCtr(LOCALHOST+AGENT_PORT+"/policy_types", 0, function(data, idx) { + getSimCtr(LOCALHOST+A1PMS_PORT+"/policy_types", 0, function(data, idx) { ag3=""; try { var jd=JSON.parse(data); @@ -399,7 +399,7 @@ function fetchAllMetrics_pol() { } if (checkFunctionFlag("ag4")) { - getSimCtr(LOCALHOST+AGENT_PORT+"/policy_ids", 0, function(data, idx) { + getSimCtr(LOCALHOST+A1PMS_PORT+"/policy_ids", 0, function(data, idx) { try { var jd=JSON.parse(data); ag4=""+jd.length @@ -412,7 +412,7 @@ function fetchAllMetrics_pol() { } if (checkFunctionFlag("ag5")) { - getSimCtr(LOCALHOST+AGENT_PORT+"/rics", 0, function(data, idx) { + getSimCtr(LOCALHOST+A1PMS_PORT+"/rics", 0, function(data, idx) { try { var jd=JSON.parse(data); ag5=""+jd.length @@ -926,12 +926,12 @@ app.get("/mon",function(req, res){ refreshCount_rc=5 var bn=req.query.basename - pmsprefix=req.query.pmsprefix + a1pmsprefix=req.query.a1pmsprefix - console.log("PMS"+pmsprefix) - if ((bn == undefined) || (pmsprefix == undefined)) { + console.log("A1PMS"+a1pmsprefix) + if ((bn == undefined) || (a1pmsprefix == undefined)) { getCtr=0 - return res.redirect('/mon?basename=ricsim&pmsprefix=/a1-policy/v2'); + return res.redirect('/mon?basename=ricsim&a1pmsprefix=/a1-policy/v2'); } else { ricbasename=bn } @@ -947,7 +947,7 @@ app.get("/mon",function(req, res){ "" + "" + "

Change basename in url if other ric sim prefix is used

" + - "

Change pmsprefix in url if pms with other prefix is used

" + + "

Change a1pmsprefix in url if a1pms with other prefix is used

" + "
" + "

Policy Management Service

" + "" + diff --git a/test/usecases/healthcheck/src/main.py b/test/usecases/healthcheck/src/main.py index fdf6d422..e69d273a 100644 --- a/test/usecases/healthcheck/src/main.py +++ b/test/usecases/healthcheck/src/main.py @@ -332,7 +332,7 @@ if __name__ == '__main__': try: rics_from_agent = get_rics_from_agent() except ConnectionError: - print(f'Policy Agent is not answering on {BASE_URL}, cannot start!') + print(f'A1PMS is not answering on {BASE_URL}, cannot start!') sys.exit(1) rics = create_ric_dict(rics_from_agent)