Commit 5ae929eb authored by Dionysis Grigoropoulos's avatar Dionysis Grigoropoulos Committed by Christos Stavrakakis
Browse files

cyclades: Update subnet-inspect

* Update subnet inspect to print externally reserved IPs too
parent 41fe8946
......@@ -164,7 +164,17 @@ def pprint_ippool(subnet, stdout=None, title=None):
("Size", size),
("Available", available)])
pprint_table(stdout, info.items(), None, separator=" | ", title=None)
pprint_pool(None, bitarray_to_map(pool.available[:size]), 80, stdout)
reserved = [pool.index_to_value(index)
for index, ip in enumerate(pool.reserved[:size])
if ip is False]
if reserved != []:
stdout.write("\nExternally Reserved IPs:\n\n")
stdout.write(", ".join(reserved) + "\n")
ip_sum = pool.available[:size] & pool.reserved[:size]
pprint_pool(None, bitarray_to_map(ip_sum), 80, stdout)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment