Ondřej Svoboda has uploaded a new change for review. Change subject: dhcp: remove remnants of compatibility with EL6 ......................................................................
dhcp: remove remnants of compatibility with EL6 dnsmasq we use now supports both --bind-dynamic and DHCPv6. Change-Id: Ic77a222ae5f942f4a588e522a20e544166d63ca2 Signed-off-by: Ondřej Svoboda <[email protected]> --- M tests/functional/dhcp.py 1 file changed, 7 insertions(+), 11 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/87/41587/1 diff --git a/tests/functional/dhcp.py b/tests/functional/dhcp.py index 447028c..46c64f0 100644 --- a/tests/functional/dhcp.py +++ b/tests/functional/dhcp.py @@ -17,14 +17,13 @@ # Refer to the README and COPYING files for full details of the license # +from errno import ENOENT, ESRCH import logging import os from signal import SIGKILL, SIGTERM from time import sleep, time -from errno import ENOENT, ESRCH -from vdsm.utils import CommandPath -from vdsm.utils import execCmd +from vdsm.utils import CommandPath, execCmd _DNSMASQ_BINARY = CommandPath('dnsmasq', '/usr/sbin/dnsmasq') _DHCLIENT_BINARY = CommandPath('dhclient', '/usr/sbin/dhclient', @@ -45,25 +44,22 @@ self.proc = None def start(self, interface, dhcp_range_from, dhcp_range_to, - dhcpv6_range_from=None, dhcpv6_range_to=None, router=None, - bind_dynamic=True): + dhcpv6_range_from, dhcpv6_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 # -d don't daemonize and log to stderr # --bind-dynamic bind only the testing veth iface - # (a better, and quiet, version of --bind-interfaces, but not on EL6) command = [ _DNSMASQ_BINARY.cmd, '--dhcp-authoritative', '-p', '0', '--dhcp-range={0},{1},2m'.format(dhcp_range_from, dhcp_range_to), + '--dhcp-range={0},{1},2m'.format(dhcpv6_range_from, + dhcpv6_range_to), '--dhcp-option=3' + (',{0}'.format(router) if router else ''), '--dhcp-option=6', - '-i', interface, '-I', 'lo', '-d', - '--bind-dynamic' if bind_dynamic else '--bind-interfaces'] - if dhcpv6_range_from and dhcpv6_range_to: - command += ['--dhcp-range={0},{1},2m'.format(dhcpv6_range_from, - dhcpv6_range_to)] + '-i', interface, '-I', 'lo', '-d', '--bind-dynamic', + ] self.proc = execCmd(command, sync=False) sleep(_START_CHECK_TIMEOUT) if self.proc.returncode: -- To view, visit https://gerrit.ovirt.org/41587 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic77a222ae5f942f4a588e522a20e544166d63ca2 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ondřej Svoboda <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
