#NEWLINE# def undeploy_application( deployment_id , timeout_seconds = 240 , is_delete_deployment = False ) : #NEWLINE# #INDENT# '\n    A blocking method which undeploys an application from the provided dsl\n    path.\n    ' #NEWLINE# client = create_rest_client ( ) #NEWLINE# execution = client . executions . start ( deployment_id , 'uninstall' ) #NEWLINE# wait_for_execution_to_end ( execution , timeout_seconds = timeout_seconds ) #NEWLINE# if ( execution . error and ( execution . error != 'None' ) ) : #NEWLINE# #INDENT# raise RuntimeError ( 'Workflow execution failed: {0}' . format ( execution . error ) ) #NEWLINE# #UNINDENT# if is_delete_deployment : #NEWLINE# #INDENT# time . sleep ( 5 ) #NEWLINE# delete_deployment ( deployment_id )