(self, request, tenant_id, lb_id)
return json.dumps(response_data[0])
Return a successful add node response with code 200
Return a successful add node response with code 200
Return a successful add node response with code 200
def add_node_to_load_balancer(self, request, tenant_id, lb_id):
        """
        Return a successful add node response with code 200
        """
        try:
            content = json_from_request(request)
        except ValueError:
            request.setResponseCode(400)
            return json.dumps(invalid_resource("Invalid JSON request body"))

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