Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Michael Black
OpenXG UE
Commits
758c4723
Commit
758c4723
authored
Sep 30, 2021
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add UL implementation
parent
2e1d2611
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
6 deletions
+39
-6
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+39
-6
No files found.
ci-scripts/cls_oaicitest.py
View file @
758c4723
...
@@ -2247,7 +2247,7 @@ class OaiCiTest():
...
@@ -2247,7 +2247,7 @@ class OaiCiTest():
SSH
.
command
(
'docker inspect --format="TRF_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" prod-trf-gen'
,
'\$'
,
5
)
SSH
.
command
(
'docker inspect --format="TRF_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" prod-trf-gen'
,
'\$'
,
5
)
result
=
re
.
search
(
'TRF_IP_ADDR = (?P<trf_ip_addr>[0-9\.]+)'
,
SSH
.
getBefore
())
result
=
re
.
search
(
'TRF_IP_ADDR = (?P<trf_ip_addr>[0-9\.]+)'
,
SSH
.
getBefore
())
if
result
is
not
None
:
if
result
is
not
None
:
EPC_Iperf_UE_IPAddress
=
result
.
group
(
'trf_ip_addr'
)
trf_gen_IP
=
result
.
group
(
'trf_ip_addr'
)
SSH
.
close
()
SSH
.
close
()
#kill iperf processes on UE side before (in case there are still some remaining)
#kill iperf processes on UE side before (in case there are still some remaining)
SSH
.
open
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
)
SSH
.
open
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
)
...
@@ -2269,22 +2269,55 @@ class OaiCiTest():
...
@@ -2269,22 +2269,55 @@ class OaiCiTest():
#client side EPC
#client side EPC
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
client_filename
=
'iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
client_filename
=
'iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
'docker exec -it prod-trf-gen /bin/bash -c "killall --signal SIGKILL iperf"'
,
'\$'
,
5
)
iperf_cmd
=
'bin/iperf -c '
+
UE_IPAddress
+
' '
+
self
.
iperf_args
+
' 2>&1 > '
+
client_filename
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 -it prod-trf-gen /bin/bash -c
\"
'
+
iperf_cmd
+
'
\"
'
SSH
.
command
(
cmd
,
'\$'
,
int
(
iperf_time
)
*
5.0
)
SSH
.
command
(
cmd
,
'\$'
,
int
(
iperf_time
)
*
5.0
)
SSH
.
command
(
'docker cp prod-trf-gen:'
+
client_filename
+
' '
+
EPC
.
SourceCodePath
,
'\$'
,
5
)
SSH
.
command
(
'docker cp prod-trf-gen:
bin/
'
+
client_filename
+
' '
+
EPC
.
SourceCodePath
,
'\$'
,
5
)
SSH
.
copyin
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
EPC
.
SourceCodePath
+
'/'
+
client_filename
,
'.'
)
SSH
.
copyin
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
EPC
.
SourceCodePath
+
'/'
+
client_filename
,
'.'
)
SSH
.
close
()
SSH
.
close
()
#copy the 2 resulting files locally
#copy the 2 resulting files locally
SSH
.
copyin
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
,
server_filename
,
'.'
)
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
,
client_filename
,
'.'
)
#send for analysis
#send for analysis
self
.
Iperf_analyzeV2Server
(
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
self
.
iperf_args
,
server_filename
,
1
)
self
.
Iperf_analyzeV2Server
(
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
self
.
iperf_args
,
server_filename
,
1
)
else
:
elif
self
.
iperf_direction
==
"UL"
:
#default is ltebox
logging
.
debug
(
"Iperf for Module in UL mode detected"
)
#server side EPC
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
server_filename
=
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
'docker exec -it prod-trf-gen /bin/bash -c "killall --signal SIGKILL iperf"'
,
'\$'
,
5
)
iperf_cmd
=
'echo $USER; nohup bin/iperf -s -u 2>&1 > '
+
server_filename
cmd
=
'docker exec -it 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
(
'iperf -B '
+
UE_IPAddress
+
' -c '
+
trf_gen_IP
+
' '
+
self
.
iperf_args
+
' 2>&1 > '
+
client_filename
,
'\$'
,
int
(
iperf_time
)
*
5.0
)
SSH
.
close
()
#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:bin/'
+
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
,
'.'
)
#send for analysis
self
.
Iperf_analyzeV2Server
(
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
self
.
iperf_args
,
server_filename
,
1
)
else
:
logging
.
debug
(
"Incorrect or missing IPERF direction in XML"
)
else
:
#default is ltebox
SSH
=
sshconnection
.
SSHConnection
()
SSH
=
sshconnection
.
SSHConnection
()
#kill iperf processes before (in case there are still some remaining)
#kill iperf processes before (in case there are still some remaining)
...
@@ -2322,7 +2355,7 @@ class OaiCiTest():
...
@@ -2322,7 +2355,7 @@ class OaiCiTest():
filename
=
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
filename
=
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
self
.
Iperf_analyzeV2Server
(
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
self
.
iperf_args
,
filename
,
1
)
self
.
Iperf_analyzeV2Server
(
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
self
.
iperf_args
,
filename
,
1
)
elif
self
.
iperf_direction
==
"UL"
:
#does not work at the moment
elif
self
.
iperf_direction
==
"UL"
:
logging
.
debug
(
"Iperf for Module in UL mode detected"
)
logging
.
debug
(
"Iperf for Module in UL mode detected"
)
#server side EPC
#server side EPC
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
...
...
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