Merge "Update of EI Data Producer API"
[nonrtric.git] / test / auto-test / FTC100.sh
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
21 TC_ONELINE_DESCR="Full agent API walkthrough using agent REST/DMAAP and with/without SDNC A1 Controller"
22
23 #App names to include in the test when running docker, space separated list
24 DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC"
25
26 #App names to include in the test when running kubernetes, space separated list
27 KUBE_INCLUDED_IMAGES="CP CR MR PA RICSIM SDNC"
28 #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list
29 KUBE_PRESTARTED_IMAGES=""
30
31 #Supported test environment profiles
32 SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU  ORAN-CHERRY ORAN-DAWN"
33 #Supported run modes
34 SUPPORTED_RUNMODES="DOCKER KUBE"
35
36 . ../common/testcase_common.sh  $@
37 . ../common/agent_api_functions.sh
38 . ../common/consul_cbs_functions.sh
39 . ../common/control_panel_api_functions.sh
40 . ../common/controller_api_functions.sh
41 . ../common/cr_api_functions.sh
42 . ../common/mr_api_functions.sh
43 . ../common/ricsimulator_api_functions.sh
44
45
46 #### TEST BEGIN ####
47
48 generate_uuid
49
50 # Tested variants of REST/DMAAP/SDNC config
51 TESTED_VARIANTS="REST   DMAAP   REST+SDNC   DMAAP+SDNC"
52
53 #Test agent and simulator protocol versions (others are http only)
54 TESTED_PROTOCOLS="HTTP HTTPS"
55
56 for __httpx in $TESTED_PROTOCOLS ; do
57     for interface in $TESTED_VARIANTS ; do
58
59         echo "#####################################################################"
60         echo "#####################################################################"
61         echo "### Testing agent: $interface using $__httpx"
62         echo "#####################################################################"
63         echo "#####################################################################"
64
65         # Clean container and start all needed containers #
66         clean_environment
67
68         if [ $__httpx == "HTTPS" ]; then
69             use_cr_https
70             use_agent_rest_https
71         else
72             use_agent_rest_http
73             use_cr_http
74         fi
75
76         start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/application.yaml
77
78         set_agent_debug
79
80         # Create service to be able to receive events when rics becomes available
81         # Must use rest towards the agent since dmaap is not configured yet
82         api_put_service 201 "ric-registration" 0 "$CR_SERVICE_PATH/ric-registration"
83
84
85         if [ $__httpx == "HTTPS" ]; then
86             use_simulator_https
87             use_mr_https
88             if [[ $interface = *"SDNC"* ]]; then
89                 use_sdnc_https
90             fi
91             if [[ $interface = *"DMAAP"* ]]; then
92                 use_agent_dmaap_https
93             else
94                 use_agent_rest_https
95             fi
96         else
97             use_simulator_http
98             use_mr_http
99             if [[ $interface = *"SDNC"* ]]; then
100                 use_sdnc_http
101             fi
102             if [[ $interface = *"DMAAP"* ]]; then
103                 use_agent_dmaap_http
104             else
105                 use_agent_rest_http
106             fi
107         fi
108
109         start_ric_simulators ricsim_g1 1  OSC_2.1.0
110         start_ric_simulators ricsim_g2 1  STD_1.1.3
111         if [ "$PMS_VERSION" == "V2" ]; then
112             start_ric_simulators ricsim_g3 1  STD_2.0.0
113         fi
114
115         start_mr
116
117         start_cr
118
119         start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/application.properties
120
121         if [ $RUNMODE == "DOCKER" ]; then
122             start_consul_cbs
123         fi
124
125         if [[ $interface = *"SDNC"* ]]; then
126             start_sdnc
127             prepare_consul_config      SDNC    ".consul_config.json"
128         else
129             prepare_consul_config      NOSDNC  ".consul_config.json"
130         fi
131
132         if [ $RUNMODE == "KUBE" ]; then
133             agent_load_config                       ".consul_config.json"
134         else
135             consul_config_app                      ".consul_config.json"
136         fi
137
138         sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json
139         sim_put_policy_type 201 ricsim_g1_1 2 testdata/OSC/sim_2.json
140
141         if [ "$PMS_VERSION" == "V2" ]; then
142             sim_put_policy_type 201 ricsim_g3_1 STD_QOS_0_2_0 testdata/STD2/sim_qos.json
143             sim_put_policy_type 201 ricsim_g3_1 STD_QOS2_0.1.0 testdata/STD2/sim_qos2.json
144
145             api_equal json:rics 3 300
146
147             api_equal json:policy-types 5 120
148
149             api_equal json:policies 0
150
151             api_equal json:policy-instances 0
152         else
153             api_equal json:rics 2 300
154
155             api_equal json:policy_schemas 3 120
156
157             api_equal json:policy_types 3
158
159             api_equal json:policies 0
160
161             api_equal json:policy_ids 0
162         fi
163
164         if [ "$PMS_VERSION" == "V2" ]; then
165             cr_equal received_callbacks 3 120
166             cr_api_check_all_sync_events 200 ric-registration ricsim_g1_1 ricsim_g2_1 ricsim_g3_1
167         fi
168         mr_equal requests_submitted 0
169
170
171         echo "############################################"
172         echo "############## Health check ################"
173         echo "############################################"
174
175         api_get_status 200
176
177         echo "############################################"
178         echo "##### Service registry and supervision #####"
179         echo "############################################"
180
181         api_get_services 404 "service1"
182
183         api_put_service 201 "service1" 1000 "$CR_SERVICE_PATH/1"
184
185         api_put_service 200 "service1" 2000 "$CR_SERVICE_PATH/1"
186
187
188         api_put_service 400 "service2" -1 "$CR_SERVICE_PATH/2"
189
190         api_put_service 400 "service2" "wrong" "$CR_SERVICE_PATH/2"
191
192         api_put_service 400 "service2" 100 "/test"
193
194         api_put_service 400 "service2" 100 "test-path"
195
196         api_put_service 201 "service2" 300 "ftp://localhost:80/test"
197
198         api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_PATH/1"
199
200         api_get_service_ids 200 "service1" "service2" "ric-registration"
201
202
203         api_put_service 201 "service3" 5000 "$CR_SERVICE_PATH/3"
204
205
206         api_get_service_ids 200 "service1" "service2" "service3" "ric-registration"
207
208
209         api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_PATH/1"
210
211         api_get_services 200 NOSERVICE "service1" 2000 "$CR_SERVICE_PATH/1" "service2" 300 "ftp://localhost:80/test" "service3" 5000 "$CR_SERVICE_PATH/3"  "ric-registration" 0 "$CR_SERVICE_PATH/ric-registration"
212
213         api_get_services 200
214
215         deviation "TR2 - Keep alive shall return 200/201 according to doc, only 200 works - test combo $interface and $__httpx"
216         #The below should work, keept here until fixed or other decision made
217         #api_put_services_keepalive 201 "service1"
218         #Using the below until decision
219         api_put_services_keepalive 200 "service1"
220
221         deviation "TR2 - Keep alive shall return 200/201 according to doc, only 200 works - test combo $interface and $__httpx"
222         #The below should work, keept here until fixed or other decision made
223         #api_put_services_keepalive 201 "service3"
224         #Using the below until decision
225         api_put_services_keepalive 200 "service3"
226
227         api_put_services_keepalive 200 "service1"
228
229         api_put_services_keepalive 200 "service3"
230
231         api_put_services_keepalive 404 "service5"
232
233         api_get_service_ids 200 "service1" "service2" "service3"  "ric-registration"
234
235         api_delete_services 204 "service1"
236
237         api_get_service_ids 200 "service2" "service3" "ric-registration"
238
239
240         api_put_service 201 "service1" 50 "$CR_SERVICE_PATH/1"
241
242         api_get_service_ids 200 "service1" "service2" "service3"  "ric-registration"
243
244
245         api_delete_services 204 "service1"
246         api_delete_services 204 "service3"
247
248         api_equal json:services 2
249
250         api_delete_services 204 "service2"
251
252         api_equal json:services 1
253
254
255         echo "############################################"
256         echo "############## RIC Repository ##############"
257         echo "############################################"
258
259         if [ "$PMS_VERSION" == "V2" ]; then
260             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"
261         else
262             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"
263         fi
264         api_get_rics 200 1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
265
266         api_get_rics 404 47
267
268         api_get_rics 404 "test"
269
270         if [ "$PMS_VERSION" == "V2" ]; then
271             api_get_ric 200 me1_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
272
273             api_get_ric 200 me2_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
274
275             api_get_ric 200 me1_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
276
277             api_get_ric 200 me2_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
278
279             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"
280
281             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"
282
283             api_get_ric 200 NOME      ricsim_g1_1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
284
285             api_get_ric 200 NOME      ricsim_g2_1 "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
286
287             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"
288
289             api_get_ric 404 NOME test1
290
291             api_get_ric 404 test NORIC
292
293             api_get_ric 400 me1_ricsim_g1_1 ricsim_g1_1
294
295             api_get_ric 400 me1_ricsim_g1_1 TESTRIC
296
297             api_get_ric 400 TESTME ricsim_g1_1
298
299         else
300             api_get_ric 200 me1_ricsim_g1_1 ricsim_g1_1
301
302             api_get_ric 200 me2_ricsim_g1_1 ricsim_g1_1
303
304             api_get_ric 200 me1_ricsim_g2_1 ricsim_g2_1
305
306             api_get_ric 200 me2_ricsim_g2_1 ricsim_g2_1
307
308             api_get_ric 404 test
309         fi
310
311         echo "############################################"
312         echo "########### A1 Policy Management ###########"
313         echo "############################################"
314
315         if [ "$PMS_VERSION" == "V2" ]; then
316             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
317             #Behaviour accepted for now
318             api_get_policy_type 200 1 testdata/OSC/1-agent-modified.json
319             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
320             #Behaviour accepted for now
321             api_get_policy_type 200 2 testdata/OSC/2-agent-modified.json
322             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
323             #Behaviour accepted for now
324             api_get_policy_type 200 STD_QOS_0_2_0 testdata/STD2/qos-agent-modified.json
325             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
326             #Behaviour accepted for now
327             api_get_policy_type 200 STD_QOS2_0.1.0 testdata/STD2/qos2-agent-modified.json
328
329             api_get_policy_type 404 3
330         else
331             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
332             #Behaviour accepted for now
333             api_get_policy_schema 200 1 testdata/OSC/1-agent-modified.json
334             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
335             #Behaviour accepted for now
336             api_get_policy_schema 200 2 testdata/OSC/2-agent-modified.json
337
338             api_get_policy_schema 404 3
339         fi
340
341         if [ "$PMS_VERSION" == "V2" ]; then
342             api_get_policy_schemas 404
343         else
344             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
345             #Behaviour accepted for now
346             api_get_policy_schemas 200 NORIC testdata/OSC/1-agent-modified.json testdata/OSC/2-agent-modified.json NOFILE
347             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
348             #Behaviour accepted for now
349             api_get_policy_schemas 200 ricsim_g1_1 testdata/OSC/1-agent-modified.json testdata/OSC/2-agent-modified.json
350
351             api_get_policy_schemas 200 ricsim_g2_1 NOFILE
352
353             api_get_policy_schemas 404 test
354         fi
355
356
357         if [ "$PMS_VERSION" == "V2" ]; then
358             api_get_policy_types 200 NORIC 1 2 EMPTY STD_QOS_0_2_0 STD_QOS2_0.1.0
359         else
360             api_get_policy_types 200 NORIC 1 2 EMPTY
361         fi
362
363         api_get_policy_types 200 ricsim_g1_1 1 2
364
365         api_get_policy_types 200 ricsim_g2_1 EMPTY
366
367         if [ "$PMS_VERSION" == "V2" ]; then
368             api_get_policy_types 200 ricsim_g3_1 STD_QOS_0_2_0 STD_QOS2_0.1.0
369         fi
370
371         api_get_policy_types 404 dummy-ric
372
373
374
375         api_put_service 201 "service10" 3600 "$CR_SERVICE_PATH/1"
376
377         if [ "$PMS_VERSION" == "V2" ]; then
378             notificationurl=$CR_SERVICE_PATH"/test"
379         else
380             notificationurl=""
381         fi
382         deviation "TR10 - agent allows policy creation on unregistered service (orig problem) - test combo $interface and $__httpx"
383         #Kept until decison
384         #api_put_policy 400 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT testdata/OSC/pi1_template.json
385         #Allow 201 for now
386         api_put_policy 201 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
387
388         api_put_policy 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
389         api_put_policy 200 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
390
391         api_put_policy 200 "service10" ricsim_g1_1 1 5000 true $notificationurl testdata/OSC/pi1_template.json
392         api_put_policy 200 "service10" ricsim_g1_1 1 5000 false $notificationurl testdata/OSC/pi1_template.json
393
394         api_put_policy 201 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json
395         api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json
396
397         api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 true $notificationurl testdata/STD/pi1_template.json
398         api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 false $notificationurl testdata/STD/pi1_template.json
399
400         if [ "$PMS_VERSION" == "V2" ]; then
401             api_put_policy 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json
402             api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json
403
404             api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 true $notificationurl testdata/STD2/pi_qos2_template.json
405             api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 false $notificationurl testdata/STD2/pi_qos2_template.json
406         fi
407
408         VAL='NOT IN EFFECT'
409         api_get_policy_status 200 5000 OSC "$VAL" "false"
410         api_get_policy_status 200 5100 STD "UNDEFINED"
411         if [ "$PMS_VERSION" == "V2" ]; then
412             api_get_policy_status 200 5200 STD2 EMPTY EMPTY
413         fi
414
415
416         deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
417         #kept until decision
418         #api_equal json:policies 2
419         #Allow 3 for now
420         if [ "$PMS_VERSION" == "V2" ]; then
421             api_equal json:policies 4
422         else
423             api_equal json:policies 3
424         fi
425
426         deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
427         #kept until decision
428         #api_equal json:policy_ids 2
429         #Allow 3 for now
430         if [ "$PMS_VERSION" == "V2" ]; then
431             api_equal json:policy-instances 4
432         else
433             api_equal json:policy_ids 3
434         fi
435
436         deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
437         #kept until decision
438         #api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100
439         #Allow policy create with unregistered service for now
440         if [ "$PMS_VERSION" == "V2" ]; then
441             api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000 5200
442         else
443             api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000
444         fi
445
446         deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
447         #kept until decision
448         #api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000
449         #Allow policy create with unregistered service for now
450         if [ "$PMS_VERSION" == "V2" ]; then
451             api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000
452
453             api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100
454
455             api_get_policy_ids 200 ricsim_g3_1 NOSERVICE NOTYPE 5200
456
457             api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100 5200
458         else
459             api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000
460
461             api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100
462
463
464             api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100
465         fi
466
467         deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
468         #kept until decision
469         #api_get_policy_ids 200 NORIC NOSERVICE 1 5000
470         #Allow policy create with unregistered service for now
471
472         api_get_policy_ids 200 NORIC NOSERVICE 1 5000 2000
473
474         api_get_policy_ids 200 NORIC NOSERVICE 2 NOID
475
476         if [ "$PMS_VERSION" == "V2" ]; then
477             api_get_policy_ids 200 NORIC NOSERVICE STD_QOS2_0.1.0 5200
478         fi
479
480         api_get_policy_ids 200 ricsim_g2_1 NOSERVICE 1 NOID
481
482         if [ "$PMS_VERSION" == "V2" ]; then
483             api_get_policy 200 5000 testdata/OSC/pi1_template.json "service10" ricsim_g1_1 1 false $notificationurl
484
485             api_get_policy 200 5100 testdata/STD/pi1_template.json "service10" ricsim_g2_1 NOTYPE false $notificationurl
486
487             api_get_policy 200 5200 testdata/STD2/pi_qos2_template.json "service10" ricsim_g3_1 STD_QOS2_0.1.0 false $notificationurl
488
489             api_get_policies 200 ricsim_g1_1 "service10" 1 5000 ricsim_g1_1 "service10" 1 false $notificationurl testdata/OSC/pi1_template.json
490         else
491             api_get_policy 200 5000 testdata/OSC/pi1_template.json
492
493             api_get_policy 200 5100 testdata/STD/pi1_template.json
494
495             api_get_policies 200 ricsim_g1_1 "service10" 1 5000 ricsim_g1_1 "service10" 1 testdata/OSC/pi1_template.json
496         fi
497
498         deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
499         #kept until decision
500         #api_delete_policy 404 2000
501         #Allow policy create with unregistered service for now
502         api_delete_policy 204 2000
503
504         api_delete_policy 404 1500
505
506         api_delete_policy 204 5000
507
508         if [ "$PMS_VERSION" == "V2" ]; then
509
510             api_delete_policy 204 5200
511         fi
512
513         api_equal json:policies 1
514
515
516         if [ "$PMS_VERSION" == "V2" ]; then
517             api_equal json:policy-instances 1
518         else
519             api_equal json:policy_ids 1
520         fi
521
522         api_delete_policy 204 5100
523
524         api_equal json:policies 0
525
526         if [ "$PMS_VERSION" == "V2" ]; then
527             api_equal json:policy-instances 0
528         else
529             api_equal json:policy_ids 0
530         fi
531
532         if [ "$PMS_VERSION" == "V2" ]; then
533             cr_equal received_callbacks 3
534         fi
535
536         if [[ $interface = *"DMAAP"* ]]; then
537             mr_greater requests_submitted 0
538             VAL=$(mr_read requests_submitted)
539             mr_equal requests_fetched $VAL
540             mr_equal responses_submitted $VAL
541             mr_equal responses_fetched $VAL
542             mr_equal current_requests 0
543             mr_equal current_responses 0
544         else
545             mr_equal requests_submitted 0
546         fi
547
548         if [[ $interface = *"SDNC"* ]]; then
549             sim_contains_str ricsim_g1_1 remote_hosts $SDNC_APP_NAME
550             sim_contains_str ricsim_g2_1 remote_hosts $SDNC_APP_NAME
551             if [ "$PMS_VERSION" == "V2" ]; then
552                 sim_contains_str ricsim_g3_1 remote_hosts $SDNC_APP_NAME
553             fi
554         else
555             sim_contains_str ricsim_g1_1 remote_hosts $POLICY_AGENT_APP_NAME
556             sim_contains_str ricsim_g2_1 remote_hosts $POLICY_AGENT_APP_NAME
557             if [ "$PMS_VERSION" == "V2" ]; then
558                 sim_contains_str ricsim_g3_1 remote_hosts $POLICY_AGENT_APP_NAME
559             fi
560         fi
561
562         check_policy_agent_logs
563         check_control_panel_logs
564
565         if [[ $interface = *"SDNC"* ]]; then
566             check_sdnc_logs
567         fi
568
569         store_logs          "${__httpx}__${interface}"
570
571     done
572
573 done
574
575 #### TEST COMPLETE ####
576
577
578 print_result
579
580 auto_clean_environment