Commit 6dfd90bd authored by Valentin Reis's avatar Valentin Reis

Merge branch 'nix-simplify' into 'master'

Refactors Nix code to be even simpler.

See merge request !53
parents 4b1d91fc 21fc57f8
Pipeline #5069 passed with stages
in 6 minutes and 6 seconds
include: 'https://xgitlab.cels.anl.gov/argo/argotest/raw/master/gitlab/basic.yml' include: 'https://xgitlab.cels.anl.gov/argo/argotest/raw/master/gitlab/refactored.yml'
stages: stages:
- build - build
......
...@@ -2,6 +2,6 @@ let argotest = ...@@ -2,6 +2,6 @@ let argotest =
builtins.fetchTarball builtins.fetchTarball
"https://xgitlab.cels.anl.gov/argo/argotest/-/archive/master/argotest-master.tar.gz"; "https://xgitlab.cels.anl.gov/argo/argotest/-/archive/master/argotest-master.tar.gz";
in import "${argotest}/test.nix" { in import "${argotest}/test.nix" {
nrm-override = ./..; nrm-override = ./.;
testName = "traceback"; testName = "traceback";
} }
...@@ -70,12 +70,12 @@ class ContainerManager(object): ...@@ -70,12 +70,12 @@ class ContainerManager(object):
# Check if container exists else create it # Check if container exists else create it
if container_name in self.containers: if container_name in self.containers:
container = self.containers[container_name] container = self.containers[container_name]
containerexistsflag = True containerexistsflag = True
processes = container.processes processes = container.processes
clientids = container.clientids clientids = container.clientids
hwbindings = container.hwbindings hwbindings = container.hwbindings
bind_index = len(processes) bind_index = len(processes)
else: else:
processes = dict() processes = dict()
clientids = dict() clientids = dict()
...@@ -114,16 +114,16 @@ class ContainerManager(object): ...@@ -114,16 +114,16 @@ class ContainerManager(object):
if hasattr(manifest.app.isolators, 'power'): if hasattr(manifest.app.isolators, 'power'):
if hasattr(manifest.app.isolators.power, 'enabled'): if hasattr(manifest.app.isolators.power, 'enabled'):
pp = manifest.app.isolators.power pp = manifest.app.isolators.power
if pp.enabled in ["1", "True"]: if pp.enabled in ["1", "True"]:
if pp.profile in ["1", "True"]: if pp.profile in ["1", "True"]:
container_power['profile'] = dict() container_power['profile'] = dict()
container_power['profile']['start'] = dict() container_power['profile']['start'] = dict()
container_power['profile']['end'] = dict() container_power['profile']['end'] = dict()
if pp.policy != "NONE": if pp.policy != "NONE":
container_power['policy'] = pp.policy container_power['policy'] = pp.policy
container_power['damper'] = pp.damper container_power['damper'] = pp.damper
container_power['slowdown'] = pp.slowdown container_power['slowdown'] = pp.slowdown
# Compute hardware bindings # Compute hardware bindings
if hasattr(manifest.app.isolators, 'hwbind'): if hasattr(manifest.app.isolators, 'hwbind'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment