summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2016-11-14 09:49:09 +0100
committerKlement Sekera <ksekera@cisco.com>2016-11-14 09:49:09 +0100
commit74dcdbfb2cfc500b59927311042f265fae278bd4 (patch)
treeeb9b9953e5c3cfcf1c94159d07ea1fc08a37e660
parent558d5ebbb4c93286f119658bd7dcbc9642c6974b (diff)
make test: improve naming of temporary pcap files
Change-Id: I0f4e83aab8bec80562bd90e8035f602ce903cd3e Signed-off-by: Klement Sekera <ksekera@cisco.com>
-rw-r--r--test/vpp_pg_interface.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/vpp_pg_interface.py b/test/vpp_pg_interface.py
index 81c7192e07e..381dc1dad21 100644
--- a/test/vpp_pg_interface.py
+++ b/test/vpp_pg_interface.py
@@ -5,7 +5,8 @@ from scapy.utils import wrpcap, rdpcap
from vpp_interface import VppInterface
from scapy.layers.l2 import Ether, ARP
-from scapy.layers.inet6 import IPv6, ICMPv6ND_NS, ICMPv6ND_NA, ICMPv6NDOptSrcLLAddr, ICMPv6NDOptDstLLAddr
+from scapy.layers.inet6 import IPv6, ICMPv6ND_NS, ICMPv6ND_NA, \
+ ICMPv6NDOptSrcLLAddr, ICMPv6NDOptDstLLAddr
class VppPGInterface(VppInterface):
@@ -60,9 +61,9 @@ class VppPGInterface(VppInterface):
def post_init_setup(self):
""" Perform post-init setup for super class and add our own setup """
super(VppPGInterface, self).post_init_setup()
- self._out_file = "pg%u_out.pcap" % self.sw_if_index
+ self._out_file = "pg%u_out.pcap" % self.pg_index
self._out_path = self.test.tempdir + "/" + self._out_file
- self._in_file = "pg%u_in.pcap" % self.sw_if_index
+ self._in_file = "pg%u_in.pcap" % self.pg_index
self._in_path = self.test.tempdir + "/" + self._in_file
self._capture_cli = "packet-generator capture pg%u pcap %s" % (
self.pg_index, self.out_path)
@@ -143,9 +144,9 @@ class VppPGInterface(VppInterface):
def create_ndp_req(self):
"""Create NDP - NS applicable for this interface"""
return (Ether(dst="ff:ff:ff:ff:ff:ff", src=self.remote_mac) /
- IPv6(src=self.remote_ip6, dst=self.local_ip6) /
- ICMPv6ND_NS(tgt=self.local_ip6) /
- ICMPv6NDOptSrcLLAddr(lladdr=self.remote_mac))
+ IPv6(src=self.remote_ip6, dst=self.local_ip6) /
+ ICMPv6ND_NS(tgt=self.local_ip6) /
+ ICMPv6NDOptSrcLLAddr(lladdr=self.remote_mac))
def resolve_arp(self, pg_interface=None):
"""Resolve ARP using provided packet-generator interface