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
lizhongxiao
OpenXG-RAN
Commits
59af5bd8
Commit
59af5bd8
authored
Feb 14, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CreateHtmlTestRowQueue: one UE column in any test
parent
646cec27
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
139 additions
and
232 deletions
+139
-232
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+17
-31
ci-scripts/cls_oai_html.py
ci-scripts/cls_oai_html.py
+64
-85
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+38
-55
ci-scripts/cls_physim.py
ci-scripts/cls_physim.py
+4
-11
ci-scripts/cls_static_code_analysis.py
ci-scripts/cls_static_code_analysis.py
+8
-28
ci-scripts/epc.py
ci-scripts/epc.py
+8
-20
ci-scripts/main.py
ci-scripts/main.py
+0
-2
No files found.
ci-scripts/cls_containerize.py
View file @
59af5bd8
...
@@ -927,24 +927,21 @@ class Containerize():
...
@@ -927,24 +927,21 @@ class Containerize():
mySSH
.
copyin
(
lIpAddr
,
lUserName
,
lPassWord
,
logfilename
,
'.'
)
mySSH
.
copyin
(
lIpAddr
,
lUserName
,
lPassWord
,
logfilename
,
'.'
)
mySSH
.
close
()
mySSH
.
close
()
html_queue
=
SimpleQueue
()
message
=
''
html_cell
=
'<pre style="background-color:white">
\n
'
if
usedImage
!=
''
:
if
usedImage
!=
''
:
html_cell
+=
f'Used Image =
{
usedImage
}
:
\n
'
message
+=
f'Used Image =
{
usedImage
}
:
\n
'
html_cell
+=
imageInfo
message
+=
imageInfo
else
:
else
:
html_cell
+=
'Could not retrieve used image info!
\n
'
message
+=
'Could not retrieve used image info!
\n
'
if
status
:
if
status
:
html_cell
+=
'
\n
Healthy deployment!
\n
'
message
+=
'
\n
Healthy deployment!
\n
'
else
:
else
:
html_cell
+=
'
\n
Unhealthy deployment! -- Check logs for reason!
\n
'
message
+=
'
\n
Unhealthy deployment! -- Check logs for reason!
\n
'
html_cell
+=
'</pre>'
html_queue
.
put
(
html_cell
)
if
status
:
if
status
:
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'OK'
,
CONST
.
ENB_PROCESS_OK
,
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'OK'
,
[
message
]
)
else
:
else
:
self
.
exitStatus
=
1
self
.
exitStatus
=
1
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'KO'
,
CONST
.
ENB_PROCESS_OK
,
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'KO'
,
[
message
]
)
def
UndeployObject
(
self
,
HTML
,
RAN
):
def
UndeployObject
(
self
,
HTML
,
RAN
):
...
@@ -1128,25 +1125,22 @@ class Containerize():
...
@@ -1128,25 +1125,22 @@ class Containerize():
imagesInfo
+=
imageInspect
.
stdout
.
strip
()
imagesInfo
+=
imageInspect
.
stdout
.
strip
()
myCmd
.
close
()
myCmd
.
close
()
html_queue
=
SimpleQueue
()
html_cell
=
''
html_cell
=
'<pre style="background-color:white">
\n
'
for
imageInfo
in
imagesInfo
.
split
(
'
\n
'
):
for
imageInfo
in
imagesInfo
.
split
(
'
\n
'
):
html_cell
+=
imageInfo
[:
-
11
]
+
'
\n
'
html_cell
+=
imageInfo
[:
-
11
]
+
'
\n
'
html_cell
+=
'
\n
'
html_cell
+=
'
\n
'
for
cState
in
containerStatus
:
for
cState
in
containerStatus
:
html_cell
+=
cState
+
'
\n
'
html_cell
+=
cState
+
'
\n
'
html_cell
+=
'</pre>'
html_queue
.
put
(
html_cell
)
if
count
==
100
and
healthy
==
self
.
nb_healthy
[
0
]:
if
count
==
100
and
healthy
==
self
.
nb_healthy
[
0
]:
if
self
.
tsharkStarted
==
False
:
if
self
.
tsharkStarted
==
False
:
logging
.
debug
(
'Starting tshark on public network'
)
logging
.
debug
(
'Starting tshark on public network'
)
self
.
CaptureOnDockerNetworks
()
self
.
CaptureOnDockerNetworks
()
HTML
.
CreateHtmlTestRowQueue
(
'n/a'
,
'OK'
,
1
,
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
'n/a'
,
'OK'
,
[
html_cell
]
)
for
cState
in
containerStatus
:
for
cState
in
containerStatus
:
logging
.
debug
(
cState
)
logging
.
debug
(
cState
)
logging
.
info
(
'
\u001B
[1m Deploying OAI Object(s) PASS
\u001B
[0m'
)
logging
.
info
(
'
\u001B
[1m Deploying OAI Object(s) PASS
\u001B
[0m'
)
else
:
else
:
HTML
.
CreateHtmlTestRowQueue
(
'Could not deploy in time'
,
'KO'
,
1
,
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
'Could not deploy in time'
,
'KO'
,
[
html_cell
]
)
for
cState
in
containerStatus
:
for
cState
in
containerStatus
:
logging
.
debug
(
cState
)
logging
.
debug
(
cState
)
logging
.
error
(
'
\u001B
[1m Deploying OAI Object(s) FAILED
\u001B
[0m'
)
logging
.
error
(
'
\u001B
[1m Deploying OAI Object(s) FAILED
\u001B
[0m'
)
...
@@ -1357,10 +1351,7 @@ class Containerize():
...
@@ -1357,10 +1351,7 @@ class Containerize():
message
+=
statLine
+
'
\n
'
message
+=
statLine
+
'
\n
'
myCmd
.
close
()
myCmd
.
close
()
html_queue
=
SimpleQueue
()
HTML
.
CreateHtmlTestRowQueue
(
self
.
pingOptions
,
'OK'
,
[
message
])
html_cell
=
'<pre style="background-color:white">
\n
'
+
message
+
'</pre>'
html_queue
.
put
(
html_cell
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
pingOptions
,
'OK'
,
1
,
html_queue
)
def
PingFromContainer
(
self
,
HTML
,
RAN
,
UE
):
def
PingFromContainer
(
self
,
HTML
,
RAN
,
UE
):
myCmd
=
cls_cmd
.
LocalCmd
()
myCmd
=
cls_cmd
.
LocalCmd
()
...
@@ -1419,14 +1410,11 @@ class Containerize():
...
@@ -1419,14 +1410,11 @@ class Containerize():
logging
.
info
(
'
\u001B
[1m Ping Test PASS
\u001B
[0m'
)
logging
.
info
(
'
\u001B
[1m Ping Test PASS
\u001B
[0m'
)
def
PingExit
(
self
,
HTML
,
RAN
,
UE
,
status
,
message
):
def
PingExit
(
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
)
if
status
:
if
status
:
HTML
.
CreateHtmlTestRowQueue
(
self
.
pingOptions
,
'OK'
,
1
,
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
pingOptions
,
'OK'
,
[
message
]
)
else
:
else
:
logging
.
error
(
'
\u001B
[1;37;41m ping test FAIL -- '
+
message
+
'
\u001B
[0m'
)
logging
.
error
(
'
\u001B
[1;37;41m ping test FAIL -- '
+
message
+
'
\u001B
[0m'
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
pingOptions
,
'KO'
,
1
,
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
pingOptions
,
'KO'
,
[
message
]
)
# Automatic undeployment
# Automatic undeployment
logging
.
warning
(
'----------------------------------------'
)
logging
.
warning
(
'----------------------------------------'
)
logging
.
warning
(
'
\u001B
[1m Starting Automatic undeployment
\u001B
[0m'
)
logging
.
warning
(
'
\u001B
[1m Starting Automatic undeployment
\u001B
[0m'
)
...
@@ -1475,14 +1463,12 @@ class Containerize():
...
@@ -1475,14 +1463,12 @@ class Containerize():
self
.
IperfExit
(
HTML
,
RAN
,
UE
,
iperfStatus
,
msg
)
self
.
IperfExit
(
HTML
,
RAN
,
UE
,
iperfStatus
,
msg
)
def
IperfExit
(
self
,
HTML
,
RAN
,
UE
,
status
,
message
):
def
IperfExit
(
self
,
HTML
,
RAN
,
UE
,
status
,
message
):
html_queue
=
SimpleQueue
()
html_cell
=
f'UE
\n
{
message
}
'
html_cell
=
'<pre style="background-color:white">UE
\n
'
+
message
+
'</pre>'
html_queue
.
put
(
html_cell
)
if
status
:
if
status
:
HTML
.
CreateHtmlTestRowQueue
(
self
.
cliOptions
,
'OK'
,
1
,
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
cliOptions
,
'OK'
,
[
html_cell
]
)
else
:
else
:
logging
.
error
(
'
\u001B
[1m Iperf Test FAIL -- '
+
message
+
'
\u001B
[0m'
)
logging
.
error
(
'
\u001B
[1m Iperf Test FAIL -- '
+
message
+
'
\u001B
[0m'
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
cliOptions
,
'KO'
,
1
,
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
cliOptions
,
'KO'
,
[
html_cell
]
)
# Automatic undeployment
# Automatic undeployment
logging
.
warning
(
'----------------------------------------'
)
logging
.
warning
(
'----------------------------------------'
)
logging
.
warning
(
'
\u001B
[1m Starting Automatic undeployment
\u001B
[0m'
)
logging
.
warning
(
'
\u001B
[1m Starting Automatic undeployment
\u001B
[0m'
)
...
...
ci-scripts/cls_oai_html.py
View file @
59af5bd8
This diff is collapsed.
Click to expand it.
ci-scripts/cls_oaicitest.py
View file @
59af5bd8
...
@@ -780,22 +780,17 @@ class OaiCiTest():
...
@@ -780,22 +780,17 @@ class OaiCiTest():
logging
.
debug
(
' RSRP = '
+
str
(
-
140
+
nRSRP
)
+
' dBm'
)
logging
.
debug
(
' RSRP = '
+
str
(
-
140
+
nRSRP
)
+
' dBm'
)
SSH
.
close
()
SSH
.
close
()
SSH
.
disablePicocomClosure
()
SSH
.
disablePicocomClosure
()
html_queue
=
SimpleQueue
()
self
.
checkDevTTYisUnlocked
()
self
.
checkDevTTYisUnlocked
()
if
attach_status
:
if
attach_status
:
html_cell
=
'<pre style="background-color:white">
CAT-M module Attachment Completed in '
+
str
(
attach_cnt
+
4
)
+
' seconds'
message
=
'
CAT-M module Attachment Completed in '
+
str
(
attach_cnt
+
4
)
+
' seconds'
if
(
nRSRQ
is
not
None
)
and
(
nRSRP
is
not
None
):
if
(
nRSRQ
is
not
None
)
and
(
nRSRP
is
not
None
):
html_cell
+=
'
\n
RSRQ = '
+
str
(
-
20
+
(
nRSRQ
/
2
))
+
' dB'
message
+=
'
\n
RSRQ = '
+
str
(
-
20
+
(
nRSRQ
/
2
))
+
' dB'
html_cell
+=
'
\n
RSRP = '
+
str
(
-
140
+
nRSRP
)
+
' dBm</pre>'
message
+=
'
\n
RSRP = '
+
str
(
-
140
+
nRSRP
)
+
' dBm'
else
:
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'OK'
,
[
message
])
html_cell
+=
'</pre>'
html_queue
.
put
(
html_cell
)
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'OK'
,
1
,
html_queue
)
else
:
else
:
logging
.
error
(
'
\u001B
[1m CAT-M module Attachment Failed
\u001B
[0m'
)
logging
.
error
(
'
\u001B
[1m CAT-M module Attachment Failed
\u001B
[0m'
)
html_cell
=
'<pre style="background-color:white">CAT-M module Attachment Failed</pre>'
message
=
'CAT-M module Attachment Failed'
html_queue
.
put
(
html_cell
)
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'KO'
,
[
message
])
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'KO'
,
1
,
html_queue
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
def
PingCatM
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
,
CONTAINERS
):
def
PingCatM
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
,
CONTAINERS
):
...
@@ -886,12 +881,11 @@ class OaiCiTest():
...
@@ -886,12 +881,11 @@ class OaiCiTest():
logging
.
debug
(
'
\u001B
[1;30;43m Packet Loss is not 0%
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;30;43m Packet Loss is not 0%
\u001B
[0m'
)
lock
.
release
()
lock
.
release
()
SSH
.
close
()
SSH
.
close
()
html_cell
=
'<pre style="background-color:white">CAT-M module
\n
IP Address : '
+
moduleIPAddr
+
'
\n
'
+
qMsg
+
'</pre>'
message
=
'CAT-M module
\n
IP Address : '
+
moduleIPAddr
+
'
\n
'
+
qMsg
statusQueue
.
put
(
html_cell
)
if
(
packetLossOK
):
if
(
packetLossOK
):
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'OK'
,
1
,
statusQueue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'OK'
,
[
message
]
)
else
:
else
:
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
1
,
statusQueue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
[
message
]
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
except
:
except
:
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
...
@@ -1017,7 +1011,7 @@ class OaiCiTest():
...
@@ -1017,7 +1011,7 @@ class OaiCiTest():
return
return
else
:
else
:
attach_status
=
True
attach_status
=
True
html_queue
=
SimpleQueue
()
message
=
''
while
(
not
status_queue
.
empty
()):
while
(
not
status_queue
.
empty
()):
count
=
status_queue
.
get
()
count
=
status_queue
.
get
()
if
(
count
<
0
):
if
(
count
<
0
):
...
@@ -1025,23 +1019,22 @@ class OaiCiTest():
...
@@ -1025,23 +1019,22 @@ class OaiCiTest():
device_id
=
status_queue
.
get
()
device_id
=
status_queue
.
get
()
message
=
status_queue
.
get
()
message
=
status_queue
.
get
()
if
(
count
<
0
):
if
(
count
<
0
):
html_cell
=
'<pre style="background-color:white">UE ('
+
device_id
+
')
\n
'
+
message
+
'</pre>'
message
=
'UE ('
+
device_id
+
')
\n
'
+
message
else
:
else
:
html_cell
=
'<pre style="background-color:white">UE ('
+
device_id
+
')
\n
'
+
message
+
' in '
+
str
(
count
+
2
)
+
' seconds</pre>'
message
=
'UE ('
+
device_id
+
')
\n
'
+
message
+
' in '
+
str
(
count
+
2
)
+
' seconds'
html_queue
.
put
(
html_cell
)
if
(
attach_status
):
if
(
attach_status
):
cnt
=
0
cnt
=
0
while
cnt
<
len
(
self
.
UEDevices
):
while
cnt
<
len
(
self
.
UEDevices
):
if
self
.
UEDevicesStatus
[
cnt
]
==
CONST
.
UE_STATUS_ATTACHING
:
if
self
.
UEDevicesStatus
[
cnt
]
==
CONST
.
UE_STATUS_ATTACHING
:
self
.
UEDevicesStatus
[
cnt
]
=
CONST
.
UE_STATUS_ATTACHED
self
.
UEDevicesStatus
[
cnt
]
=
CONST
.
UE_STATUS_ATTACHED
cnt
+=
1
cnt
+=
1
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'OK'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'OK'
,
[
message
]
)
result
=
re
.
search
(
'T_stdout'
,
str
(
RAN
.
Initialize_eNB_args
))
result
=
re
.
search
(
'T_stdout'
,
str
(
RAN
.
Initialize_eNB_args
))
if
result
is
not
None
:
if
result
is
not
None
:
logging
.
debug
(
'Waiting 5 seconds to fill up record file'
)
logging
.
debug
(
'Waiting 5 seconds to fill up record file'
)
time
.
sleep
(
5
)
time
.
sleep
(
5
)
else
:
else
:
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'KO'
,
[
message
]
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
else
:
#if an ID is specified, it is a module from the yaml infrastructure file
else
:
#if an ID is specified, it is a module from the yaml infrastructure file
...
@@ -1418,19 +1411,17 @@ class OaiCiTest():
...
@@ -1418,19 +1411,17 @@ class OaiCiTest():
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
else
:
else
:
check_status
=
True
check_status
=
True
html_queue
=
SimpleQueue
()
messages
=
[]
while
(
not
status_queue
.
empty
()):
while
(
not
status_queue
.
empty
()):
count
=
status_queue
.
get
()
count
=
status_queue
.
get
()
if
(
count
<
0
):
if
(
count
<
0
):
check_status
=
False
check_status
=
False
device_id
=
status_queue
.
get
()
device_id
=
status_queue
.
get
()
message
=
status_queue
.
get
()
messages
.
append
(
f'UE (
{
device_id
}
)
\n
{
status_queue
.
get
()
}
'
)
html_cell
=
'<pre style="background-color:white">UE ('
+
device_id
+
')
\n
'
+
message
+
'</pre>'
html_queue
.
put
(
html_cell
)
if
check_status
and
passStatus
:
if
check_status
and
passStatus
:
HTML
.
CreateHtmlTestRowQueue
(
htmlOptions
,
'OK'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
htmlOptions
,
'OK'
,
messages
)
else
:
else
:
HTML
.
CreateHtmlTestRowQueue
(
htmlOptions
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
htmlOptions
,
'KO'
,
messages
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
def
GetAllUEIPAddresses
(
self
):
def
GetAllUEIPAddresses
(
self
):
...
@@ -1694,10 +1685,8 @@ class OaiCiTest():
...
@@ -1694,10 +1685,8 @@ class OaiCiTest():
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
def
PingNoS1_wrong_exit
(
self
,
qMsg
,
HTML
):
def
PingNoS1_wrong_exit
(
self
,
qMsg
,
HTML
):
html_queue
=
SimpleQueue
()
message
=
'OAI UE ping result
\n
{qMsg}'
html_cell
=
'<pre style="background-color:white">OAI UE ping result
\n
'
+
qMsg
+
'</pre>'
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
[
message
])
html_queue
.
put
(
html_cell
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
def
PingNoS1
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
,
CONTAINERS
):
def
PingNoS1
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
,
CONTAINERS
):
SSH
=
sshconnection
.
SSHConnection
()
SSH
=
sshconnection
.
SSHConnection
()
...
@@ -1773,14 +1762,11 @@ class OaiCiTest():
...
@@ -1773,14 +1762,11 @@ class OaiCiTest():
qMsg
+=
'
\n
Packet Loss is not 0%'
qMsg
+=
'
\n
Packet Loss is not 0%'
logging
.
debug
(
'
\u001B
[1;30;43m Packet Loss is not 0%
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;30;43m Packet Loss is not 0%
\u001B
[0m'
)
SSH
.
close
()
SSH
.
close
()
html_queue
=
SimpleQueue
()
message
=
f'OAI UE ping result
\n
{
qMsg
}
'
ip_addr
=
'TBD'
html_cell
=
'<pre style="background-color:white">OAI UE ping result
\n
'
+
qMsg
+
'</pre>'
html_queue
.
put
(
html_cell
)
if
packetLossOK
:
if
packetLossOK
:
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'OK'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'OK'
,
[
message
]
)
else
:
else
:
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
[
message
]
)
# copying on the EPC server for logCollection
# copying on the EPC server for logCollection
if
ping_from_eNB
is
not
None
:
if
ping_from_eNB
is
not
None
:
...
@@ -1857,7 +1843,7 @@ class OaiCiTest():
...
@@ -1857,7 +1843,7 @@ class OaiCiTest():
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
else
:
else
:
ping_status
=
True
ping_status
=
True
html_queue
=
SimpleQueue
()
messages
=
[]
while
(
not
status_queue
.
empty
()):
while
(
not
status_queue
.
empty
()):
count
=
status_queue
.
get
()
count
=
status_queue
.
get
()
if
(
count
<
0
):
if
(
count
<
0
):
...
@@ -1865,12 +1851,11 @@ class OaiCiTest():
...
@@ -1865,12 +1851,11 @@ class OaiCiTest():
device_id
=
status_queue
.
get
()
device_id
=
status_queue
.
get
()
ip_addr
=
status_queue
.
get
()
ip_addr
=
status_queue
.
get
()
message
=
status_queue
.
get
()
message
=
status_queue
.
get
()
html_cell
=
'<pre style="background-color:white">UE ('
+
device_id
+
')
\n
IP Address : '
+
ip_addr
+
'
\n
'
+
message
+
'</pre>'
messages
.
append
(
f'UE (
{
device_id
}
)
\n
IP Address :
{
ip_addr
}
\n
{
message
}
'
)
html_queue
.
put
(
html_cell
)
if
(
ping_status
):
if
(
ping_status
):
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'OK'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'OK'
,
messages
)
else
:
else
:
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
ping_args
,
'KO'
,
messages
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
def
Iperf_ComputeTime
(
self
):
def
Iperf_ComputeTime
(
self
):
...
@@ -2909,7 +2894,7 @@ class OaiCiTest():
...
@@ -2909,7 +2894,7 @@ class OaiCiTest():
iperf_status
=
False
iperf_status
=
False
else
:
else
:
iperf_status
=
True
iperf_status
=
True
html_queue
=
SimpleQueue
()
messages
=
[]
while
(
not
status_queue
.
empty
()):
while
(
not
status_queue
.
empty
()):
count
=
status_queue
.
get
()
count
=
status_queue
.
get
()
if
(
count
<
0
):
if
(
count
<
0
):
...
@@ -2919,14 +2904,13 @@ class OaiCiTest():
...
@@ -2919,14 +2904,13 @@ class OaiCiTest():
device_id
=
status_queue
.
get
()
device_id
=
status_queue
.
get
()
ip_addr
=
status_queue
.
get
()
ip_addr
=
status_queue
.
get
()
message
=
status_queue
.
get
()
message
=
status_queue
.
get
()
html_cell
=
'<pre style="background-color:white">UE ('
+
device_id
+
')
\n
IP Address : '
+
ip_addr
+
'
\n
'
+
message
+
'</pre>'
messages
.
append
(
f'UE (
{
device_id
}
)
\n
IP Address :
{
ip_addr
}
\n
{
message
}
'
)
html_queue
.
put
(
html_cell
)
if
(
iperf_noperf
and
iperf_status
):
if
(
iperf_noperf
and
iperf_status
):
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'PERF NOT MET'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'PERF NOT MET'
,
messages
)
elif
(
iperf_status
):
elif
(
iperf_status
):
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'OK'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'OK'
,
messages
)
else
:
else
:
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'KO'
,
messages
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
def
Iperf
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
,
CONTAINERS
):
def
Iperf
(
self
,
HTML
,
RAN
,
EPC
,
COTS_UE
,
InfraUE
,
CONTAINERS
):
...
@@ -3001,7 +2985,7 @@ class OaiCiTest():
...
@@ -3001,7 +2985,7 @@ class OaiCiTest():
else
:
else
:
iperf_status
=
True
iperf_status
=
True
iperf_noperf
=
False
iperf_noperf
=
False
html_queue
=
SimpleQueue
()
messages
=
[]
while
(
not
status_queue
.
empty
()):
while
(
not
status_queue
.
empty
()):
count
=
status_queue
.
get
()
count
=
status_queue
.
get
()
if
(
count
<
0
):
if
(
count
<
0
):
...
@@ -3010,15 +2994,14 @@ class OaiCiTest():
...
@@ -3010,15 +2994,14 @@ class OaiCiTest():
iperf_noperf
=
True
iperf_noperf
=
True
device_id
=
status_queue
.
get
()
device_id
=
status_queue
.
get
()
ip_addr
=
status_queue
.
get
()
ip_addr
=
status_queue
.
get
()
message
=
status_queue
.
get
()
msg
=
status_queue
.
get
()
html_cell
=
'<pre style="background-color:white">UE ('
+
device_id
+
')
\n
IP Address : '
+
ip_addr
+
'
\n
'
+
message
+
'</pre>'
messages
.
append
(
f'UE (
{
device_id
}
)
\n
IP Address :
{
ip_addr
}
\n
{
msg
}
'
)
html_queue
.
put
(
html_cell
)
if
(
iperf_noperf
and
iperf_status
):
if
(
iperf_noperf
and
iperf_status
):
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'PERF NOT MET'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'PERF NOT MET'
,
messages
)
elif
(
iperf_status
):
elif
(
iperf_status
):
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'OK'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'OK'
,
messages
)
else
:
else
:
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'KO'
,
len
(
self
.
UEDevices
),
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
iperf_args
,
'KO'
,
messages
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
self
.
AutoTerminateUEandeNB
(
HTML
,
RAN
,
COTS_UE
,
EPC
,
InfraUE
,
CONTAINERS
)
def
CheckProcessExist
(
self
,
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
):
def
CheckProcessExist
(
self
,
check_eNB
,
check_OAI_UE
,
RAN
,
EPC
):
...
...
ci-scripts/cls_physim.py
View file @
59af5bd8
...
@@ -81,11 +81,7 @@ class PhySim:
...
@@ -81,11 +81,7 @@ class PhySim:
#once parsed move the local logfile to its folder for tidiness
#once parsed move the local logfile to its folder for tidiness
os
.
system
(
'mv '
+
self
.
__runLogFile
+
' '
+
self
.
__runLogPath
+
'/.'
)
os
.
system
(
'mv '
+
self
.
__runLogFile
+
' '
+
self
.
__runLogPath
+
'/.'
)
#updating the HTML with results
HTML
.
CreateHtmlTestRowQueue
(
self
.
runargs
,
'OK'
,
[
info
])
html_cell
=
'<pre style="background-color:white">'
+
info
+
'</pre>'
html_queue
=
SimpleQueue
()
html_queue
.
put
(
html_cell
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
runargs
,
'OK'
,
1
,
html_queue
)
return
HTML
return
HTML
def
__CheckResults_LDPCt1Test
(
self
,
HTML
,
CONST
,
testcase_id
):
def
__CheckResults_LDPCt1Test
(
self
,
HTML
,
CONST
,
testcase_id
):
...
@@ -131,8 +127,7 @@ class PhySim:
...
@@ -131,8 +127,7 @@ class PhySim:
if
ret
!=
0
:
if
ret
!=
0
:
error_msg
=
f'could not recover test result file
{
filename
}
'
error_msg
=
f'could not recover test result file
{
filename
}
'
logging
.
error
(
error_msg
)
logging
.
error
(
error_msg
)
html_queue
.
put
(
f'<pre style="background-color:white">
{
error_msg
}
</pre>'
)
HTML
.
CreateHtmlTestRowQueue
(
"could not recover results"
,
'KO'
,
[
error_msg
])
HTML
.
CreateHtmlTestRowQueue
(
"could not recover results"
,
'KO'
,
1
,
html_queue
)
self
.
exitStatus
=
1
self
.
exitStatus
=
1
return
HTML
return
HTML
...
@@ -145,13 +140,11 @@ class PhySim:
...
@@ -145,13 +140,11 @@ class PhySim:
#updating the HTML with results
#updating the HTML with results
if
PUSCH_OK
:
if
PUSCH_OK
:
html_queue
.
put
(
'<pre style="background-color:white">succeeded</pre>'
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
runargs
,
'OK'
,
1
,
[
"succeeded"
])
HTML
.
CreateHtmlTestRowQueue
(
self
.
runargs
,
'OK'
,
1
,
html_queue
)
else
:
else
:
error_msg
=
'error: no "PUSCH test OK"'
error_msg
=
'error: no "PUSCH test OK"'
logging
.
error
(
error_msg
)
logging
.
error
(
error_msg
)
html_queue
.
put
(
f'<pre style="background-color:white">
{
error_msg
}
</pre>'
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
runargs
,
'KO'
,
1
,
[
error_msg
])
HTML
.
CreateHtmlTestRowQueue
(
self
.
runargs
,
'KO'
,
1
,
html_queue
)
self
.
exitStatus
=
1
self
.
exitStatus
=
1
return
HTML
return
HTML
...
...
ci-scripts/cls_static_code_analysis.py
View file @
59af5bd8
...
@@ -357,63 +357,43 @@ class StaticCodeAnalysis():
...
@@ -357,63 +357,43 @@ class StaticCodeAnalysis():
if
nbFilesNotFormatted
==
0
:
if
nbFilesNotFormatted
==
0
:
HTML
.
CreateHtmlTestRow
(
'File(s) Format'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
'File(s) Format'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
else
:
else
:
html_queue
=
SimpleQueue
()
html_cell
=
f'Number of files not following OAI Rules:
{
nbFilesNotFormatted
}
\n
'
html_cell
=
'<pre style="background-color:white">
\n
'
html_cell
+=
'Number of files not following OAI Rules: '
+
str
(
nbFilesNotFormatted
)
+
'
\n
'
for
nFile
in
listFilesNotFormatted
:
for
nFile
in
listFilesNotFormatted
:
html_cell
+=
str
(
nFile
).
strip
()
+
'
\n
'
html_cell
+=
str
(
nFile
).
strip
()
+
'
\n
'
html_cell
+=
'</pre>'
HTML
.
CreateHtmlTestRowQueue
(
'File(s) Format'
,
'KO'
,
[
html_cell
])
html_queue
.
put
(
html_cell
)
HTML
.
CreateHtmlTestRowQueue
(
'File(s) Format'
,
'KO'
,
1
,
html_queue
)
del
(
html_cell
)
del
(
html_cell
)
del
(
html_queue
)
logging
.
debug
(
'header files not respecting the circular dependency protection: '
+
str
(
len
(
circularHeaderDependencyFiles
)))
logging
.
debug
(
'header files not respecting the circular dependency protection: '
+
str
(
len
(
circularHeaderDependencyFiles
)))
if
len
(
circularHeaderDependencyFiles
)
==
0
:
if
len
(
circularHeaderDependencyFiles
)
==
0
:
HTML
.
CreateHtmlTestRow
(
'Header Circular Dependency'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
'Header Circular Dependency'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
else
:
else
:
html_queue
=
SimpleQueue
()
html_cell
=
f'Number of files not respecting:
{
len
(
circularHeaderDependencyFiles
)
}
\n
'
html_cell
=
'<pre style="background-color:white">
\n
'
html_cell
+=
'Number of files not respecting: '
+
str
(
len
(
circularHeaderDependencyFiles
))
+
'
\n
'
for
nFile
in
circularHeaderDependencyFiles
:
for
nFile
in
circularHeaderDependencyFiles
:
html_cell
+=
str
(
nFile
).
strip
()
+
'
\n
'
html_cell
+=
str
(
nFile
).
strip
()
+
'
\n
'
html_cell
+=
'</pre>'
HTML
.
CreateHtmlTestRowQueue
(
'Header Circular Dependency'
,
'KO'
,
[
html_cell
])
html_queue
.
put
(
html_cell
)
HTML
.
CreateHtmlTestRowQueue
(
'Header Circular Dependency'
,
'KO'
,
1
,
html_queue
)
del
(
html_cell
)
del
(
html_cell
)
del
(
html_queue
)
finalStatus
=
-
1
finalStatus
=
-
1
logging
.
debug
(
'files with a GNU GPL license: '
+
str
(
len
(
gnuGplLicenceFiles
)))
logging
.
debug
(
'files with a GNU GPL license: '
+
str
(
len
(
gnuGplLicenceFiles
)))
if
len
(
gnuGplLicenceFiles
)
==
0
:
if
len
(
gnuGplLicenceFiles
)
==
0
:
HTML
.
CreateHtmlTestRow
(
'Files w/ GNU GPL License'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
'Files w/ GNU GPL License'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
else
:
else
:
html_queue
=
SimpleQueue
()
html_cell
=
f'Number of files not respecting:
{
len
(
gnuGplLicenceFiles
)
}
\n
'
html_cell
=
'<pre style="background-color:white">
\n
'
html_cell
+=
'Number of files not respecting: '
+
str
(
len
(
gnuGplLicenceFiles
))
+
'
\n
'
for
nFile
in
gnuGplLicenceFiles
:
for
nFile
in
gnuGplLicenceFiles
:
html_cell
+=
str
(
nFile
).
strip
()
+
'
\n
'
html_cell
+=
str
(
nFile
).
strip
()
+
'
\n
'
html_cell
+=
'</pre>'
HTML
.
CreateHtmlTestRowQueue
(
'Files w/ GNU GPL License'
,
'KO'
,
html_queue
)
html_queue
.
put
(
html_cell
)
HTML
.
CreateHtmlTestRowQueue
(
'Files w/ GNU GPL License'
,
'KO'
,
1
,
html_queue
)
del
(
html_cell
)
del
(
html_cell
)
del
(
html_queue
)
finalStatus
=
-
1
finalStatus
=
-
1
logging
.
debug
(
'files with a suspect license: '
+
str
(
len
(
suspectLicenceFiles
)))
logging
.
debug
(
'files with a suspect license: '
+
str
(
len
(
suspectLicenceFiles
)))
if
len
(
suspectLicenceFiles
)
==
0
:
if
len
(
suspectLicenceFiles
)
==
0
:
HTML
.
CreateHtmlTestRow
(
'Files with suspect license'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
'Files with suspect license'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
else
:
else
:
html_queue
=
SimpleQueue
()
html_cell
=
f'Number of files not respecting:
{
len
(
suspectLicenceFiles
)
}
\n
'
html_cell
=
'<pre style="background-color:white">
\n
'
html_cell
+=
'Number of files not respecting: '
+
str
(
len
(
suspectLicenceFiles
))
+
'
\n
'
for
nFile
in
suspectLicenceFiles
:
for
nFile
in
suspectLicenceFiles
:
html_cell
+=
str
(
nFile
).
strip
()
+
'
\n
'
html_cell
+=
str
(
nFile
).
strip
()
+
'
\n
'
html_cell
+=
'</pre>'
HTML
.
CreateHtmlTestRowQueue
(
'Files with suspect license'
,
'KO'
,
[
html_cell
])
html_queue
.
put
(
html_cell
)
HTML
.
CreateHtmlTestRowQueue
(
'Files with suspect license'
,
'KO'
,
1
,
html_queue
)
del
(
html_cell
)
del
(
html_cell
)
del
(
html_queue
)
finalStatus
=
-
1
finalStatus
=
-
1
else
:
else
:
...
...
ci-scripts/epc.py
View file @
59af5bd8
...
@@ -237,7 +237,7 @@ class EPCManagement():
...
@@ -237,7 +237,7 @@ class EPCManagement():
sys
.
exit
(
'Insufficient EPC Parameters'
)
sys
.
exit
(
'Insufficient EPC Parameters'
)
mySSH
=
SSH
.
SSHConnection
()
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
html_cell
=
'
<pre style="background-color:white">
\n
'
html_cell
=
''
if
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
if
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
logging
.
debug
(
'Using the SABOX simulated HSS'
)
logging
.
debug
(
'Using the SABOX simulated HSS'
)
mySSH
.
command
(
'if [ -d '
+
self
.
SourceCodePath
+
'/scripts ]; then echo '
+
self
.
Password
+
' | sudo -S rm -Rf '
+
self
.
SourceCodePath
+
'/scripts ; fi'
,
'\$'
,
5
)
mySSH
.
command
(
'if [ -d '
+
self
.
SourceCodePath
+
'/scripts ]; then echo '
+
self
.
Password
+
' | sudo -S rm -Rf '
+
self
.
SourceCodePath
+
'/scripts ; fi'
,
'\$'
,
5
)
...
@@ -288,11 +288,8 @@ class EPCManagement():
...
@@ -288,11 +288,8 @@ class EPCManagement():
html_cell
+=
'
\n
'
html_cell
+=
'
\n
'
else
:
else
:
logging
.
error
(
'This option should not occur!'
)
logging
.
error
(
'This option should not occur!'
)
html_cell
+=
'</pre>'
mySSH
.
close
()
mySSH
.
close
()
html_queue
=
SimpleQueue
()
HTML
.
CreateHtmlTestRowQueue
(
self
.
Type
,
'OK'
,
[
html_cell
])
html_queue
.
put
(
html_cell
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
Type
,
'OK'
,
1
,
html_queue
)
def
SetAmfIPAddress
(
self
):
def
SetAmfIPAddress
(
self
):
# Not an error if we don't need an 5GCN
# Not an error if we don't need an 5GCN
...
@@ -551,10 +548,7 @@ class EPCManagement():
...
@@ -551,10 +548,7 @@ class EPCManagement():
else
:
else
:
logging
.
error
(
'This should not happen!'
)
logging
.
error
(
'This should not happen!'
)
mySSH
.
close
()
mySSH
.
close
()
html_queue
=
SimpleQueue
()
HTML
.
CreateHtmlTestRowQueue
(
self
.
Type
,
'OK'
,
[
message
])
html_cell
=
'<pre style="background-color:white">'
+
message
+
'</pre>'
html_queue
.
put
(
html_cell
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
Type
,
'OK'
,
1
,
html_queue
)
def
DeployEpc
(
self
,
HTML
):
def
DeployEpc
(
self
,
HTML
):
logging
.
debug
(
'Trying to deploy'
)
logging
.
debug
(
'Trying to deploy'
)
...
@@ -644,7 +638,7 @@ class EPCManagement():
...
@@ -644,7 +638,7 @@ class EPCManagement():
expectedHealthyContainers
+=
1
expectedHealthyContainers
+=
1
mySSH
.
command
(
'docker-compose config | grep --colour=never image'
,
'\$'
,
10
)
mySSH
.
command
(
'docker-compose config | grep --colour=never image'
,
'\$'
,
10
)
html_cell
=
'
<pre style="background-color:white">
\n
'
html_cell
=
''
listOfImages
=
mySSH
.
getBefore
()
listOfImages
=
mySSH
.
getBefore
()
for
imageLine
in
listOfImages
.
split
(
'
\\
r
\\
n'
):
for
imageLine
in
listOfImages
.
split
(
'
\\
r
\\
n'
):
res1
=
re
.
search
(
'image: (?P<name>[a-zA-Z0-9\-]+):(?P<tag>[a-zA-Z0-9\-]+)'
,
str
(
imageLine
))
res1
=
re
.
search
(
'image: (?P<name>[a-zA-Z0-9\-]+):(?P<tag>[a-zA-Z0-9\-]+)'
,
str
(
imageLine
))
...
@@ -666,7 +660,6 @@ class EPCManagement():
...
@@ -666,7 +660,6 @@ class EPCManagement():
if
res4
is
not
None
:
if
res4
is
not
None
:
html_cell
+=
'('
+
res4
.
group
(
'date'
)
+
')'
html_cell
+=
'('
+
res4
.
group
(
'date'
)
+
')'
html_cell
+=
'
\n
'
html_cell
+=
'
\n
'
html_cell
+=
'</pre>'
# Checking if all are healthy
# Checking if all are healthy
cnt
=
0
cnt
=
0
while
(
cnt
<
3
):
while
(
cnt
<
3
):
...
@@ -682,8 +675,6 @@ class EPCManagement():
...
@@ -682,8 +675,6 @@ class EPCManagement():
logging
.
debug
(
' -- '
+
str
(
healthyNb
)
+
' healthy container(s)'
)
logging
.
debug
(
' -- '
+
str
(
healthyNb
)
+
' healthy container(s)'
)
logging
.
debug
(
' -- '
+
str
(
unhealthyNb
)
+
' unhealthy container(s)'
)
logging
.
debug
(
' -- '
+
str
(
unhealthyNb
)
+
' unhealthy container(s)'
)
logging
.
debug
(
' -- '
+
str
(
startingNb
)
+
' still starting container(s)'
)
logging
.
debug
(
' -- '
+
str
(
startingNb
)
+
' still starting container(s)'
)
html_queue
=
SimpleQueue
()
html_queue
.
put
(
html_cell
)
if
healthyNb
==
expectedHealthyContainers
:
if
healthyNb
==
expectedHealthyContainers
:
mySSH
.
command
(
'docker exec -d prod-oai-hss /bin/bash -c "nohup tshark -i any -f
\'
port 9042 or port 3868
\'
-w /tmp/hss_check_run.pcap 2>&1 > /dev/null"'
,
'\$'
,
5
)
mySSH
.
command
(
'docker exec -d prod-oai-hss /bin/bash -c "nohup tshark -i any -f
\'
port 9042 or port 3868
\'
-w /tmp/hss_check_run.pcap 2>&1 > /dev/null"'
,
'\$'
,
5
)
if
self
.
isMagmaUsed
:
if
self
.
isMagmaUsed
:
...
@@ -695,11 +686,11 @@ class EPCManagement():
...
@@ -695,11 +686,11 @@ class EPCManagement():
mySSH
.
command
(
'docker exec -d prod-oai-spgwu-tiny /bin/bash -c "nohup tshark -i any -f
\'
port 8805
\'
-w /tmp/spgwu_check_run.pcap 2>&1 > /dev/null"'
,
'\$'
,
10
)
mySSH
.
command
(
'docker exec -d prod-oai-spgwu-tiny /bin/bash -c "nohup tshark -i any -f
\'
port 8805
\'
-w /tmp/spgwu_check_run.pcap 2>&1 > /dev/null"'
,
'\$'
,
10
)
mySSH
.
close
()
mySSH
.
close
()
logging
.
debug
(
'Deployment OK'
)
logging
.
debug
(
'Deployment OK'
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
Type
,
'OK'
,
1
,
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
Type
,
'OK'
,
[
html_cell
]
)
else
:
else
:
mySSH
.
close
()
mySSH
.
close
()
logging
.
debug
(
'Deployment went wrong'
)
logging
.
debug
(
'Deployment went wrong'
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
Type
,
'KO'
,
1
,
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
Type
,
'KO'
,
[
html_cell
]
)
def
UndeployEpc
(
self
,
HTML
):
def
UndeployEpc
(
self
,
HTML
):
logging
.
debug
(
'Trying to undeploy'
)
logging
.
debug
(
'Trying to undeploy'
)
...
@@ -767,15 +758,12 @@ class EPCManagement():
...
@@ -767,15 +758,12 @@ class EPCManagement():
mySSH
.
command
(
'docker inspect --format=
\'
{{.Name}}
\'
prod-oai-public-net prod-oai-private-net'
,
'\$'
,
10
)
mySSH
.
command
(
'docker inspect --format=
\'
{{.Name}}
\'
prod-oai-public-net prod-oai-private-net'
,
'\$'
,
10
)
noMoreNetworkNb
=
mySSH
.
getBefore
().
count
(
'No such object'
)
noMoreNetworkNb
=
mySSH
.
getBefore
().
count
(
'No such object'
)
mySSH
.
close
()
mySSH
.
close
()
html_queue
=
SimpleQueue
()
html_cell
=
'<pre style="background-color:white">'
+
message
+
'</pre>'
html_queue
.
put
(
html_cell
)
if
noMoreContainerNb
==
nbContainers
and
noMoreNetworkNb
==
2
:
if
noMoreContainerNb
==
nbContainers
and
noMoreNetworkNb
==
2
:
logging
.
debug
(
'Undeployment OK'
)
logging
.
debug
(
'Undeployment OK'
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
Type
,
'OK'
,
1
,
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
Type
,
'OK'
,
[
message
]
)
else
:
else
:
logging
.
debug
(
'Undeployment went wrong'
)
logging
.
debug
(
'Undeployment went wrong'
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
Type
,
'KO'
,
1
,
html_queue
)
HTML
.
CreateHtmlTestRowQueue
(
self
.
Type
,
'KO'
,
[
message
]
)
def
LogCollectHSS
(
self
):
def
LogCollectHSS
(
self
):
mySSH
=
SSH
.
SSHConnection
()
mySSH
=
SSH
.
SSHConnection
()
...
...
ci-scripts/main.py
View file @
59af5bd8
...
@@ -717,7 +717,6 @@ elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
...
@@ -717,7 +717,6 @@ elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
terminate_ue_flag
=
False
terminate_ue_flag
=
False
CiTestObj
.
GetAllUEDevices
(
terminate_ue_flag
)
CiTestObj
.
GetAllUEDevices
(
terminate_ue_flag
)
CiTestObj
.
GetAllCatMDevices
(
terminate_ue_flag
)
CiTestObj
.
GetAllCatMDevices
(
terminate_ue_flag
)
HTML
.
SethtmlUEConnected
(
len
(
CiTestObj
.
UEDevices
)
+
len
(
CiTestObj
.
CatMDevices
))
HTML
.
htmlNb_Smartphones
=
len
(
CiTestObj
.
UEDevices
)
HTML
.
htmlNb_Smartphones
=
len
(
CiTestObj
.
UEDevices
)
HTML
.
htmlNb_CATM_Modules
=
len
(
CiTestObj
.
CatMDevices
)
HTML
.
htmlNb_CATM_Modules
=
len
(
CiTestObj
.
CatMDevices
)
HTML
.
CreateHtmlHeader
(
CiTestObj
.
ADBIPAddress
)
HTML
.
CreateHtmlHeader
(
CiTestObj
.
ADBIPAddress
)
...
@@ -824,7 +823,6 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
...
@@ -824,7 +823,6 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
CiTestObj
.
UEDevices
.
append
(
'COTS-Module'
)
CiTestObj
.
UEDevices
.
append
(
'COTS-Module'
)
else
:
else
:
CiTestObj
.
UEDevices
.
append
(
'OAI-UE'
)
CiTestObj
.
UEDevices
.
append
(
'OAI-UE'
)
HTML
.
SethtmlUEConnected
(
len
(
CiTestObj
.
UEDevices
)
+
len
(
CiTestObj
.
CatMDevices
))
HTML
.
CreateHtmlTabHeader
()
HTML
.
CreateHtmlTabHeader
()
# On CI bench w/ containers, we need to validate if IP routes are set
# On CI bench w/ containers, we need to validate if IP routes are set
...
...
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