#NEWLINE# def test_serialize_mellanox_iser_enabled_vlan( self ) : #NEWLINE# #INDENT# vlan = randint ( 1 , 4095 ) #NEWLINE# vlan_name = 'vlan{0}' . format ( vlan ) #NEWLINE# self . cluster = self . create_env ( consts . CLUSTER_MODES . ha_compact , mellanox = True , iser = True , iser_vlan = vlan ) #NEWLINE# serialized_data = self . serializer . serialize ( self . cluster , self . cluster . nodes ) #NEWLINE# for data in serialized_data : #NEWLINE# #INDENT# self . assertIn ( 'storage_parent' , data [ 'neutron_mellanox' ] ) #NEWLINE# self . assertIn ( 'iser_interface_name' , data [ 'neutron_mellanox' ] ) #NEWLINE# network_scheme = data [ 'network_scheme' ] #NEWLINE# self . assertEqual ( vlan_name , network_scheme [ 'roles' ] [ 'storage' ] ) #NEWLINE# self . assertIn ( vlan_name , network_scheme [ 'interfaces' ] ) #NEWLINE# self . assertEqual ( self . vlan_splinters_off , network_scheme [ 'interfaces' ] [ vlan_name ] ) #NEWLINE# self . assertIn ( vlan_name , network_scheme [ 'endpoints' ] ) #NEWLINE# self . assertIn ( 'vlandev' , network_scheme [ 'endpoints' ] [ vlan_name ] ) #NEWLINE# self . assertEqual ( self . iser_interface_name , network_scheme [ 'endpoints' ] [ vlan_name ] [ 'vlandev' ] ) #NEWLINE# self . assertNotIn ( 'br-storage' , network_scheme [ 'endpoints' ] )