3 # ============LICENSE_START===============================================
4 # Copyright (C) 2020-2023 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 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 #Pre-started 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 $@
53 sim_generate_policy_uuid
55 if [ $USE_ISTIO -eq 0 ]; then
56 # Tested variants of REST/DMAAP/SDNC config
57 if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
58 TESTED_VARIANTS="REST REST+SDNC"
60 TESTED_VARIANTS="REST DMAAP REST+SDNC DMAAP+SDNC"
63 #Test a1pms and simulator protocol versions (others are http only)
64 TESTED_PROTOCOLS="HTTP HTTPS"
66 if [ $USE_ISTIO -eq 1 ]; then
67 echo -e $RED"#########################################"$ERED
68 echo -e $RED"# No test of https when running with istio"$ERED
69 echo -e $RED"# No test of SDNC when running with istio"$ERED
70 echo -e $RED"#########################################"$ERED
72 # Tested variants of REST/DMAAP/SDNC config
73 if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
74 TESTED_VARIANTS="REST DMAAP"
76 TESTED_VARIANTS="REST"
79 #Test a1pms and simulator protocol versions (others are http only)
80 TESTED_PROTOCOLS="HTTP"
83 for __httpx in $TESTED_PROTOCOLS ; do
84 for interface in $TESTED_VARIANTS ; do
86 echo "#####################################################################"
87 echo "#####################################################################"
88 echo "### Testing a1pms: $interface using $__httpx"
89 echo "#####################################################################"
90 echo "#####################################################################"
92 # Clean container and start all needed containers #
95 if [ $RUNMODE != "KUBE" ]; then
97 echo "ISTIO not supported by docker - setting USE-ISTIO=0"
100 if [ $USE_ISTIO -eq 1 ]; then
101 echo -e $RED"#########################################"$ERED
102 echo -e $RED"# Work around istio jwks cache"$ERED
103 echo -e $RED"# Cycle istiod down and up to clear cache"$ERED
105 __kube_scale deployment istiod istio-system 0
106 __kube_scale deployment istiod istio-system 1
107 echo -e $RED"# Cycle istiod done"
108 echo -e $RED"#########################################"$ERED
110 istio_enable_istio_namespace $KUBE_SIM_NAMESPACE
111 istio_enable_istio_namespace $KUBE_NONRTRIC_NAMESPACE
112 istio_enable_istio_namespace $KUBE_A1SIM_NAMESPACE
118 if [ $USE_ISTIO -eq 1 ]; then
121 keycloak_api_obtain_admin_token
123 keycloak_api_create_realm nrtrealm true 60
124 keycloak_api_create_confidential_client nrtrealm a1pmsc
125 keycloak_api_generate_client_secret nrtrealm a1pmsc
126 keycloak_api_get_client_secret nrtrealm a1pmsc
127 keycloak_api_create_client_roles nrtrealm a1pmsc nrtrole
128 keycloak_api_map_client_roles nrtrealm a1pmsc nrtrole
130 keycloak_api_get_client_token nrtrealm a1pmsc
132 CLIENT_TOKEN=$(keycloak_api_read_client_token nrtrealm a1pmsc)
133 echo "CLIENT_TOKEN: "$CLIENT_TOKEN
135 A1PMS_SEC=$(keycloak_api_read_client_secret nrtrealm a1pmsc)
136 echo "A1PMS_SEC: "$A1PMS_SEC
139 istio_req_auth_by_jwks ricsim-g1 $KUBE_A1SIM_NAMESPACE KUBEPROXY "$KUBE_PROXY_ISTIO_JWKS_KEYS"
140 istio_auth_policy_by_issuer ricsim-g1 $KUBE_A1SIM_NAMESPACE KUBEPROXY
142 istio_req_auth_by_jwksuri ricsim-g1 $KUBE_A1SIM_NAMESPACE nrtrealm
143 istio_auth_policy_by_realm ricsim-g1 $KUBE_A1SIM_NAMESPACE nrtrealm a1pmsc nrtrole
146 istio_req_auth_by_jwks ricsim-g2 $KUBE_A1SIM_NAMESPACE KUBEPROXY "$KUBE_PROXY_ISTIO_JWKS_KEYS"
147 istio_auth_policy_by_issuer ricsim-g2 $KUBE_A1SIM_NAMESPACE KUBEPROXY
149 istio_req_auth_by_jwksuri ricsim-g2 $KUBE_A1SIM_NAMESPACE nrtrealm
150 istio_auth_policy_by_realm ricsim-g2 $KUBE_A1SIM_NAMESPACE nrtrealm a1pmsc nrtrole
153 istio_req_auth_by_jwks ricsim-g3 $KUBE_A1SIM_NAMESPACE KUBEPROXY "$KUBE_PROXY_ISTIO_JWKS_KEYS"
154 istio_auth_policy_by_issuer ricsim-g3 $KUBE_A1SIM_NAMESPACE KUBEPROXY
156 istio_req_auth_by_jwksuri ricsim-g3 $KUBE_A1SIM_NAMESPACE nrtrealm
157 istio_auth_policy_by_realm ricsim-g3 $KUBE_A1SIM_NAMESPACE nrtrealm a1pmsc nrtrole
160 istio_req_auth_by_jwks $CR_APP_NAME $KUBE_SIM_NAMESPACE KUBEPROXY "$KUBE_PROXY_ISTIO_JWKS_KEYS"
161 istio_auth_policy_by_issuer $CR_APP_NAME $KUBE_SIM_NAMESPACE KUBEPROXY
163 istio_req_auth_by_jwksuri $CR_APP_NAME $KUBE_SIM_NAMESPACE nrtrealm
164 istio_auth_policy_by_realm $CR_APP_NAME $KUBE_SIM_NAMESPACE nrtrealm a1pmsc nrtrole
166 a1pms_configure_sec nrtrealm a1pmsc $A1PMS_SEC
169 if [ $__httpx == "HTTPS" ]; then
177 start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE
181 # Create service to be able to receive events when rics becomes available
182 # Must use rest towards the a1pms since dmaap is not configured yet
183 a1pms_api_put_service 201 "ric-registration" 0 "$CR_SERVICE_APP_PATH_0/ric-registration"
186 if [ $__httpx == "HTTPS" ]; then
189 if [[ $interface = *"SDNC"* ]]; then
190 if [[ "$SDNC_FEATURE_LEVEL" == *"NO_NB_HTTPS"* ]]; then
191 deviation "SDNC does not support NB https"
197 if [[ $interface = *"DMAAP"* ]]; then
198 use_a1pms_dmaap_https
205 if [[ $interface = *"SDNC"* ]]; then
208 if [[ $interface = *"DMAAP"* ]]; then
215 start_ric_simulators ricsim_g1 1 OSC_2.1.0
216 start_ric_simulators ricsim_g2 1 STD_1.1.3
218 sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json
219 sim_put_policy_type 201 ricsim_g1_1 2 testdata/OSC/sim_2.json
221 start_ric_simulators ricsim_g3 1 STD_2.0.0
222 sim_put_policy_type 201 ricsim_g3_1 STD_QOS_0_2_0 testdata/STD2/sim_qos.json
223 sim_put_policy_type 201 ricsim_g3_1 STD_QOS2_0.1.0 testdata/STD2/sim_qos2.json
225 if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
233 start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
235 if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then
236 start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE
240 if [[ $interface = *"SDNC"* ]]; then
242 controller_api_wait_for_status_ok 200 ricsim_g1_1
243 prepare_a1pms_config SDNC ".a1pms_config.json"
245 prepare_a1pms_config NOSDNC ".a1pms_config.json"
248 if [ $RUNMODE == "KUBE" ]; then
249 a1pms_load_config ".a1pms_config.json"
251 #Temporary switch to http/https if dmaap use. Otherwise it is not possible to push config
252 if [ $__httpx == "HTTPS" ]; then
258 if [[ $interface != *"DMAAP"* ]]; then
259 echo "{}" > ".a1pms_config_incorrect.json"
260 a1pms_api_put_configuration 400 ".a1pms_config_incorrect.json"
263 a1pms_api_put_configuration 200 ".a1pms_config.json"
264 a1pms_api_get_configuration 200 ".a1pms_config.json"
265 if [ $__httpx == "HTTPS" ]; then
266 if [[ $interface = *"DMAAP"* ]]; then
267 use_a1pms_dmaap_https
272 if [[ $interface = *"DMAAP"* ]]; then
280 a1pms_equal json:rics 3 300
282 a1pms_equal json:policy-types 5 120
284 a1pms_equal json:policies 0
286 a1pms_equal json:policy-instances 0
288 cr_equal 0 received_callbacks 3 120
289 cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_1 ricsim_g2_1 ricsim_g3_1
291 if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
294 mr_equal requests_submitted 0
298 echo "############################################"
299 echo "############## Health check ################"
300 echo "############################################"
302 sleep_wait 120 "Let A1PMS configuration take effect"
304 a1pms_api_get_status 200
306 a1pms_api_get_status_root 200
308 echo "############################################"
309 echo "##### Service registry and supervision #####"
310 echo "############################################"
312 a1pms_api_get_services 404 "service1"
314 a1pms_api_put_service 201 "service1" 1000 "$CR_SERVICE_APP_PATH_0/1"
316 a1pms_api_put_service 200 "service1" 2000 "$CR_SERVICE_APP_PATH_0/1"
319 a1pms_api_put_service 400 "service2" -1 "$CR_SERVICE_APP_PATH_0/2"
321 a1pms_api_put_service 400 "service2" "wrong" "$CR_SERVICE_APP_PATH_0/2"
323 a1pms_api_put_service 400 "service2" 100 "/test"
325 a1pms_api_put_service 400 "service2" 100 "test-path"
327 a1pms_api_put_service 201 "service2" 300 "ftp://localhost:80/test"
329 a1pms_api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_APP_PATH_0/1"
331 a1pms_api_get_service_ids 200 "service1" "service2" "ric-registration"
334 a1pms_api_put_service 201 "service3" 5000 "$CR_SERVICE_APP_PATH_0/3"
337 a1pms_api_get_service_ids 200 "service1" "service2" "service3" "ric-registration"
340 a1pms_api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_APP_PATH_0/1"
342 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"
344 a1pms_api_get_services 200
346 deviation "TR2 - Keep alive shall return 200/201 according to doc, only 200 works - test combo $interface and $__httpx"
347 #The below should work, keept here until fixed or other decision made
348 #a1pms_api_put_services_keepalive 201 "service1"
349 #Using the below until decision
350 a1pms_api_put_services_keepalive 200 "service1"
352 deviation "TR2 - Keep alive shall return 200/201 according to doc, only 200 works - test combo $interface and $__httpx"
353 #The below should work, keept here until fixed or other decision made
354 #a1pms_api_put_services_keepalive 201 "service3"
355 #Using the below until decision
356 a1pms_api_put_services_keepalive 200 "service3"
358 a1pms_api_put_services_keepalive 200 "service1"
360 a1pms_api_put_services_keepalive 200 "service3"
362 a1pms_api_put_services_keepalive 404 "service5"
364 a1pms_api_get_service_ids 200 "service1" "service2" "service3" "ric-registration"
366 a1pms_api_delete_services 204 "service1"
368 a1pms_api_get_service_ids 200 "service2" "service3" "ric-registration"
371 a1pms_api_put_service 201 "service1" 50 "$CR_SERVICE_APP_PATH_0/1"
373 a1pms_api_get_service_ids 200 "service1" "service2" "service3" "ric-registration"
376 a1pms_api_delete_services 204 "service1"
377 a1pms_api_delete_services 204 "service3"
379 a1pms_equal json:services 2
381 a1pms_api_delete_services 204 "service2"
383 a1pms_equal json:services 1
386 echo "############################################"
387 echo "############## RIC Repository ##############"
388 echo "############################################"
390 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"
392 a1pms_api_get_rics 200 1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
394 a1pms_api_get_rics 404 47
396 a1pms_api_get_rics 404 "test"
398 a1pms_api_get_ric 200 me1_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
400 a1pms_api_get_ric 200 me2_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
402 a1pms_api_get_ric 200 me1_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
404 a1pms_api_get_ric 200 me2_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
406 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"
408 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"
410 a1pms_api_get_ric 200 NOME ricsim_g1_1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
412 a1pms_api_get_ric 200 NOME ricsim_g2_1 "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
414 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"
416 a1pms_api_get_ric 404 NOME test1
418 a1pms_api_get_ric 404 test NORIC
420 a1pms_api_get_ric 400 me1_ricsim_g1_1 ricsim_g1_1
422 a1pms_api_get_ric 400 me1_ricsim_g1_1 TESTRIC
424 a1pms_api_get_ric 400 TESTME ricsim_g1_1
426 echo "############################################"
427 echo "########### A1 Policy Management ###########"
428 echo "############################################"
430 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
431 #Behaviour accepted for now
432 a1pms_api_get_policy_type 200 1 testdata/OSC/1-a1pms-modified.json
433 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
434 #Behaviour accepted for now
435 a1pms_api_get_policy_type 200 2 testdata/OSC/2-a1pms-modified.json
436 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
437 #Behaviour accepted for now
438 a1pms_api_get_policy_type 200 STD_QOS_0_2_0 testdata/STD2/qos-a1pms-modified.json
439 deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx"
440 #Behaviour accepted for now
441 a1pms_api_get_policy_type 200 STD_QOS2_0.1.0 testdata/STD2/qos2-a1pms-modified.json
443 a1pms_api_get_policy_type 404 3
445 a1pms_api_get_policy_schemas 404
448 a1pms_api_get_policy_types 200 NORIC 1 2 EMPTY STD_QOS_0_2_0 STD_QOS2_0.1.0
450 a1pms_api_get_policy_types 200 ricsim_g1_1 1 2
452 a1pms_api_get_policy_types 200 ricsim_g2_1 EMPTY
454 a1pms_api_get_policy_types 200 ricsim_g3_1 STD_QOS_0_2_0 STD_QOS2_0.1.0
456 a1pms_api_get_policy_types 404 dummy-ric
460 a1pms_api_put_service 201 "service10" 3600 "$CR_SERVICE_APP_PATH_0/1"
462 notificationurl=$CR_SERVICE_APP_PATH_0"/test"
464 if [[ $interface != *"DMAAP"* ]]; then
465 # Badly formatted json is not possible to send via dmaap
466 a1pms_api_put_policy 400 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi_bad_template.json
468 deviation "TR10 - a1pms allows policy creation on unregistered service (orig problem) - test combo $interface and $__httpx"
470 #a1pms_api_put_policy 400 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT testdata/OSC/pi1_template.json
472 a1pms_api_put_policy 201 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
474 a1pms_api_put_policy 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
475 a1pms_api_put_policy 200 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
477 a1pms_api_put_policy 200 "service10" ricsim_g1_1 1 5000 true $notificationurl testdata/OSC/pi1_template.json
478 a1pms_api_put_policy 200 "service10" ricsim_g1_1 1 5000 false $notificationurl testdata/OSC/pi1_template.json
480 a1pms_api_put_policy 201 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json
481 a1pms_api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json
483 a1pms_api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 true $notificationurl testdata/STD/pi1_template.json
484 a1pms_api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 false $notificationurl testdata/STD/pi1_template.json
486 a1pms_api_put_policy 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json
487 a1pms_api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json
489 a1pms_api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 true $notificationurl testdata/STD2/pi_qos2_template.json
490 a1pms_api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 false $notificationurl testdata/STD2/pi_qos2_template.json
492 a1pms_api_get_policy_status 404 1
493 a1pms_api_get_policy_status 404 2
495 a1pms_api_get_policy_status 200 5000 OSC "$VAL" "false"
496 a1pms_api_get_policy_status 200 5100 STD "UNDEFINED"
497 a1pms_api_get_policy_status 200 5200 STD2 EMPTY EMPTY
500 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
502 #a1pms_equal json:policies 2
504 a1pms_equal json:policies 4
506 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
508 #a1pms_equal json:policy_ids 2
510 a1pms_equal json:policy-instances 4
512 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
514 #a1pms_api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100
515 #Allow policy create with unregistered service for now
516 a1pms_api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000 5200
518 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
520 #a1pms_api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000
521 #Allow policy create with unregistered service for now
522 a1pms_api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000
524 a1pms_api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100
526 a1pms_api_get_policy_ids 200 ricsim_g3_1 NOSERVICE NOTYPE 5200
528 a1pms_api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100 5200
530 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
532 #a1pms_api_get_policy_ids 200 NORIC NOSERVICE 1 5000
533 #Allow policy create with unregistered service for now
535 a1pms_api_get_policy_ids 200 NORIC NOSERVICE 1 5000 2000
537 a1pms_api_get_policy_ids 200 NORIC NOSERVICE 2 NOID
539 a1pms_api_get_policy_ids 200 NORIC NOSERVICE STD_QOS2_0.1.0 5200
541 a1pms_api_get_policy_ids 200 ricsim_g2_1 NOSERVICE 1 NOID
543 a1pms_api_get_policy 200 5000 testdata/OSC/pi1_template.json "service10" ricsim_g1_1 1 false $notificationurl
545 a1pms_api_get_policy 200 5100 testdata/STD/pi1_template.json "service10" ricsim_g2_1 NOTYPE false $notificationurl
547 a1pms_api_get_policy 200 5200 testdata/STD2/pi_qos2_template.json "service10" ricsim_g3_1 STD_QOS2_0.1.0 false $notificationurl
549 a1pms_api_get_policies 200 ricsim_g1_1 "service10" 1 5000 ricsim_g1_1 "service10" 1 false $notificationurl testdata/OSC/pi1_template.json
551 deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
553 #a1pms_api_delete_policy 404 2000
554 #Allow policy create with unregistered service for now
555 a1pms_api_delete_policy 204 2000
557 a1pms_api_delete_policy 404 1500
559 a1pms_api_delete_policy 204 5000
561 a1pms_api_delete_policy 204 5200
563 a1pms_equal json:policies 1
566 a1pms_equal json:policy-instances 1
568 a1pms_api_delete_policy 204 5100
570 a1pms_equal json:policies 0
572 a1pms_equal json:policy-instances 0
574 cr_equal 0 received_callbacks 3
576 if [[ $interface = *"DMAAP"* ]]; then
577 mr_greater requests_submitted 0
578 VAL=$(mr_read requests_submitted)
579 mr_equal requests_fetched $VAL
580 mr_equal responses_submitted $VAL
581 mr_equal responses_fetched $VAL
582 mr_equal current_requests 0
583 mr_equal current_responses 0
585 if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then
588 mr_equal requests_submitted 0
591 if [ $USE_ISTIO -eq 0 ]; then
592 if [[ $interface = *"SDNC"* ]]; then
593 sim_contains_str ricsim_g1_1 remote_hosts $SDNC_APP_NAME
594 sim_contains_str ricsim_g2_1 remote_hosts $SDNC_APP_NAME
595 sim_contains_str ricsim_g3_1 remote_hosts $SDNC_APP_NAME
597 sim_contains_str ricsim_g1_1 remote_hosts $A1PMS_APP_NAME
598 sim_contains_str ricsim_g2_1 remote_hosts $A1PMS_APP_NAME
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