#NEWLINE# def handle( self , request , data ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# params = { #NEWLINE# #INDENT# 'name' : redirect [ 'name' ] , #NEWLINE# 'admin_state_up' : ( data [ 'admin_state' ] == 'True' ) , #NEWLINE# 'shared' : data [ 'shared' ] , #NEWLINE# 'router:external' : data [ 'external' ] , #NEWLINE# #UNINDENT# } #NEWLINE# network = api . neutron . network_update ( request , self . initial [ 'network_id' ] , ** params ) #NEWLINE# msg = ( _ ( 'Network %s was successfully updated.' ) % data [ 'name' ] ) #NEWLINE# LOG . debug ( msg ) #NEWLINE# messages . success ( request , msg ) #NEWLINE# return network #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# msg = ( _ ( 'Failed to update network %s' ) % data [ 'name' ] ) #NEWLINE# LOG . info ( msg ) #NEWLINE# redirect = reverse ( self . failure_url ) #NEWLINE# exceptions . handle ( request , msg , redirect = redirect )