#NEWLINE# def test_libvirt_rbd_driver_auth_enabled_flags_override( self ) : #NEWLINE# #INDENT# libvirt_driver = net . LibvirtNetVolumeDriver ( self . fake_conn ) #NEWLINE# connection_info = self . rbd_connection ( self . vol ) #NEWLINE# secret_type = 'ceph' #NEWLINE# connection_info [ 'data' ] [ 'auth_enabled' ] = True #NEWLINE# connection_info [ 'data' ] [ 'auth_username' ] = self . user #NEWLINE# connection_info [ 'data' ] [ 'secret_type' ] = secret_type #NEWLINE# connection_info [ 'data' ] [ 'secret_uuid' ] = self . uuid #NEWLINE# flags_uuid = '37152720-1785-11e2-a740-af0c1d8b8e4b' #NEWLINE# flags_user = 'bar' #NEWLINE# self . flags ( rbd_user = flags_user , rbd_secret_uuid = flags_uuid , group = 'libvirt' ) #NEWLINE# conf = libvirt_driver . get_config ( connection_info , self . disk_info ) #NEWLINE# tree = conf . format_dom ( ) #NEWLINE# self . _assertNetworkAndProtocolEquals ( tree ) #NEWLINE# self . assertEqual ( flags_user , tree . find ( './auth' ) . get ( 'username' ) ) #NEWLINE# self . assertEqual ( secret_type , tree . find ( './auth/secret' ) . get ( 'type' ) ) #NEWLINE# self . assertEqual ( flags_uuid , tree . find ( './auth/secret' ) . get ( 'uuid' ) ) #NEWLINE# libvirt_driver . disconnect_volume ( connection_info , 'vde' )