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
4ec42027
Commit
4ec42027
authored
Sep 09, 2020
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed how to retrieve the cots ue file location
parent
1c77b36a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
ci-scripts/cls_cots_ue.py
ci-scripts/cls_cots_ue.py
+22
-2
No files found.
ci-scripts/cls_cots_ue.py
View file @
4ec42027
...
...
@@ -46,6 +46,7 @@ class CotsUe:
self
.
__cots_cde_dict_file
=
'cots_ue_ctl.yaml'
self
.
__SetAirplaneRetry
=
3
#-----------------$
#PUBLIC Methods$
#-----------------$
...
...
@@ -61,7 +62,16 @@ class CotsUe:
#returns true if it exists, false otherwise
def
Check_Exists
(
self
,
target_id
):
#load cots commands dictionary
with
open
(
self
.
__cots_cde_dict_file
,
'r'
)
as
file
:
if
(
os
.
path
.
isfile
(
self
.
__cots_cde_dict_file
)):
yaml_file
=
self
.
__cots_cde_dict_file
elif
(
os
.
path
.
isfile
(
'ci-scripts/'
+
self
.
__cots_cde_dict_file
)):
yaml_file
=
'ci-scripts/'
+
self
.
__cots_cde_dict_file
else
:
logging
.
error
(
"COTS UE dictionary yaml file cannot be found"
)
sys
.
exit
(
"COTS UE dictionary yaml file cannot be found"
)
#load cots commands dictionary
with
open
(
yaml_file
,
'r'
)
as
file
:
cots_ue_ctl
=
yaml
.
load
(
file
,
Loader
=
yaml
.
FullLoader
)
#check if ue id is in the dictionary
if
target_id
in
cots_ue_ctl
:
...
...
@@ -70,8 +80,18 @@ class CotsUe:
return
False
def
Set_Airplane
(
self
,
target_id
,
target_state_str
):
#loading cots commands dictionary
if
(
os
.
path
.
isfile
(
self
.
__cots_cde_dict_file
)):
yaml_file
=
self
.
__cots_cde_dict_file
elif
(
os
.
path
.
isfile
(
'ci-scripts/'
+
self
.
__cots_cde_dict_file
)):
yaml_file
=
'ci-scripts/'
+
self
.
__cots_cde_dict_file
else
:
logging
.
error
(
"COTS UE dictionary yaml file cannot be found"
)
sys
.
exit
(
"COTS UE dictionary yaml file cannot be found"
)
#load cots commands dictionary
with
open
(
self
.
__cots_cde_dict
_file
,
'r'
)
as
file
:
with
open
(
yaml
_file
,
'r'
)
as
file
:
cots_ue_ctl
=
yaml
.
load
(
file
,
Loader
=
yaml
.
FullLoader
)
#check if ue id is in the dictionary
if
target_id
in
cots_ue_ctl
:
...
...
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