aboutsummaryrefslogtreecommitdiffstats
path: root/src/ovs/ofctl.py
diff options
context:
space:
mode:
authorDino Simeon Madarang <dino.simeonx.madarang@intel.com>2015-10-15 16:01:14 +0100
committerMaryam Tahhan <maryam.tahhan@intel.com>2015-10-28 10:19:05 +0000
commit67b0760d2b123ee834f8552057aed0e68a282257 (patch)
tree861923d1f30559d302988fb28d4442a0b8600860 /src/ovs/ofctl.py
parentf1227a6fc81552c59fa56fe63db872871982adcc (diff)
Stop OVS from generating misleading add-br errors
Create bridge and set datapath_type in 1 transaction to prevent OVS from generating misleading error messages which jenkins considers as build errors. Update vswitch interface to include optional parameters. Change-Id: I668f474ea909b284f3726807aab42d52ae2fb504 JIRA: VSPERF-122 Signed-off-by: Dino Simeon Madarang <dino.simeonx.madarang@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Billy O Mahony <billy.o.mahony@intel.com> Reviewed-by: Gene Snider <eugene.snider@huawei.com> Reviewed-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Radek Zetik <radekx.zetik@intel.com>
Diffstat (limited to 'src/ovs/ofctl.py')
-rw-r--r--src/ovs/ofctl.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/ovs/ofctl.py b/src/ovs/ofctl.py
index 7cbdfe2c..2aae1ec8 100644
--- a/src/ovs/ofctl.py
+++ b/src/ovs/ofctl.py
@@ -65,15 +65,18 @@ class OFBase(object):
# datapath management
- def add_br(self, br_name=_OVS_BRIDGE_NAME):
+ def add_br(self, br_name=_OVS_BRIDGE_NAME, params=None):
"""Add datapath.
:param br_name: Name of bridge
:return: Instance of :class OFBridge:
"""
+ if params is None:
+ params = []
+
self.logger.debug('add bridge')
- self.run_vsctl(['add-br', br_name])
+ self.run_vsctl(['add-br', br_name]+params)
return OFBridge(br_name, self.timeout)
@@ -133,11 +136,14 @@ class OFBridge(OFBase):
return tasks.run_task(
cmd, self.logger, 'Running ovs-ofctl...', check_error)
- def create(self):
+ def create(self, params=None):
"""Create bridge.
"""
+ if params is None:
+ params = []
+
self.logger.debug('create bridge')
- self.add_br(self.br_name)
+ self.add_br(self.br_name, params=params)
def destroy(self):
"""Destroy bridge.