]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Python CLI Package: test script writing out channel stats
authorMaria Matejka <mq@ucw.cz>
Sat, 20 May 2023 13:25:35 +0000 (15:25 +0200)
committerMaria Matejka <mq@ucw.cz>
Tue, 23 May 2023 11:45:04 +0000 (13:45 +0200)
python/test.py

index ede00810edc063d40b3998ec082f8144517c1eca..67252d5f1449f8c564f916618aad0d312a161290 100644 (file)
@@ -12,4 +12,9 @@ async def main():
         await b.protocols.update()
         print(b.protocols)
 
+        for name, protocol in b.protocols.data.items():
+            print(f"{name}: {protocol.channels}")
+            for name, channel in protocol.channels.items():
+                print(f"  {name}: {channel.route_change_stats}")
+
 asyncio.run(main())