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

Method create_stream

test/test_mdata.py:37–53  ·  view source on GitHub ↗
(self, src_if, dst_if, count)

Source from the content-addressed store, hash-verified

35
36 # https://fd.io/docs/vpp/master/developer/tests/overview.html#example-how-to-add-a-new-test
37 def create_stream(self, src_if, dst_if, count):
38 packets = []
39 for i in range(count):
40 info = self.create_packet_info(src_if, dst_if)
41 payload = self.info_to_payload(info)
42
43 p = (
44 Ether(dst=src_if.local_mac, src=src_if.remote_mac)
45 / IP(src=src_if.remote_ip4, dst=dst_if.remote_ip4)
46 / UDP(sport=randint(49152, 65535), dport=5678)
47 / Raw(payload)
48 )
49
50 info.data = p.copy()
51 packets.append(p)
52
53 return packets
54
55 def verify_capture(self, src_if, dst_if, capture):
56 packet_info = None

Callers 1

test_mdata_cliMethod · 0.95

Calls 4

create_packet_infoMethod · 0.80
info_to_payloadMethod · 0.80
copyMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected