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
d0aa233a
Commit
d0aa233a
authored
Jun 12, 2023
by
Dhanuja Elizabeth Thomas
Committed by
Robert Schmidt
Jul 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove PingFromContainer definition and portions where it is called in main.py
parent
54d2b887
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
72 deletions
+0
-72
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+0
-56
ci-scripts/main.py
ci-scripts/main.py
+0
-15
ci-scripts/xml_class_list.yml
ci-scripts/xml_class_list.yml
+0
-1
No files found.
ci-scripts/cls_containerize.py
View file @
d0aa233a
...
...
@@ -1341,62 +1341,6 @@ class Containerize():
HTML
.
CreateHtmlTestRowQueue
(
self
.
pingOptions
,
'OK'
,
[
message
])
def
PingFromContainer
(
self
,
HTML
,
RAN
,
UE
):
myCmd
=
cls_cmd
.
LocalCmd
()
self
.
exitStatus
=
0
ymlPath
=
self
.
yamlPath
[
0
].
split
(
'/'
)
logPath
=
'../cmake_targets/log/'
+
ymlPath
[
1
]
cmd
=
f'mkdir -p
{
logPath
}
'
myCmd
.
run
(
cmd
,
silent
=
True
)
cmd
=
f'docker exec
{
self
.
pingContName
}
/bin/bash -c "ping
{
self
.
pingOptions
}
" 2>&1 | tee
{
logPath
}
/ping_
{
HTML
.
testCase_id
}
.log'
pingStatus
=
myCmd
.
run
(
cmd
,
timeout
=
100
,
reportNonZero
=
False
)
myCmd
.
close
()
result
=
re
.
search
(
', (?P<packetloss>[0-9\.]+)% packet loss, time [0-9\.]+ms'
,
pingStatus
.
stdout
)
if
result
is
None
:
self
.
PingExit
(
HTML
,
RAN
,
UE
,
False
,
'Packet Loss Not Found'
)
return
packetloss
=
result
.
group
(
'packetloss'
)
if
float
(
packetloss
)
==
100
:
self
.
PingExit
(
HTML
,
RAN
,
UE
,
False
,
'Packet Loss is 100%'
)
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'
,
pingStatus
.
stdout
)
if
result
is
None
:
self
.
PingExit
(
HTML
,
RAN
,
UE
,
False
,
'Ping RTT_Min RTT_Avg RTT_Max Not Found!'
)
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'
message
=
'ping result
\n
'
message
+=
' '
+
pal_msg
+
'
\n
'
message
+=
' '
+
min_msg
+
'
\n
'
message
+=
' '
+
avg_msg
+
'
\n
'
message
+=
' '
+
max_msg
+
'
\n
'
packetLossOK
=
True
if
float
(
packetloss
)
>
float
(
self
.
pingLossThreshold
):
message
+=
'
\n
Packet Loss too high'
packetLossOK
=
False
elif
float
(
packetloss
)
>
0
:
message
+=
'
\n
Packet Loss is not 0%'
self
.
PingExit
(
HTML
,
RAN
,
UE
,
packetLossOK
,
message
)
if
packetLossOK
:
logging
.
debug
(
'
\u001B
[1;37;44m 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'
)
logging
.
info
(
'
\u001B
[1m Ping Test PASS
\u001B
[0m'
)
def
PingExit
(
self
,
HTML
,
RAN
,
UE
,
status
,
message
):
if
status
:
HTML
.
CreateHtmlTestRowQueue
(
self
.
pingOptions
,
'OK'
,
[
message
])
...
...
ci-scripts/main.py
View file @
d0aa233a
...
...
@@ -374,17 +374,6 @@ def GetParametersFromXML(action):
if
(
string_field
is
not
None
):
CONTAINERS
.
ran_checkers
[
'u_retx_th'
]
=
[
float
(
x
)
for
x
in
string_field
.
split
(
','
)]
elif
action
==
'PingFromContainer'
:
string_field
=
test
.
findtext
(
'container_name'
)
if
(
string_field
is
not
None
):
CONTAINERS
.
pingContName
=
string_field
string_field
=
test
.
findtext
(
'options'
)
if
(
string_field
is
not
None
):
CONTAINERS
.
pingOptions
=
string_field
string_field
=
test
.
findtext
(
'loss_threshold'
)
if
(
string_field
is
not
None
):
CONTAINERS
.
pingLossThreshold
=
string_field
elif
action
==
'IperfFromContainer'
:
string_field
=
test
.
findtext
(
'server_container_name'
)
if
(
string_field
is
not
None
):
...
...
@@ -881,10 +870,6 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
CONTAINERS
.
UndeployGenObject
(
HTML
,
RAN
,
CiTestObj
)
if
CONTAINERS
.
exitStatus
==
1
:
RAN
.
prematureExit
=
True
elif
action
==
'PingFromContainer'
:
CONTAINERS
.
PingFromContainer
(
HTML
,
RAN
,
CiTestObj
)
if
CONTAINERS
.
exitStatus
==
1
:
RAN
.
prematureExit
=
True
elif
action
==
'IperfFromContainer'
:
CONTAINERS
.
IperfFromContainer
(
HTML
,
RAN
,
CiTestObj
)
if
CONTAINERS
.
exitStatus
==
1
:
...
...
ci-scripts/xml_class_list.yml
View file @
d0aa233a
...
...
@@ -40,7 +40,6 @@
-
Deploy_Run_PhySim
-
DeployGenObject
-
UndeployGenObject
-
PingFromContainer
-
IperfFromContainer
-
StatsFromGenObject
-
LicenceAndFormattingCheck
...
...
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