#NEWLINE# def deallocate_for_instance( self , ctxt , instance , requested_networks = None ) : #NEWLINE# #INDENT# cctxt = self . client #NEWLINE# kwargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if self . client . can_send_version ( '1.11' ) : #NEWLINE# #INDENT# version = '1.11' #NEWLINE# kwargs [ 'instance' ] = instance #NEWLINE# kwargs [ 'requested_networks' ] = requested_networks #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if self . client . can_send_version ( '1.10' ) : #NEWLINE# #INDENT# version = '1.10' #NEWLINE# kwargs [ 'requested_networks' ] = cctxt #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# version = '1.0' #NEWLINE# #UNINDENT# kwargs [ 'host' ] = instance . host #NEWLINE# kwargs [ 'instance_id' ] = instance . uuid #NEWLINE# kwargs [ 'project_id' ] = instance . project_id #NEWLINE# #UNINDENT# if CONF . multi_host : #NEWLINE# #INDENT# cctxt = cctxt . prepare ( server = instance . host , version = version ) #NEWLINE# #UNINDENT# return cctxt . call ( ctxt , 'deallocate_for_instance' , ** kwargs )