SID generation: define SIDInstallInterface

Move the SID-related options into a separate InstallInterface
(--add-sids, --netbios-name, --rid-base and --secondary-rid-base),
make ADTrustInstallInterface inherit from SIDInstallInterface.

Related: https://pagure.io/freeipa/issue/8995
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Florence Blanc-Renaud 2021-09-27 08:36:32 +02:00
parent ebe838cb86
commit f9e95ce51e

View File

@ -530,43 +530,26 @@ def generate_dns_service_records_help(api):
@group
class ADTrustInstallInterface(ServiceAdminInstallInterface):
class SIDInstallInterface(ServiceAdminInstallInterface):
"""
Interface for the AD trust installer
Interface for the SID generation Installer
Knobs defined here will be available in:
* ipa-server-install
* ipa-replica-install
* ipa-adtrust-install
"""
description = "AD trust"
# the following knobs are provided on top of those specified for
# admin credentials
description = "SID generation"
add_sids = knob(
None,
description="Add SIDs for existing users and groups as the final step"
)
add_agents = knob(
None,
description="Add IPA masters to a list of hosts allowed to "
"serve information about users from trusted forests"
)
add_agents = replica_install_only(add_agents)
enable_compat = knob(
None,
description="Enable support for trusted domains for old clients"
)
add_sids = replica_install_only(add_sids)
netbios_name = knob(
str,
None,
description="NetBIOS name of the IPA domain"
)
no_msdcs = knob(
None,
description="Deprecated: has no effect",
deprecated=True
)
rid_base = knob(
int,
1000,
@ -578,3 +561,34 @@ class ADTrustInstallInterface(ServiceAdminInstallInterface):
description="Start value of the secondary range for mapping "
"UIDs and GIDs to RIDs"
)
@group
class ADTrustInstallInterface(SIDInstallInterface):
"""
Interface for the AD trust installer
Knobs defined here will be available in:
* ipa-server-install
* ipa-replica-install
* ipa-adtrust-install
"""
description = "AD trust"
# the following knobs are provided on top of those specified for
# admin credentials
add_agents = knob(
None,
description="Add IPA masters to a list of hosts allowed to "
"serve information about users from trusted forests"
)
add_agents = replica_install_only(add_agents)
enable_compat = knob(
None,
description="Enable support for trusted domains for old clients"
)
no_msdcs = knob(
None,
description="Deprecated: has no effect",
deprecated=True
)