1 ##############################################################################
3 # Copyright (c) 2019 AT&T Intellectual Property.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 ##############################################################################
19 # This source code is part of the near-RT RIC (RAN Intelligent Controller)
20 # platform project (RICP).
24 Documentation Keywords file
25 Library ../Scripts/cleanup_db.py
26 Resource ../Resource/resource.robot
27 Library OperatingSystem
30 Get Request node b gnb
37 Remove File ${EXECDIR}/${gnb_log_filename}
38 Remove File ${EXECDIR}/${e2mgr_log_filename}
39 Remove File ${EXECDIR}/${e2t_log_filename}
40 Remove File ${EXECDIR}/${rm_sim_log_filename}
47 Run ${Save_rm_sim_log}
50 Run And Return Rc And Output ${stop_simu}
53 Log To Console Starting preparations
54 ${starting_timestamp} Evaluate datetime.datetime.now(datetime.timezone.utc).isoformat("T") modules=datetime
55 ${e2t_log_filename} Evaluate "e2t.${SUITE NAME}.log".replace(" ","-")
56 ${e2mgr_log_filename} Evaluate "e2mgr.${SUITE NAME}.log".replace(" ","-")
57 ${gnb_log_filename} Evaluate "gnb.${SUITE NAME}.log".replace(" ","-")
58 ${rm_sim_log_filename} Evaluate "rm_sim.${SUITE NAME}.log".replace(" ","-")
59 ${Save_sim_log} Evaluate 'docker logs --since ${starting_timestamp} gnbe2_oran_simu > ${gnb_log_filename}'
60 ${Save_e2mgr_log} Evaluate 'docker logs --since ${starting_timestamp} e2mgr > ${e2mgr_log_filename}'
61 ${Save_e2t_log} Evaluate 'docker logs --since ${starting_timestamp} e2 > ${e2t_log_filename}'
62 ${Save_rm_sim_log} Evaluate 'docker logs --since ${starting_timestamp} rm_sim > ${rm_sim_log_filename}'
63 Set Suite Variable ${e2t_log_filename}
64 Set Suite Variable ${e2mgr_log_filename}
65 Set Suite Variable ${gnb_log_filename}
66 Set Suite Variable ${rm_sim_log_filename}
67 Set Suite Variable ${Save_sim_log}
68 Set Suite Variable ${Save_e2mgr_log}
69 Set Suite Variable ${Save_e2t_log}
70 Set Suite Variable ${Save_rm_sim_log}
72 Log To Console Ready to flush db
73 ${flush} cleanup_db.flush
74 Should Be Equal As Strings ${flush} True
75 Run And Return Rc And Output ${stop_simu}
76 Run And Return Rc And Output ${docker_Remove}
77 Run And Return Rc And Output ${run_simu_regular}
79 Log To Console Validating dockers are up
80 ${result}= Run And Return Rc And Output ${docker_command}
81 Should Be Equal As Integers ${result[1]} ${docker_number}
84 Run And Return Rc And Output ${start_e2}
85 ${result}= Run And Return Rc And Output ${docker_command}
86 Should Be Equal As Integers ${result[1]} ${docker_number}
90 Run And Return Rc And Output ${stop_e2}
91 ${result}= Run And Return Rc And Output ${docker_command}
92 Should Be Equal As Integers ${result[1]} ${docker_number-1}
96 Run And Return Rc And Output ${dbass_remove}
97 Run And Return Rc And Output ${dbass_start}
98 ${result}= Run And Return Rc And Output ${docker_command}
99 Should Be Equal As Integers ${result[1]} ${docker_number}
102 Run And Return Rc And Output ${dbass_stop}
103 ${result}= Run And Return Rc And Output ${docker_command}
104 Should Be Equal As Integers ${result[1]} ${docker_number-1}
107 Run And Return Rc And Output ${restart_simu}
108 ${result}= Run And Return Rc And Output ${docker_command}
109 Should Be Equal As Integers ${result[1]} ${docker_number}
111 Start RoutingManager Simulator
112 Run And Return Rc And Output ${start_routingmanager_sim}
114 Stop RoutingManager Simulator
115 Run And Return Rc And Output ${stop_routingmanager_sim}