blob: 6ed56179b3878c6700646dff046381ccf909bd87 [file] [log] [blame]
Amichai4db397d2019-08-28 19:23:15 +03001##############################################################################
2#
3# Copyright (c) 2019 AT&T Intellectual Property.
4#
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
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
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.
16#
17##############################################################################
nm755n15d39822019-11-28 16:56:00 +000018#
19# This source code is part of the near-RT RIC (RAN Intelligent Controller)
20# platform project (RICP).
21#
Amichai4db397d2019-08-28 19:23:15 +030022
23*** Settings ***
24Documentation Keywords file
ss412gde190682019-10-24 09:29:26 +030025Library ../Scripts/cleanup_db.py
Amichai4db397d2019-08-28 19:23:15 +030026Resource ../Resource/resource.robot
27Library OperatingSystem
28
29
ss412g42996b72019-09-10 14:30:26 +030030
31
32
Amichai4db397d2019-08-28 19:23:15 +030033*** Keywords ***
34Post Request setup node b x-2
35 Set Headers ${header}
36 POST /v1/nodeb/x2-setup ${json}
37
38
ss412g42996b72019-09-10 14:30:26 +030039
Amichai4db397d2019-08-28 19:23:15 +030040Get Request node b enb test1
41 Sleep 1s
42 GET /v1/nodeb/test1
43
44
45Get Request node b enb test2
46 Sleep 1s
47 GET /v1/nodeb/test2
48
ss412g42996b72019-09-10 14:30:26 +030049
ss412gde190682019-10-24 09:29:26 +030050Remove log files
51 Remove File ${EXECDIR}/${gnb_log_filename}
52 Remove File ${EXECDIR}/${e2mgr_log_filename}
53 Remove File ${EXECDIR}/${rsm_log_filename}
54 Remove File ${EXECDIR}/${e2adapter_log_filename}
55
56Save logs
57 Sleep 1s
58 Run ${Save_sim_log}
59 Run ${Save_e2mgr_log}
60 Run ${Save_rsm_log}
61 Run ${Save_e2adapter_log}
62
ss412g42996b72019-09-10 14:30:26 +030063
Amichai4db397d2019-08-28 19:23:15 +030064Post Request setup node b endc-setup
65 Set Headers ${header}
66 POST /v1/nodeb/endc-setup ${endcjson}
67
ss412g42996b72019-09-10 14:30:26 +030068Stop Simulator
69 Run And Return Rc And Output ${stop_simu}
70
Amichai4db397d2019-08-28 19:23:15 +030071
72Prepare Simulator For Load Information
73 Run And Return Rc And Output ${stop_simu}
74 Run And Return Rc And Output ${docker_Remove}
ss412gde190682019-10-24 09:29:26 +030075 ${flush} cleanup_db.flush
ss412ge7dbffd2019-09-03 18:34:28 +030076 Should Be Equal As Strings ${flush} True
77 Run And Return Rc And Output ${run_simu_load}
Amichai4db397d2019-08-28 19:23:15 +030078 ${result}= Run And Return Rc And Output ${docker_command}
ss412gde190682019-10-24 09:29:26 +030079 Should Be Equal As Integers ${result[1]} ${docker_number}
Amichai4db397d2019-08-28 19:23:15 +030080
ss412ge7dbffd2019-09-03 18:34:28 +030081Prepare Enviorment
ss412gde190682019-10-24 09:29:26 +030082 ${flush} cleanup_db.flush
ss412ge7dbffd2019-09-03 18:34:28 +030083 Should Be Equal As Strings ${flush} True
84 Run And Return Rc And Output ${stop_simu}
85 Run And Return Rc And Output ${docker_Remove}
86 Run And Return Rc And Output ${run_simu_regular}
87 Run And Return Rc And Output ${restart_e2adapter}
ss412gb50194c2019-09-11 14:14:56 +030088 Sleep 2s
ss412ge7dbffd2019-09-03 18:34:28 +030089 ${result}= Run And Return Rc And Output ${docker_command}
ss412gde190682019-10-24 09:29:26 +030090 Should Be Equal As Integers ${result[1]} ${docker_number}
ss412ge7dbffd2019-09-03 18:34:28 +030091
92Start E2
93 Run And Return Rc And Output ${start_e2}
94 ${result}= Run And Return Rc And Output ${docker_command}
ss412gde190682019-10-24 09:29:26 +030095 Should Be Equal As Integers ${result[1]} ${docker_number}
ss412ge7dbffd2019-09-03 18:34:28 +030096 Sleep 2s
97
ss412gde190682019-10-24 09:29:26 +030098Start Dbass
99 Run And Return Rc And Output ${dbass_remove}
100 Run And Return Rc And Output ${dbass_start}
ss412ge7dbffd2019-09-03 18:34:28 +0300101 ${result}= Run And Return Rc And Output ${docker_command}
ss412gde190682019-10-24 09:29:26 +0300102 Should Be Equal As Integers ${result[1]} ${docker_number}
103
104Stop Dbass
105 Run And Return Rc And Output ${dbass_stop}
106 ${result}= Run And Return Rc And Output ${docker_command}
107 Should Be Equal As Integers ${result[1]} ${docker_number-1}
ss412ge7dbffd2019-09-03 18:34:28 +0300108
109
110
111
Amichai4db397d2019-08-28 19:23:15 +0300112