MCPcopy Create free account
hub / github.com/FDio/vpp / enable_sflow_via_api

Method enable_sflow_via_api

test/test_sflow_drop.py:38–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

36 i.set_table_ip6(0)
37
38 def enable_sflow_via_api(self):
39 ## TEST: Enable both interfaces
40 ret = self.vapi.sflow_enable_disable(hw_if_index=1, enable_disable=True)
41 self.assertEqual(ret.retval, 0)
42 ret = self.vapi.sflow_enable_disable(hw_if_index=2, enable_disable=True)
43 self.assertEqual(ret.retval, 0)
44
45 ## TEST: sflow_sampling_rate_set()
46 self.vapi.sflow_sampling_rate_set(sampling_N=1)
47 ret = self.vapi.sflow_sampling_rate_get()
48 self.assertEqual(ret.sampling_N, 1)
49
50 ## TEST: sflow_drop_monitoring()
51 self.vapi.sflow_drop_monitoring_set(drop_M=1)
52 ret = self.vapi.sflow_drop_monitoring_get()
53 self.assertEqual(ret.drop_M, 1)
54
55 def create_stream(self, src_if, dst_if, count):
56 packets = []

Callers 1

test_basicMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected