From 42d5ddc559bf22792b170bdacaf19996350783e1 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Fri, 11 Jan 2008 11:44:23 -0500 Subject: Service principal deletion --- ipa-python/ipaclient.py | 3 +++ ipa-python/rpcclient.py | 12 ++++++++++++ 2 files changed, 15 insertions(+) (limited to 'ipa-python') diff --git a/ipa-python/ipaclient.py b/ipa-python/ipaclient.py index c5377f3a..c05abd51 100644 --- a/ipa-python/ipaclient.py +++ b/ipa-python/ipaclient.py @@ -386,6 +386,9 @@ class IPAClient: def add_service_principal(self, princ_name): return self.transport.add_service_principal(princ_name) + def delete_service_principal(self, principal_dn): + return self.transport.delete_service_principal(principal_dn) + def find_service_principal(self, criteria, sattrs=None, searchlimit=0, timelimit=-1): """Return a list: counter followed by a Entity object for each host that matches the criteria. If the results are truncated, counter will diff --git a/ipa-python/rpcclient.py b/ipa-python/rpcclient.py index 32249fd3..4d6b3a70 100644 --- a/ipa-python/rpcclient.py +++ b/ipa-python/rpcclient.py @@ -699,6 +699,18 @@ class RPCClient: return ipautil.unwrap_binary_data(result) + def delete_service_principal(self, principal_dn): + server = self.setup_server() + + try: + result = server.delete_service_principal(principal_dn) + 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) + def find_service_principal (self, criteria, sattrs=None, searchlimit=0, timelimit=-1): """Return a list: counter followed by a Entity object for each host that matches the criteria. If the results are truncated, counter will -- cgit