]> git.proxmox.com Git - mirror_frr.git/blob - tests/topotests/bgp_features/peer2/exa_readpipe.py
Merge pull request #7550 from volta-networks/fix_bfd_isis
[mirror_frr.git] / tests / topotests / bgp_features / peer2 / exa_readpipe.py
1 #!/usr/bin/env python
2 "Helper script to read api commands from a pipe and feed them to ExaBGP"
3
4 import sys
5
6 if len(sys.argv) != 2:
7 sys.exit(1)
8 fifo = sys.argv[1]
9
10 while True:
11 pipe = open(fifo, 'r')
12 with pipe:
13 line = pipe.readline().strip()
14 if line != "":
15 sys.stdout.write("{}\n".format(line))
16 sys.stdout.flush()
17 pipe.close()
18
19 sys.exit(0)