BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | # ============LICENSE_START=============================================== |
BjornMagnussonXA | 7d7cb5f | 2023-04-11 10:32:56 +0200 | [diff] [blame] | 4 | # Copyright (C) 2020-2023 Nordix Foundation. All rights reserved. |
rohithrajneesh | 927c17e | 2023-12-01 14:26:03 +0000 | [diff] [blame] | 5 | # Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved. |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 6 | # ======================================================================== |
| 7 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | # you may not use this file except in compliance with the License. |
| 9 | # You may obtain a copy of the License at |
| 10 | # |
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | # |
| 13 | # Unless required by applicable law or agreed to in writing, software |
| 14 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | # See the License for the specific language governing permissions and |
| 17 | # limitations under the License. |
| 18 | # ============LICENSE_END================================================= |
| 19 | # |
| 20 | |
| 21 | |
| 22 | TC_ONELINE_DESCR="ONAP Use case REQ-626" |
| 23 | #App names to include in the test when running docker, space separated list |
BjornMagnussonXA | f83c362 | 2023-02-28 10:05:51 +0100 | [diff] [blame] | 24 | DOCKER_INCLUDED_IMAGES="CP CR MR DMAAPMR A1PMS RICSIM SDNC NGW KUBEPROXY" |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 25 | |
| 26 | #App names to include in the test when running kubernetes, space separated list |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 27 | KUBE_INCLUDED_IMAGES="CP CR MR DMAAPMR A1PMS RICSIM SDNC KUBEPROXY NGW" |
BjornMagnussonXA | d54225b | 2023-04-19 14:03:49 +0200 | [diff] [blame] | 28 | #Pre-started app (not started by script) to include in the test when running kubernetes, space separated list |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 29 | KUBE_PRESTARTED_IMAGES="" |
| 30 | |
| 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 |
BjornMagnussonXA | f83c362 | 2023-02-28 10:05:51 +0100 | [diff] [blame] | 34 | CONDITIONALLY_IGNORED_IMAGES="NGW" |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 35 | |
| 36 | #Supported test environment profiles |
raviteja.karumuri | b71c749 | 2024-06-25 15:06:15 +0100 | [diff] [blame^] | 37 | SUPPORTED_PROFILES="ONAP-KOHN ONAP-LONDON ONAP-MONTREAL ONAP-NEWDELHI" |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 38 | #Supported run modes |
| 39 | SUPPORTED_RUNMODES="DOCKER KUBE" |
| 40 | |
| 41 | . ../common/testcase_common.sh $@ |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 42 | |
| 43 | setup_testenvironment |
| 44 | |
| 45 | #### TEST BEGIN #### |
| 46 | |
| 47 | #Local vars in test script |
| 48 | ########################## |
| 49 | |
| 50 | use_cr_https |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 51 | use_a1pms_rest_https |
BjornMagnussonXA | 7d7cb5f | 2023-04-11 10:32:56 +0200 | [diff] [blame] | 52 | if [[ "$SDNC_FEATURE_LEVEL" == *"NO_NB_HTTPS"* ]]; then |
| 53 | deviation "SDNC does not support NB https" |
| 54 | use_sdnc_http |
| 55 | else |
| 56 | use_sdnc_https |
| 57 | fi |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 58 | use_simulator_https |
BjornMagnussonXA | 7d7cb5f | 2023-04-11 10:32:56 +0200 | [diff] [blame] | 59 | if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then |
| 60 | : |
| 61 | else |
| 62 | use_mr_https |
| 63 | fi |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 64 | __httpx="HTTPS" |
BjornMagnussonXA | f83c362 | 2023-02-28 10:05:51 +0100 | [diff] [blame] | 65 | notificationurl=$CR_SERVICE_APP_PATH_0"/test" |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 66 | |
BjornMagnussonXA | 7d7cb5f | 2023-04-11 10:32:56 +0200 | [diff] [blame] | 67 | sim_generate_policy_uuid |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 68 | |
| 69 | # Tested variants of REST/DMAAP/SDNC config |
BjornMagnussonXA | 7d7cb5f | 2023-04-11 10:32:56 +0200 | [diff] [blame] | 70 | |
| 71 | |
| 72 | if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then |
| 73 | TESTED_VARIANTS="REST REST+SDNC" |
| 74 | else |
| 75 | TESTED_VARIANTS="REST DMAAP REST+SDNC DMAAP+SDNC" |
| 76 | fi |
| 77 | |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 78 | for interface in $TESTED_VARIANTS ; do |
| 79 | |
| 80 | echo "#####################################################################" |
| 81 | echo "#####################################################################" |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 82 | echo "### Testing a1pms: $interface using https" |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 83 | echo "#####################################################################" |
| 84 | echo "#####################################################################" |
| 85 | |
| 86 | clean_environment |
| 87 | |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame] | 88 | start_kube_proxy |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 89 | |
| 90 | if [[ $interface = *"DMAAP"* ]]; then |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 91 | use_a1pms_dmaap_https |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 92 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 93 | use_a1pms_rest_https |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 94 | fi |
| 95 | |
| 96 | OSC_NUM_RICS=1 |
| 97 | STD_NUM_RICS=1 |
| 98 | |
| 99 | start_ric_simulators $RIC_SIM_PREFIX"_g1" $OSC_NUM_RICS OSC_2.1.0 |
| 100 | |
| 101 | start_ric_simulators $RIC_SIM_PREFIX"_g2" $STD_NUM_RICS STD_1.1.3 |
| 102 | |
| 103 | start_ric_simulators $RIC_SIM_PREFIX"_g3" $STD_NUM_RICS STD_2.0.0 |
| 104 | |
BjornMagnussonXA | 7d7cb5f | 2023-04-11 10:32:56 +0200 | [diff] [blame] | 105 | if [[ "$A1PMS_FEATURE_LEVEL" == *"NO-DMAAP"* ]]; then |
| 106 | : |
| 107 | else |
| 108 | start_mr "$MR_READ_TOPIC" "/events" "users/policy-agent" \ |
| 109 | "$MR_WRITE_TOPIC" "/events" "users/mr-stub" |
| 110 | fi |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 111 | |
| 112 | start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE |
| 113 | |
| 114 | if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then |
| 115 | start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE |
| 116 | fi |
| 117 | |
BjornMagnussonXA | f83c362 | 2023-02-28 10:05:51 +0100 | [diff] [blame] | 118 | |
BjornMagnussonXA | f81090f | 2022-08-24 09:17:44 +0200 | [diff] [blame] | 119 | |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 120 | if [[ $interface = *"SDNC"* ]]; then |
| 121 | start_sdnc |
BjornMagnussonXA | 7d7cb5f | 2023-04-11 10:32:56 +0200 | [diff] [blame] | 122 | controller_api_wait_for_status_ok 200 ricsim_g1_1 |
BjornMagnussonXA | f83c362 | 2023-02-28 10:05:51 +0100 | [diff] [blame] | 123 | prepare_a1pms_config SDNC ".a1pms_config.json" |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 124 | else |
BjornMagnussonXA | f83c362 | 2023-02-28 10:05:51 +0100 | [diff] [blame] | 125 | prepare_a1pms_config NOSDNC ".a1pms_config.json" |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 126 | fi |
| 127 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 128 | start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 129 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 130 | set_a1pms_trace |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 131 | |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 132 | if [ $RUNMODE == "KUBE" ]; then |
BjornMagnussonXA | f83c362 | 2023-02-28 10:05:51 +0100 | [diff] [blame] | 133 | a1pms_load_config ".a1pms_config.json" |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 134 | else |
BjornMagnussonXA | d54225b | 2023-04-19 14:03:49 +0200 | [diff] [blame] | 135 | #Temporary switch to http/https if dmaap use. Otherwise it is not possible to push config |
BjornMagnussonXA | f83c362 | 2023-02-28 10:05:51 +0100 | [diff] [blame] | 136 | if [ $__httpx == "HTTPS" ]; then |
| 137 | use_a1pms_rest_https |
| 138 | else |
| 139 | use_a1pms_rest_http |
| 140 | fi |
| 141 | a1pms_api_put_configuration 200 ".a1pms_config.json" |
| 142 | if [ $__httpx == "HTTPS" ]; then |
| 143 | if [[ $interface = *"DMAAP"* ]]; then |
| 144 | use_a1pms_dmaap_https |
| 145 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 146 | use_a1pms_rest_https |
BjornMagnussonXA | f83c362 | 2023-02-28 10:05:51 +0100 | [diff] [blame] | 147 | fi |
| 148 | else |
| 149 | if [[ $interface = *"DMAAP"* ]]; then |
| 150 | use_a1pms_dmaap_http |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 151 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 152 | use_a1pms_rest_http |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 153 | fi |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 154 | fi |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 155 | fi |
| 156 | |
| 157 | # Check that all rics are synced in |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 158 | a1pms_equal json:rics 3 300 |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 159 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 160 | a1pms_api_get_status 200 |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 161 | |
| 162 | # Print the A1 version for OSC |
| 163 | for ((i=1; i<=$OSC_NUM_RICS; i++)) |
| 164 | do |
| 165 | sim_print $RIC_SIM_PREFIX"_g1_"$i interface |
| 166 | done |
| 167 | |
| 168 | |
| 169 | # Print the A1 version for STD 1.X |
| 170 | for ((i=1; i<=$STD_NUM_RICS; i++)) |
| 171 | do |
| 172 | sim_print $RIC_SIM_PREFIX"_g2_"$i interface |
| 173 | done |
| 174 | |
| 175 | # Print the A1 version for STD 2.X |
| 176 | for ((i=1; i<=$STD_NUM_RICS; i++)) |
| 177 | do |
| 178 | sim_print $RIC_SIM_PREFIX"_g3_"$i interface |
| 179 | done |
| 180 | |
| 181 | ################################################################# |
| 182 | ## REQ: Synchronize A1 Policy Information in RAN |
| 183 | ################################################################# |
| 184 | |
BjornMagnussonXA | d54225b | 2023-04-19 14:03:49 +0200 | [diff] [blame] | 185 | # Load the policytypes in osc |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 186 | for ((i=1; i<=$OSC_NUM_RICS; i++)) |
| 187 | do |
| 188 | sim_put_policy_type 201 $RIC_SIM_PREFIX"_g1_"$i 100 demo-testdata/OSC/sim_qos.json |
| 189 | sim_put_policy_type 201 $RIC_SIM_PREFIX"_g1_"$i 20008 demo-testdata/OSC/sim_tsa.json |
| 190 | done |
| 191 | |
| 192 | #Check the number of schemas and the individual schemas in OSC |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 193 | a1pms_equal json:policy-types 3 300 |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 194 | |
| 195 | for ((i=1; i<=$OSC_NUM_RICS; i++)) |
| 196 | do |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 197 | a1pms_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g1_"$i 2 120 |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 198 | done |
| 199 | |
| 200 | # Check the schemas in OSC |
| 201 | for ((i=1; i<=$OSC_NUM_RICS; i++)) |
| 202 | do |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 203 | a1pms_api_get_policy_type 200 100 demo-testdata/OSC/qos-a1pms-modified.json |
| 204 | a1pms_api_get_policy_type 200 20008 demo-testdata/OSC/tsa-a1pms-modified.json |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 205 | done |
| 206 | |
| 207 | |
BjornMagnussonXA | d54225b | 2023-04-19 14:03:49 +0200 | [diff] [blame] | 208 | # Load the policytypes in std |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 209 | for ((i=1; i<=$STD_NUM_RICS; i++)) |
| 210 | do |
| 211 | sim_put_policy_type 201 $RIC_SIM_PREFIX"_g3_"$i STD_QOS_0_2_0 demo-testdata/STD2/sim_qos.json |
| 212 | sim_put_policy_type 201 $RIC_SIM_PREFIX"_g3_"$i STD_QOS2_0.1.0 demo-testdata/STD2/sim_qos2.json |
| 213 | done |
| 214 | |
| 215 | #Check the number of schemas and the individual schemas in STD |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 216 | a1pms_equal json:policy-types 5 120 |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 217 | |
| 218 | for ((i=1; i<=$STD_NUM_RICS; i++)) |
| 219 | do |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 220 | a1pms_equal json:policy-types?ric_id=$RIC_SIM_PREFIX"_g3_"$i 2 120 |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 221 | done |
| 222 | |
| 223 | # Check the schemas in STD |
| 224 | for ((i=1; i<=$STD_NUM_RICS; i++)) |
| 225 | do |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 226 | a1pms_api_get_policy_type 200 STD_QOS_0_2_0 demo-testdata/STD2/qos-a1pms-modified.json |
| 227 | a1pms_api_get_policy_type 200 'STD_QOS2_0.1.0' demo-testdata/STD2/qos2-a1pms-modified.json |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 228 | done |
| 229 | |
| 230 | #Check the number of types |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 231 | a1pms_equal json:policy-types 5 120 |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 232 | |
| 233 | ################################################################# |
| 234 | ## REQ: A1 Policy Type / Instance Operations |
| 235 | ################################################################# |
| 236 | |
| 237 | # Create policies |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 238 | use_a1pms_rest_http |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 239 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 240 | a1pms_api_put_service 201 "Emergency-response-app" 0 "$CR_SERVICE_APP_PATH_0/1" |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 241 | |
| 242 | # Create policies in OSC |
| 243 | for ((i=1; i<=$OSC_NUM_RICS; i++)) |
| 244 | do |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 245 | a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 100 $((3000+$i)) NOTRANSIENT $notificationurl demo-testdata/OSC/piqos_template.json 1 |
| 246 | a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g1_"$i 20008 $((4000+$i)) NOTRANSIENT $notificationurl demo-testdata/OSC/pitsa_template.json 1 |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 247 | done |
| 248 | |
| 249 | |
| 250 | # Check the number of policies in OSC |
| 251 | for ((i=1; i<=$OSC_NUM_RICS; i++)) |
| 252 | do |
| 253 | sim_equal $RIC_SIM_PREFIX"_g1_"$i num_instances 2 |
| 254 | done |
| 255 | |
| 256 | |
| 257 | # Create policies in STD |
| 258 | for ((i=1; i<=$STD_NUM_RICS; i++)) |
| 259 | do |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 260 | a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g2_"$i NOTYPE $((2100+$i)) NOTRANSIENT $notificationurl demo-testdata/STD/pi1_template.json 1 |
| 261 | a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i STD_QOS_0_2_0 $((2300+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 |
| 262 | a1pms_api_put_policy 201 "Emergency-response-app" $RIC_SIM_PREFIX"_g3_"$i 'STD_QOS2_0.1.0' $((2400+$i)) NOTRANSIENT $notificationurl demo-testdata/STD2/pi1_template.json 1 |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 263 | done |
| 264 | |
| 265 | |
| 266 | # Check the number of policies in STD |
| 267 | for ((i=1; i<=$STD_NUM_RICS; i++)) |
| 268 | do |
| 269 | sim_equal $RIC_SIM_PREFIX"_g2_"$i num_instances 1 |
| 270 | sim_equal $RIC_SIM_PREFIX"_g3_"$i num_instances 2 |
| 271 | done |
| 272 | |
| 273 | ################################################################# |
| 274 | ## REQ: A1 Policy Instance Status Operations |
| 275 | ################################################################# |
| 276 | |
| 277 | # Check status STD |
| 278 | for ((i=1; i<=$STD_NUM_RICS; i++)) |
| 279 | do |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 280 | a1pms_api_get_policy_status 200 $((2100+$i)) STD "UNDEFINED" |
| 281 | a1pms_api_get_policy_status 200 $((2300+$i)) STD2 EMPTY EMPTY |
| 282 | a1pms_api_get_policy_status 200 $((2400+$i)) STD2 EMPTY EMPTY |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 283 | done |
| 284 | |
| 285 | # Check status OSC |
raviteja.karumuri | 2c6c06e | 2024-05-27 10:58:44 +0100 | [diff] [blame] | 286 | if [[ $TEST_ENV_PROFILE =~ ^ORAN-[A-H] ]] || [[ $TEST_ENV_PROFILE =~ ^ONAP-[A-L] ]]; then |
| 287 | VAL='NOT IN EFFECT' |
| 288 | VAL2="false" |
| 289 | else |
| 290 | VAL='NOT_ENFORCED' |
| 291 | VAL2="OTHER_REASON" |
| 292 | fi |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 293 | for ((i=1; i<=$OSC_NUM_RICS; i++)) |
| 294 | do |
raviteja.karumuri | 2c6c06e | 2024-05-27 10:58:44 +0100 | [diff] [blame] | 295 | a1pms_api_get_policy_status 200 $((3000+$i)) OSC "$VAL" "$VAL2" |
| 296 | a1pms_api_get_policy_status 200 $((4000+$i)) OSC "$VAL" "$VAL2" |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 297 | done |
| 298 | |
| 299 | # Note: Status callback is not tested since this callback (http POST) is made from the |
| 300 | # ricsim directly to the receiver of the status, i.e. the status does NOT |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 301 | # pass through A1PMS |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 302 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 303 | check_a1pms_logs |
BjornMagnussonXA | bb64828 | 2021-03-19 09:12:42 +0100 | [diff] [blame] | 304 | |
| 305 | if [[ $interface = *"SDNC"* ]]; then |
| 306 | check_sdnc_logs |
| 307 | fi |
| 308 | |
| 309 | #### TEST COMPLETE #### |
| 310 | |
| 311 | store_logs "https__${interface}" |
| 312 | |
| 313 | done |
| 314 | |
| 315 | print_result |
| 316 | |
| 317 | auto_clean_environment |