Commit db343b70 by Tomas Hlavacek

Add sorting of BIRD RT and peer tables

Sort both control tables that ULG obtains automatically form BIRD daemon
on start to construct drop-down select boxes on main page at the first place.
The sorting occures when the tables are read and saved in the internal (persistent) structure.
parent f97aa9d5
......@@ -413,7 +413,7 @@ class BirdRouter(ulgmodel.Router):
if(re.match(self.proto_fltr,pspl[1])):
peers.append(pspl[0])
self.bgp_peers = peers
self.bgp_peers = sorted(peers)
def rescanRoutingTables(self):
res = self.runRawSyncCommand(self.RESCAN_TABLES_COMMAND)
......@@ -424,7 +424,7 @@ class BirdRouter(ulgmodel.Router):
if(m and m.group(2).lstrip().rstrip() == STRING_SYMBOL_ROUTING_TABLE):
tables.append(m.group(1))
self.routing_tables = tables
self.routing_tables = sorted(tables)
def getBGPPeers(self):
if(not self.bgp_peers):
......
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 sign in to comment