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"
25 #App names to include in the test when running docker, space separated list
26 DOCKER_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC NGW KUBEPROXY"
28 #App names to include in the test when running kubernetes, space separated list
29 if [ $USE_ISTIO -eq 0 ]; then
30 KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC KUBEPROXY NGW"
32 KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC KUBEPROXY NGW KEYCLOAK ISTIO AUTHSIDECAR"
34 #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list
35 KUBE_PRESTARTED_IMAGES=""
37 #Ignore image in DOCKER_INCLUDED_IMAGES, KUBE_INCLUDED_IMAGES if
38 #the image is not configured in the supplied env_file
39 #Used for images not applicable to all supported profile
40 CONDITIONALLY_IGNORED_IMAGES="NGW"
42 #Supported test environment profiles
43 SUPPORTED_PROFILES="ONAP-JAKARTA ONAP-KOHN ONAP-LONDON ORAN-F-RELEASE ORAN-G-RELEASE ORAN-H-RELEASE"
45 SUPPORTED_RUNMODES="DOCKER KUBE"
47 . ../common/testcase_common.sh $@
55 if [ $USE_ISTIO -eq 0 ]; then
56 # Tested variants of REST/DMAAP/SDNC config
57 TESTED_VARIANTS="REST DMAAP REST+SDNC DMAAP+SDNC"
59 #Test a1pms and simulator protocol versions (others are http only)
60 TESTED_PROTOCOLS="HTTP HTTPS"
62 if [ $USE_ISTIO -eq 1 ]; then
63 echo -e $RED"#########################################"$ERED
64 echo -e $RED"# No test of https when running with istio"$ERED
65 echo -e $RED"# No test of SDNC when running with istio"$ERED
66 echo -e $RED"#########################################"$ERED
68 # Tested variants of REST/DMAAP/SDNC config
69 TESTED_VARIANTS="REST DMAAP"
71 #Test a1pms and simulator protocol versions (others are http only)
72 TESTED_PROTOCOLS="HTTP"
75 for __httpx in $TESTED_PROTOCOLS ; do
76 for interface in $TESTED_VARIANTS ; do
78 echo "#####################################################################"
79 echo "#####################################################################"
80 echo "### Testing a1pms: $interface using $__httpx"
81 echo "#####################################################################"
82 echo "#####################################################################"
84 # Clean container and start all needed containers #
87 if [ $RUNMODE != "KUBE" ]; then
89 echo "ISTIO not supported by docker - setting USE-ISTIO=0"
92 if [ $USE_ISTIO -eq 1 ]; then
93 echo -e $RED"#########################################"$ERED
94 echo -e $RED"# Work around istio jwks cache"$ERED
95 echo -e $RED"# Cycle istiod down and up to clear cache"$ERED
97 __kube_scale deployment istiod istio-system 0
98 __kube_scale deployment istiod istio-system 1
99 echo -e $RED"# Cycle istiod done"
100 echo -e $RED"#########################################"$ERED
102 istio_enable_istio_namespace $KUBE_SIM_NAMESPACE
103 istio_enable_istio_namespace $KUBE_NONRTRIC_NAMESPACE
104 istio_enable_istio_namespace $KUBE_A1SIM_NAMESPACE
110 if [ $USE_ISTIO -eq 1 ]; then
113 keycloak_api_obtain_admin_token
115 keycloak_api_create_realm nrtrealm true 60
116 keycloak_api_create_confidential_client nrtrealm a1pmsc
117 keycloak_api_generate_client_secret nrtrealm a1pmsc
118 keycloak_api_get_client_secret nrtrealm a1pmsc
119 keycloak_api_create_client_roles nrtrealm a1pmsc nrtrole
120 keycloak_api_map_client_roles nrtrealm a1pmsc nrtrole
122 keycloak_api_get_client_token nrtrealm a1pmsc
124 CLIENT_TOKEN=$(keycloak_api_read_client_token nrtrealm a1pmsc)
125 echo "CLIENT_TOKEN: "$CLIENT_TOKEN
127 A1PMS_SEC=$(keycloak_api_read_client_secret nrtrealm a1pmsc)
128 echo "A1PMS_SEC: "$A1PMS_SEC
131 istio_req_auth_by_jwks ricsim-g1 $KUBE_A1SIM_NAMESPACE KUBEPROXY "$KUBE_PROXY_ISTIO_JWKS_KEYS"
132 istio_auth_policy_by_issuer ricsim-g1 $KUBE_A1SIM_NAMESPACE KUBEPROXY
134 istio_req_auth_by_jwksuri ricsim-g1 $KUBE_A1SIM_NAMESPACE nrtrealm
135 istio_auth_policy_by_realm ricsim-g1 $KUBE_A1SIM_NAMESPACE nrtrealm a1pmsc nrtrole
138 istio_req_auth_by_jwks ricsim-g2 $KUBE_A1SIM_NAMESPACE KUBEPROXY "$KUBE_PROXY_ISTIO_JWKS_KEYS"
139 istio_auth_policy_by_issuer ricsim-g2 $KUBE_A1SIM_NAMESPACE KUBEPROXY
141 istio_req_auth_by_jwksuri ricsim-g2 $KUBE_A1SIM_NAMESPACE nrtrealm
142 istio_auth_policy_by_realm ricsim-g2 $KUBE_A1SIM_NAMESPACE nrtrealm a1pmsc nrtrole
145 istio_req_auth_by_jwks ricsim-g3 $KUBE_A1SIM_NAMESPACE KUBEPROXY "$KUBE_PROXY_ISTIO_JWKS_KEYS"
146 istio_auth_policy_by_issuer ricsim-g3 $KUBE_A1SIM_NAMESPACE KUBEPROXY
148 istio_req_auth_by_jwksuri ricsim-g3 $KUBE_A1SIM_NAMESPACE nrtrealm
149 istio_auth_policy_by_realm ricsim-g3 $KUBE_A1SIM_NAMESPACE nrtrealm a1pmsc nrtrole
152 istio_req_auth_by_jwks $CR_APP_NAME $KUBE_SIM_NAMESPACE KUBEPROXY "$KUBE_PROXY_ISTIO_JWKS_KEYS"
153 istio_auth_policy_by_issuer $CR_APP_NAME $KUBE_SIM_NAMESPACE KUBEPROXY
155 istio_req_auth_by_jwksuri $CR_APP_NAME $KUBE_SIM_NAMESPACE nrtrealm
156 istio_auth_policy_by_realm $CR_APP_NAME $KUBE_SIM_NAMESPACE nrtrealm a1pmsc nrtrole
158 a1pms_configure_sec nrtrealm a1pmsc $A1PMS_SEC
161 if [ $__httpx == "HTTPS" ]; then
169 start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE
173 # Create service to be able to receive events when rics becomes available
174 # Must use rest towards the a1pms since dmaap is not configured yet
175 a1pms_api_put_service 201 "ric-registration" 0 "$CR_SERVICE_APP_PATH_0/ric-registration"
178 if [ $__httpx == "HTTPS" ]; then
181 if [[ $interface = *"SDNC"* ]]; then
184 if [[ $interface = *"DMAAP"* ]]; then
185 use_a1pms_dmaap_https
192 if [[ $interface = *"SDNC"* ]]; then
195 if [[ $interface = *"DMAAP"* ]]; then
202 start_ric_simulators ricsim_g1 1 OSC_2.1.0
203 start_ric_simulators ricsim_g2 1 STD_1.1.3
205 sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json
206 sim_put_policy_type 201 ricsim_g1_1 2 testdata/OSC/sim_2.json
208 start_ric_simulators ricsim_g3 1 STD_2.0.0
209 sim_put_policy_type 201 ricsim_g3_1 STD_QOS_0_2_0 testdata/STD2/sim_qos.json
210 sim_put_policy_type 201 ricsim_g3_1 STD_QOS2_0.1.0 testdata/STD2/sim_qos2.json
216 start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
218 if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then
219 start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE
223 if [[ $interface = *"SDNC"* ]]; then
225 prepare_a1pms_config SDNC ".a1pms_config.json"
227 prepare_a1pms_config NOSDNC ".a1pms_config.json"
230 if [ $RUNMODE == "KUBE" ]; then
231 a1pms_load_config ".a1pms_config.json"
233 #Temporary switch to http/https if dmaap use. Otherwise it is not possibble to push config
234 if [ $__httpx == "HTTPS" ]; then
240 if [[ $interface != *"DMAAP"* ]]; then
241 echo "{}" > ".a1pms_config_incorrect.json"
242 a1pms_api_put_configuration 400 ".a1pms_config_incorrect.json"
245 a1pms_api_put_configuration 200 ".a1pms_config.json"
246 a1pms_api_get_configuration 200 ".a1pms_config.json"
247 if [ $__httpx == "HTTPS" ]; then
248 if [[ $interface = *"DMAAP"* ]]; then
249 use_a1pms_dmaap_https
254 if [[ $interface = *"DMAAP"* ]]; then
262 a1pms_equal json:rics 3 300
264 a1pms_equal json:policy-types 5 120
266 a1pms_equal json:policies 0
268 a1pms_equal json:policy-instances 0
270 cr_equal 0 received_callbacks 3 120
271 cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_1 ricsim_g2_1 ricsim_g3_1
273 mr_equal requests_submitted 0
276 echo "############################################"
277 echo "############## Health check ################"
278 echo "############################################"
280 sleep_wait 120 "Let A1PMS cofiguration take effect"
282 a1pms_api_get_status 200
284 a1pms_api_get_status_root 200
286 echo "############################################"
287 echo "##### Service registry and supervision #####"
288 echo "############################################"
290 a1pms_api_get_services 404 "service1"
292 a1pms_api_put_service 201 "service1" 1000 "$CR_SERVICE_APP_PATH_0/1"
294 a1pms_api_put_service 200 "service1" 2000 "$CR_SERVICE_APP_PATH_0/1"
297 a1pms_api_put_service 400 "service2" -1 "$CR_SERVICE_APP_PATH_0/2"
299 a1pms_api_put_service 400 "service2" "wrong" "$CR_SERVICE_APP_PATH_0/2"
301 a1pms_api_put_service 400 "service2" 100 "/test"
303 a1pms_api_put_service 400 "service2" 100 "test-path"
305 a1pms_api_put_service 201 "service2" 300 "ftp://localhost:80/test"
307 a1pms_api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_APP_PATH_0/1"
309 a1pms_api_get_service_ids 200 "service1" "service2" "ric-registration"
312 a1pms_api_put_service 201 "service3" 5000 "$CR_SERVICE_APP_PATH_0/3"
315 a1pms_api_get_service_ids 200 "service1" "service2" "service3" "ric-registration"
318 a1pms_api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_APP_PATH_0/1"
320 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"
322 a1pms_api_get_services 200
324 deviation "TR2 - Keep alive shall return 200/201 according to doc, only 200 works - test combo $interface and $__httpx"
325 #The below should work, keept here until fixed or other decision made
326 #a1pms_api_put_services_keepalive 201 "service1"
327 #Using the below until decision
328 a1pms_api_put_services_keepalive 200 "service1"
330 deviation "TR2 - Keep alive shall return 200/201 according to doc, only 200 works - test combo $interface and $__httpx"
331 #The below should work, keept here until fixed or other decision made
332 #a1pms_api_put_services_keepalive 201 "service3"
333 #Using the below until decision
334 a1pms_api_put_services_keepalive 200 "service3"
336 a1pms_api_put_services_keepalive 200 "service1"
338 a1pms_api_put_services_keepalive 200 "service3"
340 a1pms_api_put_services_keepalive 404 "service5"
342 a1pms_api_get_service_ids 200 "service1" "service2" "service3" "ric-registration"
344 a1pms_api_delete_services 204 "service1"
346 a1pms_api_get_service_ids 200 "service2" "service3" "ric-registration"
349 a1pms_api_put_service 201 "service1" 50 "$CR_SERVICE_APP_PATH_0/1"
351 a1pms_api_get_service_ids 200 "service1" "service2" "service3" "ric-registration"
354 a1pms_api_delete_services 204 "service1"
355 a1pms_api_delete_services 204 "service3"
357 a1pms_equal json:services 2
359 a1pms_api_delete_services 204 "service2"
361 a1pms_equal json:services 1
364 echo "############################################"
365 echo "############## RIC Repository ##############"
366 echo "############################################"
368 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"
370 a1pms_api_get_rics 200 1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
372 a1pms_api_get_rics 404 47
374 a1pms_api_get_rics 404 "test"
376 a1pms_api_get_ric 200 me1_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
378 a1pms_api_get_ric 200 me2_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
380 a1pms_api_get_ric 200 me1_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
382 a1pms_api_get_ric 200 me2_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
384 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"
386 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"
388 a1pms_api_get_ric 200 NOME ricsim_g1_1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
390 a1pms_api_get_ric 200 NOME ricsim_g2_1 "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
392 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"
394 a1pms_api_get_ric 404 NOME test1
396 a1pms_api_get_ric 404 test NORIC
398 a1pms_api_get_ric 400 me1_ricsim_g1_1 ricsim_g1_1
400 a1pms_api_get_ric 400 me1_ricsim_g1_1 TESTRIC
402 a1pms_api_get_ric 400 TESTME ricsim_g1_1
404 echo "############################################"
405 echo "########### A1 Policy Management ###########"
406 echo "############################################"
408 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
409 #Behaviour accepted for now
410 a1pms_api_get_policy_type 200 1 testdata/OSC/1-a1pms-modified.json
411 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
412 #Behaviour accepted for now
413 a1pms_api_get_policy_type 200 2 testdata/OSC/2-a1pms-modified.json
414 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
415 #Behaviour accepted for now
416 a1pms_api_get_policy_type 200 STD_QOS_0_2_0 testdata/STD2/qos-a1pms-modified.json
417 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
418 #Behaviour accepted for now
419 a1pms_api_get_policy_type 200 STD_QOS2_0.1.0 testdata/STD2/qos2-a1pms-modified.json
421 a1pms_api_get_policy_type 404 3
423 a1pms_api_get_policy_schemas 404
426 a1pms_api_get_policy_types 200 NORIC 1 2 EMPTY STD_QOS_0_2_0 STD_QOS2_0.1.0
428 a1pms_api_get_policy_types 200 ricsim_g1_1 1 2
430 a1pms_api_get_policy_types 200 ricsim_g2_1 EMPTY
432 a1pms_api_get_policy_types 200 ricsim_g3_1 STD_QOS_0_2_0 STD_QOS2_0.1.0
434 a1pms_api_get_policy_types 404 dummy-ric
438 a1pms_api_put_service 201 "service10" 3600 "$CR_SERVICE_APP_PATH_0/1"
440 notificationurl=$CR_SERVICE_APP_PATH_0"/test"
442 if [[ $interface != *"DMAAP"* ]]; then
443 # Badly formatted json is not possible to send via dmaap
444 a1pms_api_put_policy 400 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi_bad_template.json
446 deviation "TR10 - a1pms allows policy creation on unregistered service (orig problem) - test combo $interface and $__httpx"
448 #a1pms_api_put_policy 400 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT testdata/OSC/pi1_template.json
450 a1pms_api_put_policy 201 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
452 a1pms_api_put_policy 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
453 a1pms_api_put_policy 200 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
455 a1pms_api_put_policy 200 "service10" ricsim_g1_1 1 5000 true $notificationurl testdata/OSC/pi1_template.json
456 a1pms_api_put_policy 200 "service10" ricsim_g1_1 1 5000 false $notificationurl testdata/OSC/pi1_template.json
458 a1pms_api_put_policy 201 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json
459 a1pms_api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json
461 a1pms_api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 true $notificationurl testdata/STD/pi1_template.json
462 a1pms_api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 false $notificationurl testdata/STD/pi1_template.json
464 a1pms_api_put_policy 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json
465 a1pms_api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json
467 a1pms_api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 true $notificationurl testdata/STD2/pi_qos2_template.json
468 a1pms_api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 false $notificationurl testdata/STD2/pi_qos2_template.json
470 a1pms_api_get_policy_status 404 1
471 a1pms_api_get_policy_status 404 2
473 a1pms_api_get_policy_status 200 5000 OSC "$VAL" "false"
474 a1pms_api_get_policy_status 200 5100 STD "UNDEFINED"
475 a1pms_api_get_policy_status 200 5200 STD2 EMPTY EMPTY
478 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
480 #a1pms_equal json:policies 2
482 a1pms_equal json:policies 4
484 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
486 #a1pms_equal json:policy_ids 2
488 a1pms_equal json:policy-instances 4
490 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
492 #a1pms_api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100
493 #Allow policy create with unregistered service for now
494 a1pms_api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000 5200
496 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
498 #a1pms_api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000
499 #Allow policy create with unregistered service for now
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
504 a1pms_api_get_policy_ids 200 ricsim_g3_1 NOSERVICE NOTYPE 5200
506 a1pms_api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100 5200
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 a1pms_api_get_policy_ids 200 NORIC NOSERVICE STD_QOS2_0.1.0 5200
519 a1pms_api_get_policy_ids 200 ricsim_g2_1 NOSERVICE 1 NOID
521 a1pms_api_get_policy 200 5000 testdata/OSC/pi1_template.json "service10" ricsim_g1_1 1 false $notificationurl
523 a1pms_api_get_policy 200 5100 testdata/STD/pi1_template.json "service10" ricsim_g2_1 NOTYPE false $notificationurl
525 a1pms_api_get_policy 200 5200 testdata/STD2/pi_qos2_template.json "service10" ricsim_g3_1 STD_QOS2_0.1.0 false $notificationurl
527 a1pms_api_get_policies 200 ricsim_g1_1 "service10" 1 5000 ricsim_g1_1 "service10" 1 false $notificationurl testdata/OSC/pi1_template.json
529 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
531 #a1pms_api_delete_policy 404 2000
532 #Allow policy create with unregistered service for now
533 a1pms_api_delete_policy 204 2000
535 a1pms_api_delete_policy 404 1500
537 a1pms_api_delete_policy 204 5000
539 a1pms_api_delete_policy 204 5200
541 a1pms_equal json:policies 1
544 a1pms_equal json:policy-instances 1
546 a1pms_api_delete_policy 204 5100
548 a1pms_equal json:policies 0
550 a1pms_equal json:policy-instances 0
552 cr_equal 0 received_callbacks 3
554 if [[ $interface = *"DMAAP"* ]]; then
555 mr_greater requests_submitted 0
556 VAL=$(mr_read requests_submitted)
557 mr_equal requests_fetched $VAL
558 mr_equal responses_submitted $VAL
559 mr_equal responses_fetched $VAL
560 mr_equal current_requests 0
561 mr_equal current_responses 0
563 mr_equal requests_submitted 0
565 if [ $USE_ISTIO -eq 0 ]; then
566 if [[ $interface = *"SDNC"* ]]; then
567 sim_contains_str ricsim_g1_1 remote_hosts $SDNC_APP_NAME
568 sim_contains_str ricsim_g2_1 remote_hosts $SDNC_APP_NAME
569 sim_contains_str ricsim_g3_1 remote_hosts $SDNC_APP_NAME
571 sim_contains_str ricsim_g1_1 remote_hosts $A1PMS_APP_NAME
572 sim_contains_str ricsim_g2_1 remote_hosts $A1PMS_APP_NAME
573 sim_contains_str ricsim_g3_1 remote_hosts $A1PMS_APP_NAME
579 if [[ $interface = *"SDNC"* ]]; then
583 store_logs "${__httpx}__${interface}"
589 #### TEST COMPLETE ####
594 auto_clean_environment