(self)
| 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) |
nothing calls this directly
no test coverage detected