-#!/usr/bin/env python
+#!/usr/bin/env python3
import random
import unittest
import datetime
pkt_size = random.choice(self.pg_if_packet_sizes)
p = Ether(src=src_mac, dst=dst_mac)
p /= IPv6(src=src_ip, dst=dst_ip)
- p /= (UDP(sport=1234, dport=4321) / Raw('\xa5' * 20))
+ p /= (UDP(sport=1234, dport=4321) / Raw(b'\xa5' * 20))
self.extend_packet(p, pkt_size)
return p
route_8000 = VppIpRoute(self, "8000::", 64,
[VppRoutePath(self.pg0.remote_ip6,
- self.pg0.sw_if_index,
- proto=DpoProto.DPO_PROTO_IP6)],
- is_ip6=1)
+ self.pg0.sw_if_index)])
route_8000.add_vpp_config()
self.packets = [(Ether(dst=self.pg1.local_mac,
src=self.pg1.remote_mac) /
IPv6(src="3001::1", dst="8000::100") /
UDP(sport=1234, dport=1234) /
- Raw('\xa5' * 100))]
+ Raw(b'\xa5' * 100))]
self.send_packets(self.pg1, self.pg0)
self.logger.info("FFP_TEST_FINISH_0001")
route_9001 = VppIpRoute(self, "9001::", 64,
[VppRoutePath(self.pg1.remote_ip6,
- self.pg1.sw_if_index,
- proto=DpoProto.DPO_PROTO_IP6)],
- is_ip6=1)
+ self.pg1.sw_if_index)])
route_9001.add_vpp_config()
self.packets.append(
route_3 = VppIpRoute(self, "9000::", 64,
[VppRoutePath(self.pg1._remote_hosts[0].ip6,
- self.pg1.sw_if_index,
- proto=DpoProto.DPO_PROTO_IP6)],
- is_ip6=1)
+ self.pg1.sw_if_index)])
route_3.add_vpp_config()
self.packets.append(
route_9001 = VppIpRoute(self, "9000::", 64,
[VppRoutePath(self.pg1._remote_hosts[0].ip6,
- self.pg1.sw_if_index,
- proto=DpoProto.DPO_PROTO_IP6)],
- is_ip6=1)
+ self.pg1.sw_if_index)])
route_9001.add_vpp_config()
self.packets.append(
route_8000 = VppIpRoute(self, "8000::", 64,
[VppRoutePath(self.pg0.remote_ip6,
- self.pg0.sw_if_index,
- proto=DpoProto.DPO_PROTO_IP6)],
- is_ip6=1)
+ self.pg0.sw_if_index)])
route_8000.add_vpp_config()
route_8001 = VppIpRoute(self, "8001::", 64,
- [VppRoutePath(self.p2p_sub_ifs[0].remote_ip6,
- self.p2p_sub_ifs[0].sw_if_index,
- proto=DpoProto.DPO_PROTO_IP6)],
- is_ip6=1)
+ [VppRoutePath(
+ self.p2p_sub_ifs[0].remote_ip6,
+ self.p2p_sub_ifs[0].sw_if_index)])
route_8001.add_vpp_config()
route_8002 = VppIpRoute(self, "8002::", 64,
- [VppRoutePath(self.p2p_sub_ifs[1].remote_ip6,
- self.p2p_sub_ifs[1].sw_if_index,
- proto=DpoProto.DPO_PROTO_IP6)],
- is_ip6=1)
+ [VppRoutePath(
+ self.p2p_sub_ifs[1].remote_ip6,
+ self.p2p_sub_ifs[1].sw_if_index)])
route_8002.add_vpp_config()
for i in range(0, 3):
pkt_size = random.choice(self.pg_if_packet_sizes)
p = Ether(src=src_mac, dst=dst_mac)
p /= IP(src=src_ip, dst=dst_ip)
- p /= (UDP(sport=1234, dport=4321) / Raw('\xa5' * 20))
+ p /= (UDP(sport=1234, dport=4321) / Raw(b'\xa5' * 20))
self.extend_packet(p, pkt_size)
return p