#NEWLINE# @ wsgi . action ( 'disassociate' ) #NEWLINE# def _disassociate_host_and_project( self , req , id , body ) : #NEWLINE# #INDENT# context = req . environ [ 'nova.context' ] #NEWLINE# authorize ( context ) #NEWLINE# nova_context . require_admin_context ( msg ) #NEWLINE# try : #NEWLINE# #INDENT# self . network_api . associate ( context , id , host = None , project = None ) #NEWLINE# #UNINDENT# except exception . NetworkNotFound : #NEWLINE# #INDENT# msg = _ ( 'Network not found' ) #NEWLINE# raise exc . HTTPNotFound ( explanation = msg ) #NEWLINE# #UNINDENT# except NotImplementedError : #NEWLINE# #INDENT# msg = _ ( 'Disassociate network is not implemented by the configured Network API' ) #NEWLINE# raise exc . HTTPNotImplemented ( explanation = msg ) #NEWLINE# #UNINDENT# return webob . Response ( status_int = 202 )