summaryrefslogtreecommitdiffstats
path: root/test/test_dvr.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-03-12 06:59:36 -0700
committerNeale Ranns <nranns@cisco.com>2018-03-13 16:48:23 +0000
commit8145842bf273823192140c57fc773bb92d9db64f (patch)
tree6e5267f5dac406ed44de258acbc267264659a79a /test/test_dvr.py
parenteca834ed514ddb8a7b7f18dbbef2c637d7482bd3 (diff)
Common form of fib-path reproting in dumps
Change-Id: I8f6fdbbeef2ac7e9fe5d87490ae5cba6e9a0b294 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/test_dvr.py')
-rw-r--r--test/test_dvr.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/test_dvr.py b/test/test_dvr.py
index e2e960584a6..d508a8d8b1a 100644
--- a/test/test_dvr.py
+++ b/test/test_dvr.py
@@ -215,6 +215,23 @@ class TestDVR(VppTestCase):
1, bvi=1, enable=0)
#
+ # Do a FIB dump to make sure the paths are correctly reported as DVR
+ #
+ routes = self.vapi.ip_fib_dump()
+
+ for r in routes:
+ if (inet_pton(AF_INET, ip_tag_bridged) == r.address):
+ print r
+ self.assertEqual(r.path[0].sw_if_index,
+ sub_if_on_pg3.sw_if_index)
+ self.assertEqual(r.path[0].is_dvr, 1)
+ if (inet_pton(AF_INET, ip_non_tag_bridged) == r.address):
+ print r
+ self.assertEqual(r.path[0].sw_if_index,
+ self.pg1.sw_if_index)
+ self.assertEqual(r.path[0].is_dvr, 1)
+
+ #
# the explicit route delete is require so it happens before
# the sbu-interface delete. subinterface delete is required
# because that object type does not use the object registry