ipa-addradiusclient now working
This commit is contained in:
1 parent
152f8e3392
commit
eab5a89d4a
8 files changed
+59
-16
No files matched your search
@@ -331,3 +331,14 @@ class IPAClient:
|
||||
entries.append(user.User(e))
|
||||
|
||||
return entries
|
||||
|
||||
def add_radius_client(self,client):
|
||||
client_dict = client.toDict()
|
||||
|
||||
# dn is set on the server-side
|
||||
del client_dict['dn']
|
||||
|
||||
# convert to a regular dict before sending
|
||||
result = self.transport.add_radius_client(client_dict)
|
||||
return result
|
||||
|
||||
@@ -591,3 +591,16 @@ class RPCClient:
|
||||
raise xmlrpclib.Fault(value, msg)
|
||||
|
||||
return ipautil.unwrap_binary_data(result)
|
||||
|
||||
def add_radius_client(self,client):
|
||||
server = self.setup_server()
|
||||
|
||||
try:
|
||||
result = server.add_radius_client(ipautil.wrap_binary_data(client))
|
||||
except xmlrpclib.Fault, fault:
|
||||
raise ipaerror.gen_exception(fault.faultCode, fault.faultString)
|
||||
except socket.error, (value, msg):
|
||||
raise xmlrpclib.Fault(value, msg)
|
||||
|
||||
return ipautil.unwrap_binary_data(result)
|
||||
|
||||
Reference in new issue
Block a user