On Tue, Aug 07, 2018 at 05:08:11PM +0530, [email protected] wrote:
> From: Numan Siddique <[email protected]>
> 
> Python IDL implementation doesn't have the support to connect to the
> cluster dbs. This patch adds this support. We are still missing the
> support in python idl class to connect to the cluster master. That
> support will be added in an upcoming patch.
> 
> This patch is similar to the commit 8cf6bbb184 which added multiple remote
> support in the C jsonrpc implementation.
> 
> Signed-off-by: Numan Siddique <[email protected]>

Thanks.

I couldn't resist folding in the following:

diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py
index d5bd21535863..03110a76f318 100644
--- a/python/ovs/db/idl.py
+++ b/python/ovs/db/idl.py
@@ -166,9 +166,8 @@ class Idl(object):
         # ["tcp:10.0.0.1:6641", "unix:/tmp/db.sock,t,s", tcp:10.0.0.2:6642"]
         remotes = []
         for r in remote.split(','):
-            r_length = len(remotes)
-            if r.find(":") == -1 and r_length:
-                remotes[r_length - 1] = remotes[r_length - 1] + "," + r
+            if remotes and r.find(":") == -1:
+                remotes[-1] += "," + r
             else:
                 remotes.append(r)
         return remotes
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to