installer: Propagate option values from components instead of copying them.

https://fedorahosted.org/freeipa/ticket/5556

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
David Kupka
2015-12-16 12:43:13 +00:00
committed by Martin Basti
parent b12ba14e3d
commit 30fbc7e948
2 changed files with 18 additions and 34 deletions

View File

@@ -531,6 +531,21 @@ class Composite(Configurable):
for order, owner_cls, name in result:
yield owner_cls, name
def __getattr__(self, name):
for owner_cls, knob_name in self.knobs():
if knob_name == name:
break
else:
raise AttributeError(name)
for component in self.__components:
if isinstance(component, owner_cls):
break
else:
raise AttributeError(name)
return getattr(component, name)
def _reset(self):
self.__components = list(self._get_components())
@@ -548,8 +563,7 @@ class Composite(Configurable):
try:
next(validator)
except StopIteration:
if child.done():
self.__components.remove(child)
pass
else:
new_validate.append((child, validator))
if not new_validate:
@@ -563,7 +577,8 @@ class Composite(Configurable):
yield from_(super(Composite, self)._configure())
execute = [(c, c._executor()) for c in self.__components]
execute = [(c, c._executor()) for c in self.__components
if not c.done()]
while True:
new_execute = []
for child, executor in execute:

View File

@@ -461,37 +461,6 @@ class BaseServer(common.Installable, common.Interactive, core.Composite):
# Automatically disable pkinit w/ dogtag until that is supported
self.no_pkinit = True
self.external_ca = self.ca.external_ca
self.external_ca_type = self.ca.external_ca_type
self.external_cert_files = self.ca.external_cert_files
self.dirsrv_cert_files = self.ca.dirsrv_cert_files
self.http_cert_files = self.ca.http_cert_files
self.pkinit_cert_files = self.ca.pkinit_cert_files
self.dirsrv_pin = self.ca.dirsrv_pin
self.http_pin = self.ca.http_pin
self.pkinit_pin = self.ca.pkinit_pin
self.dirsrv_cert_name = self.ca.dirsrv_cert_name
self.http_cert_name = self.ca.http_cert_name
self.pkinit_cert_name = self.ca.pkinit_cert_name
self.ca_cert_files = self.ca.ca_cert_files
self.subject = self.ca.subject
self.ca_signing_algorithm = self.ca.ca_signing_algorithm
self.skip_schema_check = self.ca.skip_schema_check
self.forwarders = self.dns.forwarders
self.auto_forwarders = self.dns.auto_forwarders
self.no_forwarders = self.dns.no_forwarders
self.reverse_zones = self.dns.reverse_zones
self.no_reverse = self.dns.no_reverse
self.auto_reverse = self.dns.auto_reverse
self.allow_zone_overlap = self.dns.allow_zone_overlap
self.no_dnssec_validation = self.dns.no_dnssec_validation
self.dnssec_master = self.dns.dnssec_master
self.disable_dnssec_master = self.dns.disable_dnssec_master
self.kasp_db_file = self.dns.kasp_db_file
self.force = self.dns.force
self.zonemgr = self.dns.zonemgr
self.unattended = not self.interactive
ca = core.Component(BaseServerCA)