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
1c4e2816
Commit
1c4e2816
authored
Jul 16, 2018
by
Sridutt Bhalachandra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added option to manifest file to enable power policy
parent
ed66373f
Pipeline
#3630
passed with stages
in 19 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
1 deletion
+39
-1
doc/manifest
doc/manifest
+7
-0
nrm/aci.py
nrm/aci.py
+32
-1
No files found.
doc/manifest
View file @
1c4e2816
...
...
@@ -23,6 +23,13 @@
"value": {
"enabled": "1"
}
},
{
"name": "argo/powerpolicy",
"value": {
"enabled": "0",
"policy": "NONE"
}
}
]
}
...
...
nrm/aci.py
View file @
1c4e2816
...
...
@@ -149,13 +149,44 @@ class PerfWrapper(SpecField):
return
True
class
PowerPolicy
(
SpecField
):
"""Information on whether to use power policy for a container."""
policies
=
[
'NONE'
,
'DDCM'
,
'DVFS'
,
'COMBINED'
]
fields
=
{
"enabled"
:
spec
(
unicode
,
False
),
"policy"
:
spec
(
unicode
,
False
)
}
def
__init__
(
self
):
"""Create empty perf wrapper."""
pass
def
load
(
self
,
data
):
"""Load perf wrapper information."""
ret
=
super
(
PowerPolicy
,
self
).
load
(
data
)
if
not
ret
:
return
ret
if
self
.
enabled
not
in
[
"0"
,
"False"
,
"1"
,
"True"
]:
logger
.
error
(
"Invalid value of powerpolicy enabled: %s"
,
self
.
enabled
)
return
False
if
self
.
policy
not
in
self
.
policies
:
logger
.
error
(
"Invalid value of powerpolicy policy: %s"
,
self
.
policy
)
return
False
return
True
class
IsolatorList
(
SpecField
):
"""Represent the list of isolator in a Manifest."""
types
=
{
"argo/scheduler"
:
spec
(
Scheduler
,
False
),
"argo/container"
:
spec
(
Container
,
True
),
"argo/perfwrapper"
:
spec
(
PerfWrapper
,
False
)
"argo/perfwrapper"
:
spec
(
PerfWrapper
,
False
),
"argo/powerpolicy"
:
spec
(
PowerPolicy
,
False
)
}
def
__init__
(
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