mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Tests: Remove DNS configuration from trust tests
Since DNS configuration is no longer needed for running trust tests, this method's contents are removed. Method is left empty as reference for others, should they have issues with DNS configuration. Reviewed-By: Petr Spacek <pspacek@redhat.com> Reviewed-By: Oleg Fayans <ofayans@redhat.com>
This commit is contained in:
parent
99339bf789
commit
1d9e1521c5
@ -436,47 +436,11 @@ def install_adtrust(host):
|
||||
|
||||
def configure_dns_for_trust(master, ad):
|
||||
"""
|
||||
This configures DNS on IPA master according to the relationship of the
|
||||
IPA's and AD's domains.
|
||||
This method is intentionally left empty. Originally it served for DNS
|
||||
configuration on IPA master according to the relationship of the IPA's
|
||||
and AD's domains.
|
||||
"""
|
||||
|
||||
def is_subdomain(subdomain, domain):
|
||||
subdomain_unpacked = subdomain.split('.')
|
||||
domain_unpacked = domain.split('.')
|
||||
|
||||
subdomain_unpacked.reverse()
|
||||
domain_unpacked.reverse()
|
||||
|
||||
subdomain = False
|
||||
|
||||
if len(subdomain_unpacked) > len(domain_unpacked):
|
||||
subdomain = True
|
||||
|
||||
for subdomain_segment, domain_segment in zip(subdomain_unpacked,
|
||||
domain_unpacked):
|
||||
subdomain = subdomain and subdomain_segment == domain_segment
|
||||
|
||||
return subdomain
|
||||
|
||||
kinit_admin(master)
|
||||
|
||||
if is_subdomain(ad.domain.name, master.domain.name):
|
||||
master.run_command(['ipa', 'dnsrecord-add', master.domain.name,
|
||||
'%s.%s' % (ad.shortname, ad.netbios),
|
||||
'--a-ip-address', ad.ip])
|
||||
|
||||
master.run_command(['ipa', 'dnsrecord-add', master.domain.name,
|
||||
ad.netbios,
|
||||
'--ns-hostname',
|
||||
'%s.%s' % (ad.shortname, ad.netbios)])
|
||||
|
||||
master.run_command(['ipa', 'dnszone-mod', master.domain.name,
|
||||
'--allow-transfer', ad.ip])
|
||||
else:
|
||||
master.run_command(['ipa', 'dnsforwardzone-add', ad.domain.name,
|
||||
'--forwarder', ad.ip,
|
||||
'--forward-policy', 'only',
|
||||
])
|
||||
pass
|
||||
|
||||
|
||||
def establish_trust_with_ad(master, ad, extra_args=()):
|
||||
|
Loading…
Reference in New Issue
Block a user