Change in vdsm[ovirt-3.6]: net tests: make functional tests run again with persistence=...
edwardh at redhat.com
edwardh at redhat.com
Sun Feb 21 16:25:06 UTC 2016
Hello Dan Kenigsberg,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/53775
to review the following change.
Change subject: net tests: make functional tests run again with persistence=ifcfg
......................................................................
net tests: make functional tests run again with persistence=ifcfg
We have multiple users that use net_persistence=ifcfg. We must make sure
that Vdsm does not inadvertently breaks them.
This patch only makes the tests run again, after recent changes assuming
unified persistence.
Change-Id: I849172cdab80e760a65ac19d367064b1dbf81b03
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1310410
Signed-off-by: Dan Kenigsberg <danken at redhat.com>
Signed-off-by: Edward Haas <edwardh at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/53713
Continuous-Integration: Jenkins CI
---
M tests/functional/networkTests.py
1 file changed, 8 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/75/53775/1
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index 4cbed8a..f7beebc 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -212,8 +212,6 @@
def assertNetworkExists(self, networkName, bridged=None, bridgeOpts=None,
hostQos=None, assert_in_running_conf=True):
netinfo = self.vdsm_net.netinfo
- config = self.vdsm_net.config
- network_config = config.networks[networkName]
network_netinfo = netinfo.networks[networkName]
self.assertIn(networkName, netinfo.networks)
if bridged is not None:
@@ -230,8 +228,14 @@
reported_qos = network_netinfo['hostQos']
_cleanup_qos_definition(reported_qos)
self.assertEqual(reported_qos, hostQos)
- if assert_in_running_conf and config is not None:
- self.assertIn(networkName, config.networks)
+
+ if not vdsm.config.config.get('vars', 'net_persistence') == 'unified':
+ return
+
+ running_config = self.vdsm_net.config
+ network_config = running_config.networks[networkName]
+ if assert_in_running_conf:
+ self.assertIn(networkName, running_config.networks)
if bridged is not None:
self.assertEqual(network_config.get('bridged'), bridged)
physical_iface = (network_config.get('bonding') or
--
To view, visit https://gerrit.ovirt.org/53775
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I849172cdab80e760a65ac19d367064b1dbf81b03
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
More information about the vdsm-patches
mailing list