From 0c2caa977f120d045b20edaf0b6dd6176ce5def4 Mon Sep 17 00:00:00 2001 From: Inessa Vasilevskaya Date: Wed, 30 Mar 2016 15:54:04 +0300 Subject: [PATCH] Fullstack connectivity: test interface scenario added. This patch adds (of_interface=native, ovsdb_interface=native) test scenario. Other scenarios have been renamed for the configuration to be self-explanatory. Change-Id: I302db874ffa61004d706d946ba8fdb35b927e830 Related-bug: #1528894 --- neutron/tests/base.py | 5 ++++- neutron/tests/fullstack/test_connectivity.py | 14 ++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/neutron/tests/base.py b/neutron/tests/base.py index 079a73cb503..74cb153c47a 100644 --- a/neutron/tests/base.py +++ b/neutron/tests/base.py @@ -102,7 +102,10 @@ def bool_from_env(key, strict=False, default=False): def sanitize_log_path(path): # Sanitize the string so that its log path is shell friendly - return path.replace(' ', '-').replace('(', '_').replace(')', '_') + replace_map = {' ': '-', '(': '_', ')': '_'} + for s, r in six.iteritems(replace_map): + path = path.replace(s, r) + return path class AttributeDict(dict): diff --git a/neutron/tests/fullstack/test_connectivity.py b/neutron/tests/fullstack/test_connectivity.py index bb181db21f9..48edbc902b8 100644 --- a/neutron/tests/fullstack/test_connectivity.py +++ b/neutron/tests/fullstack/test_connectivity.py @@ -81,12 +81,14 @@ class TestOvsConnectivitySameNetwork(BaseConnectivitySameNetworkTest): ('VLANs', {'network_type': 'vlan', 'l2_pop': False})] interface_scenarios = [ - ('openflow-cli', {'of_interface': 'ovs-ofctl', - 'ovsdb_interface': 'vsctl'}), - ('openflow-native', {'of_interface': 'native', - 'ovsdb_interface': 'vsctl'}), - ('ovsdb-native', {'of_interface': 'ovs-ofctl', - 'ovsdb_interface': 'native'})] + ('openflow-cli_ovsdb-cli', {'of_interface': 'ovs-ofctl', + 'ovsdb_interface': 'vsctl'}), + ('openflow-native_ovsdb-cli', {'of_interface': 'native', + 'ovsdb_interface': 'vsctl'}), + ('openflow-cli_ovsdb-native', {'of_interface': 'ovs-ofctl', + 'ovsdb_interface': 'native'}), + ('openflow-native_ovsdb-native', {'of_interface': 'native', + 'ovsdb_interface': 'native'})] scenarios = testscenarios.multiply_scenarios( network_scenarios, interface_scenarios)