Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-RAN
Commits
9f30ff6c
Commit
9f30ff6c
authored
Feb 09, 2022
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve iperf client file retrieval
parent
d87d2256
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
16 deletions
+20
-16
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+20
-16
No files found.
ci-scripts/cls_oaicitest.py
View file @
9f30ff6c
...
...
@@ -2386,7 +2386,7 @@ class OaiCiTest():
iperf_time
=
self
.
Iperf_ComputeTime
()
if
self
.
iperf_direction
==
"DL"
:
logging
.
debug
(
"Iperf for Module in DL mode detected"
)
#server side UE
#
#
server side UE
server_filename
=
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
open
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
)
cmd
=
'rm '
+
server_filename
...
...
@@ -2394,20 +2394,21 @@ class OaiCiTest():
cmd
=
'echo $USER; nohup iperf -s -B '
+
UE_IPAddress
+
' -u 2>&1 > '
+
server_filename
+
' &'
SSH
.
command
(
cmd
,
'\$'
,
5
)
SSH
.
close
()
#client side EPC
#
#
client side EPC
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
client_filename
=
'iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
#remove old client file in EPC.SourceCodePath
cmd
=
'rm '
+
EPC
.
SourceCodePath
+
'/'
+
client_filename
SSH
.
command
(
cmd
,
'\$'
,
5
)
iperf_cmd
=
'bin/iperf -c '
+
UE_IPAddress
+
' '
+
self
.
iperf_args
+
' 2>&1 > '
+
client_filename
cmd
=
'docker exec -it prod-trf-gen /bin/bash -c
\"
'
+
iperf_cmd
+
'
\"
'
cmd
=
'docker exec -
w /iperf-2.0.13 -
it prod-trf-gen /bin/bash -c
\"
'
+
iperf_cmd
+
'
\"
'
SSH
.
command
(
cmd
,
'\$'
,
int
(
iperf_time
)
*
5.0
)
SSH
.
command
(
'docker cp prod-trf-gen:/iperf-2.0.13/'
+
client_filename
+
' '
+
EPC
.
SourceCodePath
,
'\$'
,
5
)
SSH
.
copyin
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
EPC
.
SourceCodePath
+
'/'
+
client_filename
,
'.'
)
SSH
.
close
()
#copy the 2 resulting files locally
#copy the 2 resulting files locally
(python executor)
SSH
.
copyin
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
,
server_filename
,
'.'
)
SSH
.
copyin
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
client_filename
,
'.'
)
SSH
.
copyin
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
EPC
.
SourceCodePath
+
'/'
+
client_filename
,
'.'
)
#send for analysis
self
.
Iperf_analyzeV2Server
(
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
self
.
iperf_args
,
server_filename
,
1
)
...
...
@@ -2418,7 +2419,7 @@ class OaiCiTest():
server_filename
=
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
iperf_cmd
=
'echo $USER; nohup bin/iperf -s -u 2>&1 > '
+
server_filename
cmd
=
'docker exec -d prod-trf-gen /bin/bash -c
\"
'
+
iperf_cmd
+
'
\"
'
cmd
=
'docker exec -d
-w /iperf-2.0.13
prod-trf-gen /bin/bash -c
\"
'
+
iperf_cmd
+
'
\"
'
SSH
.
command
(
cmd
,
'\$'
,
5
)
SSH
.
close
()
...
...
@@ -2433,29 +2434,28 @@ class OaiCiTest():
#once client is done, retrieve the server file from container to EPC Host
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
command
(
'docker cp prod-trf-gen:/iperf-2.0.13/'
+
server_filename
+
' '
+
EPC
.
SourceCodePath
,
'\$'
,
5
)
SSH
.
copyin
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
EPC
.
SourceCodePath
+
'/'
+
server_filename
,
'.'
)
SSH
.
close
()
#copy the 2 resulting files locally
SSH
.
copyin
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
,
client_filename
,
'.'
)
SSH
.
copyin
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
server_filename
,
'.'
)
SSH
.
copyin
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
EPC
.
SourceCodePath
+
'/'
+
server_filename
,
'.'
)
#send for analysis
self
.
Iperf_analyzeV2Server
(
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
self
.
iperf_args
,
server_filename
,
1
)
elif
self
.
iperf_direction
==
"BIDIR"
:
logging
.
debug
(
"Iperf for Module in BIDIR mode detected"
)
#server side EPC
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
server_filename
=
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
client_filename
=
'iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
#server side EPC
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
iperf_cmd
=
'echo $USER; nohup /usr/local/bin/iperf3 -s 2>&1 > '
+
server_filename
cmd
=
'docker exec -d prod-trf-gen /bin/bash -c
\"
'
+
iperf_cmd
+
'
\"
'
cmd
=
'docker exec -d
-w /iperf-2.0.13
prod-trf-gen /bin/bash -c
\"
'
+
iperf_cmd
+
'
\"
'
SSH
.
command
(
cmd
,
'\$'
,
5
)
SSH
.
close
()
#client side UE
SSH
.
open
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
)
client_filename
=
'iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
cmd
=
'rm '
+
client_filename
SSH
.
command
(
cmd
,
'\$'
,
5
)
SSH
.
command
(
'iperf3 -B '
+
UE_IPAddress
+
' -c '
+
trf_gen_IP
+
' '
+
self
.
iperf_args
+
' 2>&1 > '
+
client_filename
,
'\$'
,
int
(
iperf_time
)
*
5.0
)
...
...
@@ -2463,13 +2463,17 @@ class OaiCiTest():
#once client is done, retrieve the server file from container to EPC Host
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
#remove old server file in EPC.SourceCodePath
cmd
=
'rm '
+
EPC
.
SourceCodePath
+
'/'
+
server_filename
SSH
.
command
(
cmd
,
'\$'
,
5
)
#copy from docker container to EPC.SourceCodePath
SSH
.
command
(
'docker cp prod-trf-gen:/iperf-2.0.13/'
+
server_filename
+
' '
+
EPC
.
SourceCodePath
,
'\$'
,
5
)
SSH
.
copyin
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
EPC
.
SourceCodePath
+
'/'
+
server_filename
,
'.'
)
SSH
.
close
()
#copy the 2 resulting files locally
SSH
.
copyin
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
,
client_filename
,
'.'
)
SSH
.
copyin
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
server_filename
,
'.'
)
SSH
.
copyin
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
EPC
.
SourceCodePath
+
'/'
+
server_filename
,
'.'
)
#send for analysis
self
.
Iperf_analyzeV2BIDIR
(
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
server_filename
,
client_filename
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment