]> git.ipfire.org Git - nitsi.git/blobdiff - test.py
Move network class into an own file
[nitsi.git] / test.py
diff --git a/test.py b/test.py
index a3d6a0dca10db9b0fa0562810a8f2c1f2ef36c7b..1ec64f842c99a80ea42d725fcf502bd945ecf30d 100755 (executable)
--- a/test.py
+++ b/test.py
@@ -48,31 +48,6 @@ class libvirt_con():
 
 
 
-# A class which define and undefine a virtual network based on an xml file
-class network():
-    def __init__(self, network_xml_file):
-        self.log = log(4)
-        self.con = libvirt_con("qemu:///system")
-        try:
-            with open(network_xml_file) as fobj:
-                self.network_xml = fobj.read()
-        except FileNotFoundError as error:
-            self.log.error("No such file: {}".format(vm_xml_file))
-
-    def define(self):
-        self.network = self.con.con.networkDefineXML(self.network_xml)
-
-        if network == None:
-            self.log.error("Failed to define virtual network")
-
-    def start(self):
-        self.network.create()
-
-    def undefine(self):
-        self.network.destroy()
-
-
-
 class RecipeExeption(Exception):
     pass