#NEWLINE# def _get_routers( self , request ) : #NEWLINE# #INDENT# if ( not self . is_router_enabled ) : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# neutron_routers = api . neutron . router_list ( request , tenant_id = request . user . tenant_id ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# neutron_routers = [ ] #NEWLINE# #UNINDENT# routers = [ { #NEWLINE# #INDENT# 'id' : router . id , #NEWLINE# 'name' : router . name , #NEWLINE# 'status' : router . status , #NEWLINE# 'external_gateway_info' : router . external_gateway_info , #NEWLINE# #UNINDENT# } for router in neutron_routers ] #NEWLINE# self . add_resource_url ( 'horizon:project:routers:detail' , routers ) #NEWLINE# return neutron_routers