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
03356e67
Commit
03356e67
authored
Jun 02, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/ci-obsolete-old-4g-core' into integration_2023_w22
parents
b3bc1dd6
e089b635
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
43 deletions
+22
-43
ci-scripts/args_parse.py
ci-scripts/args_parse.py
+2
-2
ci-scripts/cls_oaicitest.py
ci-scripts/cls_oaicitest.py
+19
-40
ci-scripts/helpreadme.py
ci-scripts/helpreadme.py
+1
-1
No files found.
ci-scripts/args_parse.py
View file @
03356e67
...
...
@@ -220,10 +220,10 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST
EPC
.
SourceCodePath
=
matchReg
.
group
(
1
)
elif
re
.
match
(
'^\-\-EPCType=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-EPCType=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
if
re
.
match
(
'OAI'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
)
or
re
.
match
(
'ltebox'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
)
or
re
.
match
(
'OAI-Rel14-
CUPS'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
)
or
re
.
match
(
'OAI-Rel14-
Docker'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
)
or
re
.
match
(
'OC-OAI-CN5G'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
):
if
re
.
match
(
'OAI'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
)
or
re
.
match
(
'ltebox'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
)
or
re
.
match
(
'OAI-Rel14-Docker'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
)
or
re
.
match
(
'OC-OAI-CN5G'
,
matchReg
.
group
(
1
),
re
.
IGNORECASE
):
EPC
.
Type
=
matchReg
.
group
(
1
)
else
:
sys
.
exit
(
'Invalid EPC Type: '
+
matchReg
.
group
(
1
)
+
' -- (should be OAI or ltebox or OAI-Rel14-
CUPS or OAI-Rel14-
Docker or OC-OAI-CN5G)'
)
sys
.
exit
(
'Invalid EPC Type: '
+
matchReg
.
group
(
1
)
+
' -- (should be OAI or ltebox or OAI-Rel14-Docker or OC-OAI-CN5G)'
)
elif
re
.
match
(
'^\-\-EPCContainerPrefix=(.+)$'
,
myArgv
,
re
.
IGNORECASE
):
matchReg
=
re
.
match
(
'^\-\-EPCContainerPrefix=(.+)$'
,
myArgv
,
re
.
IGNORECASE
)
EPC
.
ContainerPrefix
=
matchReg
.
group
(
1
)
...
...
ci-scripts/cls_oaicitest.py
View file @
03356e67
...
...
@@ -505,54 +505,33 @@ class OaiCiTest():
def
Ping_common
(
self
,
EPC
,
ue
,
RAN
):
# Launch ping on the EPC side (true for ltebox and old open-air-cn)
# But for OAI-Rel14-CUPS, we launch from python executor
ping_status
=
0
ueIP
=
ue
.
getIP
()
if
not
ueIP
:
return
(
False
,
f"UE
{
ue
.
getName
()
}
has no IP address"
)
launchFromEpc
=
False
ping_log_file
=
f'ping_
{
self
.
testCase_id
}
_
{
ue
.
getName
()
}
.log'
if
re
.
match
(
'OAI-Rel14-CUPS'
,
EPC
.
Type
,
re
.
IGNORECASE
):
launchFromEpc
=
False
ping_time
=
re
.
findall
(
"-c *(\d+)"
,
str
(
self
.
ping_args
))
if
launchFromEpc
:
SSH
=
sshconnection
.
SSHConnection
()
SSH
.
open
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
)
SSH
.
command
(
'cd '
+
EPC
.
SourceCodePath
,
'\$'
,
5
)
SSH
.
command
(
'cd scripts'
,
'\$'
,
5
)
# In case of a docker-based deployment, we need to ping from the trf-gen container
launchFromTrfContainer
=
False
if
(
re
.
match
(
'OAI-Rel14-Docker'
,
EPC
.
Type
,
re
.
IGNORECASE
))
or
(
re
.
match
(
'OAICN5G'
,
EPC
.
Type
,
re
.
IGNORECASE
)):
launchFromTrfContainer
=
True
if
launchFromTrfContainer
:
ping_status
=
SSH
.
command
(
f'docker exec -it prod-trf-gen /bin/bash -c "ping
{
self
.
ping_args
}
{
ueIP
}
" 2>&1 | tee
{
ping_log_file
}
'
,
'\$'
,
int
(
ping_time
[
0
])
*
1.5
)
else
:
ping_status
=
SSH
.
command
(
f'stdbuf -o0 ping
{
self
.
ping_args
}
{
ueIP
}
2>&1 | stdbuf -o0 tee
{
ping_log_file
}
'
,
'\$'
,
int
(
ping_time
[
0
])
*
1.5
)
#copy the ping log file to have it locally for analysis (ping stats)
SSH
.
copyin
(
EPC
.
IPAddress
,
EPC
.
UserName
,
EPC
.
Password
,
EPC
.
SourceCodePath
+
'/scripts/{ping_log_file}'
,
'.'
)
SSH
.
close
()
#target address is different depending on EPC type
if
re
.
match
(
'OAI-Rel14-Docker'
,
EPC
.
Type
,
re
.
IGNORECASE
):
Target
=
EPC
.
MmeIPAddress
elif
re
.
match
(
'OAICN5G'
,
EPC
.
Type
,
re
.
IGNORECASE
):
Target
=
EPC
.
MmeIPAddress
elif
re
.
match
(
'OC-OAI-CN5G'
,
EPC
.
Type
,
re
.
IGNORECASE
):
Target
=
"172.21.6.100"
else
:
#target address is different depending on EPC type
if
re
.
match
(
'OAI-Rel14-Docker'
,
EPC
.
Type
,
re
.
IGNORECASE
):
Target
=
EPC
.
MmeIPAddress
elif
re
.
match
(
'OAICN5G'
,
EPC
.
Type
,
re
.
IGNORECASE
):
Target
=
EPC
.
MmeIPAddress
elif
re
.
match
(
'OC-OAI-CN5G'
,
EPC
.
Type
,
re
.
IGNORECASE
):
Target
=
"172.21.6.100"
else
:
Target
=
EPC
.
IPAddress
#ping from module NIC rather than IP address to make sure round trip is over the air
interface
=
f'-I
{
ue
.
getIFName
()
}
'
if
ue
.
getIFName
()
else
''
ping_cmd
=
f'
{
ue
.
getCmdPrefix
()
}
ping
{
interface
}
{
self
.
ping_args
}
{
Target
}
&> /tmp/
{
ping_log_file
}
'
cmd
=
cls_cmd
.
getConnection
(
ue
.
getHost
())
response
=
cmd
.
run
(
ping_cmd
,
timeout
=
int
(
ping_time
[
0
])
*
1.5
)
if
response
.
returncode
!=
0
:
ping_status
=
-
1
else
:
#copy the ping log file to have it locally for analysis (ping stats)
cmd
.
copyin
(
src
=
f'/tmp/
{
ping_log_file
}
'
,
tgt
=
ping_log_file
)
Target
=
EPC
.
IPAddress
#ping from module NIC rather than IP address to make sure round trip is over the air
interface
=
f'-I
{
ue
.
getIFName
()
}
'
if
ue
.
getIFName
()
else
''
ping_cmd
=
f'
{
ue
.
getCmdPrefix
()
}
ping
{
interface
}
{
self
.
ping_args
}
{
Target
}
&> /tmp/
{
ping_log_file
}
'
cmd
=
cls_cmd
.
getConnection
(
ue
.
getHost
())
response
=
cmd
.
run
(
ping_cmd
,
timeout
=
int
(
ping_time
[
0
])
*
1.5
)
if
response
.
returncode
!=
0
:
ping_status
=
-
1
else
:
#copy the ping log file to have it locally for analysis (ping stats)
cmd
.
copyin
(
src
=
f'/tmp/
{
ping_log_file
}
'
,
tgt
=
ping_log_file
)
cmd
.
close
()
cmd
.
close
()
# TIMEOUT CASE
ue_header
=
f'UE
{
ue
.
getName
()
}
(
{
ueIP
}
)'
...
...
ci-scripts/helpreadme.py
View file @
03356e67
...
...
@@ -68,7 +68,7 @@ def EPCSrvHelp(ipaddr, username, password, sourcepath, epctype):
print
(
' --EPCUserName=[EPC
\'
s Login User Name] -- '
+
username
)
print
(
' --EPCPassword=[EPC
\'
s Login Password] -- '
+
password
)
print
(
' --EPCSourceCodePath=[EPC
\'
s Source Code Path] -- '
+
sourcepath
)
print
(
' --EPCType=[EPC
\'
s Type: OAI or ltebox or O
AI-Rel14-CUPS]
-- '
+
epctype
)
print
(
' --EPCType=[EPC
\'
s Type: OAI or ltebox or O
C-OAI-CN5G]
-- '
+
epctype
)
def
XmlHelp
(
filename
):
print
(
' --XMLTestFile=[XML Test File to be run] -- '
+
filename
)
...
...
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