#NEWLINE# def take_action( self , parsed_args ) : #NEWLINE# #INDENT# compute_client = self . app . client_manager . compute #NEWLINE# server = utils . find_resource ( compute_client . servers , parsed_args . server ) #NEWLINE# image_id = ( parsed_args . image or server . _info . get ( 'image' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . get ( 'id' ) ) #NEWLINE# image = utils . find_resource ( compute_client . images , image_id ) #NEWLINE# server = server . rebuild ( server , parsed_args . password ) #NEWLINE# if parsed_args . wait : #NEWLINE# #INDENT# if utils . wait_for_status ( compute_client . servers . get , server . id , callback = _show_progress ) : #NEWLINE# #INDENT# sys . stdout . write ( _ ( '\nComplete\n' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# sys . stdout . write ( _ ( '\nError rebuilding server' ) ) #NEWLINE# raise SystemExit #NEWLINE# #UNINDENT# #UNINDENT# details = _prep_server_detail ( compute_client , server ) #NEWLINE# return zip ( * sorted ( six . iteritems ( details ) ) )