summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/ipa_server_install.py
blob: e708040e867259baec6e9e824cae7587dd2fdc49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#
# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
#

from ipapython.install import cli
from ipapython.install.core import knob
from ipaplatform.paths import paths
from ipaserver.install.server import ServerMasterInstall


class CompatServerMasterInstall(ServerMasterInstall):
    all_ip_addresses = False
    nisdomain = None
    no_nisdomain = False
    no_sudo = False
    request_cert = False

    dm_password = knob(
        # pylint: disable=no-member
        bases=ServerMasterInstall.dm_password,
        cli_names=['--ds-password', '-p'],
    )

    admin_password = knob(
        # pylint: disable=no-member
        bases=ServerMasterInstall.admin_password,
        cli_names=(list(ServerMasterInstall.admin_password.cli_names) +
                   ['-a']),
    )

    ip_addresses = knob(
        # pylint: disable=no-member
        bases=ServerMasterInstall.ip_addresses,
        description="Master Server IP Address. This option can be used "
                    "multiple times",
    )


ServerInstall = cli.install_tool(
    CompatServerMasterInstall,
    command_name='ipa-server-install',
    log_file_name=paths.IPASERVER_INSTALL_LOG,
    debug_option=True,
    uninstall_log_file_name=paths.IPASERVER_UNINSTALL_LOG,
)


def run():
    ServerInstall.run_cli()