-#!/usr/bin/env python
+#!/usr/bin/env python3
import unittest
import binascii
from scapy.layers.inet6 import IPv6, UDP, IPv6ExtHdrSegmentRouting
from scapy.layers.inet import IP, UDP
-from scapy.utils import inet_pton, inet_ntop
-
from util import ppp
def setUpClass(self):
super(TestSRv6, self).setUpClass()
+ @classmethod
+ def tearDownClass(cls):
+ super(TestSRv6, cls).tearDownClass()
+
def setUp(self):
""" Perform test setup before each test case.
"""
if any(ipv6):
self.logger.debug(self.vapi.cli("show ip6 neighbors"))
if any(ipv4):
- self.logger.debug(self.vapi.cli("show ip arp"))
+ self.logger.debug(self.vapi.cli("show ip4 neighbors"))
self.logger.debug(self.vapi.cli("show interface"))
self.logger.debug(self.vapi.cli("show hardware"))
route = VppIpRoute(self, self.sid_list[self.test_sid_index + 1], 128,
[VppRoutePath(self.pg0.remote_ip6,
self.pg0.sw_if_index,
- proto=DpoProto.DPO_PROTO_IP6)],
- is_ip6=1)
+ proto=DpoProto.DPO_PROTO_IP6)])
route.add_vpp_config()
# configure SRv6 localSID behavior
route = VppIpRoute(self, self.sid_list[self.test_sid_index + 1], 128,
[VppRoutePath(self.pg0.remote_ip6,
self.pg0.sw_if_index,
- proto=DpoProto.DPO_PROTO_IP6)],
- is_ip6=1)
+ proto=DpoProto.DPO_PROTO_IP6)])
route.add_vpp_config()
# configure SRv6 localSID behavior
route = VppIpRoute(self, self.sid_list[self.test_sid_index + 1], 128,
[VppRoutePath(self.pg0.remote_ip6,
self.pg0.sw_if_index,
- proto=DpoProto.DPO_PROTO_IP6)],
- is_ip6=1)
+ proto=DpoProto.DPO_PROTO_IP6)])
route.add_vpp_config()
# configure SRv6 localSID behavior
p = IPv6(src=srcaddr, dst=sidlist[segleft]) / \
IPv6ExtHdrSegmentRouting(addresses=sidlist,
- segleft=segleft, nh=59) / \
+ segleft=segleft, nh=143) / \
eth
return p