Merge "Updated OpenContrail tests to support version 4"
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..303da24
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,41 @@
+# Automatically generated by `hgimportsvn`
+.svn
+.hgsvn
+
+# Ignore local virtualenvs
+lib/
+bin/
+include/
+.Python/
+
+# These lines are suggested according to the svn:ignore property
+# Feel free to enable them by uncommenting them
+*.pyc
+*.pyo
+*.swp
+*.class
+*.orig
+*~
+.hypothesis/
+
+# autogenerated
+src/_pytest/_version.py
+# setuptools
+.eggs/
+
+doc/*/_build
+build/
+dist/
+*.egg-info
+issue/
+env/
+.env/
+3rdparty/
+.tox
+.cache
+.pytest_cache
+.coverage
+.ropeproject
+.idea
+.hypothesis
+
diff --git a/cvp_checks/global_config.yaml b/cvp_checks/global_config.yaml
index 7072fcc..40303d6 100644
--- a/cvp_checks/global_config.yaml
+++ b/cvp_checks/global_config.yaml
@@ -62,7 +62,7 @@
# this test may skip groups (see example)
test_mtu:
{ #"skipped_groups": ["dbs"]
- "skipped_ifaces": ["bonding_masters", "lo", "veth", "tap", "cali", "qv", "qb"]}
+ "skipped_ifaces": ["bonding_masters", "lo", "veth", "tap", "cali", "qv", "qb", "br-int", "vxlan"]}
# mask for interfaces to skip
drivetrain_version: ''
diff --git a/cvp_checks/tests/ceph/test_ceph_pg_count.py b/cvp_checks/tests/ceph/test_ceph_pg_count.py
index 46e50c4..28783e8 100644
--- a/cvp_checks/tests/ceph/test_ceph_pg_count.py
+++ b/cvp_checks/tests/ceph/test_ceph_pg_count.py
@@ -22,7 +22,7 @@
pg_num and pgp_num should be the same and
set according formula to higher value of powered 2
"""
-
+ pytest.skip("This test needs redesign. Skipped for now")
ceph_monitors = local_salt_client.cmd(
'ceph:mon',
'test.ping',
diff --git a/cvp_checks/tests/ceph/test_ceph_tell_bench.py b/cvp_checks/tests/ceph/test_ceph_tell_bench.py
index db45435..b275022 100644
--- a/cvp_checks/tests/ceph/test_ceph_tell_bench.py
+++ b/cvp_checks/tests/ceph/test_ceph_tell_bench.py
@@ -12,6 +12,7 @@
and gives the "bytes_per_sec" speed for each OSD.
"""
+ pytest.skip("This test needs redesign. Skipped for now")
ceph_monitors = local_salt_client.cmd(
'ceph:mon',
'test.ping',
diff --git a/cvp_checks/tests/test_mtu.py b/cvp_checks/tests/test_mtu.py
index 940c145..9054ba3 100644
--- a/cvp_checks/tests/test_mtu.py
+++ b/cvp_checks/tests/test_mtu.py
@@ -8,7 +8,7 @@
testname = os.path.basename(__file__).split('.')[0]
config = utils.get_configuration()
skipped_ifaces = config.get(testname)["skipped_ifaces"] or \
- ["bonding_masters", "lo", "veth", "tap", "cali"]
+ ["bonding_masters", "lo", "veth", "tap", "cali", "qv", "qb", "br-int", "vxlan"]
total = {}
network_info = local_salt_client.cmd(
"L@"+','.join(nodes_in_group), 'cmd.run', ['ls /sys/class/net/'], expr_form='compound')
diff --git a/cvp_checks/tests/test_packet_checker.py b/cvp_checks/tests/test_packet_checker.py
index a583c24..f76c339 100644
--- a/cvp_checks/tests/test_packet_checker.py
+++ b/cvp_checks/tests/test_packet_checker.py
@@ -1,26 +1,24 @@
import pytest
import json
-import os
-from cvp_checks import utils
def test_check_package_versions(local_salt_client, nodes_in_group):
- output = local_salt_client.cmd("L@"+','.join(nodes_in_group), 'lowpkg.list_pkgs', expr_form='compound')
+ output = local_salt_client.cmd("L@"+','.join(nodes_in_group),
+ 'lowpkg.list_pkgs',
+ expr_form='compound')
# Let's exclude cid01 and dbs01 nodes from this check
exclude_nodes = local_salt_client.cmd("I@galera:master or I@gerrit:client",
'test.ping',
expr_form='compound').keys()
-
- if len(output.keys()) < 2:
+ total_nodes = [i for i in output.keys() if i not in exclude_nodes]
+ if len(total_nodes) < 2:
pytest.skip("Nothing to compare - only 1 node")
nodes = []
pkts_data = []
my_set = set()
- for node in output:
- if node in exclude_nodes:
- continue
+ for node in total_nodes:
nodes.append(node)
my_set.update(output[node].keys())
@@ -44,19 +42,29 @@
def test_check_module_versions(local_salt_client, nodes_in_group):
pre_check = local_salt_client.cmd(
- "L@"+','.join(nodes_in_group), 'cmd.run', ['dpkg -l | grep "python-pip "'], expr_form='compound')
+ "L@"+','.join(nodes_in_group),
+ 'cmd.run',
+ ['dpkg -l | grep "python-pip "'],
+ expr_form='compound')
if pre_check.values().count('') > 0:
pytest.skip("pip is not installed on one or more nodes")
- if len(pre_check.keys()) < 2:
+
+ exclude_nodes = local_salt_client.cmd("I@galera:master or I@gerrit:client",
+ 'test.ping',
+ expr_form='compound').keys()
+ total_nodes = [i for i in pre_check.keys() if i not in exclude_nodes]
+
+ if len(total_nodes) < 2:
pytest.skip("Nothing to compare - only 1 node")
- output = local_salt_client.cmd("L@"+','.join(nodes_in_group), 'pip.freeze', expr_form='compound')
+ output = local_salt_client.cmd("L@"+','.join(nodes_in_group),
+ 'pip.freeze', expr_form='compound')
nodes = []
pkts_data = []
my_set = set()
- for node in output:
+ for node in total_nodes:
nodes.append(node)
my_set.update([x.split("=")[0] for x in output[node]])
output[node] = dict([x.split("==") for x in output[node]])