(self, request, tenant_id)
return json.dumps(response_data[0])
Creates a load balancer and adds it to the load balancer store.
        Returns the newly created load balancer with response code 202
Creates a load balancer and adds it to the load balancer store.
        Returns the newly created load balancer with response code 202
Creates a load balancer and adds it to the load balancer store . Returns the newly created load balancer with response code 202
def add_load_balancer(self, request, tenant_id):
        """
        Creates a load balancer and adds it to the load balancer store.
        Returns the newly created load balancer with response code 202
        """
        try:
            content = json_from_request(request)
        except ValueError:
            request.setResponseCode(400)
            return json.dumps(invalid_resource("Invalid JSON request body"))

        lb_id = randrange(99999)
        response_data = self.session(tenant_id).add_load_balancer(
            content['loadBalancer'], lb_id
        )
        request.setResponseCode(response_data[1])
        return json.dumps(response_data[0])
def add_load_balancer ( self , request , tenant_id ) : try : content = json_from_request ( request ) except ValueError : request . setResponseCode ( 400 ) return json . dumps ( invalid_resource ( "Invalid JSON request body" ) ) lb_id = randrange ( 99999 ) response_data = self . session ( tenant_id ) . add_load_balancer ( content [ 'loadBalancer' ] , lb_id ) request . setResponseCode ( response_data [ 1 ] ) return json . dumps ( response_data [ 0 ] )