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
3afbf8e3
Commit
3afbf8e3
authored
Aug 21, 2024
by
Bipin Adhikari
Committed by
Raphael Defosseux
Sep 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch to resolve MR comments
parent
9890896b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
73 deletions
+23
-73
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+6
-4
ci-scripts/main.py
ci-scripts/main.py
+10
-28
ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml
...ipts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml
+0
-7
ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml
...ipts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml
+0
-7
ci-scripts/xml_files/container_sa_aerial_quectel.xml
ci-scripts/xml_files/container_sa_aerial_quectel.xml
+0
-7
ci-scripts/xml_files/container_sa_e1_b200_quectel.xml
ci-scripts/xml_files/container_sa_e1_b200_quectel.xml
+0
-12
ci-scripts/xml_files/container_sa_f1_b200_quectel.xml
ci-scripts/xml_files/container_sa_f1_b200_quectel.xml
+0
-7
ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml
ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml
+7
-1
No files found.
ci-scripts/cls_containerize.py
View file @
3afbf8e3
...
...
@@ -234,7 +234,6 @@ def ReTagImages(mySSH,IMAGES,ranCommitID,ranBranch,ranAllowMerge,displayedNewTag
if
not
displayedNewTags
:
logging
.
debug
(
f'
\u001B
[1m Using sanitized version of
{
image
}
with
{
imageTag
}
\u001B
[0m'
)
mySSH
.
run
(
f'sed -i -e "s@oaisoftwarealliance/
{
image
}
:develop@oai-ci/
{
imageTag
}
@" ci-docker-compose.yml'
,
silent
=
True
)
mySSH
.
run
(
f'sed -i -e "s@
{
image
}
:latest@oai-ci/
{
imageTag
}
@" ci-docker-compose.yml'
,
silent
=
True
)
# temporary solution for not using the new branch
def
DeployServices
(
mySSH
,
svcName
):
allServices
=
[]
...
...
@@ -979,7 +978,7 @@ class Containerize():
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
return
True
def
Create_Workspace
(
self
):
def
Create_Workspace
(
self
,
HTML
):
if
self
.
eNB_serverId
[
self
.
eNB_instance
]
==
'0'
:
lIpAddr
=
self
.
eNBIPAddress
lUserName
=
self
.
eNBUserName
...
...
@@ -1003,6 +1002,7 @@ class Containerize():
sshSession
=
cls_cmd
.
getConnection
(
lIpAddr
)
CreateWorkspace
(
sshSession
,
lSourcePath
,
self
.
ranRepository
,
self
.
ranCommitID
,
self
.
ranTargetBranch
,
self
.
ranAllowMerge
)
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
def
DeployObject
(
self
,
HTML
,
EPC
):
lIpAddr
,
lUserName
,
lPassWord
,
lSourcePath
=
GetCredentials
(
self
)
...
...
@@ -1012,6 +1012,7 @@ class Containerize():
logging
.
debug
(
'
\u001B
[1m Deploying OAI Object on server: '
+
lIpAddr
+
'
\u001B
[0m'
)
self
.
deployKind
[
self
.
eNB_instance
]
=
True
mySSH
=
cls_cmd
.
getConnection
(
lIpAddr
,
f'
{
lSourcePath
}
/
{
self
.
yamlPath
[
self
.
eNB_instance
]
}
'
)
logging
.
info
(
f'Current working directory:
{
lSourcePath
}
/
{
self
.
yamlPath
[
self
.
eNB_instance
]
}
'
)
ReTagImages
(
mySSH
,
IMAGES
,
self
.
ranCommitID
,
self
.
ranBranch
,
self
.
ranAllowMerge
,
self
.
displayedNewTags
)
deployStatus
,
allServices
=
DeployServices
(
mySSH
,
self
.
services
[
self
.
eNB_instance
])
if
deployStatus
!=
0
:
...
...
@@ -1031,7 +1032,7 @@ class Containerize():
logging
.
warning
(
f"Deployment Failed: Trying to copy container logs
{
self
.
eNB_logFile
[
self
.
eNB_instance
]
}
"
)
CopyinContainerLog
(
mySSH
,
lSourcePath
,
self
.
yamlPath
[
0
].
split
(
'/'
),
containerName
,
self
.
eNB_logFile
[
self
.
eNB_instance
])
status
=
False
logging
.
debug
(
GetImageInfo
(
mySSH
,
containerName
)
)
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'OK'
,
[(
GetImageInfo
(
mySSH
,
containerName
))]
)
mySSH
.
close
()
if
status
:
HTML
.
CreateHtmlTestRowQueue
(
'N/A'
,
'OK'
,
[
'Healthy deployment!'
])
...
...
@@ -1057,7 +1058,8 @@ class Containerize():
HTML
.
CreateHtmlTestRow
(
'N/A'
,
'KO'
,
CONST
.
ENB_PROCESS_NOLOGFILE_TO_ANALYZE
)
self
.
exitStatus
=
1
else
:
self
.
exitStatus
=
1
if
any
(
CheckLogs
(
self
,
mySSH
,
self
.
yamlPath
[
0
].
split
(
'/'
),
service_name
,
HTML
,
RAN
)
for
service_name
,
_
in
services
)
else
0
log_results
=
[
CheckLogs
(
self
,
mySSH
,
self
.
yamlPath
[
0
].
split
(
'/'
),
service_name
,
HTML
,
RAN
)
for
service_name
,
_
in
services
]
self
.
exitStatus
=
1
if
any
(
log_results
)
else
0
logging
.
info
(
'
\u001B
[1m Undeploying OAI Object Pass
\u001B
[0m'
)
if
self
.
exitStatus
==
0
else
logging
.
error
(
'
\u001B
[1m Undeploying OAI Object Failed
\u001B
[0m'
)
mySSH
.
close
()
...
...
ci-scripts/main.py
View file @
3afbf8e3
...
...
@@ -219,6 +219,9 @@ def GetParametersFromXML(action):
CiTestObj
.
ue_ids
=
test
.
findtext
(
'id'
).
split
(
' '
)
if
test
.
findtext
(
'nodes'
):
CiTestObj
.
nodes
=
test
.
findtext
(
'nodes'
).
split
(
' '
)
if
len
(
CiTestObj
.
ue_ids
)
!=
len
(
CiTestObj
.
nodes
):
logging
.
error
(
'Number of Nodes are not equal to the total number of UEs'
)
sys
.
exit
(
"Mismatch in number of Nodes and UIs"
)
elif
action
==
'Build_OAI_UE'
:
CiTestObj
.
Build_OAI_UE_args
=
test
.
findtext
(
'Build_OAI_UE_args'
)
...
...
@@ -267,6 +270,9 @@ def GetParametersFromXML(action):
CiTestObj
.
ue_ids
=
test
.
findtext
(
'id'
).
split
(
' '
)
if
test
.
findtext
(
'nodes'
):
CiTestObj
.
nodes
=
test
.
findtext
(
'nodes'
).
split
(
' '
)
if
len
(
CiTestObj
.
ue_ids
)
!=
len
(
CiTestObj
.
nodes
):
logging
.
error
(
'Number of Nodes are not equal to the total number of UEs'
)
sys
.
exit
(
"Mismatch in number of Nodes and UIs"
)
ping_rttavg_threshold
=
test
.
findtext
(
'ping_rttavg_threshold'
)
or
''
elif
action
==
'Iperf'
or
action
==
'Iperf2_Unidir'
:
...
...
@@ -275,6 +281,9 @@ def GetParametersFromXML(action):
CiTestObj
.
svr_id
=
test
.
findtext
(
'svr_id'
)
or
None
if
test
.
findtext
(
'nodes'
):
CiTestObj
.
nodes
=
test
.
findtext
(
'nodes'
).
split
(
' '
)
if
len
(
CiTestObj
.
ue_ids
)
!=
len
(
CiTestObj
.
nodes
):
logging
.
error
(
'Number of Nodes are not equal to the total number of UEs'
)
sys
.
exit
(
"Mismatch in number of Nodes and UIs"
)
if
test
.
findtext
(
'svr_node'
):
CiTestObj
.
svr_node
=
test
.
findtext
(
'svr_node'
)
CiTestObj
.
iperf_packetloss_threshold
=
test
.
findtext
(
'iperf_packetloss_threshold'
)
...
...
@@ -377,23 +386,6 @@ def GetParametersFromXML(action):
if
string_field
is
not
None
:
CONTAINERS
.
services
[
CONTAINERS
.
eNB_instance
]
=
string_field
elif
action
==
'DeployGenObject'
or
action
==
'UndeployGenObject'
or
action
==
'StatsFromGenObject'
:
string_field
=
test
.
findtext
(
'yaml_path'
)
if
(
string_field
is
not
None
):
CONTAINERS
.
yamlPath
[
0
]
=
string_field
string_field
=
test
.
findtext
(
'services'
)
if
(
string_field
is
not
None
):
CONTAINERS
.
services
[
0
]
=
string_field
string_field
=
test
.
findtext
(
'nb_healthy'
)
if
(
string_field
is
not
None
):
CONTAINERS
.
nb_healthy
[
0
]
=
int
(
string_field
)
string_field
=
test
.
findtext
(
'd_retx_th'
)
if
(
string_field
is
not
None
):
CONTAINERS
.
ran_checkers
[
'd_retx_th'
]
=
[
float
(
x
)
for
x
in
string_field
.
split
(
','
)]
string_field
=
test
.
findtext
(
'u_retx_th'
)
if
(
string_field
is
not
None
):
CONTAINERS
.
ran_checkers
[
'u_retx_th'
]
=
[
float
(
x
)
for
x
in
string_field
.
split
(
','
)]
elif
action
==
'Run_CUDATest'
or
action
==
'Run_NRulsimTest'
or
action
==
'Run_T2Test'
:
ldpc
.
runargs
=
test
.
findtext
(
'physim_run_args'
)
ldpc
.
runsim
=
test
.
findtext
(
'physim_run'
)
...
...
@@ -865,7 +857,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
if
not
success
:
RAN
.
prematureExit
=
True
elif
action
==
'Create_Workspace'
:
CONTAINERS
.
Create_Workspace
()
CONTAINERS
.
Create_Workspace
(
HTML
)
elif
action
==
'Deploy_Object'
:
CONTAINERS
.
DeployObject
(
HTML
,
EPC
)
if
CONTAINERS
.
exitStatus
==
1
:
...
...
@@ -884,20 +876,10 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
RAN
.
prematureExit
=
True
elif
action
==
'Deploy_Run_PhySim'
:
PHYSIM
.
Deploy_PhySim
(
HTML
,
RAN
)
elif
action
==
'DeployGenObject'
:
CONTAINERS
.
DeployGenObject
(
HTML
,
RAN
,
CiTestObj
)
if
CONTAINERS
.
exitStatus
==
1
:
RAN
.
prematureExit
=
True
elif
action
==
'UndeployGenObject'
:
CONTAINERS
.
UndeployGenObject
(
HTML
,
RAN
,
CiTestObj
)
if
CONTAINERS
.
exitStatus
==
1
:
RAN
.
prematureExit
=
True
elif
action
==
'IperfFromContainer'
:
CONTAINERS
.
IperfFromContainer
(
HTML
,
RAN
,
CiTestObj
)
if
CONTAINERS
.
exitStatus
==
1
:
RAN
.
prematureExit
=
True
elif
action
==
'StatsFromGenObject'
:
CONTAINERS
.
StatsFromGenObject
(
HTML
)
elif
action
==
'Push_Images_To_Test_Servers'
:
logging
.
debug
(
'To be implemented'
)
else
:
...
...
ci-scripts/xml_files/container_lte_b200_fdd_05Mhz_tm1_if4_5.xml
View file @
3afbf8e3
...
...
@@ -31,7 +31,6 @@
040101
800813
030131
800814
030132
040301 040531 040633 040634 040636 040671 040672 040673 040401 040201
030231
...
...
@@ -78,12 +77,6 @@
<eNB_instance>
0
</eNB_instance>
<eNB_serverId>
0
</eNB_serverId>
</testCase>
<testCase
id=
"800814"
>
<class>
Create_Workspace
</class>
<desc>
Creating new Workspace for server 0
</desc>
<eNB_instance>
0
</eNB_instance>
<eNB_serverId>
0
</eNB_serverId>
</testCase>
<testCase
id=
"030132"
>
<class>
Deploy_Object
</class>
<desc>
Deploy RCC (FDD/Band7/5MHz) in a container
</desc>
...
...
ci-scripts/xml_files/container_lte_b200_tdd_05Mhz_tm1_if4_5.xml
View file @
3afbf8e3
...
...
@@ -30,7 +30,6 @@
111110
800813
030134
800814
030135
040301 040532 040631 040632 040634 040635 040681 040682 040684 040685 040401 040201
030231
...
...
@@ -79,12 +78,6 @@
<eNB_instance>
0
</eNB_instance>
<eNB_serverId>
0
</eNB_serverId>
</testCase>
<testCase
id=
"800814"
>
<class>
Create_Workspace
</class>
<desc>
Creating new Workspace for server 0
</desc>
<eNB_instance>
0
</eNB_instance>
<eNB_serverId>
0
</eNB_serverId>
</testCase>
<testCase
id=
"030135"
>
<class>
Deploy_Object
</class>
<desc>
Deploy RCC (TDD/Band40/5MHz) in a container
</desc>
...
...
ci-scripts/xml_files/container_sa_aerial_quectel.xml
View file @
3afbf8e3
...
...
@@ -31,7 +31,6 @@
001111
800813
002222
800814
002223
000111
100000
...
...
@@ -70,12 +69,6 @@
<eNB_instance>
0
</eNB_instance>
<eNB_serverId>
0
</eNB_serverId>
</testCase>
<testCase
id=
"800814"
>
<class>
Create_Workspace
</class>
<desc>
Creating new Workspace for server 0
</desc>
<eNB_instance>
0
</eNB_instance>
<eNB_serverId>
0
</eNB_serverId>
</testCase>
<testCase
id=
"002223"
>
<class>
Deploy_Object
</class>
<desc>
Deploy VNF in a container
</desc>
...
...
ci-scripts/xml_files/container_sa_e1_b200_quectel.xml
View file @
3afbf8e3
...
...
@@ -94,12 +94,6 @@
<eNB_serverId>
0
</eNB_serverId>
<services>
gnb_cucp
</services>
</testCase>
<testCase
id=
"800814"
>
<class>
Create_Workspace
</class>
<desc>
Creating new Workspace
</desc>
<eNB_instance>
0
</eNB_instance>
<eNB_serverId>
0
</eNB_serverId>
</testCase>
<testCase
id=
"330102"
>
<class>
Deploy_Object
</class>
<desc>
Deploy gNB-CU-UP in a container
</desc>
...
...
@@ -108,12 +102,6 @@
<eNB_serverId>
0
</eNB_serverId>
<services>
gnb_cuup
</services>
</testCase>
<testCase
id=
"800815"
>
<class>
Create_Workspace
</class>
<desc>
Creating new Workspace
</desc>
<eNB_instance>
0
</eNB_instance>
<eNB_serverId>
0
</eNB_serverId>
</testCase>
<testCase
id=
"330103"
>
<class>
Deploy_Object
</class>
<desc>
Deploy gNB-DU (TDD/Band78/40MHz/B200) in a container
</desc>
...
...
ci-scripts/xml_files/container_sa_f1_b200_quectel.xml
View file @
3afbf8e3
...
...
@@ -30,7 +30,6 @@
110002
800813
130101
800814
130102
100001
110000
...
...
@@ -95,12 +94,6 @@
<eNB_serverId>
0
</eNB_serverId>
<services>
gnb_cu
</services>
</testCase>
<testCase
id=
"800814"
>
<class>
Create_Workspace
</class>
<desc>
Creating new Workspace
</desc>
<eNB_instance>
0
</eNB_instance>
<eNB_serverId>
0
</eNB_serverId>
</testCase>
<testCase
id=
"130102"
>
<class>
Deploy_Object
</class>
<desc>
Deploy gNB-DU (FDD/Band1/10MHz/B200) in a container
</desc>
...
...
ci-scripts/xml_files/container_sa_fhi72_vvdn_up2.xml
View file @
3afbf8e3
...
...
@@ -28,6 +28,7 @@
<TestCaseRequestedList>
200000
110000
800813
120000
102000
102001
...
...
@@ -56,7 +57,12 @@
<oc_project>
oaicicd-ran
</oc_project>
<images_to_pull>
oai-gnb-fhi72
</images_to_pull>
</testCase>
<testCase
id=
"800813"
>
<class>
Create_Workspace
</class>
<desc>
Creating new Workspace for server 0
</desc>
<eNB_instance>
0
</eNB_instance>
<eNB_serverId>
0
</eNB_serverId>
</testCase>
<testCase
id=
"120000"
>
<class>
Deploy_Object
</class>
<desc>
Deploy gNB (TDD/Band78/100MHz/VVDN) in a container
</desc>
...
...
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