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
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-RAN
Commits
21b63004
Commit
21b63004
authored
May 04, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove PingNoS1()
Can be handled using static IP addresses, currently not used
parent
909fee71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
94 deletions
+0
-94
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+0
-94
No files found.
ci-scripts/cls_oaicitest.py
View file @
21b63004
...
...
@@ -610,101 +610,7 @@ class OaiCiTest():
return
(
True
,
message
)
def
PingNoS1_wrong_exit
(
self
,
qMsg
,
HTML
):
message
=
'OAI UE ping result
\n
{qMsg}'
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
[
message
])
def
PingNoS1
(
self
,
HTML
,
RAN
,
EPC
,
CONTAINERS
):
raise
Exception
(
"PingNoS1 not supported!"
)
SSH
=
sshconnection
.
SSHConnection
()
check_eNB
=
True
check_OAI_UE
=
True
ping_from_eNB
=
re
.
search
(
'oaitun_enb1'
,
str
(
self
.
ping_args
))
if
ping_from_eNB
is
not
None
:
if
RAN
.
eNBIPAddress
==
''
or
RAN
.
eNBUserName
==
''
or
RAN
.
eNBPassword
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
else
:
if
self
.
UEIPAddress
==
''
or
self
.
UEUserName
==
''
or
self
.
UEPassword
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
try
:
if
ping_from_eNB
is
not
None
:
SSH
.
open
(
RAN
.
eNBIPAddress
,
RAN
.
eNBUserName
,
RAN
.
eNBPassword
)
SSH
.
command
(
'cd '
+
RAN
.
eNBSourceCodePath
+
'/cmake_targets/'
,
'\$'
,
5
)
else
:
SSH
.
open
(
self
.
UEIPAddress
,
self
.
UEUserName
,
self
.
UEPassword
)
SSH
.
command
(
'cd '
+
self
.
UESourceCodePath
+
'/cmake_targets/'
,
'\$'
,
5
)
ping_time
=
re
.
findall
(
"-c (\d+)"
,
str
(
self
.
ping_args
))
ping_status
=
SSH
.
command
(
'stdbuf -o0 ping '
+
self
.
ping_args
+
' 2>&1 | stdbuf -o0 tee ping_'
+
self
.
testCase_id
+
'.log'
,
'\$'
,
int
(
ping_time
[
0
])
*
1.5
)
# TIMEOUT CASE
if
ping_status
<
0
:
message
=
'Ping with OAI UE crashed due to TIMEOUT!'
logging
.
debug
(
'
\u001B
[1;37;41m '
+
message
+
'
\u001B
[0m'
)
self
.
PingNoS1_wrong_exit
(
message
,
HTML
)
return
result
=
re
.
search
(
', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms'
,
SSH
.
getBefore
())
if
result
is
None
:
message
=
'Packet Loss Not Found!'
logging
.
debug
(
'
\u001B
[1;37;41m '
+
message
+
'
\u001B
[0m'
)
self
.
PingNoS1_wrong_exit
(
message
,
HTML
)
return
packetloss
=
result
.
group
(
'packetloss'
)
if
float
(
packetloss
)
==
100
:
message
=
'Packet Loss is 100%'
logging
.
debug
(
'
\u001B
[1;37;41m '
+
message
+
'
\u001B
[0m'
)
self
.
PingNoS1_wrong_exit
(
message
,
HTML
)
return
result
=
re
.
search
(
'rtt min\/avg\/max\/mdev = (?P<rtt_min>[0-9\.]+)\/(?P<rtt_avg>[0-9\.]+)\/(?P<rtt_max>[0-9\.]+)\/[0-9\.]+ ms'
,
SSH
.
getBefore
())
if
result
is
None
:
message
=
'Ping RTT_Min RTT_Avg RTT_Max Not Found!'
logging
.
debug
(
'
\u001B
[1;37;41m '
+
message
+
'
\u001B
[0m'
)
self
.
PingNoS1_wrong_exit
(
message
,
HTML
)
return
rtt_min
=
result
.
group
(
'rtt_min'
)
rtt_avg
=
result
.
group
(
'rtt_avg'
)
rtt_max
=
result
.
group
(
'rtt_max'
)
pal_msg
=
'Packet Loss : '
+
packetloss
+
'%'
min_msg
=
'RTT(Min) : '
+
rtt_min
+
' ms'
avg_msg
=
'RTT(Avg) : '
+
rtt_avg
+
' ms'
max_msg
=
'RTT(Max) : '
+
rtt_max
+
' ms'
logging
.
debug
(
'
\u001B
[1;37;44m OAI UE ping result
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;34m '
+
pal_msg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;34m '
+
min_msg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;34m '
+
avg_msg
+
'
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;34m '
+
max_msg
+
'
\u001B
[0m'
)
qMsg
=
pal_msg
+
'
\n
'
+
min_msg
+
'
\n
'
+
avg_msg
+
'
\n
'
+
max_msg
packetLossOK
=
True
if
packetloss
is
not
None
:
if
float
(
packetloss
)
>
float
(
self
.
ping_packetloss_threshold
):
qMsg
+=
'
\n
Packet Loss too high'
logging
.
debug
(
'
\u001B
[1;37;41m Packet Loss too high
\u001B
[0m'
)
packetLossOK
=
False
elif
float
(
packetloss
)
>
0
:
qMsg
+=
'
\n
Packet Loss is not 0%'
logging
.
debug
(
'
\u001B
[1;30;43m Packet Loss is not 0%
\u001B
[0m'
)
SSH
.
close
()
message
=
f'OAI UE ping result
\n
{
qMsg
}
'
if
packetLossOK
:
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'OK'
,
[
message
])
else
:
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
[
message
])
# copying on the EPC server for logCollection
if
ping_from_eNB
is
not
None
:
copyin_res
=
SSH
.
copyin
(
RAN
.
eNBIPAddress
,
RAN
.
eNBUserName
,
RAN
.
eNBPassword
,
RAN
.
eNBSourceCodePath
+
'/cmake_targets/ping_'
+
self
.
testCase_id
+
'.log'
,
'.'
)
else
:
copyin_res
=
SSH
.
copyin
(
self
.
UEIPAddress
,
self
.
UEUserName
,
self
.
UEPassword
,
self
.
UESourceCodePath
+
'/cmake_targets/ping_'
+
self
.
testCase_id
+
'.log'
,
'.'
)
if
(
copyin_res
==
0
):
SSH
.
copyout
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
'ping_'
+
self
.
testCase_id
+
'.log'
,
EPC
.
SourceCodePath
+
'/scripts'
)
except
:
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
def
Ping
(
self
,
HTML
,
RAN
,
EPC
,
CONTAINERS
):
result
=
re
.
search
(
'noS1'
,
str
(
RAN
.
Initialize_eNB_args
))
if
result
is
not
None
:
self
.
PingNoS1
(
HTML
,
RAN
,
EPC
,
CONTAINERS
)
return
if
EPC
.
IPAddress
==
''
or
EPC
.
UserName
==
''
or
EPC
.
Password
==
''
or
EPC
.
SourceCodePath
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
sys
.
exit
(
'Insufficient Parameter'
)
...
...
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