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
34 Post Request setup node b x-2
36 POST /v1/nodeb/x2-setup ${json}
39 Put Request Resource Status Start
41 PUT /v1/general/resourcestatus ${resource_status_start_json}
44 Put Request Resource Status Stop
46 PUT /v1/general/resourcestatus ${resource_status_stop_json}
48 Get Request node b enb test1
53 Get Request node b enb test2
59 Remove File ${EXECDIR}/${gnb_log_filename}
60 Remove File ${EXECDIR}/${e2mgr_log_filename}
61 Remove File ${EXECDIR}/${e2t_log_filename}
62 Remove File ${EXECDIR}/${rsm_log_filename}
63 Remove File ${EXECDIR}/${e2e_simu_log_filename}
64 Remove File ${EXECDIR}/${rm_sim_log_filename}
65 Remove File ${EXECDIR}/${e2adapter_log_filename}
73 Run ${Save_e2e_simu_log}
74 Run ${Save_rm_sim_log}
75 Run ${Save_e2adapter_log}
78 Post Request setup node b endc-setup
80 POST /v1/nodeb/endc-setup ${endcjson}
83 Run And Return Rc And Output ${stop_simu}
86 Prepare Simulator For Load Information
87 Run And Return Rc And Output ${stop_simu}
88 Run And Return Rc And Output ${docker_Remove}
89 ${flush} cleanup_db.flush
90 Should Be Equal As Strings ${flush} True
91 Run And Return Rc And Output ${run_simu_load}
92 ${result}= Run And Return Rc And Output ${docker_command}
93 Should Be Equal As Integers ${result[1]} ${docker_number}
96 ${starting_timestamp} Evaluate datetime.datetime.now(datetime.timezone.utc).isoformat("T") modules=datetime
97 ${e2t_log_filename} Evaluate "e2t.${SUITE NAME}.log".replace(" ","-")
98 ${e2mgr_log_filename} Evaluate "e2mgr.${SUITE NAME}.log".replace(" ","-")
99 ${gnb_log_filename} Evaluate "gnb.${SUITE NAME}.log".replace(" ","-")
100 ${rsm_log_filename} Evaluate "rsm.${SUITE NAME}.log".replace(" ","-")
101 ${e2e_simu_log_filename} Evaluate "e2e_simu.${SUITE NAME}.log".replace(" ","-")
102 ${rm_sim_log_filename} Evaluate "rm_sim.${SUITE NAME}.log".replace(" ","-")
103 ${e2adapter_log_filename} Evaluate "e2adapter.${SUITE NAME}.log".replace(" ","-")
104 ${Save_sim_log} Evaluate 'docker logs --since ${starting_timestamp} gnbe2_simu > ${gnb_log_filename}'
105 ${Save_e2mgr_log} Evaluate 'docker logs --since ${starting_timestamp} e2mgr > ${e2mgr_log_filename}'
106 ${Save_e2t_log} Evaluate 'docker logs --since ${starting_timestamp} e2 > ${e2t_log_filename}'
107 ${Save_rsm_log} Evaluate 'docker logs --since ${starting_timestamp} rsm > ${rsm_log_filename}'
108 ${Save_e2e_simu_log} Evaluate 'docker logs --since ${starting_timestamp} e2e_simu > ${e2e_simu_log_filename}'
109 ${Save_rm_sim_log} Evaluate 'docker logs --since ${starting_timestamp} rm_sim > ${rm_sim_log_filename}'
110 ${Save_e2adapter_log} Evaluate 'docker logs --since ${starting_timestamp} e2adapter > ${e2adapter_log_filename}'
111 Set Suite Variable ${e2t_log_filename}
112 Set Suite Variable ${e2mgr_log_filename}
113 Set Suite Variable ${gnb_log_filename}
114 Set Suite Variable ${rsm_log_filename}
115 Set Suite Variable ${e2e_simu_log_filename}
116 Set Suite Variable ${rm_sim_log_filename}
117 Set Suite Variable ${e2adapter_log_filename}
118 Set Suite Variable ${Save_sim_log}
119 Set Suite Variable ${Save_e2mgr_log}
120 Set Suite Variable ${Save_e2t_log}
121 Set Suite Variable ${Save_rsm_log}
122 Set Suite Variable ${Save_e2e_simu_log}
123 Set Suite Variable ${Save_rm_sim_log}
124 Set Suite Variable ${Save_e2adapter_log}
126 ${flush} cleanup_db.flush
127 Should Be Equal As Strings ${flush} True
128 Run And Return Rc And Output ${stop_simu}
129 Run And Return Rc And Output ${stop_e2e_simu}
130 Run And Return Rc And Output ${docker_Remove}
131 Run And Return Rc And Output ${docker_remove_e2e_simu}
132 Run And Return Rc And Output ${run_simu_regular}
133 Run And Return Rc And Output ${run_e2e_simu_regular}
134 Run And Return Rc And Output ${restart_e2adapter}
136 ${result}= Run And Return Rc And Output ${docker_command}
137 Should Be Equal As Integers ${result[1]} ${docker_number}
140 Run And Return Rc And Output ${start_e2}
141 ${result}= Run And Return Rc And Output ${docker_command}
142 Should Be Equal As Integers ${result[1]} ${docker_number}
146 Run And Return Rc And Output ${stop_e2}
147 ${result}= Run And Return Rc And Output ${docker_command}
148 Should Be Equal As Integers ${result[1]} ${docker_number-1}
152 Run And Return Rc And Output ${dbass_remove}
153 Run And Return Rc And Output ${dbass_start}
154 ${result}= Run And Return Rc And Output ${docker_command}
155 Should Be Equal As Integers ${result[1]} ${docker_number}
158 Run And Return Rc And Output ${dbass_stop}
159 ${result}= Run And Return Rc And Output ${docker_command}
160 Should Be Equal As Integers ${result[1]} ${docker_number-1}
164 Run And Return Rc And Output ${restart_docker_sim}
165 ${result}= Run And Return Rc And Output ${docker_command}
166 Should Be Equal As Integers ${result[1]} ${docker_number}
168 Start RoutingManager Simulator
169 Run And Return Rc And Output ${start_routingmanager_sim}
171 Stop RoutingManager Simulator
172 Run And Return Rc And Output ${stop_routingmanager_sim}