#NEWLINE# def run( self , node_ip , cluster_id = None , drain_first = True , wait_for_thrift = True ) : #NEWLINE# #INDENT# if ( not cluster_id ) : #NEWLINE# #INDENT# cluster_id = self . cluster_id #NEWLINE# #UNINDENT# url = self . _get_full_url ( [ cluster_id , 'ops' , 'restart' , node_ip ] ) #NEWLINE# payload = { #NEWLINE# #INDENT# 'wait_for_thrift' : wait_for_thrift , #NEWLINE# 'drain_first' : drain_first , #NEWLINE# #UNINDENT# } #NEWLINE# return requests . post ( url , data = json . dumps ( payload ) ) . json ( )