mirror of
https://opendev.org/x/pyghmi
synced 2026-06-15 08:10:46 +00:00
Merge "Handle None Gateway value"
This commit is contained in:
@@ -1093,7 +1093,7 @@ class Command(object):
|
||||
cidr = _mask_to_cidr(currip['SubnetMask'])
|
||||
retval['ipv4_address'] = '{0}/{1}'.format(currip['Address'], cidr)
|
||||
retval['mac_address'] = netcfg['MACAddress']
|
||||
hasgateway = _mask_to_cidr(currip['Gateway'])
|
||||
hasgateway = _mask_to_cidr(currip['Gateway']) if currip['Gateway'] else None
|
||||
retval['ipv4_gateway'] = currip['Gateway'] if hasgateway else None
|
||||
retval['ipv4_configuration'] = currip['AddressOrigin']
|
||||
tagged = netcfg.get('VLAN', {}).get('VLANEnable', False)
|
||||
|
||||
Reference in New Issue
Block a user