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
31bc110d
Commit
31bc110d
authored
Apr 04, 2021
by
hardy
Committed by
Remi Hardy
Apr 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a bit of re factoring
parent
cffdac04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
19 deletions
+15
-19
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+15
-19
No files found.
ci-scripts/cls_oaicitest.py
View file @
31bc110d
...
...
@@ -1450,7 +1450,7 @@ class OaiCiTest():
statusQueue
.
put
(
message
)
lock
.
release
()
def
Ping_common
(
self
,
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
EPC
,
Infra
UE
):
def
Ping_common
(
self
,
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
EPC
,
Module_
UE
):
try
:
SSH
=
sshconnection
.
SSHConnection
()
# Launch ping on the EPC side (true for ltebox and old open-air-cn)
...
...
@@ -1498,8 +1498,6 @@ class OaiCiTest():
#cat is executed on EPC
SSH
.
command
(
'cat '
+
EPC
.
SourceCodePath
+
'/scripts/ping_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
'\$'
,
5
)
else
:
#launch from Module
Module_UE
=
cls_module_ue
.
Module_UE
(
InfraUE
.
ci_ue_infra
[
self
.
ue_id
])
SSH
.
open
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
)
cmd
=
'ping -I '
+
UE_IPAddress
+
' '
+
self
.
ping_args
+
' '
+
EPC
.
IPAddress
+
' 2>&1 > ping_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
cmd
,
'\$'
,
int
(
ping_time
[
0
])
*
1.5
)
...
...
@@ -1734,7 +1732,7 @@ class OaiCiTest():
device_id
=
self
.
UEDevices
[
i
]
else
:
device_id
=
""
p
=
Process
(
target
=
self
.
Ping_common
,
args
=
(
lock
,
UE_IPAddress
,
device_id
,
status_queue
,
EPC
,
Infra
UE
,))
p
=
Process
(
target
=
self
.
Ping_common
,
args
=
(
lock
,
UE_IPAddress
,
device_id
,
status_queue
,
EPC
,
Module_
UE
,))
p
.
daemon
=
True
p
.
start
()
multi_jobs
.
append
(
p
)
...
...
@@ -2184,13 +2182,12 @@ class OaiCiTest():
SSH
.
copyout
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
'iperf_'
+
self
.
testCase_id
+
'_'
+
device_id
+
'.log'
,
EPC
.
SourceCodePath
+
'/scripts'
)
def
Iperf_Module
(
self
,
lock
,
UE_IPAddress
,
device_id
,
idx
,
ue_num
,
statusQueue
,
EPC
,
Infra
UE
):
def
Iperf_Module
(
self
,
lock
,
UE_IPAddress
,
device_id
,
idx
,
ue_num
,
statusQueue
,
EPC
,
Module_
UE
):
SSH
=
sshconnection
.
SSHConnection
()
iperf_time
=
self
.
Iperf_ComputeTime
()
if
self
.
iperf_direction
==
"DL"
:
logging
.
debug
(
"Iperf for Module in DL mode detected"
)
#server side UE
Module_UE
=
cls_module_ue
.
Module_UE
(
InfraUE
.
ci_ue_infra
[
self
.
ue_id
])
SSH
.
open
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
HostPassword
)
cmd
=
'echo $USER; nohup iperf -s -B '
+
UE_IPAddress
+
' -u 2>&1 > iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
cmd
,
'\$'
,
5
)
...
...
@@ -2210,31 +2207,30 @@ class OaiCiTest():
elif
self
.
iperf_direction
==
"UL"
:
logging
.
debug
(
"Iperf for Module in UL mode detected"
)
#server side UE
Module_UE
=
cls_module_ue
.
Module_UE
(
InfraUE
.
ci_ue_infra
[
self
.
ue_id
])
SSH
.
open
(
Module_UE
.
UEHostIPAddr
,
Module_UE
.
UEHostUserName
,
Module_UE
.
UEHostPassWord
)
cmd
=
'echo $USER; nohup iperf -s -B '
+
UE_IPAddress
+
' -u 2>&1 > iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
#server side EPC
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
cmd
=
'iperf -s -u 2>&1 > iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
cmd
,
'\$'
,
5
)
logging
.
debug
(
cmd
)
#client side
EPC
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
cmd
=
'
iperf -c '
+
UE_
IPAddress
+
' '
+
self
.
iperf_args
+
' 2>&1 > iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
#client side
UE
SSH
.
open
(
Module_UE
.
HostIPAddress
,
Module_UE
.
HostUsername
,
Module_UE
.
Host
Password
)
cmd
=
'
echo $USER; nohup iperf -B '
+
UE_IPAddress
+
' '
+
'-c '
+
EPC
.
IPAddress
+
' '
+
self
.
iperf_args
+
' 2>&1 > iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
SSH
.
command
(
cmd
,
'\$'
,
int
(
iperf_time
)
*
5.0
)
logging
.
debug
(
cmd
)
#copy the 2 resulting files locally
SSH
.
copyin
(
Module_UE
.
UEHostIPAddr
,
Module_UE
.
UEHostUserName
,
Module_UE
.
UEHostPassW
ord
,
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
,
'.'
)
SSH
.
copyin
(
Module_UE
.
HostIPAddress
,
Module_UE
.
UEHostUsername
,
Module_UE
.
UEHostPassw
ord
,
'iperf_server_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
,
'.'
)
SSH
.
copyin
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
'iperf_client_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
,
'.'
)
#send for analysis
filename
=
'iperf_
server
_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
self
.
Iperf_analyzeV2Server
(
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
self
.
iperf_args
,
filename
,
1
)
filename
=
'iperf_
client
_'
+
self
.
testCase_id
+
'_'
+
self
.
ue_id
+
'.log'
self
.
Iperf_analyzeV2Server
(
lock
,
UE_IPAddress
,
device_id
,
statusQueue
,
self
.
iperf_args
,
filename
,
0
)
else
:
logging
.
debug
(
"Incorrect or missing IPERF direction in XML"
)
SSH
.
close
()
return
def
Iperf_common
(
self
,
lock
,
UE_IPAddress
,
device_id
,
idx
,
ue_num
,
statusQueue
,
EPC
,
InfraUE
):
def
Iperf_common
(
self
,
lock
,
UE_IPAddress
,
device_id
,
idx
,
ue_num
,
statusQueue
,
EPC
):
try
:
SSH
=
sshconnection
.
SSHConnection
()
# Single-UE profile -- iperf only on one UE
...
...
@@ -2626,9 +2622,9 @@ class OaiCiTest():
device_id
=
self
.
UEDevices
[
i
]
#special quick and dirty treatment for modules, iperf to be restructured
if
self
.
ue_id
!=
""
:
p
=
Process
(
target
=
self
.
Iperf_Module
,
args
=
(
lock
,
UE_IPAddress
,
device_id
,
i
,
ue_num
,
status_queue
,
EPC
,
Infra
UE
,))
p
=
Process
(
target
=
self
.
Iperf_Module
,
args
=
(
lock
,
UE_IPAddress
,
device_id
,
i
,
ue_num
,
status_queue
,
EPC
,
Module_
UE
,))
else
:
p
=
Process
(
target
=
self
.
Iperf_common
,
args
=
(
lock
,
UE_IPAddress
,
device_id
,
i
,
ue_num
,
status_queue
,
EPC
,
InfraUE
,
))
p
=
Process
(
target
=
self
.
Iperf_common
,
args
=
(
lock
,
UE_IPAddress
,
device_id
,
i
,
ue_num
,
status_queue
,
EPC
,
))
p
.
daemon
=
True
p
.
start
()
multi_jobs
.
append
(
p
)
...
...
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