Hi,
I have a requirement to fetch all ip rule list (policy tables) configured under namespace. I am using the IPDB functionality to fetch the same, but not getting the output.
Could any one help me to get the ip rules using IPDB .
Trying using Below Logic:
# Fetch all name space list
namespace_list = netns.listnetns()
# Get the namespace list
for name in namespace_list:
den = ''
netns.setns(name)
den = pyroute2.IPDB(nl=pyroute2.NetNS(name))
# Get the Namespace Information from kernel
for x in den.by_name.values():
print x
Thanks
Rishi