aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py
diff options
context:
space:
mode:
authorMaciej Skrocki <maciej.skrocki@intel.com>2017-08-28 17:24:05 -0700
committerMaciej Skrocki <maciej.skrocki@intel.com>2017-08-31 17:26:59 -0700
commit378171687bda92d031437b0d8cc90968c1655b9d (patch)
treea7d1c948d5514e94ef66aa1dd6068c960fcfbd31 /yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py
parent57b17a2223d8751f2c5eae660b706e2fc736a47c (diff)
Added TC for vFW in heat context with ixia TG
- added common method to get relative paths - added 'Ixia' APP_NAME Change-Id: I7966798bab71af66d3efbeb1e13b07e8fbb41e88 Signed-off-by: Maciej Skrocki <maciej.skrocki@intel.com>
Diffstat (limited to 'yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py')
-rw-r--r--yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py11
1 files changed, 9 insertions, 2 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 78d2bd8ba..c758baa4c 100644
--- a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py
+++ b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py
@@ -22,6 +22,7 @@ from yardstick.common.utils import ErrorClass
from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNFTrafficGen
from yardstick.network_services.vnf_generic.vnf.sample_vnf import ClientResourceHelper
from yardstick.network_services.vnf_generic.vnf.sample_vnf import Rfc2544ResourceHelper
+from yardstick.benchmark.scenarios.networking.vnf_generic import find_relative_file
LOG = logging.getLogger(__name__)
@@ -102,7 +103,9 @@ class IxiaResourceHelper(ClientResourceHelper):
self._connect()
# we don't know client_file_name until runtime as instantiate
- client_file_name = self.scenario_helper.scenario_cfg['ixia_profile']
+ client_file_name = \
+ find_relative_file(self.scenario_helper.scenario_cfg['ixia_profile'],
+ self.scenario_helper.scenario_cfg["task_path"])
self.client.ix_load_config(client_file_name)
time.sleep(WAIT_AFTER_CFG_LOAD)
@@ -117,7 +120,9 @@ class IxiaResourceHelper(ClientResourceHelper):
})
samples = {}
- ixia_file = os.path.join(os.getcwd(), "ixia_traffic.cfg")
+
+ ixia_file = find_relative_file("ixia_traffic.cfg",
+ self.scenario_helper.scenario_cfg["task_path"])
# Generate ixia traffic config...
while not self._terminated.value:
traffic_profile.execute(self, self.client, mac, ixia_file)
@@ -140,6 +145,8 @@ class IxiaResourceHelper(ClientResourceHelper):
class IxiaTrafficGen(SampleVNFTrafficGen):
+ APP_NAME = 'Ixia'
+
def __init__(self, name, vnfd, setup_env_helper_type=None, resource_helper_type=None):
if resource_helper_type is None:
resource_helper_type = IxiaResourceHelper