aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docker/Dockerfile3
-rw-r--r--docs/release-notes/functest-release.rst16
-rw-r--r--functest/ci/__init__.py (renamed from ci/__init__.py)0
-rw-r--r--[-rwxr-xr-x]functest/ci/check_os.sh (renamed from ci/check_os.sh)0
-rw-r--r--functest/ci/config_functest.yaml (renamed from ci/config_functest.yaml)0
-rw-r--r--functest/ci/config_patch.yaml (renamed from ci/config_patch.yaml)0
-rw-r--r--[-rwxr-xr-x]functest/ci/exec_test.sh (renamed from ci/exec_test.sh)0
-rw-r--r--[-rwxr-xr-x]functest/ci/generate_report.py (renamed from ci/generate_report.py)1
-rw-r--r--[-rwxr-xr-x]functest/ci/prepare_env.py (renamed from ci/prepare_env.py)4
-rw-r--r--[-rwxr-xr-x]functest/ci/run_tests.py (renamed from ci/run_tests.py)0
-rw-r--r--functest/ci/testcases.yaml (renamed from ci/testcases.yaml)0
-rw-r--r--functest/ci/tier_builder.py (renamed from ci/tier_builder.py)0
-rw-r--r--functest/ci/tier_handler.py (renamed from ci/tier_handler.py)0
-rw-r--r--functest/cli/commands/cli_env.py3
-rw-r--r--functest/cli/commands/cli_os.py2
-rw-r--r--functest/opnfv_tests/features/sfc/ovs_utils.py20
-rwxr-xr-xfunctest/opnfv_tests/features/sfc/sfc.py40
-rw-r--r--functest/utils/functest_utils.py2
18 files changed, 74 insertions, 17 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 73fce50c..a51e3046 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -41,7 +41,8 @@ ENV creds /home/opnfv/functest/conf/openstack.creds
ENV TERM xterm
ENV COLORTERM gnome-terminal
ENV PYTHONPATH $PYTHONPATH:/home/opnfv/repos/
-ENV CONFIG_FUNCTEST_YAML /home/opnfv/repos/functest/ci/config_functest.yaml
+ENV CONFIG_FUNCTEST_YAML /home/opnfv/repos/functest/functest/ci/config_functest.yaml
+ENV PYTHONPATH $PYTHONPATH:/home/opnfv/repos/:/home/opnfv/repos/functest
WORKDIR /home/opnfv
# Packaged dependencies
diff --git a/docs/release-notes/functest-release.rst b/docs/release-notes/functest-release.rst
index 1c9819f5..03dfc20a 100644
--- a/docs/release-notes/functest-release.rst
+++ b/docs/release-notes/functest-release.rst
@@ -206,12 +206,12 @@ precised, the scenario is a HA scenario):
| multisite | | | X | |
+---------------------+---------+---------+---------+---------+
-For Colorado 2.0, the following scenarios have been released:
+For Colorado 2.0, the following scenarios have been re-released:
+---------------------+---------+---------+---------+---------+
| Scenario | Apex | Compass | Fuel | Joid |
+=====================+=========+=========+=========+=========+
-| onos-nofeature | X | X | X | X |
+| onos | X | X | X | X |
+---------------------+---------+---------+---------+---------+
| odl_l2-sfc-ha | | | X | |
+---------------------+---------+---------+---------+---------+
@@ -310,12 +310,10 @@ Compass
+------------------+---------+---------+-------------------+
| odl_l2-moon | 15/18 | 83% | `compass-res-567`_|
+------------------+---------+---------+-------------------+
-| onos-ha | 15/15 | 100% | `compass-res-77`_ |
+| onos-ha | 15/15 | 100% | `compass-res-285`_|
+------------------+---------+---------+-------------------+
| onos-sfc-ha | 17/18 | 95% | `compass-res-76`_ |
+------------------+---------+---------+-------------------+
-| onos-nofeature-ha| 15/15 | 100% | `compass-res-285`_|
-+------------------+---------+---------+-------------------+
Note: all the Compass tests for Colorado have been executed on virtual
environment. Bare metal resources were used for Master branch.
@@ -356,7 +354,7 @@ Fuel
+---------------------+---------+---------+-------------------+
| odl_l3-noha | 12/15 | 80% | `fuel-res-164`_ |
+---------------------+---------+---------+-------------------+
-| onos | 20/21 | 95% | `fuel-res-117`_ |
+| onos | 20/21 | 95% | `fuel-res-492`_ |
+---------------------+---------+---------+-------------------+
| onos-noha | 18/18 | 100% | `fuel-res-166`_ |
+---------------------+---------+---------+-------------------+
@@ -364,8 +362,6 @@ Fuel
+---------------------+---------+---------+-------------------+
| onos-sfc-noha | 21/21 | 100% | `fuel-res-129`_ |
+---------------------+---------+---------+-------------------+
-| onos-nofeature-ha | 18/18 | 100% | `fuel-res-492`_ |
-+---------------------+---------+---------+-------------------+
| multisite | N.R | 100% | `fuel-res-8`_ |
+---------------------+---------+---------+-------------------+
@@ -404,12 +400,10 @@ Joid
+---------------------+---------+---------+-----------------+
| odl_l2 | 21/21 | 100% | `joid-res-103`_ |
+---------------------+---------+---------+-----------------+
-| onos | 21/21 | 100% | `joid-res-99`_ |
+| onos | 21/21 | 100% | `joid-res-345`_ |
+---------------------+---------+---------+-----------------+
| onos-sfc | 24/24 | 100% | `joid-res-97`_ |
+---------------------+---------+---------+-----------------+
-| onos-nofeature-ha | 21/21 | 100% | `joid-res-345`_ |
-+---------------------+---------+---------+-----------------+
It is highly recommended to install a json viewer in your browser
(e.g. https://addons.mozilla.org/fr/firefox/addon/jsonview/)
diff --git a/ci/__init__.py b/functest/ci/__init__.py
index e69de29b..e69de29b 100644
--- a/ci/__init__.py
+++ b/functest/ci/__init__.py
diff --git a/ci/check_os.sh b/functest/ci/check_os.sh
index 38fe32f5..38fe32f5 100755..100644
--- a/ci/check_os.sh
+++ b/functest/ci/check_os.sh
diff --git a/ci/config_functest.yaml b/functest/ci/config_functest.yaml
index cca4959a..cca4959a 100644
--- a/ci/config_functest.yaml
+++ b/functest/ci/config_functest.yaml
diff --git a/ci/config_patch.yaml b/functest/ci/config_patch.yaml
index 46064a07..46064a07 100644
--- a/ci/config_patch.yaml
+++ b/functest/ci/config_patch.yaml
diff --git a/ci/exec_test.sh b/functest/ci/exec_test.sh
index 64018005..64018005 100755..100644
--- a/ci/exec_test.sh
+++ b/functest/ci/exec_test.sh
diff --git a/ci/generate_report.py b/functest/ci/generate_report.py
index d2e09eb8..c9343729 100755..100644
--- a/ci/generate_report.py
+++ b/functest/ci/generate_report.py
@@ -2,6 +2,7 @@ import json
import os
import re
import urllib2
+
import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as ft_utils
diff --git a/ci/prepare_env.py b/functest/ci/prepare_env.py
index e110aa57..e5c24cc3 100755..100644
--- a/ci/prepare_env.py
+++ b/functest/ci/prepare_env.py
@@ -109,7 +109,7 @@ def check_env_variables():
if CI_SCENARIO is None:
logger.warning("The env variable 'DEPLOY_SCENARIO' is not defined. "
- "Setting CE_SCENARIO=undefined.")
+ "Setting CI_SCENARIO=undefined.")
CI_SCENARIO = "undefined"
else:
logger.info(" DEPLOY_SCENARIO=%s" % CI_SCENARIO)
@@ -205,7 +205,7 @@ def patch_config_file():
def verify_deployment():
print_separator()
logger.info("Verifying OpenStack services...")
- cmd = ("%s/ci/check_os.sh" % ft_utils.FUNCTEST_REPO)
+ cmd = ("%s/functest/ci/check_os.sh" % ft_utils.FUNCTEST_REPO)
logger.debug("Executing command: %s" % cmd)
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
diff --git a/ci/run_tests.py b/functest/ci/run_tests.py
index f30062f7..f30062f7 100755..100644
--- a/ci/run_tests.py
+++ b/functest/ci/run_tests.py
diff --git a/ci/testcases.yaml b/functest/ci/testcases.yaml
index afd32986..afd32986 100644
--- a/ci/testcases.yaml
+++ b/functest/ci/testcases.yaml
diff --git a/ci/tier_builder.py b/functest/ci/tier_builder.py
index e1c3e49e..e1c3e49e 100644
--- a/ci/tier_builder.py
+++ b/functest/ci/tier_builder.py
diff --git a/ci/tier_handler.py b/functest/ci/tier_handler.py
index 1eadfba5..1eadfba5 100644
--- a/ci/tier_handler.py
+++ b/functest/ci/tier_handler.py
diff --git a/functest/cli/commands/cli_env.py b/functest/cli/commands/cli_env.py
index 57201264..d331cc15 100644
--- a/functest/cli/commands/cli_env.py
+++ b/functest/cli/commands/cli_env.py
@@ -19,6 +19,7 @@ FUNCTEST_REPO = ft_utils.FUNCTEST_REPO
class CliEnv:
+
def __init__(self):
pass
@@ -36,7 +37,7 @@ class CliEnv:
else:
answer = raw_input("Invalid answer. Please type [y|n]\n")
- cmd = ("python %s/ci/prepare_env.py start" % FUNCTEST_REPO)
+ cmd = ("python %s/functest/ci/prepare_env.py start" % FUNCTEST_REPO)
ft_utils.execute_command(cmd)
def show(self):
diff --git a/functest/cli/commands/cli_os.py b/functest/cli/commands/cli_os.py
index 2f3f329f..2530b5f2 100644
--- a/functest/cli/commands/cli_os.py
+++ b/functest/cli/commands/cli_os.py
@@ -79,7 +79,7 @@ class CliOpenStack:
def check(self):
self.ping_endpoint()
- cmd = ft_utils.FUNCTEST_REPO + "/ci/check_os.sh"
+ cmd = ft_utils.FUNCTEST_REPO + "/functest/ci/check_os.sh"
ft_utils.execute_command(cmd, verbose=False)
def snapshot_create(self):
diff --git a/functest/opnfv_tests/features/sfc/ovs_utils.py b/functest/opnfv_tests/features/sfc/ovs_utils.py
index 20ab5a7e..af1f232c 100644
--- a/functest/opnfv_tests/features/sfc/ovs_utils.py
+++ b/functest/opnfv_tests/features/sfc/ovs_utils.py
@@ -11,6 +11,7 @@ import functest.utils.functest_logger as rl
import os
import time
import shutil
+import re
logger = rl.Logger('ovs_utils').getLogger()
@@ -115,3 +116,22 @@ class OVSLogger(object):
dumpdir = os.path.join(self.ovs_dir, timestamp)
with open(os.path.join(dumpdir, 'error'), 'w') as f:
f.write(related_error)
+
+ def ofctl_time_counter(self, ssh_conn):
+ try:
+ # We get the flows from table 11
+ table = 11
+ br = "br-int"
+ output = self.ofctl_dump_flows(ssh_conn, br, table)
+ pattern = "NXM_NX_NSP"
+ rsps = []
+ lines = output.split(",")
+ for line in lines:
+ is_there = re.findall(pattern, line)
+ if is_there:
+ value = line.split(":")[1].split("-")[0]
+ rsps.append(value)
+ return rsps
+ except Exception, e:
+ logger.error('Error when countering %s' % e)
+ return None
diff --git a/functest/opnfv_tests/features/sfc/sfc.py b/functest/opnfv_tests/features/sfc/sfc.py
index e5ae7dcb..5e3e37d7 100755
--- a/functest/opnfv_tests/features/sfc/sfc.py
+++ b/functest/opnfv_tests/features/sfc/sfc.py
@@ -10,6 +10,7 @@ import re
import json
import SSHUtils as ssh_utils
import ovs_utils
+import thread
parser = argparse.ArgumentParser()
@@ -400,6 +401,31 @@ def check_ssh(ips, retries=100):
return False
+# Measure the time it takes to update the classification rules
+
+
+def capture_time_log(compute_clients):
+ ovs_logger = ovs_utils.OVSLogger(
+ os.path.join(os.getcwd(), 'ovs-logs'),
+ "test")
+ i = 0
+ first_RSP = ""
+ start_time = time.time()
+ while True:
+ rsps = ovs_logger.ofctl_time_counter(compute_clients[0])
+ if not i:
+ first_RSP = rsps[0]
+ i = i + 1
+ if(first_RSP != rsps[0]):
+ if (rsps[0] == rsps[1]):
+ stop_time = time.time()
+ logger.info("classification rules updated")
+ difference = stop_time - start_time
+ logger.info("It took %s seconds" % difference)
+ break
+ time.sleep(1)
+ return
+
def main():
installer_type = os.environ.get("INSTALLER_TYPE")
@@ -453,6 +479,13 @@ def main():
nova_client, SERVER, FLAVOR, image_id, network_id, sg_id)
subprocess.call(TACKER_SCRIPT, shell=True)
+
+ # Start measuring the time it takes to implement the classification rules
+ try:
+ thread.start_new_thread(capture_time_log, (compute_clients,))
+ except Exception, e:
+ logger.error("Unable to start the thread that counts time %s" % e)
+
server_ip, client_ip, sf1, sf2 = get_floating_ips(
nova_client, neutron_client)
@@ -496,6 +529,13 @@ def main():
logger.info("Changing the classification")
subprocess.call(TACKER_CHANGECLASSI, shell=True)
+
+ # Start measuring the time it takes to implement the classification rules
+ try:
+ thread.start_new_thread(capture_time_log, (compute_clients,))
+ except Exception, e:
+ logger.error("Unable to start the thread that counts time %s" % e)
+
logger.info("Wait for ODL to update the classification rules in OVS")
time.sleep(100)
diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py
index 41b6485d..2d4a652d 100644
--- a/functest/utils/functest_utils.py
+++ b/functest/utils/functest_utils.py
@@ -439,7 +439,7 @@ def check_test_result(test_name, ret, start_time, stop_time):
def get_testcases_file():
- return FUNCTEST_REPO + "/ci/testcases.yaml"
+ return FUNCTEST_REPO + "/functest/ci/testcases.yaml"
def get_functest_yaml():