#NEWLINE# def _get_vm_port( self , ip , mac ) : #NEWLINE# #INDENT# ports = self . nb_api . get_all_logical_ports ( ) #NEWLINE# for port in ports : #NEWLINE# #INDENT# if ( port . get_device_owner ( ) == 'compute:None' ) : #NEWLINE# #INDENT# if ( ( port . get_ip ( ) == mac ) and ( port . get_mac ( ) == mac ) ) : #NEWLINE# #INDENT# return port #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return None