Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Ophélie Gagnard
slapos
Commits
6aa0adb9
Commit
6aa0adb9
authored
Jul 20, 2022
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Empty promises
parent
73003c40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
software/ors-amarisoft/promise/check_interface_up.py
software/ors-amarisoft/promise/check_interface_up.py
+7
-6
software/ors-amarisoft/promise/check_sdr_busy.py
software/ors-amarisoft/promise/check_sdr_busy.py
+7
-6
No files found.
software/ors-amarisoft/promise/check_interface_up.py
View file @
6aa0adb9
...
@@ -29,12 +29,13 @@ class RunPromise(GenericPromise):
...
@@ -29,12 +29,13 @@ class RunPromise(GenericPromise):
"""
"""
ifname
=
self
.
getConfig
(
'ifname'
)
ifname
=
self
.
getConfig
(
'ifname'
)
f
=
open
(
'/sys/class/net/%s/operstate'
%
ifname
,
'r'
)
# f = open('/sys/class/net/%s/operstate' % ifname, 'r')
if
f
.
read
()
==
'up
\
n
'
:
# if f.read() == 'up\n':
self
.
logger
.
info
(
"%s is up"
,
ifname
)
# self.logger.info("%s is up", ifname)
else
:
# else:
self
.
logger
.
error
(
"%s is down"
,
ifname
)
# self.logger.error("%s is down", ifname)
f
.
close
()
# f.close()
self
.
logger
.
info
(
"OK"
)
def
test
(
self
):
def
test
(
self
):
"""
"""
...
...
software/ors-amarisoft/promise/check_sdr_busy.py
View file @
6aa0adb9
...
@@ -28,12 +28,13 @@ class RunPromise(GenericPromise):
...
@@ -28,12 +28,13 @@ class RunPromise(GenericPromise):
In this case, check whether the file exists.
In this case, check whether the file exists.
"""
"""
sdr_dev
=
'/dev/sdr0'
sdr_dev
=
'/dev/sdr0'
try
:
# try:
open
(
sdr_dev
,
'w'
).
close
()
# open(sdr_dev, 'w').close()
self
.
logger
.
error
(
"eNB is not using %s"
,
sdr_dev
)
# self.logger.error("eNB is not using %s", sdr_dev)
except
IOError
as
e
:
# except IOError as e:
if
e
.
errno
==
errno
.
EBUSY
:
# if e.errno == errno.EBUSY:
self
.
logger
.
info
(
"eNB is using %s"
,
sdr_dev
)
# self.logger.info("eNB is using %s", sdr_dev)
self
.
logger
.
info
(
"OK"
)
def
test
(
self
):
def
test
(
self
):
"""
"""
...
...
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