From d1a0fab9041f4188e8272a11adbba60ab1f1d6e5 Mon Sep 17 00:00:00 2001
From: Sapan Bhatia <sapanb@cs.princeton.edu>
Date: Thu, 19 Mar 2009 16:51:33 +0000
Subject: [PATCH] Cleaned up nmapitest.py

---
 qaapi/qa/tests/slice/nmapitest.py | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/qaapi/qa/tests/slice/nmapitest.py b/qaapi/qa/tests/slice/nmapitest.py
index f934eb1..4cad38e 100755
--- a/qaapi/qa/tests/slice/nmapitest.py
+++ b/qaapi/qa/tests/slice/nmapitest.py
@@ -4,7 +4,15 @@
 # Connect to the node manager
 # Author: acb@cs.princeton.edu
 
+import sys
+
 from xmlrpclib import ServerProxy
 
-nodemanager = ServerProxy('http://127.0.0.1:812/')
-nodemanager.SetLoans('pl_sirius', [])
+if (len(sys.argv)!=2):
+    print "[FAILED] Please pass the name of the slice this script runs in as the first argument.\n";
+else:
+    nodemanager = ServerProxy('http://127.0.0.1:812/')
+    try:
+        nodemanager.SetLoans(sys.argv[1], [])
+    except:
+        print "[FAILED] SetLoans didn't work, probably because the packets of this connection are not getting tagged.\n";
-- 
2.47.0