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