def add_access_list(self, loadbalancer, access_list):
        """
        Adds the access list provided to the load balancer.

        The 'access_list' should be a list of dicts in the following format:

            [{"address": "192.0.43.10", "type": "DENY"},
             {"address": "192.0.43.11", "type": "ALLOW"},
             ...
             {"address": "192.0.43.99", "type": "DENY"},
            ]

        If no access list exists, it is created. If an access list
        already exists, it is updated with the provided list.
        """
        req_body = {"accessList": access_list}
        uri = "/loadbalancers/%s/accesslist" % utils.get_id(loadbalancer)
        resp, body = self.api.method_post(uri, body=req_body)
        return body
dataset/ETHPy150Open rackspace/pyrax/pyrax/cloudloadbalancers.py/CloudLoadBalancerManager.add_access_list/original