From fbbdd27b5389ccbafa3fea8608b412759093cb69 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Mon, 15 Oct 2007 09:04:13 -0700 Subject: Creates an update_entry api call, aliases update_user and update_group to it. --- ipa-python/rpcclient.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'ipa-python/rpcclient.py') diff --git a/ipa-python/rpcclient.py b/ipa-python/rpcclient.py index ae26d707..eae68ee3 100644 --- a/ipa-python/rpcclient.py +++ b/ipa-python/rpcclient.py @@ -118,6 +118,20 @@ class RPCClient: return ipautil.unwrap_binary_data(result) + def update_entry(self,oldentry,newentry): + """Update an existing entry. oldentry and newentry are dicts of attributes""" + server = self.setup_server() + + try: + result = server.update_entry(ipautil.wrap_binary_data(oldentry), + ipautil.wrap_binary_data(newentry)) + 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) + # User support -- cgit