]> git.ipfire.org Git - nitsi.git/blobdiff - network.py
Open only one connection to the libvirt daemon
[nitsi.git] / network.py
index 223930becc20006436949bd7698f5f514db4164d..cd684e9d4d62eefbd6ee7479c5e9f1449f3f8e98 100644 (file)
@@ -2,9 +2,9 @@
 
 # # A class which define and undefine a virtual network based on an xml file
 class network():
-    def __init__(self, network_xml_file):
+    def __init__(self, libvirt_con, network_xml_file):
         self.log = log(4)
-        self.con = libvirt_con("qemu:///system")
+        self.con = libvirt_con
         try:
             with open(network_xml_file) as fobj:
                 self.network_xml = fobj.read()