Add nitsi executable
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Fri, 27 Apr 2018 15:49:25 +0000 (17:49 +0200)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Fri, 27 Apr 2018 15:49:25 +0000 (17:49 +0200)
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
nitsi [new file with mode: 0644]
test.py

diff --git a/nitsi b/nitsi
new file mode 100644 (file)
index 0000000..3c88b6a
--- /dev/null
+++ b/nitsi
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+
+from test import test
+
+if __name__ == "__main__":
+    import argparse
+
+    parser = argparse.ArgumentParser()
+
+    parser.add_argument("-d", "--directory", dest="dir")
+
+    args = parser.parse_args()
+
+    currenttest = test(args.dir)
+    currenttest.read_settings()
+    currenttest.virtual_environ_setup()
+    currenttest.load_recipe()
+    try:
+        currenttest.virtual_environ_start()
+        currenttest.run_recipe()
+    except BaseException as e:
+        print(e)
+    finally:
+        currenttest.virtual_environ_stop()
\ No newline at end of file
diff --git a/test.py b/test.py
index 26b483a..67f824e 100755 (executable)
--- a/test.py
+++ b/test.py
@@ -139,24 +139,4 @@ class test():
             self.virtual_networks[name].undefine()
 
 
-if __name__ == "__main__":
-    import argparse
-
-    parser = argparse.ArgumentParser()
-
-    parser.add_argument("-d", "--directory", dest="dir")
-
-    args = parser.parse_args()
-
-    currenttest = test(args.dir)
-    currenttest.read_settings()
-    currenttest.virtual_environ_setup()
-    currenttest.load_recipe()
-    try:
-        currenttest.virtual_environ_start()
-        currenttest.run_recipe()
-    except BaseException as e:
-        print(e)
-    finally:
-        currenttest.virtual_environ_stop()