summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfmenguy <francoisregis.menguy@orange.com>2021-04-28 09:43:58 +0200
committerfmenguy <francoisregis.menguy@orange.com>2021-04-28 09:49:53 +0200
commitffa058dfad5d98c6af50126748cd5798ed7b3d94 (patch)
treecc5637d0b52a086937e0eaeada873d7f0dee0968
parente4f42c701172b6b27dea2126e095e2526bcdb365 (diff)
NFVBENCH-206 Fix TRex patches remaining code
Change-Id: Ifebb89d9d0aa2a21257c8e925cd51faa07b88353 Signed-off-by: fmenguy <francoisregis.menguy@orange.com>
-rw-r--r--nfvbench/traffic_server.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/nfvbench/traffic_server.py b/nfvbench/traffic_server.py
index 629cb3d..53f4f39 100644
--- a/nfvbench/traffic_server.py
+++ b/nfvbench/traffic_server.py
@@ -34,27 +34,12 @@ class TRexTrafficServer(TrafficServer):
assert len(contents) == 1
self.trex_dir = os.path.join(trex_base_dir, contents[0])
- def __apply_trex_patches(self):
- parent_dir = os.path.dirname(os.path.realpath(__file__))
- patches_dir = os.path.join(parent_dir, "trex_patches")
- patches = os.listdir(patches_dir)
- for patch in patches:
- patch = os.path.join(patches_dir, patch)
- command = (
- "patch --directory=" + self.trex_dir + " --strip=0"
- " --forward --no-backup-if-mismatch --reject-file=-"
- " --force --input=" + patch + " >&-")
- os.system(command)
-
def run_server(self, generator_config, filename='/etc/trex_cfg.yaml'):
"""Run TRex server for specified traffic profile.
:param traffic_profile: traffic profile object based on config file
:param filename: path where to save TRex config file
"""
- # in order to allow for customized behaviors, let's apply some patches
- # this scheme keeps acceptable since we have only simple modifications
- self.__apply_trex_patches()
cfg = self.__save_config(generator_config, filename)
cores = generator_config.cores
vtep_vlan = generator_config.gen_config.get('vtep_vlan')