-use_agent_rest_http
-
-api_get_status 200
-
-echo "Print the interface for group 1 simulators, shall be OSC"
-for ((i=1; i<=$NUM_RICS; i++))
-do
- sim_print ricsim_g1_$i interface
-done
-
-echo "Print the interface for group 2 simulators, shall be STD"
-for ((i=1; i<=$NUM_RICS; i++))
-do
- sim_print ricsim_g2_$i interface
-done
-
-echo "Load policy type in group 1 simulators"
-for ((i=1; i<=$NUM_RICS; i++))
-do
- sim_put_policy_type 201 ricsim_g1_$i 1 testdata/OSC/sim_1.json
-done
-
-echo "Check the number of instances in group 1 simulators, shall be 0"
-for ((i=1; i<=$NUM_RICS; i++))
-do
- sim_equal ricsim_g1_$i num_instances 0
-done
-
-echo "Check the number of instances in group 2 simulators, shall be 0"
-for ((i=1; i<=$NUM_RICS; i++))
-do
- sim_equal ricsim_g2_$i num_instances 0
-done
-
-echo "Wait for the agent to refresh types from the simulator"
-api_equal json:policy_types 2 120
-
-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
-done
-
-echo "Register a service"
-api_put_service 201 "rapp1" 0 "$CR_PATH/1"
-
-TEST_DURATION=$((24*3600))
-TEST_START=$SECONDS
-
-while [ $(($SECONDS-$TEST_START)) -lt $TEST_DURATION ]; do
-
- echo ""
- echo "#########################################################################################################"
- echo -e $BOLD"INFO: Test executed for: "$(($SECONDS-$TEST_START)) "seconds. Target is: "$TEST_DURATION" seconds (24h)."$EBOLD
- echo "#########################################################################################################"
- echo ""
-
-
- echo "Create 10000 instances in each OSC RIC"
- INSTANCE_ID=200000
- INSTANCES=0
- for ((i=1; i<=$NUM_RICS; i++))
- do
- api_put_policy 201 "rapp1" ricsim_g1_$i 1 $INSTANCE_ID testdata/OSC/pi1_template.json $NUM_INSTANCES
- sim_equal ricsim_g1_$i num_instances $NUM_INSTANCES
- INSTANCE_ID=$(($INSTANCE_ID+$NUM_INSTANCES))
- INSTANCES=$(($INSTANCES+$NUM_INSTANCES))
- done
-
- api_equal json:policy_ids $INSTANCES
-
- echo "Create 10000 instances in each OSC RIC"
- for ((i=1; i<=$NUM_RICS; i++))
- do
- api_put_policy 201 "rapp1" ricsim_g2_$i NOTYPE $INSTANCE_ID testdata/STD/pi1_template.json $NUM_INSTANCES
- sim_equal ricsim_g2_$i num_instances $NUM_INSTANCES
- INSTANCE_ID=$(($INSTANCE_ID+$NUM_INSTANCES))
- INSTANCES=$(($INSTANCES+$NUM_INSTANCES))
- done
-
- api_equal json:policy_ids $INSTANCES
-
-
- echo "Delete all instances in each OSC RIC"
-
- INSTANCE_ID=200000
- for ((i=1; i<=$NUM_RICS; i++))
- do
- api_delete_policy 204 $INSTANCE_ID $NUM_INSTANCES
- INSTANCES=$(($INSTANCES-$NUM_INSTANCES))
- sim_equal ricsim_g1_$i num_instances $NUM_INSTANCES
- INSTANCE_ID=$(($INSTANCE_ID+$NUM_INSTANCES))
- done
-
- api_equal json:policy_ids $INSTANCES
-
- echo "Delete all instances in each STD RIC"
- INSTANCE_ID=200000
- for ((i=1; i<=$NUM_RICS; i++))
- do
- api_delete_policy 204 $INSTANCE_ID $NUM_INSTANCES
- INSTANCES=$(($INSTANCES-$NUM_INSTANCES))
- sim_equal ricsim_g2_$i num_instances $NUM_INSTANCES
- INSTANCE_ID=$(($INSTANCE_ID+$NUM_INSTANCES))
- done
-
- api_equal json:policy_ids 0
-done