freeipa/ipa_server/test_client
2008-09-30 19:37:35 -06:00

29 lines
601 B
Python
Executable File

#!/usr/bin/python
import xmlrpclib
def user_find(uid):
try:
args=uid
result = server.user_find(args)
print "returned %s" % result
except xmlrpclib.Fault, e:
print e.faultString
# main
server = xmlrpclib.ServerProxy("http://localhost:8888/")
print server.system.listMethods()
print server.system.methodHelp("user_add")
try:
args="admin"
kw = {'givenname':'Joe', 'sn':'Smith'}
result = server.user_add(args, kw)
print "returned %s" % result
except xmlrpclib.Fault, e:
print e.faultString
user_find("admin")
user_find("notfound")