mirror of
https://opendev.org/x/pyghmi
synced 2025-01-27 19:37:44 +00:00
Workaround 'dead' IPv4 addresses
Some redfish implementations leave a dead DHCP definition when configured static. Filter out such an address when encountered. Change-Id: I25ff6b07ff75b67f7661157a8a0f1dc230f9010c
This commit is contained in:
parent
cd14632ba6
commit
3475b97a91
@ -474,6 +474,9 @@ class Command(object):
|
||||
if not ipv4:
|
||||
raise exc.PyghmiException('Unable to locate network information')
|
||||
retval = {}
|
||||
if len(netcfg['IPv4Addresses']) != 1:
|
||||
netcfg['IPv4Addresses'] = [x for x in
|
||||
netcfg['IPv4Addresses'] if x['Address'] != '0.0.0.0']
|
||||
if len(netcfg['IPv4Addresses']) != 1:
|
||||
raise exc.PyghmiException('Multiple IP addresses not supported')
|
||||
currip = netcfg['IPv4Addresses'][0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user