#NEWLINE# @ wrap_check_policy #NEWLINE# def deallocate_for_instance( self , context , instance , requested_networks = None ) : #NEWLINE# #INDENT# 'Deallocates all network structures related to instance.' #NEWLINE# if ( not isinstance ( instance , obj_base . NovaObject ) ) : #NEWLINE# #INDENT# instance = objects . Instance . _from_db_object ( context , objects . Instance ( ) , instance ) #NEWLINE# #UNINDENT# self . network_rpcapi . deallocate_for_instance ( context , instance = instance , requested_networks = requested_networks )