Changeset 13734 in genesis
- Timestamp:
- Jan 18, 2017, 10:41:57 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gformat.py
r13733 r13734 529 529 return '\n'.join(map(lambda x: ' ' * count + x, text.split('\n'))) 530 530 531 # Process DHCP blocks 531 532 dhcp_out = defaultdict(list) 532 533 for iface_key in get_interface_keys(datadump): … … 546 547 547 548 if dhcp_type(datadump[iface_key]) != DHCP_SERVER: 548 dhcp_out[if ace_key].append(textwrap.dedent("""\549 dhcp_out[ifname].append(textwrap.dedent("""\ 549 550 subnet %(autogen_subnet)s netmask %(autogen_netmask)s { 550 551 ### not autoritive … … 562 563 fixed = 5 563 564 for mac in datadump['no_portal']: 564 dhcp_out[if ace_key].append(textwrap.dedent("""\565 dhcp_out[ifname].append(textwrap.dedent("""\ 565 566 host fixed-%(ifname)s-%(fixed)s { 566 567 hardware ethernet %(mac)s; … … 570 571 fixed += 1 571 572 572 dhcp_out[if ace_key].append(textwrap.dedent("""\573 dhcp_out[ifname].append(textwrap.dedent("""\ 573 574 subnet %(autogen_subnet)s netmask %(autogen_netmask)s { 574 575 range %(autogen_dhcp_start)s %(autogen_dhcp_stop)s; … … 578 579 """ % datadump[iface_key])) 579 580 581 # Output the blocks in groups 580 582 for ifname,value in sorted(dhcp_out.iteritems()): 581 583 if len(value) > 2:
Note:
See TracChangeset
for help on using the changeset viewer.