diff options
author | Matej Klotton <mklotton@cisco.com> | 2016-12-09 15:05:46 +0100 |
---|---|---|
committer | Matej Klotton <mklotton@cisco.com> | 2016-12-13 07:06:56 +0100 |
commit | deb698447172d8cae94df9871bb32a9d21705dbb (patch) | |
tree | abe447354e185eb8f81cf53827340b26752dcce3 /test/test_vxlan.py | |
parent | abd98b2c88ec127c38ff804a0c2f2a6d6f018830 (diff) |
make test: Use VXLAN built in scapy 2.3.3
- fix documentation issues.
- fix mpls test.
Change-Id: Ieef6b4b5e4aca99e89bd03e45a991be89d42adba
Signed-off-by: Matej Klotton <mklotton@cisco.com>
Diffstat (limited to 'test/test_vxlan.py')
-rw-r--r-- | test/test_vxlan.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/test_vxlan.py b/test/test_vxlan.py index ac435852b46..1978cf0c018 100644 --- a/test/test_vxlan.py +++ b/test/test_vxlan.py @@ -6,7 +6,7 @@ from template_bd import BridgeDomain from scapy.layers.l2 import Ether from scapy.layers.inet import IP, UDP -from scapy_handlers.vxlan import VXLAN +from scapy.layers.vxlan import VXLAN class TestVxlan(BridgeDomain, VppTestCase): @@ -24,13 +24,15 @@ class TestVxlan(BridgeDomain, VppTestCase): return (Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src=self.pg0.remote_ip4, dst=self.pg0.local_ip4) / UDP(sport=self.dport, dport=self.dport, chksum=0) / - VXLAN(vni=self.vni) / + VXLAN(vni=self.vni, flags=self.flags) / pkt) def decapsulate(self, pkt): """ Decapsulate the original payload frame by removing VXLAN header """ + # check if is set I flag + self.assertEqual(pkt[VXLAN].flags, int('0x8', 16)) return pkt[VXLAN].payload # Method for checking VXLAN encapsulation. @@ -62,6 +64,7 @@ class TestVxlan(BridgeDomain, VppTestCase): try: cls.dport = 4789 + cls.flags = 0x8 cls.vni = 1 # Create 2 pg interfaces. @@ -95,5 +98,6 @@ class TestVxlan(BridgeDomain, VppTestCase): if not self.vpp_dead: self.logger.info(self.vapi.cli("show bridge-domain 1 detail")) + if __name__ == '__main__': unittest.main(testRunner=VppTestRunner) |