summaryrefslogtreecommitdiffstats
path: root/src/ovs
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2016-08-26 15:39:29 +0100
committerMartin Klozik <martinx.klozik@intel.com>2016-09-15 14:37:44 +0100
commit9b1af783ec53050129239102355e1a5c3ceb1d97 (patch)
tree4a994af7b986af3c72c21c0ac87f398b42a44b74 /src/ovs
parentacdb444a54124834acdde45107062eaf1452c119 (diff)
paths: Support binary packages
Currently VSPERF supports OVS, DPDK and QEMU built from the source code only. In some cases it is required to support installation of these tools from binary packages available for given linux distribution. Thus VSPERF configuration and code was modified to suport both source and binary versions of tools. This can be configured perf tool, so various combinations of source and binary version are supported. Together with new configuration also a handling of kernel modules was modified to automatically detect and load module dependencies. JIRA: VSPERF-340 JIRA: VSPERF-339 Change-Id: I855cb438cbd8998bdc499613ea5e7de2526299d7 Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Christian Trautman <ctrautma@redhat.com> Reviewed-by: Bill Michalowski <bmichalo@redhat.com> Reviewed-by: Otto Sabart <osabart@redhat.com>
Diffstat (limited to 'src/ovs')
-rw-r--r--src/ovs/dpctl.py5
-rw-r--r--src/ovs/ofctl.py17
2 files changed, 6 insertions, 16 deletions
diff --git a/src/ovs/dpctl.py b/src/ovs/dpctl.py
index 8ecac6dc..44a4ec9b 100644
--- a/src/ovs/dpctl.py
+++ b/src/ovs/dpctl.py
@@ -23,9 +23,6 @@ import string
from tools import tasks
from conf import settings
-_OVS_DPCTL_BIN = os.path.join(settings.getValue('OVS_DIR'), 'utilities',
- 'ovs-dpctl')
-
_OVS_LOCAL_DATAPATH = 'ovs-system'
class DPCtl(object):
@@ -51,7 +48,7 @@ class DPCtl(object):
:return: None
"""
- cmd = ['sudo', _OVS_DPCTL_BIN,
+ cmd = ['sudo', settings.getValue('TOOLS')['ovs-dpctl'],
'--timeout',
str(self.timeout)] + args
return tasks.run_task(
diff --git a/src/ovs/ofctl.py b/src/ovs/ofctl.py
index a75d0be2..27349a92 100644
--- a/src/ovs/ofctl.py
+++ b/src/ovs/ofctl.py
@@ -28,13 +28,6 @@ import re
from tools import tasks
from conf import settings
-_OVS_VSCTL_BIN = os.path.join(settings.getValue('OVS_DIR'), 'utilities',
- 'ovs-vsctl')
-_OVS_OFCTL_BIN = os.path.join(settings.getValue('OVS_DIR'), 'utilities',
- 'ovs-ofctl')
-_OVS_APPCTL_BIN = os.path.join(settings.getValue('OVS_DIR'), 'utilities',
- 'ovs-appctl')
-
_OVS_BRIDGE_NAME = settings.getValue('VSWITCH_BRIDGE_NAME')
_CACHE_FILE_NAME = '/tmp/vsperf_flows_cache'
@@ -66,9 +59,9 @@ class OFBase(object):
:return: None
"""
if self.timeout == -1:
- cmd = ['sudo', _OVS_VSCTL_BIN, '--no-wait'] + args
+ cmd = ['sudo', settings.getValue('TOOLS')['ovs-vsctl'], '--no-wait'] + args
else:
- cmd = ['sudo', _OVS_VSCTL_BIN, '--timeout', str(self.timeout)] + args
+ cmd = ['sudo', settings.getValue('TOOLS')['ovs-vsctl'], '--timeout', str(self.timeout)] + args
return tasks.run_task(
cmd, self.logger, 'Running ovs-vsctl...', check_error)
@@ -81,7 +74,7 @@ class OFBase(object):
:return: None
"""
- cmd = ['sudo', _OVS_APPCTL_BIN,
+ cmd = ['sudo', settings.getValue('TOOLS')['ovs-appctl'],
'--timeout',
str(self.timeout)] + args
return tasks.run_task(
@@ -184,8 +177,8 @@ class OFBridge(OFBase):
:return: None
"""
tmp_timeout = self.timeout if timeout == None else timeout
- cmd = ['sudo', _OVS_OFCTL_BIN, '-O', 'OpenFlow13', '--timeout',
- str(tmp_timeout)] + args
+ cmd = ['sudo', settings.getValue('TOOLS')['ovs-ofctl'], '-O',
+ 'OpenFlow13', '--timeout', str(tmp_timeout)] + args
return tasks.run_task(
cmd, self.logger, 'Running ovs-ofctl...', check_error)