Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bin He
openairinterface5G
Commits
8b3eb61f
Commit
8b3eb61f
authored
4 years ago
by
hardy
Browse files
Options
Downloads
Patches
Plain Diff
fixing typos + more in-code comments
parent
2724f9c1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ci-scripts/cls_cots_ue.py
+6
-2
6 additions, 2 deletions
ci-scripts/cls_cots_ue.py
with
6 additions
and
2 deletions
ci-scripts/cls_cots_ue.py
+
6
−
2
View file @
8b3eb61f
...
...
@@ -62,11 +62,13 @@ class CotsUe:
#load cots commands dictionary
with
open
(
self
.
__cots_cde_dict_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
:
mySSH
=
sshconnection
.
SSHConnection
()
mySSH
.
open
(
self
.
ADBIPAddr
,
self
.
ADBUserName
,
self
.
ADBPassWord
)
mySSH
.
command
(
'
sudo adb start-server
'
,
'
$
'
,
5
)
mySSH
.
command
(
'
sudo adb start-server
'
,
'
\
$
'
,
5
)
logging
.
info
(
"
Toggling COTS UE Airplane mode to :
"
+
target_state_str
)
#get current state
current_state
=
self
.
Check_Airplane
()
if
target_state_str
.
lower
()
==
"
on
"
:
target_state
=
1
...
...
@@ -82,13 +84,15 @@ class CotsUe:
time
.
sleep
(
1
)
current_state
=
self
.
Check_Airplane
()
retry
+=
1
#could not toggle despite the retry
if
current_state
!=
target_state
:
logging
.
error
(
"
ATTENTION : Could not toggle to :
"
+
target_state_str
)
logging
.
error
(
"
Current state is :
"
+
str
(
current_state
))
else
:
print
(
"
Airplane mode is already
"
+
target_state_str
)
mySSH
.
command
(
'
sudo adb kill-server
'
,
'
$
'
,
5
)
mySSH
.
command
(
'
sudo adb kill-server
'
,
'
\
$
'
,
5
)
mySSH
.
close
()
#ue id is NOT in the dictionary
else
:
logging
.
error
(
"
COTS UE Id from XML could not be found in UE YAML dictionary
"
+
self
.
__cots_cde_dict_file
)
sys
.
exit
(
"
COTS UE Id from XML could not be found in UE YAML dictionary
"
+
self
.
__cots_cde_dict_file
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment