BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 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 |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 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================================================= |
| 18 | # |
| 19 | |
| 20 | TC_ONELINE_DESCR="Change supported policy types and reconfigure rics" |
| 21 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 22 | #App names to include in the test when running docker, space separated list |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 23 | DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM SDNC KUBEPROXY" |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 24 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 25 | #App names to include in the test when running kubernetes, space separated list |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 26 | KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC KUBEPROXY" |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 27 | #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list |
| 28 | KUBE_PRESTARTED_IMAGES="" |
| 29 | |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 30 | #Ignore image in DOCKER_INCLUDED_IMAGES, KUBE_INCLUDED_IMAGES if |
| 31 | #the image is not configured in the supplied env_file |
| 32 | #Used for images not applicable to all supported profile |
| 33 | CONDITIONALLY_IGNORED_IMAGES="CBS CONSUL" |
| 34 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 35 | #Supported test environment profiles |
BjornMagnussonXA | e60d04e | 2021-12-27 13:38:01 +0100 | [diff] [blame] | 36 | SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE" |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 37 | #Supported run modes |
| 38 | SUPPORTED_RUNMODES="DOCKER KUBE" |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 39 | |
BjornMagnussonXA | 79e3700 | 2021-11-22 13:36:04 +0100 | [diff] [blame] | 40 | . ../common/testcase_common.sh $@ |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 41 | |
| 42 | setup_testenvironment |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 43 | |
| 44 | #### TEST BEGIN #### |
| 45 | |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 46 | generate_policy_uuid |
BjornMagnussonXA | ad04778 | 2020-06-08 15:54:11 +0200 | [diff] [blame] | 47 | |
BjornMagnussonXA | 496156d | 2020-08-10 14:16:24 +0200 | [diff] [blame] | 48 | use_cr_http |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 49 | |
| 50 | NUM_RICS=10 |
| 51 | NUM_RICS_2=$(($NUM_RICS-2)) |
| 52 | |
| 53 | # Tested variants of REST/SDNC config |
| 54 | TESTED_VARIANTS="REST REST+SDNC" |
| 55 | |
| 56 | for interface in $TESTED_VARIANTS ; do |
| 57 | |
| 58 | echo "#####################################################################" |
| 59 | echo "#####################################################################" |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 60 | echo "### Testing a1pms: "$interface |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 61 | echo "#####################################################################" |
| 62 | echo "#####################################################################" |
| 63 | |
| 64 | |
| 65 | # Clean container and start all needed containers # |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 66 | clean_environment |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 67 | |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame] | 68 | start_kube_proxy |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 69 | |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 70 | #Start simulators and prepare two configs |
| 71 | |
| 72 | start_ric_simulators ricsim_g1 $NUM_RICS_2 OSC_2.1.0 |
| 73 | |
BjornMagnussonXA | 79e3700 | 2021-11-22 13:36:04 +0100 | [diff] [blame] | 74 | start_cr 1 |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 75 | |
| 76 | start_mr |
| 77 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 78 | if [ $RUNMODE == "DOCKER" ]; then |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 79 | if [[ "$A1PMS_FEATURE_LEVEL" != *"NOCONSUL"* ]]; then |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 80 | start_consul_cbs |
| 81 | fi |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 82 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 83 | |
BjornMagnussonXA | f81090f | 2022-08-24 09:17:44 +0200 | [diff] [blame] | 84 | __CONFIG_HEADER="NOHEADER" |
| 85 | if [ $RUNMODE == "KUBE" ]; then |
| 86 | __CONFIG_HEADER="HEADER" |
| 87 | else |
| 88 | if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then |
| 89 | __CONFIG_HEADER="HEADER" |
| 90 | fi |
| 91 | fi |
| 92 | |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 93 | # Create first config |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 94 | if [[ $interface = *"SDNC"* ]]; then |
| 95 | start_sdnc |
BjornMagnussonXA | f81090f | 2022-08-24 09:17:44 +0200 | [diff] [blame] | 96 | prepare_consul_config SDNC ".consul_config_initial.json" $__CONFIG_HEADER |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 97 | else |
BjornMagnussonXA | f81090f | 2022-08-24 09:17:44 +0200 | [diff] [blame] | 98 | prepare_consul_config NOSDNC ".consul_config_initial.json" $__CONFIG_HEADER |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 99 | fi |
| 100 | |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 101 | # Create 2nd config and save for later |
| 102 | start_ric_simulators ricsim_g1 $NUM_RICS OSC_2.1.0 |
| 103 | |
| 104 | if [[ $interface = *"SDNC"* ]]; then |
BjornMagnussonXA | f81090f | 2022-08-24 09:17:44 +0200 | [diff] [blame] | 105 | prepare_consul_config SDNC ".consul_config_all.json" $__CONFIG_HEADER |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 106 | else |
BjornMagnussonXA | f81090f | 2022-08-24 09:17:44 +0200 | [diff] [blame] | 107 | prepare_consul_config NOSDNC ".consul_config_all.json" $__CONFIG_HEADER |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 108 | fi |
| 109 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 110 | if [ $RUNMODE == "KUBE" ] && [[ "$A1PMS_FEATURE_LEVEL" == *"INITIALCONFIGMAP"* ]]; then |
| 111 | start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/application2.yaml |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 112 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 113 | start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 114 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 115 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 116 | set_a1pms_trace |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 117 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 118 | a1pms_api_get_status 200 |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 119 | |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 120 | # Create service to be able to receive events when rics becomes available |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 121 | # Must use rest towards the a1pms since dmaap is not configured yet |
| 122 | a1pms_api_put_service 201 "ric-registration" 0 "$CR_SERVICE_APP_PATH_0/ric-registration" |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 123 | |
| 124 | #Load first config |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 125 | if [ $RUNMODE == "KUBE" ]; then |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 126 | if [[ "$A1PMS_FEATURE_LEVEL" == *"INITIALCONFIGMAP"* ]]; then |
| 127 | a1pms_api_put_configuration 200 ".consul_config_initial.json" |
| 128 | a1pms_api_get_configuration 200 ".consul_config_initial.json" |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 129 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 130 | a1pms_load_config ".consul_config_initial.json" |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 131 | fi |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 132 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 133 | if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then |
| 134 | a1pms_api_put_configuration 200 ".consul_config_initial.json" |
| 135 | a1pms_api_get_configuration 200 ".consul_config_initial.json" |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 136 | else |
| 137 | consul_config_app ".consul_config_initial.json" |
| 138 | fi |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 139 | fi |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 140 | |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 141 | for ((i=1; i<=${NUM_RICS}; i++)) |
| 142 | do |
| 143 | sim_print ricsim_g1_$i interface |
| 144 | done |
| 145 | |
| 146 | # All sims running but 2 are not configured in consul |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 147 | a1pms_equal json:rics 8 300 |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 148 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 149 | if [ "$A1PMS_VERSION" == "V2" ]; then |
BjornMagnussonXA | 79e3700 | 2021-11-22 13:36:04 +0100 | [diff] [blame] | 150 | cr_equal 0 received_callbacks?id=ric-registration 8 120 |
| 151 | cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_1 ricsim_g1_2 ricsim_g1_3 ricsim_g1_4 ricsim_g1_5 ricsim_g1_6 ricsim_g1_7 ricsim_g1_8 |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 152 | fi |
| 153 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 154 | a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:NOTYPE:???? \ |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 155 | ricsim_g1_2:me1_ricsim_g1_2,me2_ricsim_g1_2:NOTYPE:???? \ |
| 156 | ricsim_g1_3:me1_ricsim_g1_3,me2_ricsim_g1_3:NOTYPE:???? \ |
| 157 | ricsim_g1_4:me1_ricsim_g1_4,me2_ricsim_g1_4:NOTYPE:???? \ |
| 158 | ricsim_g1_5:me1_ricsim_g1_5,me2_ricsim_g1_5:NOTYPE:???? \ |
| 159 | ricsim_g1_6:me1_ricsim_g1_6,me2_ricsim_g1_6:NOTYPE:???? \ |
| 160 | ricsim_g1_7:me1_ricsim_g1_7,me2_ricsim_g1_7:NOTYPE:???? \ |
| 161 | ricsim_g1_8:me1_ricsim_g1_8,me2_ricsim_g1_8:NOTYPE:???? " |
| 162 | |
| 163 | |
| 164 | sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json |
| 165 | sim_put_policy_type 201 ricsim_g1_2 1 testdata/OSC/sim_1.json |
| 166 | sim_put_policy_type 201 ricsim_g1_3 1 testdata/OSC/sim_1.json |
| 167 | sim_put_policy_type 201 ricsim_g1_4 1 testdata/OSC/sim_1.json |
| 168 | sim_put_policy_type 201 ricsim_g1_5 1 testdata/OSC/sim_1.json |
| 169 | |
| 170 | sim_put_policy_type 201 ricsim_g1_2 2 testdata/OSC/sim_2.json |
| 171 | sim_put_policy_type 201 ricsim_g1_3 2 testdata/OSC/sim_2.json |
| 172 | sim_put_policy_type 201 ricsim_g1_4 2 testdata/OSC/sim_2.json |
| 173 | sim_put_policy_type 201 ricsim_g1_5 2 testdata/OSC/sim_2.json |
| 174 | sim_put_policy_type 201 ricsim_g1_6 2 testdata/OSC/sim_2.json |
| 175 | |
| 176 | sim_put_policy_type 201 ricsim_g1_3 3 testdata/OSC/sim_3.json |
| 177 | sim_put_policy_type 201 ricsim_g1_4 3 testdata/OSC/sim_3.json |
| 178 | sim_put_policy_type 201 ricsim_g1_5 3 testdata/OSC/sim_3.json |
| 179 | sim_put_policy_type 201 ricsim_g1_6 3 testdata/OSC/sim_3.json |
| 180 | sim_put_policy_type 201 ricsim_g1_7 3 testdata/OSC/sim_3.json |
| 181 | |
| 182 | sim_put_policy_type 201 ricsim_g1_4 4 testdata/OSC/sim_4.json |
| 183 | sim_put_policy_type 201 ricsim_g1_5 4 testdata/OSC/sim_4.json |
| 184 | sim_put_policy_type 201 ricsim_g1_6 4 testdata/OSC/sim_4.json |
| 185 | sim_put_policy_type 201 ricsim_g1_7 4 testdata/OSC/sim_4.json |
| 186 | sim_put_policy_type 201 ricsim_g1_8 4 testdata/OSC/sim_4.json |
| 187 | |
| 188 | sim_put_policy_type 201 ricsim_g1_5 5 testdata/OSC/sim_5.json |
| 189 | sim_put_policy_type 201 ricsim_g1_6 5 testdata/OSC/sim_5.json |
| 190 | sim_put_policy_type 201 ricsim_g1_7 5 testdata/OSC/sim_5.json |
| 191 | sim_put_policy_type 201 ricsim_g1_8 5 testdata/OSC/sim_5.json |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 192 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 193 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 194 | a1pms_equal json:policy-types 5 120 |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 195 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 196 | echo "Check the number of types in the a1pms for each ric" |
| 197 | a1pms_equal json:policy-types?ric_id=ricsim_g1_1 1 120 |
| 198 | a1pms_equal json:policy-types?ric_id=ricsim_g1_2 2 120 |
| 199 | a1pms_equal json:policy-types?ric_id=ricsim_g1_3 3 120 |
| 200 | a1pms_equal json:policy-types?ric_id=ricsim_g1_4 4 120 |
| 201 | a1pms_equal json:policy-types?ric_id=ricsim_g1_5 5 120 |
| 202 | a1pms_equal json:policy-types?ric_id=ricsim_g1_6 4 120 |
| 203 | a1pms_equal json:policy-types?ric_id=ricsim_g1_7 3 120 |
| 204 | a1pms_equal json:policy-types?ric_id=ricsim_g1_8 2 120 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 205 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 206 | a1pms_equal json:policy_types 5 120 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 207 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 208 | echo "Check the number of types in the a1pms for each ric" |
| 209 | a1pms_equal json:policy_types?ric=ricsim_g1_1 1 120 |
| 210 | a1pms_equal json:policy_types?ric=ricsim_g1_2 2 120 |
| 211 | a1pms_equal json:policy_types?ric=ricsim_g1_3 3 120 |
| 212 | a1pms_equal json:policy_types?ric=ricsim_g1_4 4 120 |
| 213 | a1pms_equal json:policy_types?ric=ricsim_g1_5 5 120 |
| 214 | a1pms_equal json:policy_types?ric=ricsim_g1_6 4 120 |
| 215 | a1pms_equal json:policy_types?ric=ricsim_g1_7 3 120 |
| 216 | a1pms_equal json:policy_types?ric=ricsim_g1_8 2 120 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 217 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 218 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 219 | a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 220 | ricsim_g1_2:me1_ricsim_g1_2,me2_ricsim_g1_2:1,2:???? \ |
| 221 | ricsim_g1_3:me1_ricsim_g1_3,me2_ricsim_g1_3:1,2,3:???? \ |
| 222 | ricsim_g1_4:me1_ricsim_g1_4,me2_ricsim_g1_4:1,2,3,4:???? \ |
| 223 | ricsim_g1_5:me1_ricsim_g1_5,me2_ricsim_g1_5:1,2,3,4,5:???? \ |
| 224 | ricsim_g1_6:me1_ricsim_g1_6,me2_ricsim_g1_6:2,3,4,5:???? \ |
| 225 | ricsim_g1_7:me1_ricsim_g1_7,me2_ricsim_g1_7:3,4,5:???? \ |
| 226 | ricsim_g1_8:me1_ricsim_g1_8,me2_ricsim_g1_8:4,5:???? " |
| 227 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 228 | if [ "$A1PMS_VERSION" == "V2" ]; then |
BjornMagnussonXA | 79e3700 | 2021-11-22 13:36:04 +0100 | [diff] [blame] | 229 | cr_equal 0 received_callbacks?id=ric-registration 16 120 |
| 230 | cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_1 ricsim_g1_2 ricsim_g1_3 ricsim_g1_4 ricsim_g1_5 ricsim_g1_6 ricsim_g1_7 ricsim_g1_8 |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 231 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 232 | |
| 233 | #Load config with all rics |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 234 | if [ $RUNMODE == "KUBE" ]; then |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 235 | if [[ "$A1PMS_FEATURE_LEVEL" == *"INITIALCONFIGMAP"* ]]; then |
| 236 | a1pms_api_put_configuration 200 ".consul_config_all.json" |
| 237 | a1pms_api_get_configuration 200 ".consul_config_all.json" |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 238 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 239 | a1pms_load_config ".consul_config_all.json" |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 240 | fi |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 241 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 242 | if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then |
| 243 | a1pms_api_put_configuration 200 ".consul_config_all.json" |
| 244 | a1pms_api_get_configuration 200 ".consul_config_all.json" |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 245 | else |
| 246 | consul_config_app ".consul_config_all.json" |
| 247 | fi |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 248 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 249 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 250 | a1pms_equal json:rics 10 120 |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 251 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 252 | if [ "$A1PMS_VERSION" == "V2" ]; then |
BjornMagnussonXA | 79e3700 | 2021-11-22 13:36:04 +0100 | [diff] [blame] | 253 | cr_equal 0 received_callbacks?id=ric-registration 18 120 |
| 254 | cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_9 ricsim_g1_10 |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 255 | fi |
| 256 | |
| 257 | sim_put_policy_type 201 ricsim_g1_9 5 testdata/OSC/sim_5.json |
| 258 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 259 | if [ "$A1PMS_VERSION" == "V2" ]; then |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 260 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 261 | a1pms_equal json:policy-types 5 120 |
BjornMagnussonXA | fec823b | 2021-08-03 14:14:05 +0200 | [diff] [blame] | 262 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 263 | echo "Check the number of types in the a1pms for each ric" |
| 264 | a1pms_equal json:policy-types?ric_id=ricsim_g1_1 1 120 |
| 265 | a1pms_equal json:policy-types?ric_id=ricsim_g1_2 2 120 |
| 266 | a1pms_equal json:policy-types?ric_id=ricsim_g1_3 3 120 |
| 267 | a1pms_equal json:policy-types?ric_id=ricsim_g1_4 4 120 |
| 268 | a1pms_equal json:policy-types?ric_id=ricsim_g1_5 5 120 |
| 269 | a1pms_equal json:policy-types?ric_id=ricsim_g1_6 4 120 |
| 270 | a1pms_equal json:policy-types?ric_id=ricsim_g1_7 3 120 |
| 271 | a1pms_equal json:policy-types?ric_id=ricsim_g1_8 2 120 |
| 272 | a1pms_equal json:policy-types?ric_id=ricsim_g1_9 1 120 |
| 273 | a1pms_equal json:policy-types?ric_id=ricsim_g1_10 0 120 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 274 | else |
| 275 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 276 | a1pms_equal json:policy_types 5 120 |
BjornMagnussonXA | fec823b | 2021-08-03 14:14:05 +0200 | [diff] [blame] | 277 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 278 | echo "Check the number of types in the a1pms for each ric" |
| 279 | a1pms_equal json:policy_types?ric=ricsim_g1_1 1 120 |
| 280 | a1pms_equal json:policy_types?ric=ricsim_g1_2 2 120 |
| 281 | a1pms_equal json:policy_types?ric=ricsim_g1_3 3 120 |
| 282 | a1pms_equal json:policy_types?ric=ricsim_g1_4 4 120 |
| 283 | a1pms_equal json:policy_types?ric=ricsim_g1_5 5 120 |
| 284 | a1pms_equal json:policy_types?ric=ricsim_g1_6 4 120 |
| 285 | a1pms_equal json:policy_types?ric=ricsim_g1_7 3 120 |
| 286 | a1pms_equal json:policy_types?ric=ricsim_g1_8 2 120 |
| 287 | a1pms_equal json:policy_types?ric=ricsim_g1_9 1 120 |
| 288 | a1pms_equal json:policy_types?ric=ricsim_g1_10 0 120 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 289 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 290 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 291 | a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 292 | ricsim_g1_2:me1_ricsim_g1_2,me2_ricsim_g1_2:1,2:???? \ |
| 293 | ricsim_g1_3:me1_ricsim_g1_3,me2_ricsim_g1_3:1,2,3:???? \ |
| 294 | ricsim_g1_4:me1_ricsim_g1_4,me2_ricsim_g1_4:1,2,3,4:???? \ |
| 295 | ricsim_g1_5:me1_ricsim_g1_5,me2_ricsim_g1_5:1,2,3,4,5:???? \ |
| 296 | ricsim_g1_6:me1_ricsim_g1_6,me2_ricsim_g1_6:2,3,4,5:???? \ |
| 297 | ricsim_g1_7:me1_ricsim_g1_7,me2_ricsim_g1_7:3,4,5:???? \ |
| 298 | ricsim_g1_8:me1_ricsim_g1_8,me2_ricsim_g1_8:4,5:???? \ |
| 299 | ricsim_g1_9:me1_ricsim_g1_9,me2_ricsim_g1_9:5:???? \ |
| 300 | ricsim_g1_10:me1_ricsim_g1_10,me2_ricsim_g1_10:NOTYPE:???? " |
| 301 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 302 | if [ "$A1PMS_VERSION" == "V2" ]; then |
BjornMagnussonXA | 79e3700 | 2021-11-22 13:36:04 +0100 | [diff] [blame] | 303 | cr_equal 0 received_callbacks?id=ric-registration 19 120 |
| 304 | cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_9 |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 305 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 306 | |
| 307 | #No policy type in sim #10 |
| 308 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 309 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 310 | a1pms_equal json:policy-types 5 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 311 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 312 | a1pms_equal json:policy_types 5 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 313 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 314 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 315 | a1pms_api_put_service 201 "serv1" 3600 "$CR_SERVICE_APP_PATH_0/serv1" |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 316 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 317 | if [ "$A1PMS_VERSION" == "V2" ]; then |
BjornMagnussonXA | 79e3700 | 2021-11-22 13:36:04 +0100 | [diff] [blame] | 318 | notificationurl=$CR_SERVICE_APP_PATH_0"/test" |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 319 | else |
| 320 | notificationurl="" |
| 321 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 322 | |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 323 | sleep_wait 120 |
| 324 | |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 325 | # Load config with reduced number of rics |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 326 | if [ $RUNMODE == "KUBE" ]; then |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 327 | if [[ "$A1PMS_FEATURE_LEVEL" == *"INITIALCONFIGMAP"* ]]; then |
| 328 | a1pms_api_put_configuration 200 ".consul_config_initial.json" |
| 329 | a1pms_api_get_configuration 200 ".consul_config_initial.json" |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 330 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 331 | a1pms_load_config ".consul_config_initial.json" |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 332 | fi |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 333 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 334 | if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then |
| 335 | a1pms_api_put_configuration 200 ".consul_config_initial.json" |
| 336 | a1pms_api_get_configuration 200 ".consul_config_initial.json" |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 337 | else |
| 338 | consul_config_app ".consul_config_initial.json" |
| 339 | fi |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 340 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 341 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 342 | a1pms_equal json:rics 8 120 |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 343 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 344 | if [ "$A1PMS_VERSION" == "V2" ]; then |
BjornMagnussonXA | 79e3700 | 2021-11-22 13:36:04 +0100 | [diff] [blame] | 345 | cr_equal 0 received_callbacks?id=ric-registration 19 120 |
| 346 | cr_api_check_all_sync_events 200 0 ric-registration EMPTY |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 347 | fi |
| 348 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 349 | if [ "$A1PMS_VERSION" == "V2" ]; then |
BjornMagnussonXA | fec823b | 2021-08-03 14:14:05 +0200 | [diff] [blame] | 350 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 351 | a1pms_equal json:policy-types 5 120 |
BjornMagnussonXA | fec823b | 2021-08-03 14:14:05 +0200 | [diff] [blame] | 352 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 353 | echo "Check the number of types in the a1pms for each ric" |
| 354 | a1pms_equal json:policy-types?ric_id=ricsim_g1_1 1 120 |
| 355 | a1pms_equal json:policy-types?ric_id=ricsim_g1_2 2 120 |
| 356 | a1pms_equal json:policy-types?ric_id=ricsim_g1_3 3 120 |
| 357 | a1pms_equal json:policy-types?ric_id=ricsim_g1_4 4 120 |
| 358 | a1pms_equal json:policy-types?ric_id=ricsim_g1_5 5 120 |
| 359 | a1pms_equal json:policy-types?ric_id=ricsim_g1_6 4 120 |
| 360 | a1pms_equal json:policy-types?ric_id=ricsim_g1_7 3 120 |
| 361 | a1pms_equal json:policy-types?ric_id=ricsim_g1_8 2 120 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 362 | else |
BjornMagnussonXA | fec823b | 2021-08-03 14:14:05 +0200 | [diff] [blame] | 363 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 364 | a1pms_equal json:policy_types 5 120 |
BjornMagnussonXA | fec823b | 2021-08-03 14:14:05 +0200 | [diff] [blame] | 365 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 366 | echo "Check the number of types in the a1pms for each ric" |
| 367 | a1pms_equal json:policy_types?ric=ricsim_g1_1 1 120 |
| 368 | a1pms_equal json:policy_types?ric=ricsim_g1_2 2 120 |
| 369 | a1pms_equal json:policy_types?ric=ricsim_g1_3 3 120 |
| 370 | a1pms_equal json:policy_types?ric=ricsim_g1_4 4 120 |
| 371 | a1pms_equal json:policy_types?ric=ricsim_g1_5 5 120 |
| 372 | a1pms_equal json:policy_types?ric=ricsim_g1_6 4 120 |
| 373 | a1pms_equal json:policy_types?ric=ricsim_g1_7 3 120 |
| 374 | a1pms_equal json:policy_types?ric=ricsim_g1_8 2 120 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 375 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 376 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 377 | a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 378 | ricsim_g1_2:me1_ricsim_g1_2,me2_ricsim_g1_2:1,2:???? \ |
| 379 | ricsim_g1_3:me1_ricsim_g1_3,me2_ricsim_g1_3:1,2,3:???? \ |
| 380 | ricsim_g1_4:me1_ricsim_g1_4,me2_ricsim_g1_4:1,2,3,4:???? \ |
| 381 | ricsim_g1_5:me1_ricsim_g1_5,me2_ricsim_g1_5:1,2,3,4,5:???? \ |
| 382 | ricsim_g1_6:me1_ricsim_g1_6,me2_ricsim_g1_6:2,3,4,5:???? \ |
| 383 | ricsim_g1_7:me1_ricsim_g1_7,me2_ricsim_g1_7:3,4,5:???? \ |
| 384 | ricsim_g1_8:me1_ricsim_g1_8,me2_ricsim_g1_8:4,5:???? " |
| 385 | |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 386 | sleep_wait 120 |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 387 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 388 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 389 | a1pms_equal json:policy-instances 0 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 390 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 391 | a1pms_equal json:policy_ids 0 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 392 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 393 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 394 | a1pms_api_get_policy_types 404 ricsim_g1_9 |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 395 | |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 396 | # Load config with all rics |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 397 | if [ $RUNMODE == "KUBE" ]; then |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 398 | if [[ "$A1PMS_FEATURE_LEVEL" == *"INITIALCONFIGMAP"* ]]; then |
| 399 | a1pms_api_put_configuration 200 ".consul_config_all.json" |
| 400 | a1pms_api_get_configuration 200 ".consul_config_all.json" |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 401 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 402 | a1pms_load_config ".consul_config_all.json" |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 403 | fi |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 404 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 405 | if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then |
| 406 | a1pms_api_put_configuration 200 ".consul_config_all.json" |
| 407 | a1pms_api_get_configuration 200 ".consul_config_all.json" |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 408 | else |
| 409 | consul_config_app ".consul_config_all.json" |
| 410 | fi |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 411 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 412 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 413 | a1pms_equal json:rics 10 120 |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 414 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 415 | if [ "$A1PMS_VERSION" == "V2" ]; then |
BjornMagnussonXA | fec823b | 2021-08-03 14:14:05 +0200 | [diff] [blame] | 416 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 417 | a1pms_equal json:policy-types 5 120 |
BjornMagnussonXA | fec823b | 2021-08-03 14:14:05 +0200 | [diff] [blame] | 418 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 419 | echo "Check the number of types in the a1pms for each ric" |
| 420 | a1pms_equal json:policy-types?ric_id=ricsim_g1_1 1 120 |
| 421 | a1pms_equal json:policy-types?ric_id=ricsim_g1_2 2 120 |
| 422 | a1pms_equal json:policy-types?ric_id=ricsim_g1_3 3 120 |
| 423 | a1pms_equal json:policy-types?ric_id=ricsim_g1_4 4 120 |
| 424 | a1pms_equal json:policy-types?ric_id=ricsim_g1_5 5 120 |
| 425 | a1pms_equal json:policy-types?ric_id=ricsim_g1_6 4 120 |
| 426 | a1pms_equal json:policy-types?ric_id=ricsim_g1_7 3 120 |
| 427 | a1pms_equal json:policy-types?ric_id=ricsim_g1_8 2 120 |
| 428 | a1pms_equal json:policy-types?ric_id=ricsim_g1_9 1 120 |
| 429 | a1pms_equal json:policy-types?ric_id=ricsim_g1_10 0 120 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 430 | else |
BjornMagnussonXA | fec823b | 2021-08-03 14:14:05 +0200 | [diff] [blame] | 431 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 432 | a1pms_equal json:policy_types 5 120 |
BjornMagnussonXA | fec823b | 2021-08-03 14:14:05 +0200 | [diff] [blame] | 433 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 434 | echo "Check the number of types in the a1pms for each ric" |
| 435 | a1pms_equal json:policy_types?ric=ricsim_g1_1 1 120 |
| 436 | a1pms_equal json:policy_types?ric=ricsim_g1_2 2 120 |
| 437 | a1pms_equal json:policy_types?ric=ricsim_g1_3 3 120 |
| 438 | a1pms_equal json:policy_types?ric=ricsim_g1_4 4 120 |
| 439 | a1pms_equal json:policy_types?ric=ricsim_g1_5 5 120 |
| 440 | a1pms_equal json:policy_types?ric=ricsim_g1_6 4 120 |
| 441 | a1pms_equal json:policy_types?ric=ricsim_g1_7 3 120 |
| 442 | a1pms_equal json:policy_types?ric=ricsim_g1_8 2 120 |
| 443 | a1pms_equal json:policy_types?ric=ricsim_g1_9 1 120 |
| 444 | a1pms_equal json:policy_types?ric=ricsim_g1_10 0 120 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 445 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 446 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 447 | a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 448 | ricsim_g1_2:me1_ricsim_g1_2,me2_ricsim_g1_2:1,2:???? \ |
| 449 | ricsim_g1_3:me1_ricsim_g1_3,me2_ricsim_g1_3:1,2,3:???? \ |
| 450 | ricsim_g1_4:me1_ricsim_g1_4,me2_ricsim_g1_4:1,2,3,4:???? \ |
| 451 | ricsim_g1_5:me1_ricsim_g1_5,me2_ricsim_g1_5:1,2,3,4,5:???? \ |
| 452 | ricsim_g1_6:me1_ricsim_g1_6,me2_ricsim_g1_6:2,3,4,5:???? \ |
| 453 | ricsim_g1_7:me1_ricsim_g1_7,me2_ricsim_g1_7:3,4,5:???? \ |
| 454 | ricsim_g1_8:me1_ricsim_g1_8,me2_ricsim_g1_8:4,5:???? \ |
| 455 | ricsim_g1_9:me1_ricsim_g1_9,me2_ricsim_g1_9:5:???? \ |
| 456 | ricsim_g1_10:me1_ricsim_g1_10,me2_ricsim_g1_10:NOTYPE:???? " |
| 457 | |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 458 | sleep_wait 120 |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 459 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 460 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 461 | a1pms_equal json:policy-instances 0 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 462 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 463 | a1pms_equal json:policy_ids 0 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 464 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 465 | |
| 466 | sim_equal ricsim_g1_9 num_instances 0 |
| 467 | |
| 468 | |
| 469 | sim_delete_policy_type 204 ricsim_g1_4 4 |
| 470 | sim_delete_policy_type 204 ricsim_g1_5 4 |
| 471 | sim_delete_policy_type 204 ricsim_g1_6 4 |
| 472 | sim_delete_policy_type 204 ricsim_g1_7 4 |
| 473 | |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 474 | sleep_wait 120 |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 475 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 476 | if [ "$A1PMS_VERSION" == "V2" ]; then |
BjornMagnussonXA | fec823b | 2021-08-03 14:14:05 +0200 | [diff] [blame] | 477 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 478 | a1pms_equal json:policy-types 5 120 |
BjornMagnussonXA | fec823b | 2021-08-03 14:14:05 +0200 | [diff] [blame] | 479 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 480 | a1pms_equal json:policy-types?ric_id=ricsim_g1_1 1 120 |
| 481 | a1pms_equal json:policy-types?ric_id=ricsim_g1_2 2 120 |
| 482 | a1pms_equal json:policy-types?ric_id=ricsim_g1_3 3 120 |
| 483 | a1pms_equal json:policy-types?ric_id=ricsim_g1_4 3 120 |
| 484 | a1pms_equal json:policy-types?ric_id=ricsim_g1_5 4 120 |
| 485 | a1pms_equal json:policy-types?ric_id=ricsim_g1_6 3 120 |
| 486 | a1pms_equal json:policy-types?ric_id=ricsim_g1_7 2 120 |
| 487 | a1pms_equal json:policy-types?ric_id=ricsim_g1_8 2 120 |
| 488 | a1pms_equal json:policy-types?ric_id=ricsim_g1_9 1 120 |
| 489 | a1pms_equal json:policy-types?ric_id=ricsim_g1_10 0 120 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 490 | else |
BjornMagnussonXA | fec823b | 2021-08-03 14:14:05 +0200 | [diff] [blame] | 491 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 492 | a1pms_equal json:policy_types 5 120 |
BjornMagnussonXA | fec823b | 2021-08-03 14:14:05 +0200 | [diff] [blame] | 493 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 494 | a1pms_equal json:policy_types?ric=ricsim_g1_1 1 120 |
| 495 | a1pms_equal json:policy_types?ric=ricsim_g1_2 2 120 |
| 496 | a1pms_equal json:policy_types?ric=ricsim_g1_3 3 120 |
| 497 | a1pms_equal json:policy_types?ric=ricsim_g1_4 3 120 |
| 498 | a1pms_equal json:policy_types?ric=ricsim_g1_5 4 120 |
| 499 | a1pms_equal json:policy_types?ric=ricsim_g1_6 3 120 |
| 500 | a1pms_equal json:policy_types?ric=ricsim_g1_7 2 120 |
| 501 | a1pms_equal json:policy_types?ric=ricsim_g1_8 2 120 |
| 502 | a1pms_equal json:policy_types?ric=ricsim_g1_9 1 120 |
| 503 | a1pms_equal json:policy_types?ric=ricsim_g1_10 0 120 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 504 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 505 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 506 | a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 507 | ricsim_g1_2:me1_ricsim_g1_2,me2_ricsim_g1_2:1,2:???? \ |
| 508 | ricsim_g1_3:me1_ricsim_g1_3,me2_ricsim_g1_3:1,2,3:???? \ |
| 509 | ricsim_g1_4:me1_ricsim_g1_4,me2_ricsim_g1_4:1,2,3:???? \ |
| 510 | ricsim_g1_5:me1_ricsim_g1_5,me2_ricsim_g1_5:1,2,3,5:???? \ |
| 511 | ricsim_g1_6:me1_ricsim_g1_6,me2_ricsim_g1_6:2,3,5:???? \ |
| 512 | ricsim_g1_7:me1_ricsim_g1_7,me2_ricsim_g1_7:3,5:???? \ |
| 513 | ricsim_g1_8:me1_ricsim_g1_8,me2_ricsim_g1_8:4,5:???? \ |
| 514 | ricsim_g1_9:me1_ricsim_g1_9,me2_ricsim_g1_9:5:???? \ |
| 515 | ricsim_g1_10:me1_ricsim_g1_10,me2_ricsim_g1_10:NOTYPE:???? " |
| 516 | |
| 517 | sim_delete_policy_type 204 ricsim_g1_8 4 |
| 518 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 519 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 520 | a1pms_equal json:policy-types 5 120 |
| 521 | a1pms_equal json:policy-types?ric_id=ricsim_g1_8 1 120 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 522 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 523 | a1pms_equal json:policy_types 5 120 |
| 524 | a1pms_equal json:policy_types?ric=ricsim_g1_8 1 120 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 525 | fi |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 526 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 527 | a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:???? \ |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 528 | ricsim_g1_2:me1_ricsim_g1_2,me2_ricsim_g1_2:1,2:???? \ |
| 529 | ricsim_g1_3:me1_ricsim_g1_3,me2_ricsim_g1_3:1,2,3:???? \ |
| 530 | ricsim_g1_4:me1_ricsim_g1_4,me2_ricsim_g1_4:1,2,3:???? \ |
| 531 | ricsim_g1_5:me1_ricsim_g1_5,me2_ricsim_g1_5:1,2,3,5:???? \ |
| 532 | ricsim_g1_6:me1_ricsim_g1_6,me2_ricsim_g1_6:2,3,5:???? \ |
| 533 | ricsim_g1_7:me1_ricsim_g1_7,me2_ricsim_g1_7:3,5:???? \ |
| 534 | ricsim_g1_8:me1_ricsim_g1_8,me2_ricsim_g1_8:5:???? \ |
| 535 | ricsim_g1_9:me1_ricsim_g1_9,me2_ricsim_g1_9:5:???? \ |
| 536 | ricsim_g1_10:me1_ricsim_g1_10,me2_ricsim_g1_10:NOTYPE:???? " |
| 537 | |
| 538 | |
| 539 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 540 | check_a1pms_logs |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 541 | if [[ $interface = *"SDNC"* ]]; then |
| 542 | check_sdnc_logs |
| 543 | fi |
| 544 | |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 545 | store_logs ${interface} |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 546 | |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 547 | done |
| 548 | |
| 549 | |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 550 | #### TEST COMPLETE #### |
| 551 | |
| 552 | |
| 553 | print_result |
| 554 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 555 | auto_clean_environment |