facebook / fboss

Facebook Open Switching System Software for controlling network switches.
Other
860 stars 295 forks source link

fboss_route.py prints binary addresses #17

Closed jaymzh closed 8 years ago

jaymzh commented 8 years ago

Not terribly useful for humans:

# fboss_route.py list_routes
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr='\xa9\xfe\x00\x00', port=0), prefixLength=16), nextHopAddrs=[BinaryAddress(addr='\xa9\xfe\x00\n', port=0)])
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr='\xac\x1f\x01\x00', port=0), prefixLength=24), nextHopAddrs=[BinaryAddress(addr='\xac\x1f\x01\x00', port=0)])
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr='\xac\x1f\x02\x00', port=0), prefixLength=24), nextHopAddrs=[BinaryAddress(addr='\xac\x1f\x02\x00', port=0)])
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr='\xac\x1f\x03\x00', port=0), prefixLength=24), nextHopAddrs=[BinaryAddress(addr='\xac\x1f\x03\x00', port=0)])
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr='\xac\x1f\x04\x00', port=0), prefixLength=24), nextHopAddrs=[BinaryAddress(addr='\xac\x1f\x04\x00', port=0)])
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr='\xac\x1f\x05\x00', port=0), prefixLength=24), nextHopAddrs=[BinaryAddress(addr='\xac\x1f\x05\x00', port=0)])
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr='\xac\x1f\x06\x00', port=0), prefixLength=24), nextHopAddrs=[BinaryAddress(addr='\xac\x1f\x06\x00', port=0)])
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr='\n\x0b\x00n', port=0), prefixLength=31), nextHopAddrs=[BinaryAddress(addr='\n\x0b\x00o', port=0)])
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr='\n\x0b\x08n', port=0), prefixLength=31), nextHopAddrs=[BinaryAddress(addr='\n\x0b\x08o', port=0)])
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr='\n\x0b\x10n', port=0), prefixLength=31), nextHopAddrs=[BinaryAddress(addr='\n\x0b\x10o', port=0)])
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr='\n\x0b\x18n', port=0), prefixLength=31), nextHopAddrs=[BinaryAddress(addr='\n\x0b\x18o', port=0)])
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr=' \x01\x00\xdb\x11\x11\x11P\x00\x00\x00\x00\x00\x00\x00\x00', port=0), prefixLength=64), nextHopAddrs=[BinaryAddress(addr=' \x01\x00\xdb\x11\x11\x11P\x00\x00\x00\x00\x00\x)
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr='\xfe\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', port=0), prefixLength=64), nextHopAddrs=[])
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr=' \x01\x00\xdb33\x0e\x01\x10\x00\x00\x00\x00\x00\x00\xaa', port=0), prefixLength=127), nextHopAddrs=[BinaryAddress(addr=' \x01\x00\xdb33\x0e\x01\x10\x00\x00\x00\x00\x00\x0)
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr=' \x01\x00\xdb34\x0e\x01\x10\x00\x00\x00\x00\x00\x00\xaa', port=0), prefixLength=127), nextHopAddrs=[BinaryAddress(addr=' \x01\x00\xdb34\x0e\x01\x10\x00\x00\x00\x00\x00\x0)
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr=' \x01\x00\xdb35\x0e\x01\x10\x00\x00\x00\x00\x00\x00\xaa', port=0), prefixLength=127), nextHopAddrs=[BinaryAddress(addr=' \x01\x00\xdb35\x0e\x01\x10\x00\x00\x00\x00\x00\x0)
Route UnicastRoute(dest=IpPrefix(ip=BinaryAddress(addr=' \x01\x00\xdb36\x0e\x01\x10\x00\x00\x00\x00\x00\x00\xaa', port=0), prefixLength=127), nextHopAddrs=[BinaryAddress(addr=' \x01\x00\xdb36\x0e\x01\x10\x00\x00\x00\x00\x00\x0)
oridb commented 8 years ago

Yes -- the tooling that we ship right now leaves a lot to be desired. If you're g, there's some work to do. One of those things is 'being useful'. At the moment, it's a good demo for developers on how to interact with fboss, but it's not sufficient for day to day administrative use.

We'd like to clean up the CLI and ship it, but right now it depends on facebook internal APIs.

jaymzh commented 8 years ago

This is fixed.