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

Method test_basic

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

Source from the content-addressed store, hash-verified

124 # self.assert_equal(dm_fail, None, ctr_dm_fail)
125
126 def test_basic(self):
127 self.enable_sflow_via_api()
128 count = 7
129 # create the packet stream, with ttl decrementing so
130 # that just 1 packet will be dropped
131 packets = self.create_stream(self.pg0, self.pg1, count)
132 # add the stream to the source interface
133 self.pg0.add_stream(packets)
134 # enable capture on both interfaces
135 self.pg0.enable_capture()
136 self.pg1.enable_capture()
137 # start the packet generator
138 self.pg_start()
139 # get capture - the proper count of packets was saved by
140 # create_packet_info() based on dst_if parameter
141 capture = self.pg1.get_capture(count - 1, timeout=2)
142 # expect an ICMP TTL exceeded message back on pg0
143 # and a dropped packet that sflow will write to DROPMON
144 capture0 = self.pg0.get_capture(1, timeout=2)
145 # allow time for the dropped packet to be fully
146 # processed, and for the counters to be updated
147 self.sleep(1.0)
148 # verify sflow counters
149 self.verify_sflow(count)

Callers

nothing calls this directly

Calls 8

enable_sflow_via_apiMethod · 0.95
create_streamMethod · 0.95
verify_sflowMethod · 0.95
pg_startMethod · 0.80
add_streamMethod · 0.45
enable_captureMethod · 0.45
get_captureMethod · 0.45
sleepMethod · 0.45

Tested by

no test coverage detected