3 # ============LICENSE_START===============================================
4 # Copyright (C) 2020 Nordix Foundation. All rights reserved.
5 # ========================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 # ============LICENSE_END=================================================
21 TC_ONELINE_DESCR="Full a1pms API walkthrough using a1pms REST/DMAAP and with/without SDNC A1 Controller"
23 #App names to include in the test when running docker, space separated list
24 DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM SDNC NGW KUBEPROXY"
26 #App names to include in the test when running kubernetes, space separated list
27 KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC KUBEPROXY NGW"
28 #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list
29 KUBE_PRESTARTED_IMAGES=""
31 #Ignore image in DOCKER_INCLUDED_IMAGES, KUBE_INCLUDED_IMAGES if
32 #the image is not configured in the supplied env_file
33 #Used for images not applicable to all supported profile
34 CONDITIONALLY_IGNORED_IMAGES="CBS CONSUL NGW"
36 #Supported test environment profiles
37 SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
39 SUPPORTED_RUNMODES="DOCKER KUBE"
41 . ../common/testcase_common.sh $@
49 # Tested variants of REST/DMAAP/SDNC config
50 TESTED_VARIANTS="REST DMAAP REST+SDNC DMAAP+SDNC"
52 #Test a1pms and simulator protocol versions (others are http only)
53 TESTED_PROTOCOLS="HTTP HTTPS"
55 for __httpx in $TESTED_PROTOCOLS ; do
56 for interface in $TESTED_VARIANTS ; do
58 echo "#####################################################################"
59 echo "#####################################################################"
60 echo "### Testing a1pms: $interface using $__httpx"
61 echo "#####################################################################"
62 echo "#####################################################################"
64 # Clean container and start all needed containers #
69 if [ $__httpx == "HTTPS" ]; then
77 start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE
81 # Create service to be able to receive events when rics becomes available
82 # Must use rest towards the a1pms since dmaap is not configured yet
83 a1pms_api_put_service 201 "ric-registration" 0 "$CR_SERVICE_APP_PATH_0/ric-registration"
86 if [ $__httpx == "HTTPS" ]; then
89 if [[ $interface = *"SDNC"* ]]; then
92 if [[ $interface = *"DMAAP"* ]]; then
100 if [[ $interface = *"SDNC"* ]]; then
103 if [[ $interface = *"DMAAP"* ]]; then
110 start_ric_simulators ricsim_g1 1 OSC_2.1.0
111 start_ric_simulators ricsim_g2 1 STD_1.1.3
113 sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json
114 sim_put_policy_type 201 ricsim_g1_1 2 testdata/OSC/sim_2.json
116 if [ "$A1PMS_VERSION" == "V2" ]; then
117 start_ric_simulators ricsim_g3 1 STD_2.0.0
118 sim_put_policy_type 201 ricsim_g3_1 STD_QOS_0_2_0 testdata/STD2/sim_qos.json
119 sim_put_policy_type 201 ricsim_g3_1 STD_QOS2_0.1.0 testdata/STD2/sim_qos2.json
126 start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
128 if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then
129 start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE
132 if [[ $interface = *"SDNC"* ]]; then
134 prepare_consul_config SDNC ".consul_config.json"
136 prepare_consul_config NOSDNC ".consul_config.json"
139 if [ $RUNMODE == "KUBE" ]; then
140 a1pms_load_config ".consul_config.json"
142 if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then
143 #Temporary switch to http/https if dmaap use. Otherwise it is not possibble to push config
144 if [ $__httpx == "HTTPS" ]; then
150 if [[ $interface != *"DMAAP"* ]]; then
151 echo "{}" > ".consul_config_incorrect.json"
152 a1pms_api_put_configuration 400 ".consul_config_incorrect.json"
155 a1pms_api_put_configuration 200 ".consul_config.json"
156 a1pms_api_get_configuration 200 ".consul_config.json"
157 if [ $__httpx == "HTTPS" ]; then
158 if [[ $interface = *"DMAAP"* ]]; then
159 use_a1pms_dmaap_https
164 if [[ $interface = *"DMAAP"* ]]; then
173 consul_config_app ".consul_config.json"
177 if [ "$A1PMS_VERSION" == "V2" ]; then
178 a1pms_equal json:rics 3 300
180 a1pms_equal json:policy-types 5 120
182 a1pms_equal json:policies 0
184 a1pms_equal json:policy-instances 0
186 a1pms_equal json:rics 2 300
188 a1pms_equal json:policy_schemas 3 120
190 a1pms_equal json:policy_types 3
192 a1pms_equal json:policies 0
194 a1pms_equal json:policy_ids 0
197 if [ "$A1PMS_VERSION" == "V2" ]; then
198 cr_equal 0 received_callbacks 3 120
199 cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_1 ricsim_g2_1 ricsim_g3_1
201 mr_equal requests_submitted 0
204 echo "############################################"
205 echo "############## Health check ################"
206 echo "############################################"
208 a1pms_api_get_status 200
210 a1pms_api_get_status_root 200
212 echo "############################################"
213 echo "##### Service registry and supervision #####"
214 echo "############################################"
216 a1pms_api_get_services 404 "service1"
218 a1pms_api_put_service 201 "service1" 1000 "$CR_SERVICE_APP_PATH_0/1"
220 a1pms_api_put_service 200 "service1" 2000 "$CR_SERVICE_APP_PATH_0/1"
223 a1pms_api_put_service 400 "service2" -1 "$CR_SERVICE_APP_PATH_0/2"
225 a1pms_api_put_service 400 "service2" "wrong" "$CR_SERVICE_APP_PATH_0/2"
227 a1pms_api_put_service 400 "service2" 100 "/test"
229 a1pms_api_put_service 400 "service2" 100 "test-path"
231 a1pms_api_put_service 201 "service2" 300 "ftp://localhost:80/test"
233 a1pms_api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_APP_PATH_0/1"
235 a1pms_api_get_service_ids 200 "service1" "service2" "ric-registration"
238 a1pms_api_put_service 201 "service3" 5000 "$CR_SERVICE_APP_PATH_0/3"
241 a1pms_api_get_service_ids 200 "service1" "service2" "service3" "ric-registration"
244 a1pms_api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_APP_PATH_0/1"
246 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"
248 a1pms_api_get_services 200
250 deviation "TR2 - Keep alive shall return 200/201 according to doc, only 200 works - test combo $interface and $__httpx"
251 #The below should work, keept here until fixed or other decision made
252 #a1pms_api_put_services_keepalive 201 "service1"
253 #Using the below until decision
254 a1pms_api_put_services_keepalive 200 "service1"
256 deviation "TR2 - Keep alive shall return 200/201 according to doc, only 200 works - test combo $interface and $__httpx"
257 #The below should work, keept here until fixed or other decision made
258 #a1pms_api_put_services_keepalive 201 "service3"
259 #Using the below until decision
260 a1pms_api_put_services_keepalive 200 "service3"
262 a1pms_api_put_services_keepalive 200 "service1"
264 a1pms_api_put_services_keepalive 200 "service3"
266 a1pms_api_put_services_keepalive 404 "service5"
268 a1pms_api_get_service_ids 200 "service1" "service2" "service3" "ric-registration"
270 a1pms_api_delete_services 204 "service1"
272 a1pms_api_get_service_ids 200 "service2" "service3" "ric-registration"
275 a1pms_api_put_service 201 "service1" 50 "$CR_SERVICE_APP_PATH_0/1"
277 a1pms_api_get_service_ids 200 "service1" "service2" "service3" "ric-registration"
280 a1pms_api_delete_services 204 "service1"
281 a1pms_api_delete_services 204 "service3"
283 a1pms_equal json:services 2
285 a1pms_api_delete_services 204 "service2"
287 a1pms_equal json:services 1
290 echo "############################################"
291 echo "############## RIC Repository ##############"
292 echo "############################################"
294 if [ "$A1PMS_VERSION" == "V2" ]; then
295 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"
297 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"
299 a1pms_api_get_rics 200 1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
301 a1pms_api_get_rics 404 47
303 a1pms_api_get_rics 404 "test"
305 if [ "$A1PMS_VERSION" == "V2" ]; then
306 a1pms_api_get_ric 200 me1_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
308 a1pms_api_get_ric 200 me2_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
310 a1pms_api_get_ric 200 me1_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
312 a1pms_api_get_ric 200 me2_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
314 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"
316 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"
318 a1pms_api_get_ric 200 NOME ricsim_g1_1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
320 a1pms_api_get_ric 200 NOME ricsim_g2_1 "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
322 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"
324 a1pms_api_get_ric 404 NOME test1
326 a1pms_api_get_ric 404 test NORIC
328 a1pms_api_get_ric 400 me1_ricsim_g1_1 ricsim_g1_1
330 a1pms_api_get_ric 400 me1_ricsim_g1_1 TESTRIC
332 a1pms_api_get_ric 400 TESTME ricsim_g1_1
335 a1pms_api_get_ric 200 me1_ricsim_g1_1 ricsim_g1_1
337 a1pms_api_get_ric 200 me2_ricsim_g1_1 ricsim_g1_1
339 a1pms_api_get_ric 200 me1_ricsim_g2_1 ricsim_g2_1
341 a1pms_api_get_ric 200 me2_ricsim_g2_1 ricsim_g2_1
343 a1pms_api_get_ric 404 test
346 echo "############################################"
347 echo "########### A1 Policy Management ###########"
348 echo "############################################"
350 if [ "$A1PMS_VERSION" == "V2" ]; then
351 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
352 #Behaviour accepted for now
353 a1pms_api_get_policy_type 200 1 testdata/OSC/1-a1pms-modified.json
354 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
355 #Behaviour accepted for now
356 a1pms_api_get_policy_type 200 2 testdata/OSC/2-a1pms-modified.json
357 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
358 #Behaviour accepted for now
359 a1pms_api_get_policy_type 200 STD_QOS_0_2_0 testdata/STD2/qos-a1pms-modified.json
360 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
361 #Behaviour accepted for now
362 a1pms_api_get_policy_type 200 STD_QOS2_0.1.0 testdata/STD2/qos2-a1pms-modified.json
364 a1pms_api_get_policy_type 404 3
366 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
367 #Behaviour accepted for now
368 a1pms_api_get_policy_schema 200 1 testdata/OSC/1-a1pms-modified.json
369 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
370 #Behaviour accepted for now
371 a1pms_api_get_policy_schema 200 2 testdata/OSC/2-a1pms-modified.json
373 a1pms_api_get_policy_schema 404 3
376 if [ "$A1PMS_VERSION" == "V2" ]; then
377 a1pms_api_get_policy_schemas 404
379 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
380 #Behaviour accepted for now
381 a1pms_api_get_policy_schemas 200 NORIC testdata/OSC/1-a1pms-modified.json testdata/OSC/2-a1pms-modified.json NOFILE
382 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
383 #Behaviour accepted for now
384 a1pms_api_get_policy_schemas 200 ricsim_g1_1 testdata/OSC/1-a1pms-modified.json testdata/OSC/2-a1pms-modified.json
386 a1pms_api_get_policy_schemas 200 ricsim_g2_1 NOFILE
388 a1pms_api_get_policy_schemas 404 test
392 if [ "$A1PMS_VERSION" == "V2" ]; then
393 a1pms_api_get_policy_types 200 NORIC 1 2 EMPTY STD_QOS_0_2_0 STD_QOS2_0.1.0
395 a1pms_api_get_policy_types 200 NORIC 1 2 EMPTY
398 a1pms_api_get_policy_types 200 ricsim_g1_1 1 2
400 a1pms_api_get_policy_types 200 ricsim_g2_1 EMPTY
402 if [ "$A1PMS_VERSION" == "V2" ]; then
403 a1pms_api_get_policy_types 200 ricsim_g3_1 STD_QOS_0_2_0 STD_QOS2_0.1.0
406 a1pms_api_get_policy_types 404 dummy-ric
410 a1pms_api_put_service 201 "service10" 3600 "$CR_SERVICE_APP_PATH_0/1"
412 if [ "$A1PMS_VERSION" == "V2" ]; then
413 notificationurl=$CR_SERVICE_APP_PATH_0"/test"
417 if [[ $interface != *"DMAAP"* ]]; then
418 # Badly formatted json is not possible to send via dmaap
419 a1pms_api_put_policy 400 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi_bad_template.json
421 deviation "TR10 - a1pms allows policy creation on unregistered service (orig problem) - test combo $interface and $__httpx"
423 #a1pms_api_put_policy 400 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT testdata/OSC/pi1_template.json
425 a1pms_api_put_policy 201 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
427 a1pms_api_put_policy 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
428 a1pms_api_put_policy 200 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
430 a1pms_api_put_policy 200 "service10" ricsim_g1_1 1 5000 true $notificationurl testdata/OSC/pi1_template.json
431 a1pms_api_put_policy 200 "service10" ricsim_g1_1 1 5000 false $notificationurl testdata/OSC/pi1_template.json
433 a1pms_api_put_policy 201 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json
434 a1pms_api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json
436 a1pms_api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 true $notificationurl testdata/STD/pi1_template.json
437 a1pms_api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 false $notificationurl testdata/STD/pi1_template.json
439 if [ "$A1PMS_VERSION" == "V2" ]; then
440 a1pms_api_put_policy 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json
441 a1pms_api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json
443 a1pms_api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 true $notificationurl testdata/STD2/pi_qos2_template.json
444 a1pms_api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 false $notificationurl testdata/STD2/pi_qos2_template.json
447 a1pms_api_get_policy_status 404 1
448 a1pms_api_get_policy_status 404 2
450 a1pms_api_get_policy_status 200 5000 OSC "$VAL" "false"
451 a1pms_api_get_policy_status 200 5100 STD "UNDEFINED"
452 if [ "$A1PMS_VERSION" == "V2" ]; then
453 a1pms_api_get_policy_status 200 5200 STD2 EMPTY EMPTY
457 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
459 #a1pms_equal json:policies 2
461 if [ "$A1PMS_VERSION" == "V2" ]; then
462 a1pms_equal json:policies 4
464 a1pms_equal json:policies 3
467 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
469 #a1pms_equal json:policy_ids 2
471 if [ "$A1PMS_VERSION" == "V2" ]; then
472 a1pms_equal json:policy-instances 4
474 a1pms_equal json:policy_ids 3
477 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
479 #a1pms_api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100
480 #Allow policy create with unregistered service for now
481 if [ "$A1PMS_VERSION" == "V2" ]; then
482 a1pms_api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000 5200
484 a1pms_api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000
487 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
489 #a1pms_api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000
490 #Allow policy create with unregistered service for now
491 if [ "$A1PMS_VERSION" == "V2" ]; then
492 a1pms_api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000
494 a1pms_api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100
496 a1pms_api_get_policy_ids 200 ricsim_g3_1 NOSERVICE NOTYPE 5200
498 a1pms_api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100 5200
500 a1pms_api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000
502 a1pms_api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100
505 a1pms_api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100
508 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
510 #a1pms_api_get_policy_ids 200 NORIC NOSERVICE 1 5000
511 #Allow policy create with unregistered service for now
513 a1pms_api_get_policy_ids 200 NORIC NOSERVICE 1 5000 2000
515 a1pms_api_get_policy_ids 200 NORIC NOSERVICE 2 NOID
517 if [ "$A1PMS_VERSION" == "V2" ]; then
518 a1pms_api_get_policy_ids 200 NORIC NOSERVICE STD_QOS2_0.1.0 5200
521 a1pms_api_get_policy_ids 200 ricsim_g2_1 NOSERVICE 1 NOID
523 if [ "$A1PMS_VERSION" == "V2" ]; then
524 a1pms_api_get_policy 200 5000 testdata/OSC/pi1_template.json "service10" ricsim_g1_1 1 false $notificationurl
526 a1pms_api_get_policy 200 5100 testdata/STD/pi1_template.json "service10" ricsim_g2_1 NOTYPE false $notificationurl
528 a1pms_api_get_policy 200 5200 testdata/STD2/pi_qos2_template.json "service10" ricsim_g3_1 STD_QOS2_0.1.0 false $notificationurl
530 a1pms_api_get_policies 200 ricsim_g1_1 "service10" 1 5000 ricsim_g1_1 "service10" 1 false $notificationurl testdata/OSC/pi1_template.json
532 a1pms_api_get_policy 200 5000 testdata/OSC/pi1_template.json
534 a1pms_api_get_policy 200 5100 testdata/STD/pi1_template.json
536 a1pms_api_get_policies 200 ricsim_g1_1 "service10" 1 5000 ricsim_g1_1 "service10" 1 testdata/OSC/pi1_template.json
539 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
541 #a1pms_api_delete_policy 404 2000
542 #Allow policy create with unregistered service for now
543 a1pms_api_delete_policy 204 2000
545 a1pms_api_delete_policy 404 1500
547 a1pms_api_delete_policy 204 5000
549 if [ "$A1PMS_VERSION" == "V2" ]; then
551 a1pms_api_delete_policy 204 5200
554 a1pms_equal json:policies 1
557 if [ "$A1PMS_VERSION" == "V2" ]; then
558 a1pms_equal json:policy-instances 1
560 a1pms_equal json:policy_ids 1
563 a1pms_api_delete_policy 204 5100
565 a1pms_equal json:policies 0
567 if [ "$A1PMS_VERSION" == "V2" ]; then
568 a1pms_equal json:policy-instances 0
570 a1pms_equal json:policy_ids 0
573 if [ "$A1PMS_VERSION" == "V2" ]; then
574 cr_equal 0 received_callbacks 3
577 if [[ $interface = *"DMAAP"* ]]; then
578 mr_greater requests_submitted 0
579 VAL=$(mr_read requests_submitted)
580 mr_equal requests_fetched $VAL
581 mr_equal responses_submitted $VAL
582 mr_equal responses_fetched $VAL
583 mr_equal current_requests 0
584 mr_equal current_responses 0
586 mr_equal requests_submitted 0
589 if [[ $interface = *"SDNC"* ]]; then
590 sim_contains_str ricsim_g1_1 remote_hosts $SDNC_APP_NAME
591 sim_contains_str ricsim_g2_1 remote_hosts $SDNC_APP_NAME
592 if [ "$A1PMS_VERSION" == "V2" ]; then
593 sim_contains_str ricsim_g3_1 remote_hosts $SDNC_APP_NAME
596 sim_contains_str ricsim_g1_1 remote_hosts $A1PMS_APP_NAME
597 sim_contains_str ricsim_g2_1 remote_hosts $A1PMS_APP_NAME
598 if [ "$A1PMS_VERSION" == "V2" ]; then
599 sim_contains_str ricsim_g3_1 remote_hosts $A1PMS_APP_NAME
605 if [[ $interface = *"SDNC"* ]]; then
609 store_logs "${__httpx}__${interface}"
615 #### TEST COMPLETE ####
620 auto_clean_environment