#NEWLINE# def _add_interface_by_subnet( self , request , data ) : #NEWLINE# #INDENT# router_id = data [ 'router_id' ] #NEWLINE# try : #NEWLINE# #INDENT# router_inf = api . neutron . router_add_interface ( request , router_id , subnet_id = data [ 'subnet_id' ] ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# self . _handle_error ( request , router_id , e ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# port = api . neutron . port_get ( request , router_inf [ 'port_id' ] ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# port = None #NEWLINE# #UNINDENT# return port