Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
OpenXG
OpenXG UE
Commits
c66eebe8
Commit
c66eebe8
authored
Sep 08, 2020
by
Remi Hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replaced if if ... by if elif ... in GetPAramtersFromXML function
parent
4b18a2e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
ci-scripts/main.py
ci-scripts/main.py
+14
-14
No files found.
ci-scripts/main.py
View file @
c66eebe8
...
@@ -3174,7 +3174,7 @@ def GetParametersFromXML(action):
...
@@ -3174,7 +3174,7 @@ def GetParametersFromXML(action):
else
:
else
:
RAN
.
backgroundBuild
=
False
RAN
.
backgroundBuild
=
False
if
action
==
'WaitEndBuild_eNB'
:
el
if
action
==
'WaitEndBuild_eNB'
:
RAN
.
Build_eNB_args
=
test
.
findtext
(
'Build_eNB_args'
)
RAN
.
Build_eNB_args
=
test
.
findtext
(
'Build_eNB_args'
)
eNB_instance
=
test
.
findtext
(
'eNB_instance'
)
eNB_instance
=
test
.
findtext
(
'eNB_instance'
)
if
(
eNB_instance
is
None
):
if
(
eNB_instance
is
None
):
...
@@ -3185,7 +3185,7 @@ def GetParametersFromXML(action):
...
@@ -3185,7 +3185,7 @@ def GetParametersFromXML(action):
if
(
RAN
.
eNB_serverId
is
None
):
if
(
RAN
.
eNB_serverId
is
None
):
RAN
.
eNB_serverId
=
'0'
RAN
.
eNB_serverId
=
'0'
if
action
==
'Initialize_eNB'
:
el
if
action
==
'Initialize_eNB'
:
RAN
.
Initialize_eNB_args
=
test
.
findtext
(
'Initialize_eNB_args'
)
RAN
.
Initialize_eNB_args
=
test
.
findtext
(
'Initialize_eNB_args'
)
eNB_instance
=
test
.
findtext
(
'eNB_instance'
)
eNB_instance
=
test
.
findtext
(
'eNB_instance'
)
if
(
eNB_instance
is
None
):
if
(
eNB_instance
is
None
):
...
@@ -3205,7 +3205,7 @@ def GetParametersFromXML(action):
...
@@ -3205,7 +3205,7 @@ def GetParametersFromXML(action):
else
:
else
:
RAN
.
air_interface
[
RAN
.
eNB_instance
]
=
'ocp-enb'
RAN
.
air_interface
[
RAN
.
eNB_instance
]
=
'ocp-enb'
if
action
==
'Terminate_eNB'
:
el
if
action
==
'Terminate_eNB'
:
eNB_instance
=
test
.
findtext
(
'eNB_instance'
)
eNB_instance
=
test
.
findtext
(
'eNB_instance'
)
if
(
eNB_instance
is
None
):
if
(
eNB_instance
is
None
):
RAN
.
eNB_instance
=
0
RAN
.
eNB_instance
=
0
...
@@ -3224,21 +3224,21 @@ def GetParametersFromXML(action):
...
@@ -3224,21 +3224,21 @@ def GetParametersFromXML(action):
else
:
else
:
RAN
.
air_interface
[
RAN
.
eNB_instance
]
=
'ocp-enb'
RAN
.
air_interface
[
RAN
.
eNB_instance
]
=
'ocp-enb'
if
action
==
'Attach_UE'
:
el
if
action
==
'Attach_UE'
:
nbMaxUEtoAttach
=
test
.
findtext
(
'nbMaxUEtoAttach'
)
nbMaxUEtoAttach
=
test
.
findtext
(
'nbMaxUEtoAttach'
)
if
(
nbMaxUEtoAttach
is
None
):
if
(
nbMaxUEtoAttach
is
None
):
CiTestObj
.
nbMaxUEtoAttach
=
-
1
CiTestObj
.
nbMaxUEtoAttach
=
-
1
else
:
else
:
CiTestObj
.
nbMaxUEtoAttach
=
int
(
nbMaxUEtoAttach
)
CiTestObj
.
nbMaxUEtoAttach
=
int
(
nbMaxUEtoAttach
)
if
action
==
'CheckStatusUE'
:
el
if
action
==
'CheckStatusUE'
:
expectedNBUE
=
test
.
findtext
(
'expectedNbOfConnectedUEs'
)
expectedNBUE
=
test
.
findtext
(
'expectedNbOfConnectedUEs'
)
if
(
expectedNBUE
is
None
):
if
(
expectedNBUE
is
None
):
CiTestObj
.
expectedNbOfConnectedUEs
=
-
1
CiTestObj
.
expectedNbOfConnectedUEs
=
-
1
else
:
else
:
CiTestObj
.
expectedNbOfConnectedUEs
=
int
(
expectedNBUE
)
CiTestObj
.
expectedNbOfConnectedUEs
=
int
(
expectedNBUE
)
if
action
==
'Build_OAI_UE'
:
el
if
action
==
'Build_OAI_UE'
:
CiTestObj
.
Build_OAI_UE_args
=
test
.
findtext
(
'Build_OAI_UE_args'
)
CiTestObj
.
Build_OAI_UE_args
=
test
.
findtext
(
'Build_OAI_UE_args'
)
CiTestObj
.
clean_repository
=
test
.
findtext
(
'clean_repository'
)
CiTestObj
.
clean_repository
=
test
.
findtext
(
'clean_repository'
)
if
(
CiTestObj
.
clean_repository
==
'false'
):
if
(
CiTestObj
.
clean_repository
==
'false'
):
...
@@ -3246,7 +3246,7 @@ def GetParametersFromXML(action):
...
@@ -3246,7 +3246,7 @@ def GetParametersFromXML(action):
else
:
else
:
CiTestObj
.
clean_repository
=
True
CiTestObj
.
clean_repository
=
True
if
action
==
'Initialize_OAI_UE'
:
el
if
action
==
'Initialize_OAI_UE'
:
CiTestObj
.
Initialize_OAI_UE_args
=
test
.
findtext
(
'Initialize_OAI_UE_args'
)
CiTestObj
.
Initialize_OAI_UE_args
=
test
.
findtext
(
'Initialize_OAI_UE_args'
)
UE_instance
=
test
.
findtext
(
'UE_instance'
)
UE_instance
=
test
.
findtext
(
'UE_instance'
)
if
(
UE_instance
is
None
):
if
(
UE_instance
is
None
):
...
@@ -3264,7 +3264,7 @@ def GetParametersFromXML(action):
...
@@ -3264,7 +3264,7 @@ def GetParametersFromXML(action):
#CiTestObj.air_interface = 'ocp-enb'
#CiTestObj.air_interface = 'ocp-enb'
logging
.
error
(
'OCP UE -- NOT SUPPORTED'
)
logging
.
error
(
'OCP UE -- NOT SUPPORTED'
)
if
action
==
'Terminate_OAI_UE'
:
el
if
action
==
'Terminate_OAI_UE'
:
UE_instance
=
test
.
findtext
(
'UE_instance'
)
UE_instance
=
test
.
findtext
(
'UE_instance'
)
if
(
UE_instance
is
None
):
if
(
UE_instance
is
None
):
CiTestObj
.
UE_instance
=
'0'
CiTestObj
.
UE_instance
=
'0'
...
@@ -3281,11 +3281,11 @@ def GetParametersFromXML(action):
...
@@ -3281,11 +3281,11 @@ def GetParametersFromXML(action):
#CiTestObj.air_interface = 'ocp-enb'
#CiTestObj.air_interface = 'ocp-enb'
logging
.
error
(
'OCP UE -- NOT SUPPORTED'
)
logging
.
error
(
'OCP UE -- NOT SUPPORTED'
)
if
action
==
'Ping'
or
action
==
'Ping_CatM_module'
:
elif
(
action
==
'Ping'
)
or
(
action
==
'Ping_CatM_module'
)
:
CiTestObj
.
ping_args
=
test
.
findtext
(
'ping_args'
)
CiTestObj
.
ping_args
=
test
.
findtext
(
'ping_args'
)
CiTestObj
.
ping_packetloss_threshold
=
test
.
findtext
(
'ping_packetloss_threshold'
)
CiTestObj
.
ping_packetloss_threshold
=
test
.
findtext
(
'ping_packetloss_threshold'
)
if
action
==
'Iperf'
:
el
if
action
==
'Iperf'
:
CiTestObj
.
iperf_args
=
test
.
findtext
(
'iperf_args'
)
CiTestObj
.
iperf_args
=
test
.
findtext
(
'iperf_args'
)
CiTestObj
.
iperf_packetloss_threshold
=
test
.
findtext
(
'iperf_packetloss_threshold'
)
CiTestObj
.
iperf_packetloss_threshold
=
test
.
findtext
(
'iperf_packetloss_threshold'
)
CiTestObj
.
iperf_profile
=
test
.
findtext
(
'iperf_profile'
)
CiTestObj
.
iperf_profile
=
test
.
findtext
(
'iperf_profile'
)
...
@@ -3303,14 +3303,14 @@ def GetParametersFromXML(action):
...
@@ -3303,14 +3303,14 @@ def GetParametersFromXML(action):
logging
.
debug
(
'ERROR: test-case has wrong option '
+
CiTestObj
.
iperf_options
)
logging
.
debug
(
'ERROR: test-case has wrong option '
+
CiTestObj
.
iperf_options
)
CiTestObj
.
iperf_options
=
'check'
CiTestObj
.
iperf_options
=
'check'
if
action
==
'IdleSleep'
:
el
if
action
==
'IdleSleep'
:
string_field
=
test
.
findtext
(
'idle_sleep_time_in_sec'
)
string_field
=
test
.
findtext
(
'idle_sleep_time_in_sec'
)
if
(
string_field
is
None
):
if
(
string_field
is
None
):
CiTestObj
.
idle_sleep_time
=
5
CiTestObj
.
idle_sleep_time
=
5
else
:
else
:
CiTestObj
.
idle_sleep_time
=
int
(
string_field
)
CiTestObj
.
idle_sleep_time
=
int
(
string_field
)
if
action
==
'Perform_X2_Handover'
:
el
if
action
==
'Perform_X2_Handover'
:
string_field
=
test
.
findtext
(
'x2_ho_options'
)
string_field
=
test
.
findtext
(
'x2_ho_options'
)
if
(
string_field
is
None
):
if
(
string_field
is
None
):
CiTestObj
.
x2_ho_options
=
'network'
CiTestObj
.
x2_ho_options
=
'network'
...
@@ -3321,7 +3321,7 @@ def GetParametersFromXML(action):
...
@@ -3321,7 +3321,7 @@ def GetParametersFromXML(action):
else
:
else
:
CiTestObj
.
x2_ho_options
=
string_field
CiTestObj
.
x2_ho_options
=
string_field
if
action
==
'Build_PhySim'
:
el
if
action
==
'Build_PhySim'
:
ldpc
.
buildargs
=
test
.
findtext
(
'physim_build_args'
)
ldpc
.
buildargs
=
test
.
findtext
(
'physim_build_args'
)
forced_workspace_cleanup
=
test
.
findtext
(
'forced_workspace_cleanup'
)
forced_workspace_cleanup
=
test
.
findtext
(
'forced_workspace_cleanup'
)
if
(
forced_workspace_cleanup
is
None
):
if
(
forced_workspace_cleanup
is
None
):
...
@@ -3332,7 +3332,7 @@ def GetParametersFromXML(action):
...
@@ -3332,7 +3332,7 @@ def GetParametersFromXML(action):
else
:
else
:
ldpc
.
forced_workspace_cleanup
=
False
ldpc
.
forced_workspace_cleanup
=
False
if
action
==
'Run_PhySim'
:
else
:
# ie
action == 'Run_PhySim':
ldpc
.
runargs
=
test
.
findtext
(
'physim_run_args'
)
ldpc
.
runargs
=
test
.
findtext
(
'physim_run_args'
)
...
...
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