AHA. it was choking out on :: for /48s!
This commit is contained in:
parent
753d5007d8
commit
50fd503ce6
@ -129,15 +129,15 @@ class Assignment(object):
|
|||||||
self.alloc_block = self.alloc.ip.alloc_block
|
self.alloc_block = self.alloc.ip.alloc_block
|
||||||
self.iface_blocks = self.alloc_block.extract_subnet(self.prefix, count = 1)
|
self.iface_blocks = self.alloc_block.extract_subnet(self.prefix, count = 1)
|
||||||
logger.debug('Allocation blocks for {0}: {1}'.format(self.iface, ','.join([str(i) for i in self.iface_blocks])))
|
logger.debug('Allocation blocks for {0}: {1}'.format(self.iface, ','.join([str(i) for i in self.iface_blocks])))
|
||||||
for i in self.iface_blocks:
|
for idx, i in enumerate(self.iface_blocks):
|
||||||
# DHCPv6 range.
|
# DHCPv6 range.
|
||||||
_base = str(i.ip).rstrip(':')
|
_base = '{0}:{1}'.format(str(i.ip).rstrip(':'), idx)
|
||||||
logger.debug('Base prefix for {0}: {1}'.format(str(i), _base))
|
logger.debug('Base prefix for {0}: {1}'.format(str(i), _base))
|
||||||
start = '{0}:dead:beef:cafe:0'.format(_base)
|
start = '{0}:dead:beef:cafe:0'.format(_base)
|
||||||
stop = '{0}:dead:beef:cafe:ffff'.format(_base)
|
stop = '{0}:dead:beef:cafe:ffff'.format(_base)
|
||||||
range = (start, stop)
|
d_range = (start, stop)
|
||||||
self.dhcp6_ranges.append(range)
|
self.dhcp6_ranges.append(d_range)
|
||||||
logger.debug('Added range {0} to block {1} for iface {2}'.format(range, str(i.ip), self.iface))
|
logger.debug('Added range {0} to block {1} for iface {2}'.format(d_range, str(i.ip), self.iface))
|
||||||
return(None)
|
return(None)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user