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 authored and Martin Basti committed 2015-12-21 18:37:32 +01:00
1 parent b12ba14e3d
commit 30fbc7e948
2 files changed
+18 -34

No files matched your search

+18 -3
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: