import repository from arizona
[raven.git] / demo / pingpong / scripts / delusers.py
1 #!/usr/bin/python
2
3 #           [option, long option,    variable,     action,        data,     default,                            metavar, description]
4 """arizonaconfig\r
5    options=[]\r
6    includes=[]\r
7 """
8
9 import os, sys, time, shutil
10 import glob
11
12 import arizonaconfig
13 import planetlabAPI
14 import planetlabCall
15
16 def main():
17    arizonaconfig.init_options("delusers.py")
18    planetlabAPI.PlanetLablogin()
19
20    email = "guest20@fake.cs.arizona.edu";
21
22    persons = planetlabAPI.doplccall("GetPersons", email);
23    person = persons[0]
24
25    print person
26
27    if person["email"] != email:
28       print "uh oh"
29       sys.exit(-1)
30
31    print "deleting id", person["person_id"]
32
33    planetlabAPI.doplccall("DeletePerson", person["person_id"])
34
35    print "done."
36
37 if __name__ == "__main__":
38    main()