#NEWLINE# def test_get_collection_custom_fields( self ) : #NEWLINE# #INDENT# fields = 'uuid,extra' #NEWLINE# for i in range ( 3 ) : #NEWLINE# #INDENT# obj_utils . create_test_port ( self . context , node_id = self . node . id , uuid = uuidutils . generate_uuid ( ) , address = ( '52:54:00:cf:2d:3%s' % i ) ) #NEWLINE# #UNINDENT# data = self . get_json ( ( '/ports?fields=%s' % self ) , headers = { #NEWLINE# #INDENT# api_base . Version . string : str ( api_v1 . MAX_VER ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( 3 , len ( data [ 'ports' ] ) ) #NEWLINE# for port in data [ 'ports' ] : #NEWLINE# #INDENT# self . assertItemsEqual ( [ 'uuid' , 'extra' , 'links' ] , port )