aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2015-10-22 15:00:27 +0200
committerjose.lausuch <jose.lausuch@ericsson.com>2015-10-22 15:00:27 +0200
commitb9f3f8b0ea0466f974d8b45f7bb8b718066bb313 (patch)
tree856672ee3a40ba985424957386c994195e9ee5d5
parentb3e241e1ee0e794ec732eddc5eaeb1f59dc1a999 (diff)
Include cirros image in the docker container
JIRA: FUNCTEST-73 Change-Id: Ie2ddaac3dbdbdad09832094fe31264abe4ba8118 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
-rw-r--r--docker/Dockerfile2
-rwxr-xr-xtestcases/config_functest.py17
-rw-r--r--testcases/config_functest.yaml2
3 files changed, 6 insertions, 15 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 95ef22b5d..1ac044359 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -54,3 +54,5 @@ RUN git clone https://gerrit.opnfv.org/gerrit/releng ${repos_dir}/releng
RUN git clone https://github.com/openstack/rally.git ${repos_dir}/rally
RUN pip install -r ${repos_dir}/functest/docker/requirements.pip
+
+ADD http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img /home/opnfv/functest/data/ \ No newline at end of file
diff --git a/testcases/config_functest.py b/testcases/config_functest.py
index c509d3d12..8523a77f4 100755
--- a/testcases/config_functest.py
+++ b/testcases/config_functest.py
@@ -58,18 +58,17 @@ RALLY_INSTALLATION_DIR = functest_yaml.get("general").get("directories").get("di
RALLY_RESULT_DIR = functest_yaml.get("general").get("directories").get("dir_rally_res")
VPING_DIR = REPO_PATH + functest_yaml.get("general").get("directories").get("dir_vping")
ODL_DIR = REPO_PATH + functest_yaml.get("general").get("directories").get("dir_odl")
-IMAGE_DIR = functest_yaml.get("general").get("directories").get("dir_functest_data")
+DATA_DIR = functest_yaml.get("general").get("directories").get("dir_functest_data")
# Tempest/Rally configuration details
DEPLOYMENT_MAME = "opnfv-rally"
RALLY_COMMIT = functest_yaml.get("general").get("openstack").get("rally_stable_commit")
#GLANCE image parameters
-IMAGE_URL = functest_yaml.get("general").get("openstack").get("image_url")
+IMAGE_FILE_NAME = functest_yaml.get("general").get("openstack").get("image_file_name")
IMAGE_DISK_FORMAT = functest_yaml.get("general").get("openstack").get("image_disk_format")
IMAGE_NAME = functest_yaml.get("general").get("openstack").get("image_name")
-IMAGE_FILE_NAME = IMAGE_URL.rsplit('/')[-1]
-IMAGE_PATH = IMAGE_DIR + "/" + IMAGE_FILE_NAME
+IMAGE_PATH = DATA_DIR + "/" + IMAGE_FILE_NAME
def action_start():
@@ -106,12 +105,6 @@ def action_start():
if not os.path.exists(RALLY_RESULT_DIR):
os.makedirs(RALLY_RESULT_DIR)
- logger.info("Downloading image...")
- if not functest_utils.download_url(IMAGE_URL, IMAGE_DIR):
- logger.error("There has been a problem downloading the image '%s'." %IMAGE_URL)
- action_clean()
- exit(-1)
-
logger.info("Creating Glance image: %s ..." %IMAGE_NAME)
if not create_glance_image(IMAGE_PATH,IMAGE_NAME,IMAGE_DISK_FORMAT):
logger.error("There has been a problem while creating the Glance image.")
@@ -194,10 +187,6 @@ def action_clean():
logger.debug("Removing Rally installation directory %s" % RALLY_INSTALLATION_DIR)
shutil.rmtree(RALLY_INSTALLATION_DIR,ignore_errors=True)
- if os.path.exists(IMAGE_PATH):
- logger.debug("Deleting image")
- os.remove(IMAGE_PATH)
-
cmd = "glance image-list | grep "+IMAGE_NAME+" | cut -c3-38"
p = os.popen(cmd,"r")
diff --git a/testcases/config_functest.yaml b/testcases/config_functest.yaml
index 92eb769e0..03835158d 100644
--- a/testcases/config_functest.yaml
+++ b/testcases/config_functest.yaml
@@ -32,7 +32,7 @@ general:
openstack:
image_name: functest-img
- image_url: http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
+ image_file_name: cirros-0.3.4-x86_64-disk.img
image_disk_format: qcow2