mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-25 08:21:05 -06:00
29 lines
607 B
Python
Executable File
29 lines
607 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="jsmith1"
|
|
kw = {'givenname':'Joe', 'sn':'Smith'}
|
|
result = server.user_add(kw, args)
|
|
print "returned %s" % result
|
|
except xmlrpclib.Fault, e:
|
|
print e.faultString
|
|
|
|
#user_find("admin")
|
|
#user_find("notfound")
|