#NEWLINE# @ test . idempotent_id ( '86c3529b-1231-40de-803c-00e40882f043' ) #NEWLINE# def test_create_list_port_with_address_pair( self ) : #NEWLINE# #INDENT# allowed_address_pairs = [ { #NEWLINE# #INDENT# 'ip_address' : self . ip_address , #NEWLINE# 'mac_address' : self . mac_address , #NEWLINE# #UNINDENT# } ] #NEWLINE# body = self . client . create_port ( network_id = self . network [ 'id' ] , allowed_address_pairs = allowed_address_pairs ) #NEWLINE# port_id = body [ 'port' ] [ 'id' ] #NEWLINE# self . addCleanup ( self . client . delete_port , port_id ) #NEWLINE# body = self . client . list_ports ( ) #NEWLINE# ports = body [ 'ports' ] #NEWLINE# port = [ p for p in port if ( p [ 'id' ] == port_id ) ] #NEWLINE# msg = 'Created port not found in list of ports returned by Neutron' #NEWLINE# self . assertTrue ( port , msg ) #NEWLINE# self . _confirm_allowed_address_pair ( port [ 0 ] , self . ip_address )