mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-06 13:56:18 +00:00
Realm.wait_for_ip: We only need to checik that stas_without_ips and stas_without_ip6s are equal to zero once, simplify code further
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -655,9 +655,7 @@ class Realm(LFCliBase):
|
|||||||
else:
|
else:
|
||||||
if debug:
|
if debug:
|
||||||
print("Found IP: %s on port: %s" % (v['ip'], sta_eid))
|
print("Found IP: %s on port: %s" % (v['ip'], sta_eid))
|
||||||
if len(stas_without_ip4s) == 0 and not ipv6:
|
|
||||||
print('Found IPs for all requested ports')
|
|
||||||
return True
|
|
||||||
if ipv6:
|
if ipv6:
|
||||||
v = response['interface']
|
v = response['interface']
|
||||||
ip6a = v['ipv6_address']
|
ip6a = v['ipv6_address']
|
||||||
@@ -668,11 +666,7 @@ class Realm(LFCliBase):
|
|||||||
stas_without_ip6s[sta_eid] = True
|
stas_without_ip6s[sta_eid] = True
|
||||||
if debug:
|
if debug:
|
||||||
print("Waiting for port %s to get IPv6 Address try %s / %s, reported: %s." % (sta_eid, sec_elapsed, timeout_sec, ip6a))
|
print("Waiting for port %s to get IPv6 Address try %s / %s, reported: %s." % (sta_eid, sec_elapsed, timeout_sec, ip6a))
|
||||||
if len(stas_without_ip6s) == 0 and not ipv4:
|
|
||||||
print('Found IPs for all requested ports')
|
|
||||||
return True
|
|
||||||
|
|
||||||
if ipv4 and ipv6:
|
|
||||||
if len(stas_without_ip4s) == len(stas_without_ip6s) == 0:
|
if len(stas_without_ip4s) == len(stas_without_ip6s) == 0:
|
||||||
print('Found IPs for all requested ports')
|
print('Found IPs for all requested ports')
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user