libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1102982 - /incubator/libcloud/trunk/libcloud/loadbalancer/base.py
Date Sat, 14 May 2011 09:24:30 GMT
Author: tomaz
Date: Sat May 14 09:24:29 2011
New Revision: 1102982

URL: http://svn.apache.org/viewvc?rev=1102982&view=rev
Log:
Add LBAlgorithm class and set DEFAULT_ALGORITHM variable to ROUND_ROBIN.

Modified:
    incubator/libcloud/trunk/libcloud/loadbalancer/base.py

Modified: incubator/libcloud/trunk/libcloud/loadbalancer/base.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/loadbalancer/base.py?rev=1102982&r1=1102981&r2=1102982&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/loadbalancer/base.py (original)
+++ incubator/libcloud/trunk/libcloud/loadbalancer/base.py Sat May 14 09:24:29 2011
@@ -19,6 +19,7 @@ __all__ = [
         "LBNode",
         "LB",
         "LBDriver",
+        "LBAlgorithm"
         ]
 
 class LBNode(object):
@@ -32,6 +33,12 @@ class LBNode(object):
         return ('<LBNode: id=%s, address=%s:%s>' % (self.id,
             self.ip, self.port))
 
+class LBAlgorithm(object):
+    RANDOM = 0
+    ROUND_ROBIN = 1
+    LEAST_CONNECTIONS = 2
+
+DEFAULT_ALGORITHM = LBAlgorithm.ROUND_ROBIN
 
 class LB(object):
     """



Mime
View raw message