Bug fix in test scipt.
[sfa.git] / testbeds / iotlab / tests / sfi_client_tests.py
index 57c603f..0bff16c 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-
+import sys
 import os
 from sfa.iotlab.LDAPapi import LDAPapi
 from difflib import SequenceMatcher
@@ -9,10 +9,11 @@ def parse_options():
     #arguments supplied
     if len(sys.argv) > 1 :
         options_list = sys.argv[1:]
+        print options_list
         rspec_rep = options_list[0]
         return rspec_rep
     else:
-       print "Must supply Rspecs directory"
+       print "Must supply Rspecs directory ",  sys.argv[1:]
        return
 
 
@@ -69,8 +70,8 @@ dn = 'uid=' + 'user' + ',' + ldap_server.baseDN
 result = ldap_server.LdapSearch('(uid=user)', [])
 
 if result != []:
-       retval = ldap_server.LDAPDelete(dn)
-       print "deleting firexp user : %s " , retval
+       retval = ldap_server.LdapDelete(dn)
+       print "deleting firexp user : ", retval
 
 
 print "config sfi"
@@ -115,8 +116,8 @@ print " ================= SFI.PY RESOURCES -R IOTLAB -L ALL ============="
 raw_input("Press Enter to continue...")
 os.system('sfi.py resources -r iotlab -l all')
 
-print " ================= SFI.PY RESOURCES -O  output rspec ==========="
-os.system('sfi.py resources -o /root/tests_rspecs/iotlab_devlille_OUTPUT.rspec')
+print " ================= SFI.PY RESOURCES -O  output rspec ==========="
+os.system('sfi.py resources -o /root/tests_rspecs/iotlab_devlille_OUTPUT.rspec')
 
 print " ================= SFI.PY RESOURCES -L LEASES  ============="
 raw_input("Press Enter to continue...")
@@ -128,7 +129,7 @@ raw_input("Press Enter to continue...")
 os.system('sfi.py show iotlab.avakian')
 
 print " =================    SFI.PY SHOW NODE   ============="
-os.system('sfi.py show iotlab.node6.devlille.senslab.info')
+os.system('sfi.py show iotlab.m3-3.devgrenoble.iot-lab.info')
 
 print " =================    SFI.PY SLICES       ============="
 raw_input("Press Enter to continue...")