BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 1 | #!/bin/bash |
BjornMagnussonXA | 80a9200 | 2020-03-19 14:31:06 +0100 | [diff] [blame] | 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 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 21 | TC_ONELINE_DESCR="Full a1pms API walkthrough using a1pms REST/DMAAP and with/without SDNC A1 Controller" |
BjornMagnussonXA | 80a9200 | 2020-03-19 14:31:06 +0100 | [diff] [blame] | 22 | |
BjornMagnussonXA | cd93844 | 2022-05-11 10:01:24 +0200 | [diff] [blame^] | 23 | USE_ISTIO=1 |
| 24 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 25 | #App names to include in the test when running docker, space separated list |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 26 | DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM SDNC NGW KUBEPROXY" |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 27 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 28 | #App names to include in the test when running kubernetes, space separated list |
BjornMagnussonXA | cd93844 | 2022-05-11 10:01:24 +0200 | [diff] [blame^] | 29 | if [ $USE_ISTIO -eq 0 ]; then |
| 30 | KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC KUBEPROXY NGW" |
| 31 | else |
| 32 | KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM SDNC KUBEPROXY NGW KEYCLOAK ISTIO AUTHSIDECAR" |
| 33 | fi |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 34 | #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list |
| 35 | KUBE_PRESTARTED_IMAGES="" |
| 36 | |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 37 | #Ignore image in DOCKER_INCLUDED_IMAGES, KUBE_INCLUDED_IMAGES if |
| 38 | #the image is not configured in the supplied env_file |
| 39 | #Used for images not applicable to all supported profile |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 40 | CONDITIONALLY_IGNORED_IMAGES="CBS CONSUL NGW" |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 41 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 42 | #Supported test environment profiles |
BjornMagnussonXA | e60d04e | 2021-12-27 13:38:01 +0100 | [diff] [blame] | 43 | 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] | 44 | #Supported run modes |
| 45 | SUPPORTED_RUNMODES="DOCKER KUBE" |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 46 | |
BjornMagnussonXA | 79e3700 | 2021-11-22 13:36:04 +0100 | [diff] [blame] | 47 | . ../common/testcase_common.sh $@ |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 48 | |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 49 | setup_testenvironment |
BjornMagnussonXA | 80a9200 | 2020-03-19 14:31:06 +0100 | [diff] [blame] | 50 | |
| 51 | #### TEST BEGIN #### |
| 52 | |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 53 | generate_policy_uuid |
BjornMagnussonXA | ad04778 | 2020-06-08 15:54:11 +0200 | [diff] [blame] | 54 | |
BjornMagnussonXA | cd93844 | 2022-05-11 10:01:24 +0200 | [diff] [blame^] | 55 | if [ $USE_ISTIO -eq 0 ]; then |
| 56 | # Tested variants of REST/DMAAP/SDNC config |
| 57 | TESTED_VARIANTS="REST DMAAP REST+SDNC DMAAP+SDNC" |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 58 | |
BjornMagnussonXA | cd93844 | 2022-05-11 10:01:24 +0200 | [diff] [blame^] | 59 | #Test a1pms and simulator protocol versions (others are http only) |
| 60 | TESTED_PROTOCOLS="HTTP HTTPS" |
| 61 | else |
| 62 | if [ $USE_ISTIO -eq 1 ]; then |
| 63 | echo -e $RED"#########################################"$ERED |
| 64 | echo -e $RED"# No test of https when running with istio"$ERED |
| 65 | echo -e $RED"# No test of SDNC when running with istio"$ERED |
| 66 | echo -e $RED"#########################################"$ERED |
| 67 | fi |
| 68 | # Tested variants of REST/DMAAP/SDNC config |
| 69 | TESTED_VARIANTS="REST DMAAP" |
| 70 | |
| 71 | #Test a1pms and simulator protocol versions (others are http only) |
| 72 | TESTED_PROTOCOLS="HTTP" |
| 73 | fi |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 74 | |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 75 | for __httpx in $TESTED_PROTOCOLS ; do |
| 76 | for interface in $TESTED_VARIANTS ; do |
BjornMagnussonXA | 80a9200 | 2020-03-19 14:31:06 +0100 | [diff] [blame] | 77 | |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 78 | echo "#####################################################################" |
| 79 | echo "#####################################################################" |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 80 | echo "### Testing a1pms: $interface using $__httpx" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 81 | echo "#####################################################################" |
| 82 | echo "#####################################################################" |
BjornMagnussonXA | 80a9200 | 2020-03-19 14:31:06 +0100 | [diff] [blame] | 83 | |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 84 | # Clean container and start all needed containers # |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 85 | clean_environment |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 86 | |
BjornMagnussonXA | cd93844 | 2022-05-11 10:01:24 +0200 | [diff] [blame^] | 87 | if [ $RUNMODE != "KUBE" ]; then |
| 88 | USE_ISTIO=0 |
| 89 | echo "ISTIO not supported by docker - setting USE-ISTIO=0" |
| 90 | fi |
| 91 | |
| 92 | if [ $USE_ISTIO -eq 1 ]; then |
| 93 | echo -e $RED"#########################################"$ERED |
| 94 | echo -e $RED"# Work around istio jwks cache"$ERED |
| 95 | echo -e $RED"# Cycle istiod down and up to clear cache"$ERED |
| 96 | echo "" |
| 97 | __kube_scale deployment istiod istio-system 0 |
| 98 | __kube_scale deployment istiod istio-system 1 |
| 99 | echo -e $RED"# Cycle istiod done" |
| 100 | echo -e $RED"#########################################"$ERED |
| 101 | |
| 102 | istio_enable_istio_namespace $KUBE_SIM_NAMESPACE |
| 103 | istio_enable_istio_namespace $KUBE_NONRTRIC_NAMESPACE |
| 104 | istio_enable_istio_namespace $KUBE_A1SIM_NAMESPACE |
| 105 | fi |
| 106 | |
| 107 | |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame] | 108 | start_kube_proxy |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 109 | |
BjornMagnussonXA | cd93844 | 2022-05-11 10:01:24 +0200 | [diff] [blame^] | 110 | if [ $USE_ISTIO -eq 1 ]; then |
| 111 | start_keycloak |
| 112 | |
| 113 | keycloak_api_obtain_admin_token |
| 114 | |
| 115 | keycloak_api_create_realm nrtrealm true 60 |
| 116 | keycloak_api_create_confidential_client nrtrealm a1pmsc |
| 117 | keycloak_api_generate_client_secret nrtrealm a1pmsc |
| 118 | keycloak_api_get_client_secret nrtrealm a1pmsc |
| 119 | keycloak_api_create_client_roles nrtrealm a1pmsc nrtrole |
| 120 | keycloak_api_map_client_roles nrtrealm a1pmsc nrtrole |
| 121 | |
| 122 | keycloak_api_get_client_token nrtrealm a1pmsc |
| 123 | |
| 124 | CLIENT_TOKEN=$(keycloak_api_read_client_token nrtrealm a1pmsc) |
| 125 | echo "CLIENT_TOKEN: "$CLIENT_TOKEN |
| 126 | |
| 127 | A1PMS_SEC=$(keycloak_api_read_client_secret nrtrealm a1pmsc) |
| 128 | echo "A1PMS_SEC: "$A1PMS_SEC |
| 129 | |
| 130 | # Protect ricsim-g3 |
| 131 | istio_req_auth_by_jwks ricsim-g1 $KUBE_A1SIM_NAMESPACE KUBEPROXY "$KUBE_PROXY_ISTIO_JWKS_KEYS" |
| 132 | istio_auth_policy_by_issuer ricsim-g1 $KUBE_A1SIM_NAMESPACE KUBEPROXY |
| 133 | |
| 134 | istio_req_auth_by_jwksuri ricsim-g1 $KUBE_A1SIM_NAMESPACE nrtrealm |
| 135 | istio_auth_policy_by_realm ricsim-g1 $KUBE_A1SIM_NAMESPACE nrtrealm a1pmsc nrtrole |
| 136 | |
| 137 | # Protect ricsim-g2 |
| 138 | istio_req_auth_by_jwks ricsim-g2 $KUBE_A1SIM_NAMESPACE KUBEPROXY "$KUBE_PROXY_ISTIO_JWKS_KEYS" |
| 139 | istio_auth_policy_by_issuer ricsim-g2 $KUBE_A1SIM_NAMESPACE KUBEPROXY |
| 140 | |
| 141 | istio_req_auth_by_jwksuri ricsim-g2 $KUBE_A1SIM_NAMESPACE nrtrealm |
| 142 | istio_auth_policy_by_realm ricsim-g2 $KUBE_A1SIM_NAMESPACE nrtrealm a1pmsc nrtrole |
| 143 | |
| 144 | # Protect ricsim-g3 |
| 145 | istio_req_auth_by_jwks ricsim-g3 $KUBE_A1SIM_NAMESPACE KUBEPROXY "$KUBE_PROXY_ISTIO_JWKS_KEYS" |
| 146 | istio_auth_policy_by_issuer ricsim-g3 $KUBE_A1SIM_NAMESPACE KUBEPROXY |
| 147 | |
| 148 | istio_req_auth_by_jwksuri ricsim-g3 $KUBE_A1SIM_NAMESPACE nrtrealm |
| 149 | istio_auth_policy_by_realm ricsim-g3 $KUBE_A1SIM_NAMESPACE nrtrealm a1pmsc nrtrole |
| 150 | |
| 151 | # Protect CR |
| 152 | istio_req_auth_by_jwks $CR_APP_NAME $KUBE_SIM_NAMESPACE KUBEPROXY "$KUBE_PROXY_ISTIO_JWKS_KEYS" |
| 153 | istio_auth_policy_by_issuer $CR_APP_NAME $KUBE_SIM_NAMESPACE KUBEPROXY |
| 154 | |
| 155 | istio_req_auth_by_jwksuri $CR_APP_NAME $KUBE_SIM_NAMESPACE nrtrealm |
| 156 | istio_auth_policy_by_realm $CR_APP_NAME $KUBE_SIM_NAMESPACE nrtrealm a1pmsc nrtrole |
| 157 | |
| 158 | a1pms_configure_sec nrtrealm a1pmsc $A1PMS_SEC |
| 159 | fi |
| 160 | |
BjornMagnussonXA | 496156d | 2020-08-10 14:16:24 +0200 | [diff] [blame] | 161 | if [ $__httpx == "HTTPS" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 162 | use_cr_https |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 163 | use_a1pms_rest_https |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 164 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 165 | use_a1pms_rest_http |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 166 | use_cr_http |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 167 | fi |
| 168 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 169 | start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 170 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 171 | set_a1pms_debug |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 172 | |
| 173 | # Create service to be able to receive events when rics becomes available |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 174 | # Must use rest towards the a1pms since dmaap is not configured yet |
| 175 | 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] | 176 | |
| 177 | |
| 178 | if [ $__httpx == "HTTPS" ]; then |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 179 | use_simulator_https |
| 180 | use_mr_https |
| 181 | if [[ $interface = *"SDNC"* ]]; then |
| 182 | use_sdnc_https |
| 183 | fi |
| 184 | if [[ $interface = *"DMAAP"* ]]; then |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 185 | use_a1pms_dmaap_https |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 186 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 187 | use_a1pms_rest_https |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 188 | fi |
BjornMagnussonXA | 496156d | 2020-08-10 14:16:24 +0200 | [diff] [blame] | 189 | else |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 190 | use_simulator_http |
| 191 | use_mr_http |
| 192 | if [[ $interface = *"SDNC"* ]]; then |
| 193 | use_sdnc_http |
| 194 | fi |
| 195 | if [[ $interface = *"DMAAP"* ]]; then |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 196 | use_a1pms_dmaap_http |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 197 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 198 | use_a1pms_rest_http |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 199 | fi |
BjornMagnussonXA | 496156d | 2020-08-10 14:16:24 +0200 | [diff] [blame] | 200 | fi |
BjornMagnussonXA | 80a9200 | 2020-03-19 14:31:06 +0100 | [diff] [blame] | 201 | |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 202 | start_ric_simulators ricsim_g1 1 OSC_2.1.0 |
| 203 | start_ric_simulators ricsim_g2 1 STD_1.1.3 |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 204 | |
| 205 | sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json |
| 206 | sim_put_policy_type 201 ricsim_g1_1 2 testdata/OSC/sim_2.json |
| 207 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 208 | if [ "$A1PMS_VERSION" == "V2" ]; then |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 209 | start_ric_simulators ricsim_g3 1 STD_2.0.0 |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 210 | sim_put_policy_type 201 ricsim_g3_1 STD_QOS_0_2_0 testdata/STD2/sim_qos.json |
| 211 | sim_put_policy_type 201 ricsim_g3_1 STD_QOS2_0.1.0 testdata/STD2/sim_qos2.json |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 212 | fi |
BjornMagnussonXA | 80a9200 | 2020-03-19 14:31:06 +0100 | [diff] [blame] | 213 | |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 214 | start_mr |
BjornMagnussonXA | 80a9200 | 2020-03-19 14:31:06 +0100 | [diff] [blame] | 215 | |
BjornMagnussonXA | 79e3700 | 2021-11-22 13:36:04 +0100 | [diff] [blame] | 216 | start_cr 1 |
BjornMagnussonXA | 80a9200 | 2020-03-19 14:31:06 +0100 | [diff] [blame] | 217 | |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 218 | start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE |
| 219 | |
| 220 | if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then |
| 221 | start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE |
| 222 | fi |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 223 | |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 224 | if [[ $interface = *"SDNC"* ]]; then |
| 225 | start_sdnc |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 226 | prepare_consul_config SDNC ".consul_config.json" |
| 227 | else |
| 228 | prepare_consul_config NOSDNC ".consul_config.json" |
| 229 | fi |
BjornMagnussonXA | 80a9200 | 2020-03-19 14:31:06 +0100 | [diff] [blame] | 230 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 231 | if [ $RUNMODE == "KUBE" ]; then |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 232 | a1pms_load_config ".consul_config.json" |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 233 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 234 | if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 235 | #Temporary switch to http/https if dmaap use. Otherwise it is not possibble to push config |
| 236 | if [ $__httpx == "HTTPS" ]; then |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 237 | use_a1pms_rest_https |
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 | use_a1pms_rest_http |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 240 | fi |
| 241 | |
| 242 | if [[ $interface != *"DMAAP"* ]]; then |
| 243 | echo "{}" > ".consul_config_incorrect.json" |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 244 | a1pms_api_put_configuration 400 ".consul_config_incorrect.json" |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 245 | fi |
| 246 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 247 | a1pms_api_put_configuration 200 ".consul_config.json" |
| 248 | a1pms_api_get_configuration 200 ".consul_config.json" |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 249 | if [ $__httpx == "HTTPS" ]; then |
| 250 | if [[ $interface = *"DMAAP"* ]]; then |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 251 | use_a1pms_dmaap_https |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 252 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 253 | use_a1pms_rest_https |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 254 | fi |
| 255 | else |
| 256 | if [[ $interface = *"DMAAP"* ]]; then |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 257 | use_a1pms_dmaap_http |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 258 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 259 | use_a1pms_rest_http |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 260 | fi |
| 261 | fi |
| 262 | |
| 263 | else |
| 264 | start_consul_cbs |
| 265 | consul_config_app ".consul_config.json" |
| 266 | fi |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 267 | fi |
BjornMagnussonXA | 80a9200 | 2020-03-19 14:31:06 +0100 | [diff] [blame] | 268 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 269 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 270 | a1pms_equal json:rics 3 300 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 271 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 272 | a1pms_equal json:policy-types 5 120 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 273 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 274 | a1pms_equal json:policies 0 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 275 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 276 | a1pms_equal json:policy-instances 0 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 277 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 278 | a1pms_equal json:rics 2 300 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 279 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 280 | a1pms_equal json:policy_schemas 3 120 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 281 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 282 | a1pms_equal json:policy_types 3 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 283 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 284 | a1pms_equal json:policies 0 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 285 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 286 | a1pms_equal json:policy_ids 0 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 287 | fi |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 288 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 289 | if [ "$A1PMS_VERSION" == "V2" ]; then |
BjornMagnussonXA | 79e3700 | 2021-11-22 13:36:04 +0100 | [diff] [blame] | 290 | cr_equal 0 received_callbacks 3 120 |
| 291 | cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_1 ricsim_g2_1 ricsim_g3_1 |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 292 | fi |
| 293 | mr_equal requests_submitted 0 |
| 294 | |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 295 | |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 296 | echo "############################################" |
| 297 | echo "############## Health check ################" |
| 298 | echo "############################################" |
| 299 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 300 | a1pms_api_get_status 200 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 301 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 302 | a1pms_api_get_status_root 200 |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 303 | |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 304 | echo "############################################" |
| 305 | echo "##### Service registry and supervision #####" |
| 306 | echo "############################################" |
| 307 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 308 | a1pms_api_get_services 404 "service1" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 309 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 310 | a1pms_api_put_service 201 "service1" 1000 "$CR_SERVICE_APP_PATH_0/1" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 311 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 312 | a1pms_api_put_service 200 "service1" 2000 "$CR_SERVICE_APP_PATH_0/1" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 313 | |
| 314 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 315 | a1pms_api_put_service 400 "service2" -1 "$CR_SERVICE_APP_PATH_0/2" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 316 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 317 | a1pms_api_put_service 400 "service2" "wrong" "$CR_SERVICE_APP_PATH_0/2" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 318 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 319 | a1pms_api_put_service 400 "service2" 100 "/test" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 320 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 321 | a1pms_api_put_service 400 "service2" 100 "test-path" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 322 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 323 | a1pms_api_put_service 201 "service2" 300 "ftp://localhost:80/test" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 324 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 325 | a1pms_api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_APP_PATH_0/1" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 326 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 327 | a1pms_api_get_service_ids 200 "service1" "service2" "ric-registration" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 328 | |
| 329 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 330 | a1pms_api_put_service 201 "service3" 5000 "$CR_SERVICE_APP_PATH_0/3" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 331 | |
| 332 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 333 | a1pms_api_get_service_ids 200 "service1" "service2" "service3" "ric-registration" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 334 | |
| 335 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 336 | a1pms_api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_APP_PATH_0/1" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 337 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 338 | a1pms_api_get_services 200 NOSERVICE "service1" 2000 "$CR_SERVICE_APP_PATH_0/1" "service2" 300 "ftp://localhost:80/test" "service3" 5000 "$CR_SERVICE_APP_PATH_0/3" "ric-registration" 0 "$CR_SERVICE_APP_PATH_0/ric-registration" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 339 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 340 | a1pms_api_get_services 200 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 341 | |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 342 | deviation "TR2 - Keep alive shall return 200/201 according to doc, only 200 works - test combo $interface and $__httpx" |
| 343 | #The below should work, keept here until fixed or other decision made |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 344 | #a1pms_api_put_services_keepalive 201 "service1" |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 345 | #Using the below until decision |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 346 | a1pms_api_put_services_keepalive 200 "service1" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 347 | |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 348 | deviation "TR2 - Keep alive shall return 200/201 according to doc, only 200 works - test combo $interface and $__httpx" |
| 349 | #The below should work, keept here until fixed or other decision made |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 350 | #a1pms_api_put_services_keepalive 201 "service3" |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 351 | #Using the below until decision |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 352 | a1pms_api_put_services_keepalive 200 "service3" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 353 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 354 | a1pms_api_put_services_keepalive 200 "service1" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 355 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 356 | a1pms_api_put_services_keepalive 200 "service3" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 357 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 358 | a1pms_api_put_services_keepalive 404 "service5" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 359 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 360 | a1pms_api_get_service_ids 200 "service1" "service2" "service3" "ric-registration" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 361 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 362 | a1pms_api_delete_services 204 "service1" |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 363 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 364 | a1pms_api_get_service_ids 200 "service2" "service3" "ric-registration" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 365 | |
| 366 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 367 | a1pms_api_put_service 201 "service1" 50 "$CR_SERVICE_APP_PATH_0/1" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 368 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 369 | a1pms_api_get_service_ids 200 "service1" "service2" "service3" "ric-registration" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 370 | |
| 371 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 372 | a1pms_api_delete_services 204 "service1" |
| 373 | a1pms_api_delete_services 204 "service3" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 374 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 375 | a1pms_equal json:services 2 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 376 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 377 | a1pms_api_delete_services 204 "service2" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 378 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 379 | a1pms_equal json:services 1 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 380 | |
| 381 | |
| 382 | echo "############################################" |
| 383 | echo "############## RIC Repository ##############" |
| 384 | echo "############################################" |
| 385 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 386 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 387 | a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 388 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 389 | a1pms_api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 390 | fi |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 391 | a1pms_api_get_rics 200 1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 392 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 393 | a1pms_api_get_rics 404 47 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 394 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 395 | a1pms_api_get_rics 404 "test" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 396 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 397 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 398 | a1pms_api_get_ric 200 me1_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 399 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 400 | a1pms_api_get_ric 200 me2_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 401 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 402 | a1pms_api_get_ric 200 me1_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 403 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 404 | a1pms_api_get_ric 200 me2_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 405 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 406 | a1pms_api_get_ric 200 me1_ricsim_g3_1 NORIC "ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 407 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 408 | a1pms_api_get_ric 200 me2_ricsim_g3_1 NORIC "ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 409 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 410 | a1pms_api_get_ric 200 NOME ricsim_g1_1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 411 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 412 | a1pms_api_get_ric 200 NOME ricsim_g2_1 "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 413 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 414 | a1pms_api_get_ric 200 NOME ricsim_g3_1 "ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE" |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 415 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 416 | a1pms_api_get_ric 404 NOME test1 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 417 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 418 | a1pms_api_get_ric 404 test NORIC |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 419 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 420 | a1pms_api_get_ric 400 me1_ricsim_g1_1 ricsim_g1_1 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 421 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 422 | a1pms_api_get_ric 400 me1_ricsim_g1_1 TESTRIC |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 423 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 424 | a1pms_api_get_ric 400 TESTME ricsim_g1_1 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 425 | |
| 426 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 427 | a1pms_api_get_ric 200 me1_ricsim_g1_1 ricsim_g1_1 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 428 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 429 | a1pms_api_get_ric 200 me2_ricsim_g1_1 ricsim_g1_1 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 430 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 431 | a1pms_api_get_ric 200 me1_ricsim_g2_1 ricsim_g2_1 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 432 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 433 | a1pms_api_get_ric 200 me2_ricsim_g2_1 ricsim_g2_1 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 434 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 435 | a1pms_api_get_ric 404 test |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 436 | fi |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 437 | |
| 438 | echo "############################################" |
| 439 | echo "########### A1 Policy Management ###########" |
| 440 | echo "############################################" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 441 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 442 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 443 | deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 444 | #Behaviour accepted for now |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 445 | a1pms_api_get_policy_type 200 1 testdata/OSC/1-a1pms-modified.json |
| 446 | deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 447 | #Behaviour accepted for now |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 448 | a1pms_api_get_policy_type 200 2 testdata/OSC/2-a1pms-modified.json |
| 449 | deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 450 | #Behaviour accepted for now |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 451 | a1pms_api_get_policy_type 200 STD_QOS_0_2_0 testdata/STD2/qos-a1pms-modified.json |
| 452 | deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 453 | #Behaviour accepted for now |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 454 | a1pms_api_get_policy_type 200 STD_QOS2_0.1.0 testdata/STD2/qos2-a1pms-modified.json |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 455 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 456 | a1pms_api_get_policy_type 404 3 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 457 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 458 | deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 459 | #Behaviour accepted for now |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 460 | a1pms_api_get_policy_schema 200 1 testdata/OSC/1-a1pms-modified.json |
| 461 | deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 462 | #Behaviour accepted for now |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 463 | a1pms_api_get_policy_schema 200 2 testdata/OSC/2-a1pms-modified.json |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 464 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 465 | a1pms_api_get_policy_schema 404 3 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 466 | fi |
| 467 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 468 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 469 | a1pms_api_get_policy_schemas 404 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 470 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 471 | deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 472 | #Behaviour accepted for now |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 473 | a1pms_api_get_policy_schemas 200 NORIC testdata/OSC/1-a1pms-modified.json testdata/OSC/2-a1pms-modified.json NOFILE |
| 474 | deviation "TR9 - a1pms modify the type with type id - test combo $interface and $__httpx" |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 475 | #Behaviour accepted for now |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 476 | a1pms_api_get_policy_schemas 200 ricsim_g1_1 testdata/OSC/1-a1pms-modified.json testdata/OSC/2-a1pms-modified.json |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 477 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 478 | a1pms_api_get_policy_schemas 200 ricsim_g2_1 NOFILE |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 479 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 480 | a1pms_api_get_policy_schemas 404 test |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 481 | fi |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 482 | |
| 483 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 484 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 485 | a1pms_api_get_policy_types 200 NORIC 1 2 EMPTY STD_QOS_0_2_0 STD_QOS2_0.1.0 |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 486 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 487 | a1pms_api_get_policy_types 200 NORIC 1 2 EMPTY |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 488 | fi |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 489 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 490 | a1pms_api_get_policy_types 200 ricsim_g1_1 1 2 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 491 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 492 | a1pms_api_get_policy_types 200 ricsim_g2_1 EMPTY |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 493 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 494 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 495 | a1pms_api_get_policy_types 200 ricsim_g3_1 STD_QOS_0_2_0 STD_QOS2_0.1.0 |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 496 | fi |
| 497 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 498 | a1pms_api_get_policy_types 404 dummy-ric |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 499 | |
| 500 | |
| 501 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 502 | a1pms_api_put_service 201 "service10" 3600 "$CR_SERVICE_APP_PATH_0/1" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 503 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 504 | if [ "$A1PMS_VERSION" == "V2" ]; then |
BjornMagnussonXA | 79e3700 | 2021-11-22 13:36:04 +0100 | [diff] [blame] | 505 | notificationurl=$CR_SERVICE_APP_PATH_0"/test" |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 506 | else |
| 507 | notificationurl="" |
| 508 | fi |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 509 | if [[ $interface != *"DMAAP"* ]]; then |
| 510 | # Badly formatted json is not possible to send via dmaap |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 511 | a1pms_api_put_policy 400 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi_bad_template.json |
BjornMagnussonXA | 8fbb226 | 2022-01-24 15:20:15 +0100 | [diff] [blame] | 512 | fi |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 513 | deviation "TR10 - a1pms allows policy creation on unregistered service (orig problem) - test combo $interface and $__httpx" |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 514 | #Kept until decison |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 515 | #a1pms_api_put_policy 400 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT testdata/OSC/pi1_template.json |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 516 | #Allow 201 for now |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 517 | a1pms_api_put_policy 201 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 518 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 519 | a1pms_api_put_policy 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json |
| 520 | a1pms_api_put_policy 200 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 521 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 522 | a1pms_api_put_policy 200 "service10" ricsim_g1_1 1 5000 true $notificationurl testdata/OSC/pi1_template.json |
| 523 | a1pms_api_put_policy 200 "service10" ricsim_g1_1 1 5000 false $notificationurl testdata/OSC/pi1_template.json |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 524 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 525 | a1pms_api_put_policy 201 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json |
| 526 | a1pms_api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json |
BjornMagnussonXA | bbd2e9d | 2020-05-27 21:24:06 +0200 | [diff] [blame] | 527 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 528 | a1pms_api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 true $notificationurl testdata/STD/pi1_template.json |
| 529 | a1pms_api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 false $notificationurl testdata/STD/pi1_template.json |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 530 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 531 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 532 | a1pms_api_put_policy 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json |
| 533 | a1pms_api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 534 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 535 | a1pms_api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 true $notificationurl testdata/STD2/pi_qos2_template.json |
| 536 | a1pms_api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 false $notificationurl testdata/STD2/pi_qos2_template.json |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 537 | fi |
| 538 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 539 | a1pms_api_get_policy_status 404 1 |
| 540 | a1pms_api_get_policy_status 404 2 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 541 | VAL='NOT IN EFFECT' |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 542 | a1pms_api_get_policy_status 200 5000 OSC "$VAL" "false" |
| 543 | a1pms_api_get_policy_status 200 5100 STD "UNDEFINED" |
| 544 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 545 | a1pms_api_get_policy_status 200 5200 STD2 EMPTY EMPTY |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 546 | fi |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 547 | |
| 548 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 549 | deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 550 | #kept until decision |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 551 | #a1pms_equal json:policies 2 |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 552 | #Allow 3 for now |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 553 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 554 | a1pms_equal json:policies 4 |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 555 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 556 | a1pms_equal json:policies 3 |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 557 | fi |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 558 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 559 | deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 560 | #kept until decision |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 561 | #a1pms_equal json:policy_ids 2 |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 562 | #Allow 3 for now |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 563 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 564 | a1pms_equal json:policy-instances 4 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 565 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 566 | a1pms_equal json:policy_ids 3 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 567 | fi |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 568 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 569 | deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 570 | #kept until decision |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 571 | #a1pms_api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 572 | #Allow policy create with unregistered service for now |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 573 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 574 | a1pms_api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000 5200 |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 575 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 576 | a1pms_api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000 |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 577 | fi |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 578 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 579 | deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 580 | #kept until decision |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 581 | #a1pms_api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 582 | #Allow policy create with unregistered service for now |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 583 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 584 | a1pms_api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 585 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 586 | a1pms_api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100 |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 587 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 588 | a1pms_api_get_policy_ids 200 ricsim_g3_1 NOSERVICE NOTYPE 5200 |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 589 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 590 | a1pms_api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100 5200 |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 591 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 592 | a1pms_api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000 |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 593 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 594 | a1pms_api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 595 | |
| 596 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 597 | a1pms_api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100 |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 598 | fi |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 599 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 600 | deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 601 | #kept until decision |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 602 | #a1pms_api_get_policy_ids 200 NORIC NOSERVICE 1 5000 |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 603 | #Allow policy create with unregistered service for now |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 604 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 605 | a1pms_api_get_policy_ids 200 NORIC NOSERVICE 1 5000 2000 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 606 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 607 | a1pms_api_get_policy_ids 200 NORIC NOSERVICE 2 NOID |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 608 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 609 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 610 | a1pms_api_get_policy_ids 200 NORIC NOSERVICE STD_QOS2_0.1.0 5200 |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 611 | fi |
| 612 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 613 | a1pms_api_get_policy_ids 200 ricsim_g2_1 NOSERVICE 1 NOID |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 614 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 615 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 616 | a1pms_api_get_policy 200 5000 testdata/OSC/pi1_template.json "service10" ricsim_g1_1 1 false $notificationurl |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 617 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 618 | a1pms_api_get_policy 200 5100 testdata/STD/pi1_template.json "service10" ricsim_g2_1 NOTYPE false $notificationurl |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 619 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 620 | a1pms_api_get_policy 200 5200 testdata/STD2/pi_qos2_template.json "service10" ricsim_g3_1 STD_QOS2_0.1.0 false $notificationurl |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 621 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 622 | a1pms_api_get_policies 200 ricsim_g1_1 "service10" 1 5000 ricsim_g1_1 "service10" 1 false $notificationurl testdata/OSC/pi1_template.json |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 623 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 624 | a1pms_api_get_policy 200 5000 testdata/OSC/pi1_template.json |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 625 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 626 | a1pms_api_get_policy 200 5100 testdata/STD/pi1_template.json |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 627 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 628 | a1pms_api_get_policies 200 ricsim_g1_1 "service10" 1 5000 ricsim_g1_1 "service10" 1 testdata/OSC/pi1_template.json |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 629 | fi |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 630 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 631 | deviation "TR10 - a1pms allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx" |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 632 | #kept until decision |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 633 | #a1pms_api_delete_policy 404 2000 |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 634 | #Allow policy create with unregistered service for now |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 635 | a1pms_api_delete_policy 204 2000 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 636 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 637 | a1pms_api_delete_policy 404 1500 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 638 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 639 | a1pms_api_delete_policy 204 5000 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 640 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 641 | if [ "$A1PMS_VERSION" == "V2" ]; then |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 642 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 643 | a1pms_api_delete_policy 204 5200 |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 644 | fi |
| 645 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 646 | a1pms_equal json:policies 1 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 647 | |
BjornMagnussonXA | 2791e08 | 2020-11-12 00:52:08 +0100 | [diff] [blame] | 648 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 649 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 650 | a1pms_equal json:policy-instances 1 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 651 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 652 | a1pms_equal json:policy_ids 1 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 653 | fi |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 654 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 655 | a1pms_api_delete_policy 204 5100 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 656 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 657 | a1pms_equal json:policies 0 |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 658 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 659 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 660 | a1pms_equal json:policy-instances 0 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 661 | else |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 662 | a1pms_equal json:policy_ids 0 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 663 | fi |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 664 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 665 | if [ "$A1PMS_VERSION" == "V2" ]; then |
BjornMagnussonXA | 79e3700 | 2021-11-22 13:36:04 +0100 | [diff] [blame] | 666 | cr_equal 0 received_callbacks 3 |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 667 | fi |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 668 | |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 669 | if [[ $interface = *"DMAAP"* ]]; then |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 670 | mr_greater requests_submitted 0 |
| 671 | VAL=$(mr_read requests_submitted) |
| 672 | mr_equal requests_fetched $VAL |
| 673 | mr_equal responses_submitted $VAL |
| 674 | mr_equal responses_fetched $VAL |
| 675 | mr_equal current_requests 0 |
| 676 | mr_equal current_responses 0 |
| 677 | else |
| 678 | mr_equal requests_submitted 0 |
| 679 | fi |
BjornMagnussonXA | cd93844 | 2022-05-11 10:01:24 +0200 | [diff] [blame^] | 680 | if [ $USE_ISTIO -eq 0 ]; then |
| 681 | if [[ $interface = *"SDNC"* ]]; then |
| 682 | sim_contains_str ricsim_g1_1 remote_hosts $SDNC_APP_NAME |
| 683 | sim_contains_str ricsim_g2_1 remote_hosts $SDNC_APP_NAME |
| 684 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 685 | sim_contains_str ricsim_g3_1 remote_hosts $SDNC_APP_NAME |
| 686 | fi |
| 687 | else |
| 688 | sim_contains_str ricsim_g1_1 remote_hosts $A1PMS_APP_NAME |
| 689 | sim_contains_str ricsim_g2_1 remote_hosts $A1PMS_APP_NAME |
| 690 | if [ "$A1PMS_VERSION" == "V2" ]; then |
| 691 | sim_contains_str ricsim_g3_1 remote_hosts $A1PMS_APP_NAME |
| 692 | fi |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 693 | fi |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 694 | fi |
| 695 | |
BjornMagnussonXA | d2aeca8 | 2022-03-07 11:04:55 +0100 | [diff] [blame] | 696 | check_a1pms_logs |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 697 | |
BjornMagnussonXA | 49f0e5a | 2020-11-08 22:41:39 +0100 | [diff] [blame] | 698 | if [[ $interface = *"SDNC"* ]]; then |
| 699 | check_sdnc_logs |
| 700 | fi |
| 701 | |
BjornMagnussonXA | 70e878f | 2020-05-11 14:11:30 +0200 | [diff] [blame] | 702 | store_logs "${__httpx}__${interface}" |
BjornMagnussonXA | 72667f1 | 2020-04-24 09:20:18 +0200 | [diff] [blame] | 703 | |
| 704 | done |
BjornMagnussonXA | 80a9200 | 2020-03-19 14:31:06 +0100 | [diff] [blame] | 705 | |
| 706 | done |
| 707 | |
| 708 | #### TEST COMPLETE #### |
| 709 | |
| 710 | |
| 711 | print_result |
| 712 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 713 | auto_clean_environment |