#NEWLINE# def get_interfaces_data( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# device_id = self . kwargs [ 'router_id' ] #NEWLINE# ports = api . neutron . port_list ( self . request , device_id = device_id ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# ports = [ ] #NEWLINE# msg = _ ( 'Port list can not be retrieved.' ) #NEWLINE# exceptions . handle ( self . request , msg ) #NEWLINE# #UNINDENT# for p in ports : #NEWLINE# #INDENT# p . set_id_as_name_if_empty ( ) #NEWLINE# #UNINDENT# return ports