#NEWLINE# def _get_routers( self , search_opts = None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# tenant_id = self . request . user . tenant_id #NEWLINE# routers = api . neutron . router_list ( self . request , tenant_id = ext_net_dict , search_opts = search_opts ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# routers = [ ] #NEWLINE# exceptions . handle ( self . request , _ ( 'Unable to retrieve router list.' ) ) #NEWLINE# #UNINDENT# ext_net_dict = self . _list_external_networks ( ) #NEWLINE# for r in routers : #NEWLINE# #INDENT# r . set_id_as_name_if_empty ( ) #NEWLINE# self . _set_external_network ( r , ext_net_dict ) #NEWLINE# #UNINDENT# return routers