#NEWLINE# def _update_router_gw_info( self , context , router_id , info , router = None ) : #NEWLINE# #INDENT# super ( ApicGBPL3ServicePlugin , self ) . _update_router_gw_info ( context , router_id , info , router ) #NEWLINE# if ( info and ( 'network_id' in info ) ) : #NEWLINE# #INDENT# filters = { #NEWLINE# #INDENT# 'device_id' : [ router_id ] , #NEWLINE# 'device_owner' : [ q_const . DEVICE_OWNER_ROUTER_GW ] , #NEWLINE# 'network_id' : [ info [ 'network_id' ] ] , #NEWLINE# #UNINDENT# } #NEWLINE# ports = self . _core_plugin . get_ports ( context . elevated ( ) , filters = filters ) #NEWLINE# self . _core_plugin . update_port_status ( context , ports [ 0 ] [ 'id' ] , q_const . PORT_STATUS_ACTIVE )