summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2017-03-08 08:01:41 +0000
committerMartin Basti <mbasti@redhat.com>2017-03-13 10:12:40 +0100
commit1cfe06c79eb0b98a0f4bd663165156596b59e85f (patch)
tree43f62bd1ad9a38f54458e9efa3ca00f089bc192a
parent94f362d7b0b6c838752eb2f6674149e96d3ae95b (diff)
downloadfreeipa-1cfe06c79eb0b98a0f4bd663165156596b59e85f.tar.gz
freeipa-1cfe06c79eb0b98a0f4bd663165156596b59e85f.tar.xz
freeipa-1cfe06c79eb0b98a0f4bd663165156596b59e85f.zip
client install: split off SSSD options into a separate class
Split off SSSD knob definitions from the ClientInstallInterface class into a new SSSDInstallInterface class. https://pagure.io/freeipa/issue/6392 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
-rw-r--r--ipaclient/install/client.py44
-rw-r--r--ipaclient/install/sssd.py52
2 files changed, 55 insertions, 41 deletions
diff --git a/ipaclient/install/client.py b/ipaclient/install/client.py
index 774eaaf5b..b25122334 100644
--- a/ipaclient/install/client.py
+++ b/ipaclient/install/client.py
@@ -63,7 +63,7 @@ from ipapython.ipautil import (
)
from ipapython.ssh import SSHPublicKey
-from . import automount, ipadiscovery, ntpconf
+from . import automount, ipadiscovery, ntpconf, sssd
from .ipachangeconf import IPAChangeConf
NoneType = type(None)
@@ -3356,7 +3356,8 @@ def init(installer):
class ClientInstallInterface(hostname_.HostNameInstallInterface,
- service.ServiceAdminInstallInterface):
+ service.ServiceAdminInstallInterface,
+ sssd.SSSDInstallInterface):
"""
Interface of the client installer
@@ -3367,12 +3368,6 @@ class ClientInstallInterface(hostname_.HostNameInstallInterface,
* ipa-replica-install
"""
- fixed_primary = knob(
- None,
- description="Configure sssd to use fixed server as primary IPA server",
- )
- fixed_primary = enroll_only(fixed_primary)
-
principal = knob(
bases=service.ServiceAdminInstallInterface.principal,
description="principal to use to join the IPA realm",
@@ -3487,32 +3482,6 @@ class ClientInstallInterface(hostname_.HostNameInstallInterface,
)
request_cert = prepare_only(request_cert)
- permit = knob(
- None,
- description="disable access rules by default, permit all access.",
- )
- permit = enroll_only(permit)
-
- enable_dns_updates = knob(
- None,
- description="Configures the machine to attempt dns updates when the "
- "ip address changes.",
- )
- enable_dns_updates = enroll_only(enable_dns_updates)
-
- no_krb5_offline_passwords = knob(
- None,
- description="Configure SSSD not to store user password when the "
- "server is offline",
- )
- no_krb5_offline_passwords = enroll_only(no_krb5_offline_passwords)
-
- preserve_sssd = knob(
- None,
- description="Preserve old SSSD configuration if possible",
- )
- preserve_sssd = enroll_only(preserve_sssd)
-
def __init__(self, **kwargs):
super(ClientInstallInterface, self).__init__(**kwargs)
@@ -3605,13 +3574,6 @@ class ClientInstall(ClientInstallInterface,
"example: '/usr/lib/firefox')",
)
- no_sssd = knob(
- None,
- description="Do not configure the client to use SSSD for "
- "authentication",
- cli_names=[None, '-S'],
- )
-
def __init__(self, **kwargs):
super(ClientInstall, self).__init__(**kwargs)
diff --git a/ipaclient/install/sssd.py b/ipaclient/install/sssd.py
new file mode 100644
index 000000000..5e163e3e6
--- /dev/null
+++ b/ipaclient/install/sssd.py
@@ -0,0 +1,52 @@
+#
+# Copyright (C) 2016 FreeIPA Contributors see COPYING for license
+#
+
+from ipalib.install import service
+from ipalib.install.service import enroll_only
+from ipapython.install.core import group, knob
+
+
+@group
+class SSSDInstallInterface(service.ServiceInstallInterface):
+ description = "SSSD"
+
+ fixed_primary = knob(
+ None,
+ description="Configure sssd to use fixed server as primary IPA server",
+ )
+ fixed_primary = enroll_only(fixed_primary)
+
+ permit = knob(
+ None,
+ description="disable access rules by default, permit all access.",
+ )
+ permit = enroll_only(permit)
+
+ enable_dns_updates = knob(
+ None,
+ description="Configures the machine to attempt dns updates when the "
+ "ip address changes.",
+ )
+ enable_dns_updates = enroll_only(enable_dns_updates)
+
+ no_krb5_offline_passwords = knob(
+ None,
+ description="Configure SSSD not to store user password when the "
+ "server is offline",
+ )
+ no_krb5_offline_passwords = enroll_only(no_krb5_offline_passwords)
+
+ preserve_sssd = knob(
+ None,
+ description="Preserve old SSSD configuration if possible",
+ )
+ preserve_sssd = enroll_only(preserve_sssd)
+
+ no_sssd = knob(
+ None,
+ description="Do not configure the client to use SSSD for "
+ "authentication",
+ cli_names=[None, '-S'],
+ )
+ no_sssd = enroll_only(no_sssd)