aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml2
-rw-r--r--samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml5
-rw-r--r--tests/unit/network_services/libs/ixia_libs/test_IxNet.py2
-rw-r--r--yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py4
-rw-r--r--yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py17
5 files changed, 18 insertions, 12 deletions
diff --git a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml
index 746023de2..71a803d32 100644
--- a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml
+++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml
@@ -41,4 +41,4 @@ context:
type: Node
name: yardstick
nfvi_type: baremetal
- file: /etc/yardstick/nodes/pod.yaml
+ file: /etc/yardstick/nodes/pod_ixia.yaml
diff --git a/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml b/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml
index ccd40c33b..6b213a54a 100644
--- a/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml
+++ b/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml
@@ -53,6 +53,8 @@ private_1:
outer_l4:
srcport: "{{get(flow, 'flow.srcport_range', '1234') }}"
dstport: "{{get(flow, 'flow.dstport_range', '2001') }}"
+ count: "{{get(flow, 'flow.count', '1') }}"
+
public_1:
ipv4:
outer_l2:
@@ -75,6 +77,7 @@ public_1:
outer_l4:
srcport: "{{get(flow, 'flow.srcport_range', '1234') }}"
dstport: "{{get(flow, 'flow.dstport_range', '2001') }}"
+ count: "{{get(flow, 'flow.count', '1') }}"
private_2:
ipv4:
outer_l2:
@@ -97,6 +100,7 @@ private_2:
outer_l4:
srcport: "{{get(flow, 'flow.srcport_range', '1234') }}"
dstport: "{{get(flow, 'flow.dstport_range', '2001') }}"
+ count: "{{get(flow, 'flow.count', '1') }}"
public_2:
ipv4:
outer_l2:
@@ -119,3 +123,4 @@ public_2:
outer_l4:
srcport: "{{get(flow, 'flow.srcport_range', '1234') }}"
dstport: "{{get(flow, 'flow.dstport_range', '2001') }}"
+ count: "{{get(flow, 'flow.count', '1') }}"
diff --git a/tests/unit/network_services/libs/ixia_libs/test_IxNet.py b/tests/unit/network_services/libs/ixia_libs/test_IxNet.py
index 9114b5163..87d76f829 100644
--- a/tests/unit/network_services/libs/ixia_libs/test_IxNet.py
+++ b/tests/unit/network_services/libs/ixia_libs/test_IxNet.py
@@ -263,7 +263,7 @@ class TestIxNextgen(unittest.TestCase):
result = ixnet_gen.ix_get_statistics()
self.assertIsNotNone(result)
- self.assertEqual(ixnet.getList.call_count, 2)
+ self.assertEqual(ixnet.getList.call_count, 1)
self.assertEqual(ixnet.execute.call_count, 20)
def test_find_view_obj_no_where(self):
diff --git a/yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py b/yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py
index 815a2a21c..d36ec2edd 100644
--- a/yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py
+++ b/yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py
@@ -322,13 +322,13 @@ class IxNextgen(object):
def ix_get_statistics(self):
views = self.ixnet.getList('/statistics', 'view')
+ stats = {}
view_obj = self.find_view_obj("Traffic Item Statistics", views)
stats = self.build_stats_map(view_obj, self.STATS_NAME_MAP)
- self.find_view_obj("Port Statistics", views)
+ view_obj = self.find_view_obj("Port Statistics", views)
ports_stats = self.build_stats_map(view_obj, self.PORT_STATS_NAME_MAP)
- views = self.ixnet.getList('/statistics', 'view')
view_obj = self.find_view_obj("Flow Statistics", views)
stats["latency"] = self.build_stats_map(view_obj, self.LATENCY_NAME_MAP)
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 07bbdae95..3d3fe73ea 100644
--- a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py
+++ b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py
@@ -23,11 +23,6 @@ from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNFTraff
from yardstick.network_services.vnf_generic.vnf.sample_vnf import ClientResourceHelper
from yardstick.network_services.vnf_generic.vnf.sample_vnf import Rfc2544ResourceHelper
-try:
- from IxNet import IxNextgen
-except ImportError:
- IxNextgen = ErrorClass
-
LOG = logging.getLogger(__name__)
WAIT_AFTER_CFG_LOAD = 10
@@ -36,6 +31,11 @@ IXIA_LIB = os.path.dirname(os.path.realpath(__file__))
IXNET_LIB = os.path.join(IXIA_LIB, "../../libs/ixia_libs/IxNet")
sys.path.append(IXNET_LIB)
+try:
+ from IxNet import IxNextgen
+except ImportError:
+ IxNextgen = ErrorClass
+
class IxiaRfc2544Helper(Rfc2544ResourceHelper):
@@ -59,7 +59,7 @@ class IxiaResourceHelper(ClientResourceHelper):
self.pub_ports = None
def _connect(self, client=None):
- self.client.connect(self.vnfd_helper)
+ self.client._connect(self.vnfd_helper)
def _build_ports(self):
# self.generate_port_pairs(self.topology)
@@ -72,7 +72,7 @@ class IxiaResourceHelper(ClientResourceHelper):
def stop_collect(self):
self._terminated.value = 0
- if self.client:
+ if self.client and self.client.ixnet:
self.client.ix_stop_traffic()
def generate_samples(self, key=None, default=None):
@@ -109,7 +109,7 @@ class IxiaResourceHelper(ClientResourceHelper):
self.client.ix_assign_ports()
mac = {}
- for index, interface in enumerate(self.vnfd_helper.interfaces):
+ for index, interface in enumerate(self.vnfd_helper.interfaces, 1):
virt_intf = interface["virtual-interface"]
mac.update({
"src_mac_{}".format(index): virt_intf["local_mac"],
@@ -146,6 +146,7 @@ class IxiaTrafficGen(SampleVNFTrafficGen):
super(IxiaTrafficGen, self).__init__(name, vnfd, setup_env_helper_type,
resource_helper_type)
+ self.done = True
self._ixia_traffic_gen = None
self.ixia_file_name = ''
self.tg_port_pairs = []