Change in vdsm[master]: testSetupNetworksAddDelDhcp: Modernize and prepare for a cle...
osvoboda at redhat.com
osvoboda at redhat.com
Mon Dec 15 16:51:17 UTC 2014
Ondřej Svoboda has uploaded a new change for review.
Change subject: testSetupNetworksAddDelDhcp: Modernize and prepare for a clean extension
......................................................................
testSetupNetworksAddDelDhcp: Modernize and prepare for a clean extension
Change-Id: If4df973624bf8e9ca35e27ce6e6c34724d1a5cdc
Signed-off-by: Ondřej Svoboda <osvoboda at redhat.com>
---
M tests/functional/dhcp.py
M tests/functional/networkTests.py
2 files changed, 13 insertions(+), 10 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/85/36185/1
diff --git a/tests/functional/dhcp.py b/tests/functional/dhcp.py
index 078d763..e719ba8 100644
--- a/tests/functional/dhcp.py
+++ b/tests/functional/dhcp.py
@@ -45,7 +45,7 @@
def __init__(self):
self.proc = None
- def start(self, interface, dhcpRangeFrom, dhcpRangeTo, router=None):
+ def start(self, interface, dhcp_range_from, dhcp_range_to, router=None):
# -p 0 don't act as a DNS server
# --dhcp-option=3,<router> advertise a specific gateway (or None)
# --dhcp-option=6 don't reply with any DNS servers
@@ -53,7 +53,7 @@
self.proc = execCmd([
_DNSMASQ_BINARY.cmd, '--dhcp-authoritative',
'-p', '0',
- '--dhcp-range={0},{1},2m'.format(dhcpRangeFrom, dhcpRangeTo),
+ '--dhcp-range={0},{1},2m'.format(dhcp_range_from, dhcp_range_to),
'--dhcp-option=3' + (',{0}'.format(router) if router else ''),
'--dhcp-option=6',
'-i', interface, '-I', 'lo', '-d',
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index 36b8a06..f23f033 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -1772,8 +1772,10 @@
self.assertEqual(devs[right]['dhcpv4'], dhcpv4)
device_name = right
- ip_addr = test_net['addr']
- self.assertSourceRoutingConfiguration(device_name, ip_addr)
+ if dhcpv4:
+ # TODO: source routing not ready for IPv6
+ ip_addr = test_net['addr']
+ self.assertSourceRoutingConfiguration(device_name, ip_addr)
network = {NETWORK_NAME: {'remove': True}}
status, msg = self.vdsm_net.setupNetworks(network, {}, NOCHK)
@@ -1781,12 +1783,13 @@
self.assertNetworkDoesntExist(NETWORK_NAME)
# Assert that routes and rules don't exist
- routes = self.getSourceRoutingRoutes(device_name, ip_addr)
- for route in routes:
- self.assertRouteDoesNotExist(route)
- rules = self.getSourceRoutingRules(device_name, ip_addr)
- for rule in rules:
- self.assertRuleDoesNotExist(rule)
+ if dhcpv4:
+ routes = self.getSourceRoutingRoutes(device_name, ip_addr)
+ for route in routes:
+ self.assertRouteDoesNotExist(route)
+ rules = self.getSourceRoutingRules(device_name, ip_addr)
+ for rule in rules:
+ self.assertRuleDoesNotExist(rule)
@permutations([['default'], ['local']])
@cleanupNet
--
To view, visit http://gerrit.ovirt.org/36185
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If4df973624bf8e9ca35e27ce6e6c34724d1a5cdc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda at redhat.com>
More information about the vdsm-patches
mailing list