mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
DNS Locations: hide option --no-msdcs in adtrust-install
Since DNS location mechanism is active, this option has no effect, because records are generate dynamically. https://fedorahosted.org/freeipa/ticket/2008 Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
@@ -29,6 +29,8 @@ import ldap
|
||||
|
||||
import six
|
||||
|
||||
from optparse import SUPPRESS_HELP
|
||||
|
||||
from ipaserver.install import adtrustinstance
|
||||
from ipaserver.install.installutils import (
|
||||
read_password,
|
||||
@@ -54,9 +56,11 @@ def parse_options():
|
||||
default=False, help="print debugging information")
|
||||
parser.add_option("--netbios-name", dest="netbios_name",
|
||||
help="NetBIOS name of the IPA domain")
|
||||
|
||||
# no-msdcs has not effect, option is here just for backward compatibility
|
||||
parser.add_option("--no-msdcs", dest="no_msdcs", action="store_true",
|
||||
default=False, help="Do not create DNS service records " \
|
||||
"for Windows in managed DNS server")
|
||||
default=False, help=SUPPRESS_HELP)
|
||||
|
||||
parser.add_option("--rid-base", dest="rid_base", type=int, default=1000,
|
||||
help="Start value for mapping UIDs and GIDs to RIDs")
|
||||
parser.add_option("--secondary-rid-base", dest="secondary_rid_base",
|
||||
@@ -390,7 +394,7 @@ def main():
|
||||
smb.setup(api.env.host, api.env.realm,
|
||||
netbios_name, reset_netbios_name,
|
||||
options.rid_base, options.secondary_rid_base,
|
||||
options.no_msdcs, options.add_sids,
|
||||
options.add_sids,
|
||||
enable_compat = options.enable_compat)
|
||||
smb.find_local_id_range()
|
||||
smb.create_instance()
|
||||
|
||||
@@ -124,7 +124,6 @@ class ADTRUSTInstance(service.Service):
|
||||
def __init__(self, fstore=None):
|
||||
self.netbios_name = None
|
||||
self.reset_netbios_name = None
|
||||
self.no_msdcs = None
|
||||
self.add_sids = None
|
||||
self.smbd_user = None
|
||||
self.smb_dn_pwd = None
|
||||
@@ -585,17 +584,14 @@ class ADTRUSTInstance(service.Service):
|
||||
|
||||
err_msg = None
|
||||
|
||||
if self.no_msdcs:
|
||||
err_msg = '--no-msdcs was given, special DNS service records ' \
|
||||
'are not added to local DNS server'
|
||||
ret = api.Command['dns_is_enabled']()
|
||||
if not ret['result']:
|
||||
err_msg = "DNS management was not enabled at install time."
|
||||
else:
|
||||
ret = api.Command['dns_is_enabled']()
|
||||
if not ret['result']:
|
||||
err_msg = "DNS management was not enabled at install time."
|
||||
else:
|
||||
if not dns_zone_exists(zone):
|
||||
err_msg = "DNS zone %s cannot be managed " \
|
||||
"as it is not defined in IPA" % zone
|
||||
if not dns_zone_exists(zone):
|
||||
err_msg = (
|
||||
"DNS zone %s cannot be managed as it is not defined in "
|
||||
"IPA" % zone)
|
||||
|
||||
if err_msg:
|
||||
self.print_msg(err_msg)
|
||||
@@ -766,7 +762,7 @@ class ADTRUSTInstance(service.Service):
|
||||
|
||||
def setup(self, fqdn, realm_name, netbios_name,
|
||||
reset_netbios_name, rid_base, secondary_rid_base,
|
||||
no_msdcs=False, add_sids=False, smbd_user="samba",
|
||||
add_sids=False, smbd_user="samba",
|
||||
enable_compat=False):
|
||||
self.fqdn = fqdn
|
||||
self.realm = realm_name
|
||||
@@ -774,7 +770,6 @@ class ADTRUSTInstance(service.Service):
|
||||
self.reset_netbios_name = reset_netbios_name
|
||||
self.rid_base = rid_base
|
||||
self.secondary_rid_base = secondary_rid_base
|
||||
self.no_msdcs = no_msdcs
|
||||
self.add_sids = add_sids
|
||||
self.enable_compat = enable_compat
|
||||
self.smbd_user = smbd_user
|
||||
|
||||
Reference in New Issue
Block a user