summaryrefslogtreecommitdiffstats
path: root/dovetail/container.py
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2018-12-13 06:23:08 -0500
committerDan Xu <xudan16@huawei.com>2018-12-17 01:29:29 +0000
commit8ab783f403984b3ef9a6c3010a9a81c0f29c4236 (patch)
treef20edcd1d4b1c56182e11ccfe05f66b6d7ead26f /dovetail/container.py
parent13e644d0ba893ddc5e2944c2e827fde7cd58ae72 (diff)
make item 'extra_container' available for every project
The item 'extra_container' used to be available for Bottlenecks only. Make it open for Dovetail framework. Change-Id: If4f2c032924447b97e401d497aca0309c0f5d847 Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'dovetail/container.py')
-rw-r--r--dovetail/container.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/dovetail/container.py b/dovetail/container.py
index ed006dc9..d44035cd 100644
--- a/dovetail/container.py
+++ b/dovetail/container.py
@@ -168,10 +168,10 @@ class Container(object):
def clean(self):
cmd = ('sudo docker rm -f {}'.format(self.container_id))
dt_utils.exec_cmd(cmd, self.logger)
- if self.valid_type.lower() == 'bottlenecks':
- containers = dt_utils.get_value_from_dict(
- 'extra_container', dt_cfg.dovetail_config[self.valid_type])
- for container in containers:
+ extra_containers = dt_utils.get_value_from_dict(
+ 'extra_container', dt_cfg.dovetail_config[self.valid_type])
+ if extra_containers:
+ for container in extra_containers:
if self.check_container_exist(container):
cmd = ('sudo docker rm -f {}'.format(container))
dt_utils.exec_cmd(cmd, self.logger)