From a6eb87bd68295e15ea19f5cb274cffbef5954d04 Mon Sep 17 00:00:00 2001 From: Martin Babinsky Date: Wed, 8 Jun 2016 18:25:55 +0200 Subject: server-del: perform full master removal in managed topology This patch implements most of the del_master_managed() functionality as a part of `server-del` command. `server-del` nows performs these actions: * check topology connectivity * check that at least one CA/DNS server and DNSSec masters are left after removal * cleanup all LDAP entries/attributes exposing information about the master * cleanup master DNS records * remove master and service principals * remove master entry from LDAP * check that all segments pointing to the master were removed `server-del` now accepts the following options: * `--force`: force master removal even if it doesn't exist * `--ignore-topology-disconnect`: ignore errors arising from disconnected topology before and after master removal * `--ignore-last-of-role`: remove master even if it is last DNS server, and DNSSec key master. The last CA will *not* be removed regardless of this option. https://fedorahosted.org/freeipa/ticket/5588 Reviewed-By: Martin Basti --- ipaclient/plugins/server.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ipaclient/plugins/server.py (limited to 'ipaclient/plugins') diff --git a/ipaclient/plugins/server.py b/ipaclient/plugins/server.py new file mode 100644 index 000000000..277a87488 --- /dev/null +++ b/ipaclient/plugins/server.py @@ -0,0 +1,17 @@ +# +# Copyright (C) 2016 FreeIPA Contributors see COPYING for license +# + +from ipaclient.frontend import MethodOverride +from ipalib import _ +from ipalib.plugable import Registry + +register = Registry() + + +@register(override=True) +class server_del(MethodOverride): + def interactive_prompt_callback(self, kw): + self.api.Backend.textui.print_plain( + _("Removing %(servers)s from replication topology, " + "please wait...") % {'servers': ', '.join(kw['cn'])}) -- cgit