aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2016-10-04 06:52:30 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-10-04 06:52:30 +0000
commitfc8f6e0cc0d688eda3f36ff848cda7a33d6607e4 (patch)
tree0efa8eb49bc7c670af2bcd6c47566aea62f812cf /src
parente2e6c855327ec2d0a21c4cf172c92d82948ed5d4 (diff)
parentaf5315b3e713d65256aea791da89dd74c90e4072 (diff)
Merge "cmd_timeout: Add ovs command timeout configuration option"
Diffstat (limited to 'src')
-rw-r--r--src/ovs/ofctl.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ovs/ofctl.py b/src/ovs/ofctl.py
index 27349a92..e9b86127 100644
--- a/src/ovs/ofctl.py
+++ b/src/ovs/ofctl.py
@@ -29,13 +29,14 @@ from tools import tasks
from conf import settings
_OVS_BRIDGE_NAME = settings.getValue('VSWITCH_BRIDGE_NAME')
+_OVS_CMD_TIMEOUT = settings.getValue('OVS_CMD_TIMEOUT')
_CACHE_FILE_NAME = '/tmp/vsperf_flows_cache'
class OFBase(object):
"""Add/remove/show datapaths using ``ovs-ofctl``.
"""
- def __init__(self, timeout=10):
+ def __init__(self, timeout=_OVS_CMD_TIMEOUT):
"""Initialise logger.
:param timeout: Timeout to be used for each command
@@ -138,7 +139,7 @@ class OFBase(object):
class OFBridge(OFBase):
"""Control a bridge instance using ``ovs-vsctl`` and ``ovs-ofctl``.
"""
- def __init__(self, br_name=_OVS_BRIDGE_NAME, timeout=10):
+ def __init__(self, br_name=_OVS_BRIDGE_NAME, timeout=_OVS_CMD_TIMEOUT):
"""Initialise bridge.
:param br_name: Bridge name