#NEWLINE# def _get_object( self , * args , **kwargs ) : #NEWLINE# #INDENT# if ( not hasattr ( self , '_object' ) ) : #NEWLINE# #INDENT# port_id = self . kwargs [ 'port_id' ] #NEWLINE# try : #NEWLINE# #INDENT# self . _object = api . neutron . port_get ( self . request , port_id ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# redirect = reverse ( 'horizon:project:networks:detail' , args = ( self . kwargs [ 'network_id' ] , ) ) #NEWLINE# msg = _ ( 'Unable to retrieve port details' ) #NEWLINE# exceptions . handle ( self . request , msg , redirect = redirect ) #NEWLINE# #UNINDENT# #UNINDENT# return self . _object