DS refactor, fixes/optimizations

This commit is contained in:
Arseniy Kuznetsov
2021-02-06 16:19:03 +01:00
parent 3689386af0
commit 0693de8f90
2 changed files with 22 additions and 10 deletions

View File

@@ -40,9 +40,12 @@ class DHCPOutput:
output_table = []
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)
output_table.append(BaseOutputProcessor.OutputDHCPEntry(**record))
num_records += 1
output_table.append({})
print()
print(tabulate(output_table, headers = "keys", tablefmt="github"))
print(tabulate([{0:'DHCP Clients:', 1:num_records}], tablefmt="text"))