hrm
This commit is contained in:
@@ -68,12 +68,17 @@ class Assignment(object):
|
||||
self.ra_dns = ra_dns
|
||||
self.ra_tag = ra_tag
|
||||
self.ra_other = ra_other
|
||||
self.ra_dhcp = ra_dhcp
|
||||
for a in ('dns', 'tag', 'other', 'dhcp'):
|
||||
k = 'ra_{0}'.format(a)
|
||||
v = getattr(self, k)
|
||||
logger.debug('{0}: {1}'.format(k, v))
|
||||
self.ra_domains = set()
|
||||
if isinstance(ra_domains, list):
|
||||
self.ra_domains.update(ra_domains)
|
||||
elif isinstance(ra_domains, str):
|
||||
self.ra_domains.update([i.lower().strip() for i in ra_domains if i.strip() != ''])
|
||||
self.ra_dhcp = ra_dhcp
|
||||
logger.debug('ra_domains: {0}'.format(', '.join(self.ra_domains)))
|
||||
self.iface = None
|
||||
self.iface_ll = None
|
||||
self.iface_idx = None
|
||||
@@ -122,8 +127,8 @@ class Assignment(object):
|
||||
|
||||
def parse_alloc(self):
|
||||
self.alloc_block = self.alloc.ip.alloc_block
|
||||
# NOT AN IP6 OBJECT!
|
||||
self.iface_blocks = self.alloc_block.extract_subnet(self.prefix, count = 1)
|
||||
logger.debug('Allocation blocks for {0}: {1}'.format(self.iface, ','.join(self.iface_blocks)))
|
||||
for i in self.iface_blocks:
|
||||
# DHCPv6 range.
|
||||
_base = str(i.ip).rstrip(':')
|
||||
|
||||
Reference in New Issue
Block a user