aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-03-19 05:44:16 -0700
committerNeale Ranns <nranns@cisco.com>2019-03-20 07:47:36 +0000
commit76ef6094cb550ebb452a7068b02ff5fc6da420c7 (patch)
tree757d35064a45b1a0441daf589bc542fd0a445e5d
parentb8daa257bd309c1d4dbbcd05e7d7e77408d8aea5 (diff)
tests: cdp plugin. Replace cdp enable cli command with API call.
Change-Id: Ic2d21b535a58c1c618ec9e652d30858ad45a7d43 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
-rw-r--r--src/plugins/cdp/cdp.api2
-rw-r--r--test/test_cdp.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/cdp/cdp.api b/src/plugins/cdp/cdp.api
index 34507025f42..19f058c825b 100644
--- a/src/plugins/cdp/cdp.api
+++ b/src/plugins/cdp/cdp.api
@@ -25,7 +25,7 @@ autoreply define cdp_enable_disable
/* Arbitrary context, so client can match reply to request */
u32 context;
- /* Enable / disable the feature */
+ /* Enable (1)/ disable (0) the feature */
u8 enable_disable;
};
diff --git a/test/test_cdp.py b/test/test_cdp.py
index 1996c5141f0..7f77b4bbb01 100644
--- a/test/test_cdp.py
+++ b/test/test_cdp.py
@@ -76,14 +76,14 @@ class TestCDP(VppTestCase):
super(TestCDP, cls).tearDownClass()
def test_enable_cdp(self):
- self.logger.info(self.vapi.cli("cdp enable"))
+ self.logger.info(self.vapi.cdp_enable_disable(enable_disable=1))
ret = self.vapi.cli("show cdp")
self.logger.info(ret)
not_enabled = self.nen_ptr.search(ret)
self.assertFalse(not_enabled, "CDP isn't enabled")
def test_send_cdp_packet(self):
- self.logger.info(self.vapi.cli("cdp enable"))
+ self.logger.info(self.vapi.cdp_enable_disable(enable_disable=1))
self.send_packet(self.create_packet())
neighbors = list(self.show_cdp())
@@ -103,7 +103,7 @@ class TestCDP(VppTestCase):
self.send_bad_packet(8, ".")
def send_bad_packet(self, l, v):
- self.logger.info(self.vapi.cli("cdp enable"))
+ self.logger.info(self.vapi.cdp_enable_disable(enable_disable=1))
self.send_packet(self.create_bad_packet(l, v))
errors = list(self.show_errors())