]> git.ipfire.org Git - nitsi.git/blobdiff - test.py
Add a working virtual environment config
[nitsi.git] / test.py
diff --git a/test.py b/test.py
index 36b391b46c161cf05e4ade0eaa6b60a7ed40c6f1..9df1bd1fdbc0ef88bb0cdd8e79f00d713c5dd9d8 100755 (executable)
--- a/test.py
+++ b/test.py
@@ -556,10 +556,22 @@ class virtual_environ():
             self.log.debug(_machine)
             machines.setdefault(_machine, vm(
                 os.path.normpath(self.path + "/" + self.config[_machine]["xml_file"]),
-                os.path.normpath(self.path + "/" + self.config[_machine]["snapshot_xml_file"])))
+                os.path.normpath(self.path + "/" + self.config[_machine]["snapshot_xml_file"]),
+                self.config[_machine]["image"],
+                self.config[_machine]["root_uid"],
+                self.config[_machine]["username"],
+                self.config[_machine]["password"]))
 
         return machines
 
+    @property
+    def machine_names(self):
+        return self.machines
+
+    @property
+    def network_names(self):
+        return self.networks
+
 
 if __name__ == "__main__":
     import argparse
@@ -570,7 +582,10 @@ if __name__ == "__main__":
 
     args = parser.parse_args()
 
-    _recipe = recipe("/home/jonatan/python-testing-kvm/test/recipe")
     currenttest = test(args.dir)
     currenttest.read_settings()
-    currenttest.virtual_environ_setup()
\ No newline at end of file
+    currenttest.virtual_environ_setup()
+    currenttest.load_recipe()
+    currenttest.virtual_environ_start()
+    currenttest.run_recipe()
+    currenttest.virtual_environ_stop()
\ No newline at end of file