Imported Debian patch 4.7.2-3
This commit is contained in:
committed by
Mario Fetka
parent
27edeba051
commit
8bc559c5a1
@@ -43,7 +43,6 @@ class Config(pytest_multihost.config.Config):
|
||||
'dns_forwarder',
|
||||
'domain_level',
|
||||
'log_journal_since',
|
||||
'fips_mode',
|
||||
}
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
@@ -68,7 +67,6 @@ class Config(pytest_multihost.config.Config):
|
||||
self.log_journal_since = kwargs.get('log_journal_since') or '-1h'
|
||||
if self.domain_level is None:
|
||||
self.domain_level = MAX_DOMAIN_LEVEL
|
||||
self.fips_mode = kwargs.get('fips_mode', False)
|
||||
|
||||
def get_domain_class(self):
|
||||
return Domain
|
||||
@@ -80,18 +78,13 @@ class Config(pytest_multihost.config.Config):
|
||||
|
||||
@property
|
||||
def ad_domains(self):
|
||||
return [d for d in self.domains if d.is_ad_type]
|
||||
return [d for d in self.domains if d.type == 'AD']
|
||||
|
||||
def get_all_hosts(self):
|
||||
for domain in self.domains:
|
||||
for host in domain.hosts:
|
||||
yield host
|
||||
|
||||
def get_all_ipa_hosts(self):
|
||||
for ipa_domain in (d for d in self.domains if d.is_ipa_type):
|
||||
for ipa_host in ipa_domain.hosts:
|
||||
yield ipa_host
|
||||
|
||||
def to_dict(self):
|
||||
extra_args = self.extra_init_args - {'dirman_dn'}
|
||||
result = super(Config, self).to_dict(extra_args)
|
||||
@@ -129,18 +122,10 @@ class Domain(pytest_multihost.config.Domain):
|
||||
self.name = str(name)
|
||||
self.hosts = []
|
||||
|
||||
assert self.is_ipa_type or self.is_ad_type
|
||||
assert domain_type in ('IPA', 'AD')
|
||||
self.realm = self.name.upper()
|
||||
self.basedn = DN(*(('dc', p) for p in name.split('.')))
|
||||
|
||||
@property
|
||||
def is_ipa_type(self):
|
||||
return self.type == 'IPA'
|
||||
|
||||
@property
|
||||
def is_ad_type(self):
|
||||
return self.type == 'AD' or self.type.startswith('AD_')
|
||||
|
||||
@property
|
||||
def static_roles(self):
|
||||
# Specific roles for each domain type are hardcoded
|
||||
@@ -148,19 +133,15 @@ class Domain(pytest_multihost.config.Domain):
|
||||
return ('master', 'replica', 'client', 'other')
|
||||
elif self.type == 'AD':
|
||||
return ('ad',)
|
||||
elif self.type == 'AD_SUBDOMAIN':
|
||||
return ('ad_subdomain',)
|
||||
elif self.type == 'AD_TREEDOMAIN':
|
||||
return ('ad_treedomain',)
|
||||
else:
|
||||
raise LookupError(self.type)
|
||||
|
||||
def get_host_class(self, host_dict):
|
||||
from ipatests.pytest_ipa.integration.host import Host, WinHost
|
||||
|
||||
if self.is_ipa_type:
|
||||
if self.type == 'IPA':
|
||||
return Host
|
||||
elif self.is_ad_type:
|
||||
elif self.type == 'AD':
|
||||
return WinHost
|
||||
else:
|
||||
raise LookupError(self.type)
|
||||
|
||||
Reference in New Issue
Block a user