#NEWLINE# def purge( self ) : #NEWLINE# #INDENT# "Ensure resource doesn't exist upstream\n\n        By site, make sure resource is deleted. True if it is or was able to\n        get to the desired state, False if not and logged in ``last_error``.\n\n        Cache is cleared first thing and before return.\n\n        :rtype: bool\n        " #NEWLINE# self . clear_cache ( ) #NEWLINE# try : #NEWLINE# #INDENT# if self . exists ( ) : #NEWLINE# #INDENT# self . logger . debug ( '[%s] Deleting' , e . identifier ) #NEWLINE# id_ = self . existing_resource ( ) [ 'id' ] #NEWLINE# self . resource ( id_ ) . delete ( ) #NEWLINE# self . logger . info ( '[%s] has been deleted!' , self . identifier ) #NEWLINE# self . clear_cache ( ) #NEWLINE# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# self . log_error ( e ) #NEWLINE# self . clear_cache ( ) #NEWLINE# return False