summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2016-12-24 01:21:36 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-24 01:21:36 +0000
commitbd847993c084f2d29de099c4b0e33a3d2e8de03e (patch)
tree42e703fcaf1b439669daf830e649052562d57113 /api
parent734a4d10e3d3efc0ed869771be56b3cbd9df7602 (diff)
parente88d02c9d87c18dbaaf849d8b10167e6dadf485a (diff)
Merge "Bugfix: the load_image.sh script will load a image with the same name"
Diffstat (limited to 'api')
-rw-r--r--api/resources/env_action.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/api/resources/env_action.py b/api/resources/env_action.py
index fa0f95d90..c2c93f1eb 100644
--- a/api/resources/env_action.py
+++ b/api/resources/env_action.py
@@ -195,6 +195,8 @@ def _prepare_env_daemon():
# update the external_network
_source_file(rc_file)
+ _clean_images()
+
_load_images()
@@ -251,6 +253,14 @@ def _append_external_network(rc_file):
raise
+def _clean_images():
+ cmd = [config.CLEAN_IMAGES_SCRIPT]
+ p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
+ cwd=config.YARDSTICK_REPOS_DIR)
+ output = p.communicate()[0]
+ logger.debug('The result is: %s', output)
+
+
def _load_images():
cmd = [config.LOAD_IMAGES_SCRIPT]
p = subprocess.Popen(cmd, stdout=subprocess.PIPE,