moving former sanity tests into system/hooks + iterating
[tests.git] / system / hooks / slice / nmapitest.py
diff --git a/system/hooks/slice/nmapitest.py b/system/hooks/slice/nmapitest.py
new file mode 100755 (executable)
index 0000000..023629b
--- /dev/null
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+# Module: VNET+
+# Description:         
+# Connect to the node manager
+# Author: acb@cs.princeton.edu/sapanb@cs.princeton.edu
+
+import sys
+import os
+
+from xmlrpclib import ServerProxy
+
+homedir=os.environ['HOME']
+slice_name = homedir.rsplit('/')[0]
+
+nodemanager = ServerProxy('http://127.0.0.1:812/')
+try:
+    nodemanager.SetLoans(slice_name, [])
+except:
+    print "[FAILED] SetLoans didn't work, probably because the packets of this connection are not getting tagged.\n";