#NEWLINE# def run( self , name ) : #NEWLINE# #INDENT# driver = self . _get_driver ( ) #NEWLINE# try : #NEWLINE# #INDENT# node = [ n for n in driver . list_nodes ( ) if ( n . extra [ 'hostname' ] == name ) ] [ 0 ] #NEWLINE# #UNINDENT# except IndexError : #NEWLINE# #INDENT# raise Exception ( 'Node with name {} not found in Softlayer' . format ( name ) ) #NEWLINE# #UNINDENT# self . logger . info ( 'Destroying node...' ) #NEWLINE# node = driver . destroy_node ( node ) #NEWLINE# self . logger . info ( 'Node successfully destroyed: {}' . format ( node ) ) #NEWLINE# return