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