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
36 PUT ${update_gnb_url} ${update_gnb_body}
38 Set General Configuration request
40 PUT ${set_general_configuration} ${set_general_configuration_body}
42 Update Ran request not valid
44 PUT ${update_gnb_url} ${update_gnb_body_notvalid}
47 Remove File ${EXECDIR}/${gnb_log_filename}
48 Remove File ${EXECDIR}/${e2mgr_log_filename}
49 Remove File ${EXECDIR}/${e2t_log_filename}
50 Remove File ${EXECDIR}/${rm_sim_log_filename}
57 Run ${Save_rm_sim_log}
60 Run And Return Rc And Output ${stop_simu}
63 Log To Console Starting preparations
64 ${starting_timestamp} Evaluate datetime.datetime.now(datetime.timezone.utc).isoformat("T") modules=datetime
65 ${e2t_log_filename} Evaluate "e2t.${SUITE NAME}.log".replace(" ","-")
66 ${e2mgr_log_filename} Evaluate "e2mgr.${SUITE NAME}.log".replace(" ","-")
67 ${gnb_log_filename} Evaluate "gnb.${SUITE NAME}.log".replace(" ","-")
68 ${rm_sim_log_filename} Evaluate "rm_sim.${SUITE NAME}.log".replace(" ","-")
69 ${Save_sim_log} Evaluate 'docker logs --since ${starting_timestamp} gnbe2_oran_simu > ${gnb_log_filename}'
70 ${Save_e2mgr_log} Evaluate 'docker logs --since ${starting_timestamp} e2mgr > ${e2mgr_log_filename}'
71 ${Save_e2t_log} Evaluate 'docker logs --since ${starting_timestamp} e2 > ${e2t_log_filename}'
72 ${Save_rm_sim_log} Evaluate 'docker logs --since ${starting_timestamp} rm_sim > ${rm_sim_log_filename}'
73 Set Suite Variable ${e2t_log_filename}
74 Set Suite Variable ${e2mgr_log_filename}
75 Set Suite Variable ${gnb_log_filename}
76 Set Suite Variable ${rm_sim_log_filename}
77 Set Suite Variable ${Save_sim_log}
78 Set Suite Variable ${Save_e2mgr_log}
79 Set Suite Variable ${Save_e2t_log}
80 Set Suite Variable ${Save_rm_sim_log}
82 Log To Console Ready to flush db
83 ${flush} cleanup_db.flush
84 Should Be Equal As Strings ${flush} True
85 Run And Return Rc And Output ${stop_simu}
86 Run And Return Rc And Output ${docker_Remove}
87 Run And Return Rc And Output ${run_simu_regular}
89 Log To Console Validating dockers are up
90 ${result}= Run And Return Rc And Output ${docker_command}
91 Should Be Equal As Integers ${result[1]} ${docker_number}
94 Run And Return Rc And Output ${start_e2}
95 ${result}= Run And Return Rc And Output ${docker_command}
96 Should Be Equal As Integers ${result[1]} ${docker_number}
100 Run And Return Rc And Output ${stop_e2}
101 ${result}= Run And Return Rc And Output ${docker_command}
102 Should Be Equal As Integers ${result[1]} ${docker_number-1}
106 Run And Return Rc And Output ${dbass_remove}
107 Run And Return Rc And Output ${dbass_start}
108 ${result}= Run And Return Rc And Output ${docker_command}
109 Should Be Equal As Integers ${result[1]} ${docker_number}
112 Run And Return Rc And Output ${dbass_stop}
113 ${result}= Run And Return Rc And Output ${docker_command}
114 Should Be Equal As Integers ${result[1]} ${docker_number-1}
117 Run And Return Rc And Output ${restart_simu}
118 ${result}= Run And Return Rc And Output ${docker_command}
119 Should Be Equal As Integers ${result[1]} ${docker_number}
121 Start RoutingManager Simulator
122 Run And Return Rc And Output ${start_routingmanager_sim}
124 Stop RoutingManager Simulator
125 Run And Return Rc And Output ${stop_routingmanager_sim}
127 Restart simulator with less docker
128 Run And Return Rc And Output ${restart_simu}
129 ${result}= Run And Return Rc And Output ${docker_command}
130 Should Be Equal As Integers ${result[1]} ${docker_number-1}
132 Flush And Populate DB
133 ${flush} cleanup_db.flush