self.con is already the connection to the libvirt daemon
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Sun, 29 Apr 2018 08:31:10 +0000 (10:31 +0200)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Sun, 29 Apr 2018 08:31:10 +0000 (10:31 +0200)
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
machine.py
network.py

index a67cbcb..9fbdf3f 100644 (file)
@@ -38,7 +38,7 @@ class machine():
         self.password = password
 
     def define(self):
         self.password = password
 
     def define(self):
-        self.dom = self.con.con.defineXML(self.vm_xml)
+        self.dom = self.con.defineXML(self.vm_xml)
         if self.dom == None:
             self.log.error("Could not define VM")
             raise BaseException
         if self.dom == None:
             self.log.error("Could not define VM")
             raise BaseException
index cd684e9..0e76274 100644 (file)
@@ -12,7 +12,7 @@ class network():
             self.log.error("No such file: {}".format(vm_xml_file))
 
     def define(self):
             self.log.error("No such file: {}".format(vm_xml_file))
 
     def define(self):
-        self.network = self.con.con.networkDefineXML(self.network_xml)
+        self.network = self.con.networkDefineXML(self.network_xml)
 
         if network == None:
             self.log.error("Failed to define virtual network")
 
         if network == None:
             self.log.error("Failed to define virtual network")