aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_bfd.py
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2022-02-09 13:47:29 +0000
committerNeale Ranns <neale@graphiant.com>2022-02-09 13:47:29 +0000
commit63f2c7d70136761e24b19cca1f09d9cbdde66b69 (patch)
tree19be481e9f572b5ad607322644beb22cecfdf586 /test/test_bfd.py
parent023521fcb6713e1151a04e4358bb58695dd6e479 (diff)
bfd: Add an update API that has create new or modify existing semantics
Type: improvement helps keep the agents stateless Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I3588f13c081e24f5a8083b490eb02856361e4ccb
Diffstat (limited to 'test/test_bfd.py')
-rw-r--r--test/test_bfd.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/test_bfd.py b/test/test_bfd.py
index e6a710d7bf9..7a444cb3caf 100644
--- a/test/test_bfd.py
+++ b/test/test_bfd.py
@@ -142,6 +142,34 @@ class BFDAPITestCase(VppTestCase):
"required min receive interval")
self.assert_equal(session.detect_mult, s.detect_mult, "detect mult")
+ def test_upd_bfd(self):
+ """ Create/Modify w/ Update BFD session parameters """
+ session = VppBFDUDPSession(self, self.pg0, self.pg0.remote_ip4,
+ desired_min_tx=50000,
+ required_min_rx=10000,
+ detect_mult=1)
+ session.upd_vpp_config()
+ s = session.get_bfd_udp_session_dump_entry()
+ self.assert_equal(session.desired_min_tx,
+ s.desired_min_tx,
+ "desired min transmit interval")
+ self.assert_equal(session.required_min_rx,
+ s.required_min_rx,
+ "required min receive interval")
+
+ self.assert_equal(session.detect_mult, s.detect_mult, "detect mult")
+ session.upd_vpp_config(desired_min_tx=session.desired_min_tx * 2,
+ required_min_rx=session.required_min_rx * 2,
+ detect_mult=session.detect_mult * 2)
+ s = session.get_bfd_udp_session_dump_entry()
+ self.assert_equal(session.desired_min_tx,
+ s.desired_min_tx,
+ "desired min transmit interval")
+ self.assert_equal(session.required_min_rx,
+ s.required_min_rx,
+ "required min receive interval")
+ self.assert_equal(session.detect_mult, s.detect_mult, "detect mult")
+
def test_add_sha1_keys(self):
""" add SHA1 keys """
key_count = 10