aboutsummaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-07-04 07:39:56 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-07-04 07:39:56 +0000
commited39c21344dc4b4209eb4319ba15ce60defc3e90 (patch)
treef5c9a08f23196cc3a728beadf375199eee083db9 /ci
parent32462ed96c883239a9aac15faa70d97a78780fdb (diff)
parentbbc47d487f06da2906116e5ade134e11c4221786 (diff)
Merge "Change OpenStack clean behaviour"
Diffstat (limited to 'ci')
-rwxr-xr-xci/check_os.sh2
-rw-r--r--ci/config_functest.yaml2
-rw-r--r--ci/prepare_env.py12
-rw-r--r--ci/run_tests.py14
4 files changed, 16 insertions, 14 deletions
diff --git a/ci/check_os.sh b/ci/check_os.sh
index c9e0b5136..38fe32f58 100755
--- a/ci/check_os.sh
+++ b/ci/check_os.sh
@@ -26,7 +26,7 @@ fi
echo "Checking OpenStack endpoints:"
publicURL=$OS_AUTH_URL
publicIP=$(echo $publicURL|sed 's/^.*http\:\/\///'|sed 's/.[^:]*$//')
-publicPort=$(echo $publicURL|sed 's/^.*://'|sed 's/.[^\/]*$//')
+publicPort=$(echo $publicURL|sed 's/^.*://'|sed 's/\/.*$//')
echo ">>Verifying connectivity to the public endpoint $publicIP:$publicPort..."
verify_connectivity $publicIP $publicPort
RETVAL=$?
diff --git a/ci/config_functest.yaml b/ci/config_functest.yaml
index dc0919bbf..ea502dacb 100644
--- a/ci/config_functest.yaml
+++ b/ci/config_functest.yaml
@@ -29,6 +29,8 @@ general:
dir_rally_inst: /home/opnfv/.rally
openstack:
+ snapshot_file: /home/opnfv/functest/conf/openstack_snapshot.yaml
+
image_name: Cirros-0.3.4
image_file_name: cirros-0.3.4-x86_64-disk.img
image_disk_format: qcow2
diff --git a/ci/prepare_env.py b/ci/prepare_env.py
index 5754a62b2..4f29260f6 100644
--- a/ci/prepare_env.py
+++ b/ci/prepare_env.py
@@ -12,20 +12,19 @@
# http://www.apache.org/licenses/LICENSE-2.0
#
+
import argparse
import os
import re
import subprocess
import sys
-import yaml
import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as ft_utils
-import functest.utils.generate_defaults as gen_def
import functest.utils.openstack_utils as os_utils
+import yaml
-""" arguments """
actions = ['start', 'check']
parser = argparse.ArgumentParser()
parser.add_argument("action", help="Possible actions are: "
@@ -241,12 +240,6 @@ def install_rally():
"OpenStack flavors."))
-def generate_os_defaults():
- print_separator()
- logger.info("Generating OpenStack defaults...")
- gen_def.main()
-
-
def check_environment():
msg_not_active = "The Functest environment is not installed."
if not os.path.isfile(ENV_FILE):
@@ -274,7 +267,6 @@ def main():
source_rc_file()
verify_deployment()
install_rally()
- generate_os_defaults()
with open(ENV_FILE, "w") as env_file:
env_file.write("1")
diff --git a/ci/run_tests.py b/ci/run_tests.py
index 5dba18190..29b01d7ff 100644
--- a/ci/run_tests.py
+++ b/ci/run_tests.py
@@ -14,13 +14,13 @@ import re
import sys
import functest.ci.tier_builder as tb
-import functest.utils.clean_openstack as clean_os
import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as ft_utils
+import functest.utils.openstack_clean as os_clean
+import functest.utils.openstack_snapshot as os_snapshot
import functest.utils.openstack_utils as os_utils
-""" arguments """
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--test", dest="test", action='store',
help="Test case or tier (group of tests) to be executed. "
@@ -61,8 +61,13 @@ def source_rc_file():
os_utils.source_credentials(rc_file)
+def generate_os_snapshot():
+ logger.debug("Generating OpenStack snapshot...")
+ os_snapshot.main()
+
+
def cleanup():
- clean_os.main()
+ os_clean.main()
def run_test(test):
@@ -71,6 +76,9 @@ def run_test(test):
logger.info("Running test case '%s'..." % test_name)
print_separator("=")
logger.debug("\n%s" % test)
+
+ generate_os_snapshot()
+
flags = (" -t %s" % (test_name))
if REPORT_FLAG:
flags += " -r"