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"
-#App names to exclude checking pulling images for, space separated list
-EXCLUDED_IMAGES="ECS"
+#App names to include in the test, space separated list
+INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC"
. ../common/testcase_common.sh $@
. ../common/agent_api_functions.sh
done
echo "Wait for the agent to refresh types from the simulator"
-api_equal json:policy_types 2 120
+if [ "$PMS_VERSION" == "V2" ]; then
+ api_equal json:policy-types 2 120
+else
+ api_equal json:policy_types 2 120
+fi
echo "Check the number of types in the agent for each ric is 1"
for ((i=1; i<=$NUM_RICS; i++))
do
- api_equal json:policy_types?ric=ricsim_g1_$i 1 120
+ if [ "$PMS_VERSION" == "V2" ]; then
+ api_equal json:policy-types?ric_id=ricsim_g1_$i 1 120
+ else
+ api_equal json:policy_types?ric=ricsim_g1_$i 1 120
+ fi
done
echo "Register a service"
MR_MESSAGES=0
+if [ "$PMS_VERSION" == "V2" ]; then
+ notificationurl="http://localhost:80"
+else
+ notificationurl=""
+fi
+
while [ $(($SECONDS-$TEST_START)) -lt $TEST_DURATION ]; do
echo ""
INSTANCE_ID=200000
INSTANCES=0
if [ $interface == "REST_PARALLEL" ]; then
- api_put_policy_parallel 201 "serv1" ricsim_g1_ $NUM_RICS 1 $INSTANCE_ID NOTRANSIENT testdata/OSC/pi1_template.json $NUM_INSTANCES 3
+ 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 testdata/OSC/pi1_template.json $NUM_INSTANCES
+ 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 testdata/OSC/pi1_template.json $NUM_INSTANCES
+ 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))
INSTANCES=$(($INSTANCES+$NUM_INSTANCES))
done
- api_equal json:policy_ids $INSTANCES
+ if [ "$PMS_VERSION" == "V2" ]; then
+ api_equal json:policy_instances $INSTANCES
+ else
+ api_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 testdata/STD/pi1_template.json $NUM_INSTANCES 3
+ 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 testdata/STD/pi1_template.json $NUM_INSTANCES
+ 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 testdata/STD/pi1_template.json $NUM_INSTANCES
+ 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))
INSTANCES=$(($INSTANCES+$NUM_INSTANCES))
done
- api_equal json:policy_ids $INSTANCES
+ if [ "$PMS_VERSION" == "V2" ]; then
+ api_equal json:policy_instances $INSTANCES
+ else
+ api_equal json:policy_ids $INSTANCES
+ fi
echo "Delete all instances in each OSC RIC"
INSTANCE_ID=$(($INSTANCE_ID+$NUM_INSTANCES))
done
- api_equal json:policy_ids $INSTANCES
+ if [ "$PMS_VERSION" == "V2" ]; then
+ api_equal json:policy_instances $INSTANCES
+ else
+ api_equal json:policy_ids $INSTANCES
+ fi
echo "Delete all instances in each STD RIC"
INSTANCE_ID=$(($INSTANCE_ID+$NUM_INSTANCES))
done
- api_equal json:policy_ids 0
+ if [ "$PMS_VERSION" == "V2" ]; then
+ api_equal json:policy_instances $INSTANCES
+ else
+ api_equal json:policy_ids $INSTANCES
+ fi
cr_equal received_callbacks 0