#NEWLINE# @ operation #NEWLINE# def restart( cloudify_agent = None , **_ ) : #NEWLINE# #INDENT# installer = get_backend ( cloudify_agent ) #NEWLINE# worker_name = installer . agent_name #NEWLINE# installer . restart ( ) #NEWLINE# with update_storage ( ctx ) as data : #NEWLINE# #INDENT# data [ worker_name ] = data . get ( worker_name , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# data [ worker_name ] [ 'states' ] = data [ worker_name ] . get ( 'states' , [ ] ) #NEWLINE# data [ worker_name ] [ 'states' ] . append ( 'restarted' )