Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nrm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
argo
nrm
Commits
3f15f39d
Commit
3f15f39d
authored
Feb 13, 2018
by
Swann Perarnau
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'testing-fixes' into 'master'
Testing fixes See merge request
!13
parents
ee5b31e0
3dc8ccbe
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
Makefile
Makefile
+1
-1
nrm/containers.py
nrm/containers.py
+2
-2
nrm/controller.py
nrm/controller.py
+5
-5
nrm/daemon.py
nrm/daemon.py
+1
-1
setup.py
setup.py
+1
-1
No files found.
Makefile
View file @
3f15f39d
...
...
@@ -4,7 +4,7 @@ source:
$(PYTHON)
setup.py sdist
install
:
$(PYTHON)
setup.py
install
--force
--prefix
/g/g91/ramesh2/ARGO/NRM
$(PYTHON)
setup.py
install
--force
check
:
tox
nrm/containers.py
View file @
3f15f39d
...
...
@@ -45,8 +45,8 @@ class ContainerManager(object):
# build context to execute
environ
=
os
.
environ
environ
[
'PATH'
]
=
(
"/usr/local/sbin:"
"/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
)
#
environ['PATH'] = ("/usr/local/sbin:"
#
"/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin")
environ
[
'AC_APP_NAME'
]
=
manifest
.
name
environ
[
'AC_METADATA_URL'
]
=
"localhost"
logger
.
info
(
"run: environ: %r"
,
environ
)
...
...
nrm/controller.py
View file @
3f15f39d
...
...
@@ -65,16 +65,16 @@ class PowerActuator(object):
logger
.
info
(
"power limits: %r:"
,
pl
)
if
target
==
'i'
:
for
k
in
pl
:
r
=
range
(
int
(
pl
[
k
][
'curW'
]),
int
(
pl
[
k
][
'maxW'
]))
r
=
range
(
int
(
pl
[
k
][
'curW'
])
+
1
,
int
(
pl
[
k
][
'maxW'
]))
actions
.
extend
([
Action
(
k
,
s
,
s
-
r
[
0
])
for
s
in
r
])
elif
target
==
'd'
:
for
k
in
pl
:
r
=
range
(
0
,
int
(
pl
[
k
][
'curW'
]))
actions
.
extend
([
Action
(
k
,
s
,
s
-
r
[
-
1
]
)
for
s
in
r
])
r
=
range
(
1
,
int
(
pl
[
k
][
'curW'
]))
actions
.
extend
([
Action
(
k
,
s
,
r
[
-
1
]
-
s
)
for
s
in
r
])
return
actions
def
execute
(
self
,
action
):
logger
.
info
(
"changing power limit: %r
"
,
action
)
logger
.
info
(
"changing power limit: %r
, %r"
,
action
.
command
,
action
.
delta
)
self
.
sensor_manager
.
set_powerlimit
(
action
.
target
,
action
.
command
)
def
update
(
self
,
action
):
...
...
@@ -105,7 +105,7 @@ class Controller(object):
if
actions
:
# TODO: better choice
actions
.
sort
(
key
=
lambda
x
:
x
[
0
].
delta
)
return
actions
.
pop
()
return
actions
.
pop
(
0
)
else
:
return
(
None
,
None
)
...
...
nrm/daemon.py
View file @
3f15f39d
...
...
@@ -19,7 +19,7 @@ logger = logging.getLogger('nrm')
class
Daemon
(
object
):
def
__init__
(
self
):
self
.
target
=
1.0
self
.
target
=
1
00
.0
def
do_downstream_receive
(
self
,
parts
):
logger
.
info
(
"receiving downstream message: %r"
,
parts
)
...
...
setup.py
View file @
3f15f39d
...
...
@@ -21,5 +21,5 @@ setup(
packages
=
find_packages
(),
install_requires
=
[
'six'
,
'pyzmq'
,
'tornado'
,
'numpy'
],
scripts
=
[
'bin/daemon'
,
'bin/
client
'
]
scripts
=
[
'bin/daemon'
,
'bin/
app'
,
'bin/cmd'
,
'bin/argo-perf-wrapper
'
]
)
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