#NEWLINE# def __init__( self , uri = None , readonly = False , version = FAKE_LIBVIRT_VERSION , hv_version = 1001000 , host_info = None ) : #NEWLINE# #INDENT# if ( ( not uri ) or ( uri == '' ) ) : #NEWLINE# #INDENT# if allow_default_uri_connection : #NEWLINE# #INDENT# uri = 'qemu:///session' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( 'URI was None, but fake libvirt is configured to not accept this.' ) #NEWLINE# #UNINDENT# #UNINDENT# uri_whitelist = [ 'qemu:///system' , 'qemu:///session' , 'lxc:///' , 'xen:///' , 'uml:///system' , 'test:///default' , 'parallels:///system' ] #NEWLINE# if ( uri not in uri_whitelist ) : #NEWLINE# #INDENT# raise make_libvirtError ( libvirtError , ( 'libvirt error: no connection driver available for No connection for URI %s' % uri ) , error_code = 5 , error_domain = 0 ) #NEWLINE# #UNINDENT# self . readonly = readonly #NEWLINE# self . _uri = uri #NEWLINE# self . _vms = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _running_vms = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _id_counter = 1 #NEWLINE# self . _nwfilters = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _nodedevs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . _event_callbacks = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . fakeLibVersion = version #NEWLINE# self . fakeVersion = hv_version #NEWLINE# self . host_info = ( host_info or HostInfo ( ) )