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
wangjie
OpenXG-RAN
Commits
32e5e464
Commit
32e5e464
authored
Jul 28, 2021
by
Remi Hardy
Browse files
Options
Browse Files
Download
Plain Diff
[CI] support for 5G Core (sabox only for the moment)
parents
4bfbb6f1
244a7a9a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
154 additions
and
24 deletions
+154
-24
ci-scripts/epc.py
ci-scripts/epc.py
+71
-23
ci-scripts/main.py
ci-scripts/main.py
+5
-0
ci-scripts/xml_class_list.yml
ci-scripts/xml_class_list.yml
+3
-1
ci-scripts/xml_files/sa_cn5g_closure.xml
ci-scripts/xml_files/sa_cn5g_closure.xml
+37
-0
ci-scripts/xml_files/sa_cn5g_start.xml
ci-scripts/xml_files/sa_cn5g_start.xml
+38
-0
No files found.
ci-scripts/epc.py
View file @
32e5e464
...
@@ -62,6 +62,7 @@ class EPCManagement():
...
@@ -62,6 +62,7 @@ class EPCManagement():
self
.
PcapFileName
=
''
self
.
PcapFileName
=
''
self
.
testCase_id
=
''
self
.
testCase_id
=
''
self
.
MmeIPAddress
=
''
self
.
MmeIPAddress
=
''
self
.
AmfIPAddress
=
''
self
.
containerPrefix
=
'prod'
self
.
containerPrefix
=
'prod'
self
.
mmeConfFile
=
'mme.conf'
self
.
mmeConfFile
=
'mme.conf'
self
.
yamlPath
=
''
self
.
yamlPath
=
''
...
@@ -76,7 +77,7 @@ class EPCManagement():
...
@@ -76,7 +77,7 @@ class EPCManagement():
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
EPCSrvHelp
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
,
self
.
SourceCodePath
,
self
.
Type
)
HELP
.
EPCSrvHelp
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
,
self
.
SourceCodePath
,
self
.
Type
)
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
)
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
logging
.
debug
(
'Using the OAI EPC Release 14 Cassandra-based HSS in Docker'
)
logging
.
debug
(
'Using the OAI EPC Release 14 Cassandra-based HSS in Docker'
)
...
@@ -120,7 +121,7 @@ class EPCManagement():
...
@@ -120,7 +121,7 @@ class EPCManagement():
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
EPCSrvHelp
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
,
self
.
SourceCodePath
,
self
.
Type
)
HELP
.
EPCSrvHelp
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
,
self
.
SourceCodePath
,
self
.
Type
)
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
)
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
logging
.
debug
(
'Using the OAI EPC Release 14 MME in Docker'
)
logging
.
debug
(
'Using the OAI EPC Release 14 MME in Docker'
)
...
@@ -161,7 +162,7 @@ class EPCManagement():
...
@@ -161,7 +162,7 @@ class EPCManagement():
return
return
# Only in case of Docker containers, MME IP address is not the EPC HOST IP address
# Only in case of Docker containers, MME IP address is not the EPC HOST IP address
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
mySSH
=
SSH
.
SSHConnection
()
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
command
(
'docker inspect --format="MME_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" '
+
self
.
containerPrefix
+
'-oai-mme'
,
'\$'
,
5
)
mySSH
.
command
(
'docker inspect --format="MME_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" '
+
self
.
containerPrefix
+
'-oai-mme'
,
'\$'
,
5
)
result
=
re
.
search
(
'MME_IP_ADDR = (?P<mme_ip_addr>[0-9\.]+)'
,
mySSH
.
getBefore
())
result
=
re
.
search
(
'MME_IP_ADDR = (?P<mme_ip_addr>[0-9\.]+)'
,
mySSH
.
getBefore
())
...
@@ -177,7 +178,7 @@ class EPCManagement():
...
@@ -177,7 +178,7 @@ class EPCManagement():
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
EPCSrvHelp
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
,
self
.
SourceCodePath
,
self
.
Type
)
HELP
.
EPCSrvHelp
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
,
self
.
SourceCodePath
,
self
.
Type
)
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
)
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
logging
.
debug
(
'Using the OAI EPC Release 14 SPGW-CUPS in Docker'
)
logging
.
debug
(
'Using the OAI EPC Release 14 SPGW-CUPS in Docker'
)
...
@@ -211,9 +212,40 @@ class EPCManagement():
...
@@ -211,9 +212,40 @@ class EPCManagement():
mySSH
.
close
()
mySSH
.
close
()
HTML
.
CreateHtmlTestRow
(
self
.
Type
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
self
.
Type
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
def
Initialize5GCN
(
self
,
HTML
):
if
self
.
IPAddress
==
''
or
self
.
UserName
==
''
or
self
.
Password
==
''
or
self
.
SourceCodePath
==
''
or
self
.
Type
==
''
:
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
EPCSrvHelp
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
,
self
.
SourceCodePath
,
self
.
Type
)
sys
.
exit
(
'Insufficient EPC Parameters'
)
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
if
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
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
(
'mkdir -p '
+
self
.
SourceCodePath
+
'/scripts'
,
'\$'
,
5
)
mySSH
.
command
(
'cd /opt/hss_sim0609'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S rm -f hss.log'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S echo "Starting sudo session" && sudo su -c "screen -dm -S simulated_5g_hss ./start_5g_hss"'
,
'\$'
,
5
)
logging
.
debug
(
'Using the sabox'
)
mySSH
.
command
(
'cd /opt/ltebox/tools'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S ./start_sabox'
,
'\$'
,
5
)
else
:
logging
.
error
(
'This option should not occur!'
)
mySSH
.
close
()
HTML
.
CreateHtmlTestRow
(
self
.
Type
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
def
SetAmfIPAddress
(
self
):
# Not an error if we don't need an 5GCN
if
self
.
IPAddress
==
''
or
self
.
UserName
==
''
or
self
.
Password
==
''
or
self
.
SourceCodePath
==
''
or
self
.
Type
==
''
:
return
if
self
.
IPAddress
==
'none'
:
return
if
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
self
.
MmeIPAddress
=
self
.
IPAddress
def
CheckHSSProcess
(
self
,
status_queue
):
def
CheckHSSProcess
(
self
,
status_queue
):
try
:
try
:
mySSH
=
SSH
.
SSHConnection
()
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
mySSH
.
command
(
'docker top '
+
self
.
containerPrefix
+
'-oai-hss'
,
'\$'
,
5
)
mySSH
.
command
(
'docker top '
+
self
.
containerPrefix
+
'-oai-hss'
,
'\$'
,
5
)
...
@@ -238,7 +270,7 @@ class EPCManagement():
...
@@ -238,7 +270,7 @@ class EPCManagement():
def
CheckMMEProcess
(
self
,
status_queue
):
def
CheckMMEProcess
(
self
,
status_queue
):
try
:
try
:
mySSH
=
SSH
.
SSHConnection
()
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
mySSH
.
command
(
'docker top '
+
self
.
containerPrefix
+
'-oai-mme'
,
'\$'
,
5
)
mySSH
.
command
(
'docker top '
+
self
.
containerPrefix
+
'-oai-mme'
,
'\$'
,
5
)
...
@@ -251,11 +283,11 @@ class EPCManagement():
...
@@ -251,11 +283,11 @@ class EPCManagement():
elif
re
.
match
(
'OAI'
,
self
.
Type
,
re
.
IGNORECASE
):
elif
re
.
match
(
'OAI'
,
self
.
Type
,
re
.
IGNORECASE
):
result
=
re
.
search
(
'\/bin\/bash .\/run_'
,
mySSH
.
getBefore
())
result
=
re
.
search
(
'\/bin\/bash .\/run_'
,
mySSH
.
getBefore
())
elif
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
elif
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
result
=
re
.
search
(
'mme'
,
mySSH
.
getBefore
())
result
=
re
.
search
(
'mme
|amf
'
,
mySSH
.
getBefore
())
else
:
else
:
logging
.
error
(
'This should not happen!'
)
logging
.
error
(
'This should not happen!'
)
if
result
is
None
:
if
result
is
None
:
logging
.
debug
(
'
\u001B
[1;37;41m MME Process Not Found!
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;37;41m MME
|AMF
Process Not Found!
\u001B
[0m'
)
status_queue
.
put
(
CONST
.
MME_PROCESS_FAILED
)
status_queue
.
put
(
CONST
.
MME_PROCESS_FAILED
)
else
:
else
:
status_queue
.
put
(
CONST
.
MME_PROCESS_OK
)
status_queue
.
put
(
CONST
.
MME_PROCESS_OK
)
...
@@ -265,7 +297,7 @@ class EPCManagement():
...
@@ -265,7 +297,7 @@ class EPCManagement():
def
CheckSPGWProcess
(
self
,
status_queue
):
def
CheckSPGWProcess
(
self
,
status_queue
):
try
:
try
:
mySSH
=
SSH
.
SSHConnection
()
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
mySSH
.
command
(
'docker top '
+
self
.
containerPrefix
+
'-oai-spgwc'
,
'\$'
,
5
)
mySSH
.
command
(
'docker top '
+
self
.
containerPrefix
+
'-oai-spgwc'
,
'\$'
,
5
)
...
@@ -281,11 +313,11 @@ class EPCManagement():
...
@@ -281,11 +313,11 @@ class EPCManagement():
result
=
re
.
search
(
'\/bin\/bash .\/run_'
,
mySSH
.
getBefore
())
result
=
re
.
search
(
'\/bin\/bash .\/run_'
,
mySSH
.
getBefore
())
elif
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
elif
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
mySSH
.
command
(
'stdbuf -o0 ps -aux | grep --color=never xGw | grep -v grep'
,
'\$'
,
5
)
mySSH
.
command
(
'stdbuf -o0 ps -aux | grep --color=never xGw | grep -v grep'
,
'\$'
,
5
)
result
=
re
.
search
(
'xGw'
,
mySSH
.
getBefore
())
result
=
re
.
search
(
'xGw
|upf
'
,
mySSH
.
getBefore
())
else
:
else
:
logging
.
error
(
'This should not happen!'
)
logging
.
error
(
'This should not happen!'
)
if
result
is
None
:
if
result
is
None
:
logging
.
debug
(
'
\u001B
[1;37;41m SPGW Process Not Found!
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1;37;41m SPGW
|UPF
Process Not Found!
\u001B
[0m'
)
status_queue
.
put
(
CONST
.
SPGW_PROCESS_FAILED
)
status_queue
.
put
(
CONST
.
SPGW_PROCESS_FAILED
)
else
:
else
:
status_queue
.
put
(
CONST
.
SPGW_PROCESS_OK
)
status_queue
.
put
(
CONST
.
SPGW_PROCESS_OK
)
...
@@ -294,7 +326,7 @@ class EPCManagement():
...
@@ -294,7 +326,7 @@ class EPCManagement():
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
os
.
kill
(
os
.
getppid
(),
signal
.
SIGUSR1
)
def
TerminateHSS
(
self
,
HTML
):
def
TerminateHSS
(
self
,
HTML
):
mySSH
=
SSH
.
SSHConnection
()
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
mySSH
.
command
(
'docker exec -it '
+
self
.
containerPrefix
+
'-oai-hss /bin/bash -c "killall --signal SIGINT oai_hss tshark"'
,
'\$'
,
5
)
mySSH
.
command
(
'docker exec -it '
+
self
.
containerPrefix
+
'-oai-hss /bin/bash -c "killall --signal SIGINT oai_hss tshark"'
,
'\$'
,
5
)
...
@@ -322,14 +354,14 @@ class EPCManagement():
...
@@ -322,14 +354,14 @@ class EPCManagement():
mySSH
.
command
(
'cd '
+
self
.
SourceCodePath
,
'\$'
,
5
)
mySSH
.
command
(
'cd '
+
self
.
SourceCodePath
,
'\$'
,
5
)
mySSH
.
command
(
'cd scripts'
,
'\$'
,
5
)
mySSH
.
command
(
'cd scripts'
,
'\$'
,
5
)
time
.
sleep
(
1
)
time
.
sleep
(
1
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S
killall --signal SIGKILL hss_sim
'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S
screen -S simulated_hss -X quit
'
,
'\$'
,
5
)
else
:
else
:
logging
.
error
(
'This should not happen!'
)
logging
.
error
(
'This should not happen!'
)
mySSH
.
close
()
mySSH
.
close
()
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
def
TerminateMME
(
self
,
HTML
):
def
TerminateMME
(
self
,
HTML
):
mySSH
=
SSH
.
SSHConnection
()
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
mySSH
.
command
(
'docker exec -it '
+
self
.
containerPrefix
+
'-oai-mme /bin/bash -c "killall --signal SIGINT oai_mme tshark"'
,
'\$'
,
5
)
mySSH
.
command
(
'docker exec -it '
+
self
.
containerPrefix
+
'-oai-mme /bin/bash -c "killall --signal SIGINT oai_mme tshark"'
,
'\$'
,
5
)
...
@@ -355,7 +387,7 @@ class EPCManagement():
...
@@ -355,7 +387,7 @@ class EPCManagement():
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
def
TerminateSPGW
(
self
,
HTML
):
def
TerminateSPGW
(
self
,
HTML
):
mySSH
=
SSH
.
SSHConnection
()
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
if
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
mySSH
.
command
(
'docker exec -it '
+
self
.
containerPrefix
+
'-oai-spgwc /bin/bash -c "killall --signal SIGINT oai_spgwc tshark"'
,
'\$'
,
5
)
mySSH
.
command
(
'docker exec -it '
+
self
.
containerPrefix
+
'-oai-spgwc /bin/bash -c "killall --signal SIGINT oai_spgwc tshark"'
,
'\$'
,
5
)
...
@@ -397,6 +429,22 @@ class EPCManagement():
...
@@ -397,6 +429,22 @@ class EPCManagement():
mySSH
.
close
()
mySSH
.
close
()
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
def
Terminate5GCN
(
self
,
HTML
):
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
if
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
mySSH
.
command
(
'cd /opt/ltebox/tools'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S ./stop_sabox'
,
'\$'
,
5
)
time
.
sleep
(
1
)
mySSH
.
command
(
'cd '
+
self
.
SourceCodePath
,
'\$'
,
5
)
mySSH
.
command
(
'cd scripts'
,
'\$'
,
5
)
time
.
sleep
(
1
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S screen -S simulated_5g_hss -X quit'
,
'\$'
,
5
)
else
:
logging
.
error
(
'This should not happen!'
)
mySSH
.
close
()
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
def
DeployEpc
(
self
,
HTML
):
def
DeployEpc
(
self
,
HTML
):
logging
.
debug
(
'Trying to deploy'
)
logging
.
debug
(
'Trying to deploy'
)
if
not
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
if
not
re
.
match
(
'OAI-Rel14-Docker'
,
self
.
Type
,
re
.
IGNORECASE
):
...
@@ -408,7 +456,7 @@ class EPCManagement():
...
@@ -408,7 +456,7 @@ class EPCManagement():
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
GenericHelp
(
CONST
.
Version
)
HELP
.
EPCSrvHelp
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
,
self
.
SourceCodePath
,
self
.
Type
)
HELP
.
EPCSrvHelp
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
,
self
.
SourceCodePath
,
self
.
Type
)
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
)
mySSH
.
command
(
'docker-compose --version'
,
'\$'
,
5
)
mySSH
.
command
(
'docker-compose --version'
,
'\$'
,
5
)
result
=
re
.
search
(
'docker-compose version 1'
,
mySSH
.
getBefore
())
result
=
re
.
search
(
'docker-compose version 1'
,
mySSH
.
getBefore
())
...
@@ -502,7 +550,7 @@ class EPCManagement():
...
@@ -502,7 +550,7 @@ class EPCManagement():
logging
.
debug
(
'Trying to undeploy'
)
logging
.
debug
(
'Trying to undeploy'
)
# No check down, we suppose everything done before.
# No check down, we suppose everything done before.
mySSH
=
SSH
.
SSHConnection
()
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
# Recovering logs and pcap files
# Recovering logs and pcap files
mySSH
.
command
(
'cd '
+
self
.
SourceCodePath
+
'/logs'
,
'\$'
,
5
)
mySSH
.
command
(
'cd '
+
self
.
SourceCodePath
+
'/logs'
,
'\$'
,
5
)
...
@@ -546,7 +594,7 @@ class EPCManagement():
...
@@ -546,7 +594,7 @@ class EPCManagement():
HTML
.
CreateHtmlTestRow
(
self
.
Type
,
'KO'
,
CONST
.
INVALID_PARAMETER
)
HTML
.
CreateHtmlTestRow
(
self
.
Type
,
'KO'
,
CONST
.
INVALID_PARAMETER
)
def
LogCollectHSS
(
self
):
def
LogCollectHSS
(
self
):
mySSH
=
SSH
.
SSHConnection
()
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
command
(
'cd '
+
self
.
SourceCodePath
+
'/scripts'
,
'\$'
,
5
)
mySSH
.
command
(
'cd '
+
self
.
SourceCodePath
+
'/scripts'
,
'\$'
,
5
)
mySSH
.
command
(
'rm -f hss.log.zip'
,
'\$'
,
5
)
mySSH
.
command
(
'rm -f hss.log.zip'
,
'\$'
,
5
)
...
@@ -576,7 +624,7 @@ class EPCManagement():
...
@@ -576,7 +624,7 @@ class EPCManagement():
mySSH
.
close
()
mySSH
.
close
()
def
LogCollectMME
(
self
):
def
LogCollectMME
(
self
):
mySSH
=
SSH
.
SSHConnection
()
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
command
(
'cd '
+
self
.
SourceCodePath
+
'/scripts'
,
'\$'
,
5
)
mySSH
.
command
(
'cd '
+
self
.
SourceCodePath
+
'/scripts'
,
'\$'
,
5
)
mySSH
.
command
(
'rm -f mme.log.zip'
,
'\$'
,
5
)
mySSH
.
command
(
'rm -f mme.log.zip'
,
'\$'
,
5
)
...
@@ -597,13 +645,13 @@ class EPCManagement():
...
@@ -597,13 +645,13 @@ class EPCManagement():
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S rm mme*.log'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S rm mme*.log'
,
'\$'
,
5
)
elif
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
elif
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
mySSH
.
command
(
'cp /opt/ltebox/var/log/*Log.0 .'
,
'\$'
,
5
)
mySSH
.
command
(
'cp /opt/ltebox/var/log/*Log.0 .'
,
'\$'
,
5
)
mySSH
.
command
(
'zip mme.log.zip mmeLog.0 s1apcLog.0 s1apsLog.0 s11cLog.0 libLog.0 s1apCodecLog.0'
,
'\$'
,
60
)
mySSH
.
command
(
'zip mme.log.zip mmeLog.0 s1apcLog.0 s1apsLog.0 s11cLog.0 libLog.0 s1apCodecLog.0
amfLog.0 ngapcLog.0 ngapcommonLog.0 ngapsLog.0
'
,
'\$'
,
60
)
else
:
else
:
logging
.
error
(
'This option should not occur!'
)
logging
.
error
(
'This option should not occur!'
)
mySSH
.
close
()
mySSH
.
close
()
def
LogCollectSPGW
(
self
):
def
LogCollectSPGW
(
self
):
mySSH
=
SSH
.
SSHConnection
()
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
mySSH
.
command
(
'cd '
+
self
.
SourceCodePath
+
'/scripts'
,
'\$'
,
5
)
mySSH
.
command
(
'cd '
+
self
.
SourceCodePath
+
'/scripts'
,
'\$'
,
5
)
mySSH
.
command
(
'rm -f spgw.log.zip'
,
'\$'
,
5
)
mySSH
.
command
(
'rm -f spgw.log.zip'
,
'\$'
,
5
)
...
@@ -625,8 +673,8 @@ class EPCManagement():
...
@@ -625,8 +673,8 @@ class EPCManagement():
mySSH
.
command
(
'zip spgw.log.zip spgw*.log'
,
'\$'
,
60
)
mySSH
.
command
(
'zip spgw.log.zip spgw*.log'
,
'\$'
,
60
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S rm spgw*.log'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S rm spgw*.log'
,
'\$'
,
5
)
elif
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
elif
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
mySSH
.
command
(
'cp /opt/ltebox/var/log/
xGw
Log.0 .'
,
'\$'
,
5
)
mySSH
.
command
(
'cp /opt/ltebox/var/log/
*
Log.0 .'
,
'\$'
,
5
)
mySSH
.
command
(
'zip spgw.log.zip xGwLog.0'
,
'\$'
,
60
)
mySSH
.
command
(
'zip spgw.log.zip xGwLog.0
upfLog.0
'
,
'\$'
,
60
)
else
:
else
:
logging
.
error
(
'This option should not occur!'
)
logging
.
error
(
'This option should not occur!'
)
mySSH
.
close
()
mySSH
.
close
()
...
...
ci-scripts/main.py
View file @
32e5e464
...
@@ -659,6 +659,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
...
@@ -659,6 +659,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
if
(
EPC
.
IPAddress
!=
''
)
and
(
EPC
.
IPAddress
!=
'none'
):
if
(
EPC
.
IPAddress
!=
''
)
and
(
EPC
.
IPAddress
!=
'none'
):
CiTestObj
.
CheckFlexranCtrlInstallation
(
RAN
,
EPC
,
CONTAINERS
)
CiTestObj
.
CheckFlexranCtrlInstallation
(
RAN
,
EPC
,
CONTAINERS
)
EPC
.
SetMmeIPAddress
()
EPC
.
SetMmeIPAddress
()
EPC
.
SetAmfIPAddress
()
#get the list of tests to be done
#get the list of tests to be done
todo_tests
=
[]
todo_tests
=
[]
...
@@ -775,6 +776,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
...
@@ -775,6 +776,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
EPC
.
InitializeSPGW
(
HTML
)
EPC
.
InitializeSPGW
(
HTML
)
elif
action
==
'Terminate_SPGW'
:
elif
action
==
'Terminate_SPGW'
:
EPC
.
TerminateSPGW
(
HTML
)
EPC
.
TerminateSPGW
(
HTML
)
elif
action
==
'Initialize_5GCN'
:
EPC
.
Initialize5GCN
(
HTML
)
elif
action
==
'Terminate_5GCN'
:
EPC
.
Terminate5GCN
(
HTML
)
elif
action
==
'Deploy_EPC'
:
elif
action
==
'Deploy_EPC'
:
EPC
.
DeployEpc
(
HTML
)
EPC
.
DeployEpc
(
HTML
)
elif
action
==
'Undeploy_EPC'
:
elif
action
==
'Undeploy_EPC'
:
...
...
ci-scripts/xml_class_list.yml
View file @
32e5e464
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
-
Terminate_MME
-
Terminate_MME
-
Initialize_SPGW
-
Initialize_SPGW
-
Terminate_SPGW
-
Terminate_SPGW
-
Initialize_5GCN
-
Terminate_5GCN
-
Initialize_CatM_module
-
Initialize_CatM_module
-
Terminate_CatM_module
-
Terminate_CatM_module
-
Attach_CatM_module
-
Attach_CatM_module
...
@@ -38,4 +40,4 @@
...
@@ -38,4 +40,4 @@
-
Deploy_Object
-
Deploy_Object
-
Undeploy_Object
-
Undeploy_Object
-
Cppcheck_Analysis
-
Cppcheck_Analysis
-
Deploy_Run_PhySim
-
Deploy_Run_PhySim
\ No newline at end of file
ci-scripts/xml_files/sa_cn5g_closure.xml
0 → 100644
View file @
32e5e464
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>
cn5g-closure
</htmlTabRef>
<htmlTabName>
CN5G-Closure
</htmlTabName>
<htmlTabIcon>
log-out
</htmlTabIcon>
<TestCaseRequestedList>
060000
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase
id=
"060000"
>
<class>
Terminate_5GCN
</class>
<desc>
Terminate 5G Core
</desc>
</testCase>
</testCaseList>
ci-scripts/xml_files/sa_cn5g_start.xml
0 → 100644
View file @
32e5e464
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>
cn5g-start-tab
</htmlTabRef>
<htmlTabName>
CN5G-Start
</htmlTabName>
<htmlTabIcon>
log-in
</htmlTabIcon>
<TestCaseRequestedList>
000100
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase
id=
"000100"
>
<class>
Initialize_5GCN
</class>
<desc>
Initialize 5G Core
</desc>
</testCase>
</testCaseList>
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