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 ##############################################################################
20 Documentation Keywords file
21 Library ../Scripts/cleanup_db.py
22 Resource ../Resource/resource.robot
23 Library OperatingSystem
30 Post Request setup node b x-2
32 POST /v1/nodeb/x2-setup ${json}
35 Put Request Resource Status Start
37 PUT /v1/general/resourcestatus ${resource_status_start_json}
40 Put Request Resource Status Stop
42 PUT /v1/general/resourcestatus ${resource_status_stop_json}
44 Get Request node b enb test1
49 Get Request node b enb test2
55 Remove File ${EXECDIR}/${gnb_log_filename}
56 Remove File ${EXECDIR}/${e2mgr_log_filename}
57 Remove File ${EXECDIR}/${e2t_log_filename}
58 Remove File ${EXECDIR}/${rsm_log_filename}
59 Remove File ${EXECDIR}/${e2e_simu_log_filename}
60 Remove File ${EXECDIR}/${e2adapter_log_filename}
68 Run ${Save_e2e_simu_log}
69 Run ${Save_e2adapter_log}
72 Post Request setup node b endc-setup
74 POST /v1/nodeb/endc-setup ${endcjson}
77 Run And Return Rc And Output ${stop_simu}
81 Prepare Simulator For Load Information
82 Run And Return Rc And Output ${stop_simu}
83 Run And Return Rc And Output ${docker_Remove}
84 ${flush} cleanup_db.flush
85 Should Be Equal As Strings ${flush} True
86 Run And Return Rc And Output ${run_simu_load}
87 ${result}= Run And Return Rc And Output ${docker_command}
88 Should Be Equal As Integers ${result[1]} ${docker_number}
91 ${starting_timestamp} Evaluate datetime.datetime.now(datetime.timezone.utc).isoformat("T") modules=datetime
92 ${e2t_log_filename} Evaluate "e2t.${SUITE NAME}.log".replace(" ","-")
93 ${e2mgr_log_filename} Evaluate "e2mgr.${SUITE NAME}.log".replace(" ","-")
94 ${gnb_log_filename} Evaluate "gnb.${SUITE NAME}.log".replace(" ","-")
95 ${rsm_log_filename} Evaluate "rsm.${SUITE NAME}.log".replace(" ","-")
96 ${e2e_simu_log_filename} Evaluate "e2e_simu.${SUITE NAME}.log".replace(" ","-")
97 ${e2adapter_log_filename} Evaluate "e2adapter.${SUITE NAME}.log".replace(" ","-")
98 ${Save_sim_log} Evaluate 'docker logs --since ${starting_timestamp} gnbe2_simu > ${gnb_log_filename}'
99 ${Save_e2mgr_log} Evaluate 'docker logs --since ${starting_timestamp} e2mgr > ${e2mgr_log_filename}'
100 ${Save_e2t_log} Evaluate 'docker logs --since ${starting_timestamp} e2 > ${e2t_log_filename}'
101 ${Save_rsm_log} Evaluate 'docker logs --since ${starting_timestamp} rsm > ${rsm_log_filename}'
102 ${Save_e2e_simu_log} Evaluate 'docker logs --since ${starting_timestamp} e2e_simu > ${e2e_simu_log_filename}'
103 ${Save_e2adapter_log} Evaluate 'docker logs --since ${starting_timestamp} e2adapter > ${e2adapter_log_filename}'
104 Set Suite Variable ${e2t_log_filename}
105 Set Suite Variable ${e2mgr_log_filename}
106 Set Suite Variable ${gnb_log_filename}
107 Set Suite Variable ${rsm_log_filename}
108 Set Suite Variable ${e2e_simu_log_filename}
109 Set Suite Variable ${e2adapter_log_filename}
110 Set Suite Variable ${Save_sim_log}
111 Set Suite Variable ${Save_e2mgr_log}
112 Set Suite Variable ${Save_e2t_log}
113 Set Suite Variable ${Save_rsm_log}
114 Set Suite Variable ${Save_e2e_simu_log}
115 Set Suite Variable ${Save_e2adapter_log}
117 ${flush} cleanup_db.flush
118 Should Be Equal As Strings ${flush} True
119 Run And Return Rc And Output ${stop_simu}
120 Run And Return Rc And Output ${stop_e2e_simu}
121 Run And Return Rc And Output ${docker_Remove}
122 Run And Return Rc And Output ${docker_remove_e2e_simu}
123 Run And Return Rc And Output ${run_simu_regular}
124 Run And Return Rc And Output ${run_e2e_simu_regular}
125 Run And Return Rc And Output ${restart_e2adapter}
127 ${result}= Run And Return Rc And Output ${docker_command}
128 Should Be Equal As Integers ${result[1]} ${docker_number}
131 Run And Return Rc And Output ${start_e2}
132 ${result}= Run And Return Rc And Output ${docker_command}
133 Should Be Equal As Integers ${result[1]} ${docker_number}
137 Run And Return Rc And Output ${stop_e2}
138 ${result}= Run And Return Rc And Output ${docker_command}
139 Should Be Equal As Integers ${result[1]} ${docker_number-1}
143 Run And Return Rc And Output ${dbass_remove}
144 Run And Return Rc And Output ${dbass_start}
145 ${result}= Run And Return Rc And Output ${docker_command}
146 Should Be Equal As Integers ${result[1]} ${docker_number}
149 Run And Return Rc And Output ${dbass_stop}
150 ${result}= Run And Return Rc And Output ${docker_command}
151 Should Be Equal As Integers ${result[1]} ${docker_number-1}
155 Run And Return Rc And Output ${restart_docker_sim}
156 ${result}= Run And Return Rc And Output ${docker_command}
157 Should Be Equal As Integers ${result[1]} ${docker_number}