lrvan commented on a change in pull request #1349: Implemented create methods 
for AWS ALB driver
URL: https://github.com/apache/libcloud/pull/1349#discussion_r322163839
 
 

 ##########
 File path: libcloud/loadbalancer/drivers/alb.py
 ##########
 @@ -60,26 +211,496 @@ def __init__(self, access_id, secret, region, 
token=None):
         )
 
     def list_protocols(self):
+        """
+        Return list of protocols supported by driver
+
+        :rtype: ``list`` of ``strings``
+        """
         return ['http', 'https']
 
     def list_balancers(self):
+        """
+        List all load balancers
+
+        :rtype: ``list`` of :class:`LoadBalancer`
+        """
         params = {'Action': 'DescribeLoadBalancers'}
         data = self.connection.request(ROOT, params=params).object
         return self._to_balancers(data)
 
-    def balancer_list_members(self, balancer):
-        return balancer._members
-
     def get_balancer(self, balancer_id):
+        """
+        Get a load balancer object by ARN
+
+        :param  balancer_id: ARN of load balancer you wish to fetch.
+        :type  balancer_id: ``str``
+
+        :rtype: :class:`LoadBalancer`
+        """
         params = {
             'Action': 'DescribeLoadBalancers',
-            'LoadBalancerNames.member.1': balancer_id
+            'LoadBalancerArns.member.1': balancer_id
         }
         data = self.connection.request(ROOT, params=params).object
         return self._to_balancers(data)[0]
 
-    def ex_balancer_list_listeners(self, balancer):
-        return balancer.extra.get('listeners', [])
+    def create_balancer(self, name, port, protocol, algorithm, members,
+                        ex_scheme="", ex_security_groups=[], ex_subnets=[],
 
 Review comment:
   good catch :) I've corrected it in the last commit. Thanks for pointing me 
out to this nuance.
   
   Regarding the docs - let's publish them as a separate change (not sure if I 
can find time for them asap). So lets incorporate this particular functionality 
into dev (since it already has some documentation in doc strings) in order to 
make it available for the community.
   
   I've sent signed ICLA just today.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to