DS refactor, fixes/optimizations

This commit is contained in:
Arseniy Kuznetsov
2021-02-07 15:46:42 +01:00
parent cb2ff3c1a5
commit ad6fc82744
4 changed files with 12 additions and 12 deletions

View File

@@ -35,11 +35,11 @@ class DHCPOutput:
else:
dhcp_by_server[server] = [dhcp_lease_record]
output_entry = BaseOutputProcessor.OutputDHCPEntry
output_table = BaseOutputProcessor.output_table(output_entry)
output_records = 0
lease_records = len(dhcp_lease_records)
output_entry = BaseOutputProcessor.OutputDHCPEntry
output_table = BaseOutputProcessor.output_table(output_entry)
for key in dhcp_by_server.keys():
for record in dhcp_by_server[key]:
record['host_name'] = BaseOutputProcessor.dhcp_name(router_entry, record, drop_comment = True)
@@ -47,7 +47,7 @@ class DHCPOutput:
output_records += 1
if output_records < lease_records:
output_table.add_row(output_entry())
print (output_table.draw())
for server in dhcp_by_server.keys():