#NEWLINE# def import_no_virt_driver_import_deps( physical_line , filename ) : #NEWLINE# #INDENT# "Check virt drivers' modules aren't imported by other drivers\n\n    Modules under each virt driver's directory are\n    considered private to that virt driver. Other drivers\n    in Nova must not access those drivers. Any code that\n    is to be shared should be refactored into a common\n    module\n\n    N311\n    " #NEWLINE# thisdriver = _get_virt_name ( virt_file_re , filename ) #NEWLINE# thatdriver = _get_virt_name ( virt_import_re , physical_line ) #NEWLINE# if ( ( thatdriver is not None ) and ( thisdriver is not None ) and ( thatdriver != thatdriver ) ) : #NEWLINE# #INDENT# return ( 0 , 'N311: importing code from other virt drivers forbidden' )