aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/libs/ixia_libs
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/network_services/libs/ixia_libs')
-rw-r--r--yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py b/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
index 4db7ab44f..1428c38f4 100644
--- a/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
+++ b/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
@@ -225,11 +225,16 @@ class IxNextgen(object): # pragma: no cover
zip(self._cfg['cards'], self._cfg['ports'])]
log.info('Create and assign vports: %s', ports)
- for port in ports:
- vport = self.ixnet.add(self.ixnet.getRoot(), 'vport')
- self.ixnet.commit()
- self.ixnet.execute('assignPorts', [port], [], [vport], True)
+
+ vports = []
+ for _ in ports:
+ vports.append(self.ixnet.add(self.ixnet.getRoot(), 'vport'))
self.ixnet.commit()
+
+ self.ixnet.execute('assignPorts', ports, [], vports, True)
+ self.ixnet.commit()
+
+ for vport in vports:
if self.ixnet.getAttribute(vport, '-state') != 'up':
log.warning('Port %s is down', vport)