mirror of
https://opendev.org/x/pyghmi
synced 2025-07-12 07:21:32 +00:00
Have ipv6 addresses always be represented as list
IPv6 interfaces tend to emphasize more open ended use of aliases. To support this, have ipv6_addresses manifest as a list, to allow for implementations to extend to represent more complex situations. Change-Id: Ia5727ff4830da58f847a7090e45dc819d4f216b2
This commit is contained in:
@ -541,4 +541,5 @@ class OEMHandler(generic.OEMHandler):
|
||||
# fall back to a dumber, but more universal formatter
|
||||
ipv6str = binascii.b2a_hex(ipv6_addr)
|
||||
ipv6str = ':'.join([ipv6str[x:x+4] for x in xrange(0, 32, 4)])
|
||||
netdata['ipv6_address'] = '{0}/{1}'.format(ipv6str, ipv6_prefix)
|
||||
netdata['ipv6_addresses'] = [
|
||||
'{0}/{1}'.format(ipv6str, ipv6_prefix)]
|
||||
|
Reference in New Issue
Block a user