ipaserver.install.installutils: move commonly used utils to ipapython.ipautil

When creating ipa-client-samba tool, few common routines from the server
installer code became useful for the client code as well.

Move them to ipapython.ipautil and update references as well.

Fixes: https://pagure.io/freeipa/issue/3999
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
Alexander Bokovoy committed 2019-06-29 11:00:28 +03:00
1 parent 84201e1daf
commit cdb94e0ff2
16 files changed
+129 -65

No files matched your search

+3 -3
View File
@@ -1217,7 +1217,7 @@ class BindInstance(service.Service):
except Exception:
logger.exception("Failed to unconfigure DNS resolver")
installutils.rmtree(paths.BIND_LDAP_DNS_IPA_WORKDIR)
ipautil.rmtree(paths.BIND_LDAP_DNS_IPA_WORKDIR)
# disabled by default, by ldap_configure()
if enabled:
@@ -1237,5 +1237,5 @@ class BindInstance(service.Service):
if named_regular_running:
self.named_regular.start()
installutils.remove_keytab(self.keytab)
installutils.remove_ccache(run_as=self.service_user)
ipautil.remove_keytab(self.keytab)
ipautil.remove_ccache(run_as=self.service_user)