From 31bf8417dc043776e6299e18f58550b6370583ff Mon Sep 17 00:00:00 2001 From: Deepak S Date: Sat, 12 Aug 2017 14:15:05 -0700 Subject: Support traffic generator for testing more than 10 ports Change-Id: I9c027af082cedbadc23b0151d403dab4e9756da4 Signed-off-by: Deepak S --- yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py | 4 ++-- yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py index 4abe06059..78d2bd8ba 100644 --- a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py +++ b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py @@ -63,8 +63,8 @@ class IxiaResourceHelper(ClientResourceHelper): def _build_ports(self): # self.generate_port_pairs(self.topology) - self.priv_ports = [int(x[0][-1]) for x in self.tg_port_pairs] - self.pub_ports = [int(x[1][-1]) for x in self.tg_port_pairs] + self.priv_ports = [int(x[0][2:]) for x in self.tg_port_pairs] + self.pub_ports = [int(x[1][2:]) for x in self.tg_port_pairs] self.my_ports = list(set(self.priv_ports).union(set(self.pub_ports))) def get_stats(self, *args, **kwargs): diff --git a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py index 548060849..d94a9a6e6 100644 --- a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py +++ b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py @@ -52,8 +52,8 @@ class TrexRfcResourceHelper(TrexResourceHelper): def _build_ports(self): self.tg_port_pairs, self.networks = MultiPortConfig.get_port_pairs( self.vnfd_helper.interfaces) - self.priv_ports = [int(x[0][-1]) for x in self.tg_port_pairs] - self.pub_ports = [int(x[1][-1]) for x in self.tg_port_pairs] + self.priv_ports = [int(x[0][2:]) for x in self.tg_port_pairs] + self.pub_ports = [int(x[1][2:]) for x in self.tg_port_pairs] self.my_ports = list(set(chain(self.priv_ports, self.pub_ports))) def _run_traffic_once(self, traffic_profile): -- cgit 1.2.3-korg