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
zzha zzha
OpenXG-RAN
Commits
d2a35f70
Commit
d2a35f70
authored
Nov 23, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IperfFromContainer: Undeploy automatically on failure, like for Ping
parent
277786bc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+13
-5
ci-scripts/main.py
ci-scripts/main.py
+1
-1
No files found.
ci-scripts/cls_containerize.py
View file @
d2a35f70
...
...
@@ -1345,7 +1345,7 @@ class Containerize():
self
.
UndeployGenObject
(
HTML
,
RAN
,
UE
)
self
.
exitStatus
=
1
def
IperfFromContainer
(
self
,
HTML
,
RAN
):
def
IperfFromContainer
(
self
,
HTML
,
RAN
,
UE
):
self
.
exitStatus
=
0
ymlPath
=
self
.
yamlPath
[
0
].
split
(
'/'
)
...
...
@@ -1382,7 +1382,7 @@ class Containerize():
message
=
'Could not connect to iperf server!'
else
:
message
=
'Server Report and Connection refused Not Found!'
self
.
IperfExit
(
HTML
,
False
,
message
)
self
.
IperfExit
(
HTML
,
RAN
,
UE
,
False
,
message
)
logging
.
error
(
'
\u001B
[1;37;41m Iperf Test FAIL
\u001B
[0m'
)
return
...
...
@@ -1449,17 +1449,17 @@ class Containerize():
if
jitter
is
not
None
:
msg
+=
'Jitter : '
+
jitter
+
'
\n
'
logging
.
debug
(
'
\u001B
[1;34m Jitter : '
+
jitter
+
'
\u001B
[0m'
)
self
.
IperfExit
(
HTML
,
iperfStatus
,
msg
)
self
.
IperfExit
(
HTML
,
RAN
,
UE
,
iperfStatus
,
msg
)
else
:
iperfStatus
=
False
logging
.
error
(
'problem?'
)
self
.
IperfExit
(
HTML
,
iperfStatus
,
'problem?'
)
self
.
IperfExit
(
HTML
,
RAN
,
UE
,
iperfStatus
,
'problem?'
)
if
iperfStatus
:
logging
.
info
(
'
\u001B
[1m Iperf Test PASS
\u001B
[0m'
)
else
:
logging
.
error
(
'
\u001B
[1;37;41m Iperf Test FAIL
\u001B
[0m'
)
def
IperfExit
(
self
,
HTML
,
status
,
message
):
def
IperfExit
(
self
,
HTML
,
RAN
,
UE
,
status
,
message
):
html_queue
=
SimpleQueue
()
html_cell
=
'<pre style="background-color:white">UE
\n
'
+
message
+
'</pre>'
html_queue
.
put
(
html_cell
)
...
...
@@ -1468,6 +1468,14 @@ class Containerize():
else
:
logging
.
error
(
'
\u001B
[1m Iperf Test FAIL -- '
+
message
+
'
\u001B
[0m'
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
cliOptions
,
'KO'
,
1
,
html_queue
)
# Automatic undeployment
logging
.
warning
(
'----------------------------------------'
)
logging
.
warning
(
'
\u001B
[1m Starting Automatic undeployment
\u001B
[0m'
)
logging
.
warning
(
'----------------------------------------'
)
HTML
.
testCase_id
=
'AUTO-UNDEPLOY'
HTML
.
desc
=
'Automatic Un-Deployment'
self
.
UndeployGenObject
(
HTML
,
RAN
,
UE
)
self
.
exitStatus
=
1
def
CheckAndAddRoute
(
self
,
svrName
,
ipAddr
,
userName
,
password
):
...
...
ci-scripts/main.py
View file @
d2a35f70
...
...
@@ -1013,7 +1013,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
if
CONTAINERS
.
exitStatus
==
1
:
RAN
.
prematureExit
=
True
elif
action
==
'IperfFromContainer'
:
CONTAINERS
.
IperfFromContainer
(
HTML
,
RAN
)
CONTAINERS
.
IperfFromContainer
(
HTML
,
RAN
,
CiTestObj
)
if
CONTAINERS
.
exitStatus
==
1
:
RAN
.
prematureExit
=
True
elif
action
==
'StatsFromGenObject'
:
...
...
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