summaryrefslogtreecommitdiffstats
path: root/ipaclient/plugins/server.py
blob: 5356dbbf58373eebeab1c8c59ff0e23b374a15f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#
# Copyright (C) 2016 FreeIPA Contributors see COPYING for license
#

from ipaclient.frontend import MethodOverride
from ipalib import _, errors
from ipalib.plugable import Registry

register = Registry()


@register(override=True, no_fail=True)
class server_del(MethodOverride):
    def interactive_prompt_callback(self, kw):
        server_list = kw.get('cn')
        if not server_list:
            raise errors.RequirementError(name='cn')

        self.api.Backend.textui.print_plain(
            _("Removing %(servers)s from replication topology, "
              "please wait...") % {'servers': ', '.join(server_list)})