(self, request, tenant_id, lb_id, node_id)
return json.dumps(resp_body)
Return a 202 response code to updating a node, if successful.
Return a 202 response code to updating a node, if successful.
Return a 202 response code to updating a node if successful .
def update_node(self, request, tenant_id, lb_id, node_id):
        """
        Return a 202 response code to updating a node, if successful.
        """
        try:
            content = json_from_request(request)
            assert (isinstance(content, dict) and
                    list(content.keys()) == ["node"])
            content = content["node"]
            assert isinstance(content, dict)
        except (ValueError, AssertionError):
            resp_body, resp_code = invalid_json_schema()
        else:
            resp_body, resp_code = self.session(tenant_id).update_node(
                lb_id, node_id, content
            )
        request.setResponseCode(resp_code)
        if isinstance(resp_body, string_types):
            return resp_body
        return json.dumps(resp_body)
def update_node ( self , request , tenant_id , lb_id , node_id ) : try : content = json_from_request ( request ) assert ( isinstance ( content , dict ) and list ( content . keys ( ) ) == [ "node" ] ) content = content [ "node" ] assert isinstance ( content , dict ) except ( ValueError , AssertionError ) : resp_body , resp_code = invalid_json_schema ( ) else : resp_body , resp_code = self . session ( tenant_id ) . update_node ( lb_id , node_id , content ) request . setResponseCode ( resp_code ) if isinstance ( resp_body , string_types ) : return resp_body return json . dumps ( resp_body )