test-network: use [DHCPv4] and [DHCPv6] sections instead of deprecated [DHCP] section
This commit is contained in:
parent
26ce7c3bc8
commit
72e04ea31c
|
@ -5,7 +5,7 @@ Name=veth99
|
||||||
DHCP=ipv4
|
DHCP=ipv4
|
||||||
IPv6AcceptRA=false
|
IPv6AcceptRA=false
|
||||||
|
|
||||||
[DHCP]
|
[DHCPv4]
|
||||||
Anonymize=true
|
Anonymize=true
|
||||||
UseMTU=true
|
UseMTU=true
|
||||||
UseRoutes=true
|
UseRoutes=true
|
||||||
|
|
|
@ -5,7 +5,7 @@ Name=veth99
|
||||||
DHCP=ipv4
|
DHCP=ipv4
|
||||||
IPv6AcceptRA=false
|
IPv6AcceptRA=false
|
||||||
|
|
||||||
[DHCP]
|
[DHCPv4]
|
||||||
UseMTU=true
|
UseMTU=true
|
||||||
UseRoutes=true
|
UseRoutes=true
|
||||||
SendHostname=true
|
SendHostname=true
|
||||||
|
|
|
@ -4,5 +4,5 @@ Name=veth99
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=ipv6
|
DHCP=ipv6
|
||||||
|
|
||||||
[DHCP]
|
[DHCPv6]
|
||||||
RapidCommit=false
|
RapidCommit=false
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
Name=veth99
|
Name=veth99
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=yes
|
DHCP=ipv4
|
||||||
|
IPv6AcceptRA=no
|
||||||
|
|
||||||
[DHCP]
|
[DHCPv4]
|
||||||
ListenPort=5555
|
ListenPort=5555
|
||||||
|
|
|
@ -14,5 +14,5 @@ Destination=192.168.6.0/24
|
||||||
[Route]
|
[Route]
|
||||||
Destination=192.168.7.0/24
|
Destination=192.168.7.0/24
|
||||||
|
|
||||||
[DHCP]
|
[DHCPv4]
|
||||||
UseRoutes=no
|
UseRoutes=no
|
||||||
|
|
|
@ -5,6 +5,6 @@ Name=veth99
|
||||||
DHCP=ipv4
|
DHCP=ipv4
|
||||||
IPv6AcceptRA=false
|
IPv6AcceptRA=false
|
||||||
|
|
||||||
[DHCP]
|
[DHCPv4]
|
||||||
UseRoutes=true
|
UseRoutes=true
|
||||||
RouteMetric=24
|
RouteMetric=24
|
||||||
|
|
|
@ -5,6 +5,6 @@ Name=veth99
|
||||||
DHCP=ipv4
|
DHCP=ipv4
|
||||||
IPv6AcceptRA=false
|
IPv6AcceptRA=false
|
||||||
|
|
||||||
[DHCP]
|
[DHCPv4]
|
||||||
UseRoutes=true
|
UseRoutes=true
|
||||||
RouteTable=12
|
RouteTable=12
|
||||||
|
|
|
@ -5,6 +5,6 @@ Name=veth99
|
||||||
IPv6AcceptRA=false
|
IPv6AcceptRA=false
|
||||||
DHCP=ipv4
|
DHCP=ipv4
|
||||||
|
|
||||||
[DHCP]
|
[DHCPv4]
|
||||||
UseRoutes=true
|
UseRoutes=true
|
||||||
UseTimezone=true
|
UseTimezone=true
|
||||||
|
|
|
@ -4,7 +4,7 @@ Name=veth99
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=ipv4
|
DHCP=ipv4
|
||||||
|
|
||||||
[DHCP]
|
[DHCPv4]
|
||||||
UseDNS=yes
|
UseDNS=yes
|
||||||
|
|
||||||
[IPv6AcceptRA]
|
[IPv6AcceptRA]
|
||||||
|
|
|
@ -4,7 +4,10 @@ Name=veth99
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=yes
|
DHCP=yes
|
||||||
|
|
||||||
[DHCP]
|
[DHCPv4]
|
||||||
|
UseDNS=no
|
||||||
|
|
||||||
|
[DHCPv6]
|
||||||
UseDNS=no
|
UseDNS=no
|
||||||
|
|
||||||
[IPv6AcceptRA]
|
[IPv6AcceptRA]
|
||||||
|
|
|
@ -4,7 +4,10 @@ Name=veth99
|
||||||
[Network]
|
[Network]
|
||||||
DHCP=yes
|
DHCP=yes
|
||||||
|
|
||||||
[DHCP]
|
[DHCPv4]
|
||||||
|
UseDNS=yes
|
||||||
|
|
||||||
|
[DHCPv6]
|
||||||
UseDNS=yes
|
UseDNS=yes
|
||||||
|
|
||||||
[IPv6AcceptRA]
|
[IPv6AcceptRA]
|
||||||
|
|
|
@ -6,5 +6,5 @@ DHCP=ipv4
|
||||||
LinkLocalAddressing=fallback
|
LinkLocalAddressing=fallback
|
||||||
IPv6AcceptRA=no
|
IPv6AcceptRA=no
|
||||||
|
|
||||||
[DHCP]
|
[DHCPv4]
|
||||||
MaxAttempts=1
|
MaxAttempts=1
|
||||||
|
|
|
@ -2538,10 +2538,6 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
|
||||||
start_dnsmasq('--dhcp-alternate-port=67,5555')
|
start_dnsmasq('--dhcp-alternate-port=67,5555')
|
||||||
self.wait_online(['veth99:routable', 'veth-peer:routable'])
|
self.wait_online(['veth99:routable', 'veth-peer:routable'])
|
||||||
|
|
||||||
# link become 'routable' when at least one protocol provide an valid address.
|
|
||||||
self.wait_address('veth99', r'inet 192.168.5.[0-9]*/24 brd 192.168.5.255 scope global dynamic', ipv='-4')
|
|
||||||
self.wait_address('veth99', r'inet6 2600::[0-9a-f]*/128 scope global (?:dynamic noprefixroute|noprefixroute dynamic)', ipv='-6')
|
|
||||||
|
|
||||||
output = check_output('ip -4 address show dev veth99')
|
output = check_output('ip -4 address show dev veth99')
|
||||||
print(output)
|
print(output)
|
||||||
self.assertRegex(output, '192.168.5.* dynamic')
|
self.assertRegex(output, '192.168.5.* dynamic')
|
||||||
|
|
Loading…
Reference in a new issue