From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C4C88A046B for ; Tue, 23 Jul 2019 10:13:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC6111BFC5; Tue, 23 Jul 2019 10:13:30 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 4A0691BFAD for ; Tue, 23 Jul 2019 10:13:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jul 2019 01:13:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,298,1559545200"; d="scan'208";a="320931394" Received: from ubuntu.sh.intel.com ([10.67.119.68]) by orsmga004.jf.intel.com with ESMTP; 23 Jul 2019 01:13:27 -0700 From: lihong To: dts@dpdk.org Cc: lihong Date: Tue, 23 Jul 2019 08:50:52 +0800 Message-Id: <1563843053-30184-2-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1563843053-30184-1-git-send-email-lihongx.ma@intel.com> References: <1563843053-30184-1-git-send-email-lihongx.ma@intel.com> Subject: [dts] [PATCH V1 2/3][scapy vxlan] framework: update vxlan name from Vxlan to VXLAN X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" depend on dep/vxlan.py, update Vxlan to VXLAN Signed-off-by: lihong --- framework/etgen.py | 12 ++++++------ framework/packet.py | 4 ++-- framework/pktgen_ixia.py | 14 +++++++------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/framework/etgen.py b/framework/etgen.py index cd6829d..212b9c2 100644 --- a/framework/etgen.py +++ b/framework/etgen.py @@ -238,19 +238,19 @@ class IxiaPacketGenerator(SSHConnection): def parse_pcap(self, fpcap): dump_str1 = "cmds = []\n" dump_str2 = "for i in rdpcap('%s', -1):\n" % fpcap - dump_str3 = " if 'Vxlan' in i.command():\n" + \ + dump_str3 = " if 'VXLAN' in i.command():\n" + \ " vxlan_str = ''\n" + \ - " l = len(i[Vxlan])\n" + \ - " vxlan = str(i[Vxlan])\n" + \ + " l = len(i[VXLAN])\n" + \ + " vxlan = str(i[VXLAN])\n" + \ " first = True\n" + \ " for j in range(l):\n" + \ " if first:\n" + \ - " vxlan_str += \"Vxlan(hexval='%02X\" %ord(vxlan[j])\n" + \ + " vxlan_str += \"VXLAN(hexval='%02X\" %ord(vxlan[j])\n" + \ " first = False\n" + \ " else:\n" + \ " vxlan_str += \" %02X\" %ord(vxlan[j])\n" + \ " vxlan_str += \"\')\"\n" + \ - " command = re.sub(r\"Vxlan(.*)\", vxlan_str, i.command())\n" + \ + " command = re.sub(r\"VXLAN(.*)\", vxlan_str, i.command())\n" + \ " else:\n" + \ " command = i.command()\n" + \ " cmds.append(command)\n" + \ @@ -375,7 +375,7 @@ class IxiaPacketGenerator(SSHConnection): match = pat.match(header) params = eval('dict(%s)' % match.group(2)) method_name = match.group(1) - if method_name == 'Vxlan': + if method_name == 'VXLAN': method = getattr(self, method_name.lower()) method(txport, **params) break diff --git a/framework/packet.py b/framework/packet.py index d39479f..502d85c 100755 --- a/framework/packet.py +++ b/framework/packet.py @@ -65,7 +65,7 @@ DTS_PATH = exec_file.replace('/framework/packet.py', '') DEP_FOLDER = DTS_PATH + '/dep' sys.path.append(DEP_FOLDER) -from vxlan import Vxlan +from vxlan import VXLAN from nvgre import NVGRE, IPPROTO_NVGRE from lldp import LLDP, LLDPManagementAddress from Dot1BR import Dot1BR @@ -123,7 +123,7 @@ class scapy(object): 'icmp': ICMP(), 'gre': GRE(), 'raw': Raw(), - 'vxlan': Vxlan(), + 'vxlan': VXLAN(), 'inner_mac': Ether(), 'inner_vlan': Dot1Q(), diff --git a/framework/pktgen_ixia.py b/framework/pktgen_ixia.py index 80481fe..2895c6b 100644 --- a/framework/pktgen_ixia.py +++ b/framework/pktgen_ixia.py @@ -141,19 +141,19 @@ class Ixia(SSHConnection): dump_str1 = "cmds = []\n" dump_str2 = "for i in rdpcap('%s', -1):\n" % pcap_path - dump_str3 = " if 'Vxlan' in i.command():\n" + \ + dump_str3 = " if 'VXLAN' in i.command():\n" + \ " vxlan_str = ''\n" + \ - " l = len(i[Vxlan])\n" + \ - " vxlan = str(i[Vxlan])\n" + \ + " l = len(i[VXLAN])\n" + \ + " vxlan = str(i[VXLAN])\n" + \ " first = True\n" + \ " for j in range(l):\n" + \ " if first:\n" + \ - " vxlan_str += \"Vxlan(hexval='%02X\" %ord(vxlan[j])\n" + \ + " vxlan_str += \"VXLAN(hexval='%02X\" %ord(vxlan[j])\n" + \ " first = False\n" + \ " else:\n" + \ " vxlan_str += \" %02X\" %ord(vxlan[j])\n" + \ " vxlan_str += \"\')\"\n" + \ - " command = re.sub(r\"Vxlan(.*)\", vxlan_str, i.command())\n" + \ + " command = re.sub(r\"VXLAN(.*)\", vxlan_str, i.command())\n" + \ " else:\n" + \ " command = i.command()\n" + \ " cmds.append(command)\n" + \ @@ -502,7 +502,7 @@ class Ixia(SSHConnection): match = pat.match(header) params = eval('dict(%s)' % match.group(2)) method_name = match.group(1) - if method_name == 'Vxlan': + if method_name == 'VXLAN': method = getattr(self, method_name.lower()) method(ixia_port, vm.get('fields_config', {}), **params) break @@ -1747,4 +1747,4 @@ class IxiaPacketGenerator(PacketGenerator): ''' close ixia session ''' if self._conn is not None: self._disconnect() - return \ No newline at end of file + return -- 2.7.4