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
spbro
OpenXG-RAN
Commits
21b63004
Commit
21b63004
authored
1 year ago
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
Branches unavailable
2024.w43
2024.w42
2024.w41
2024.w40
2024.w39
2024.w38
2024.w36
2024.w35
2024.w34
2024.w33
2024.w32
2024.w31
2024.w30
2024.w29
2024.w28
2024.w27
2024.w26
2024.w25
2024.w24
2024.w23
2024.w22
2024.w21
2024.w18
2024.w17
2024.w16
2024.w15
2024.w14
2024.w13
2024.w12
2024.w11
2024.w10
2024.w09
2024.w08
2024.w06
2024.w05
2024.w04
2024.w03
2024.w02
2024.w01
2023.w51
2023.w50
2023.w49
2023.w48
2023.w47
2023.w45
2023.w43
2023.w42
2023.w41
2023.w40
2023.w39
2023.w38
2023.w37
2023.w36
2023.w34
2023.w33
2023.w32
2023.w31
2023.w30
2023.w29
2023.w28
2023.w27
2023.w26
2023.w25
2023.w24
2023.w23
2023.w22
2023.w21
2023.w20
v2.1.0
v2.0.0
ARC_1.3
No related merge requests found
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'
)
...
...
This diff is collapsed.
Click to expand it.
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