diff options
author | Kevin McCarthy <kmccarth@redhat.com> | 2007-10-15 09:04:13 -0700 |
---|---|---|
committer | Kevin McCarthy <kmccarth@redhat.com> | 2007-10-15 09:04:13 -0700 |
commit | fbbdd27b5389ccbafa3fea8608b412759093cb69 (patch) | |
tree | 6fb9d1e82fc9b21a322493a79071b5dab00cd822 /ipa-python/rpcclient.py | |
parent | 63f7cdf7f7e1c39b791dad6951fa39d9a6d58c9d (diff) | |
download | freeipa-fbbdd27b5389ccbafa3fea8608b412759093cb69.tar.gz freeipa-fbbdd27b5389ccbafa3fea8608b412759093cb69.tar.xz freeipa-fbbdd27b5389ccbafa3fea8608b412759093cb69.zip |
Creates an update_entry api call, aliases update_user and update_group to it.
Diffstat (limited to 'ipa-python/rpcclient.py')
-rw-r--r-- | ipa-python/rpcclient.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ipa-python/rpcclient.py b/ipa-python/rpcclient.py index ae26d7070..eae68ee32 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 |