Thu, Apr 02, 2020 at 05:24:34PM CEST, jtluka(a)redhat.com wrote:
This method transforms dictionary items into key=value pairs
that are used in ovs syntax.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
---
lnst/Devices/OvsBridgeDevice.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lnst/Devices/OvsBridgeDevice.py b/lnst/Devices/OvsBridgeDevice.py
index 7e5bf0c4..044b5411 100644
--- a/lnst/Devices/OvsBridgeDevice.py
+++ b/lnst/Devices/OvsBridgeDevice.py
@@ -35,6 +35,13 @@ class OvsBridgeDevice(SoftDevice):
def destroy(self):
exec_cmd("ovs-vsctl del-br %s" % self.name)
+ def _dict_to_keyvalues(self, options):
+ opts = ""
+ for opt_name, opt_value in options.items():
+ opts += " %s=%s" % (opt_name, opt_value)
+
+ return opts
+
def port_add(self, dev, **kwargs):
options = ""
for opt_name, opt_value in kwargs.items():
--
2.21.1
I pushed the series.
-Jan