|
|
aa60fb |
From 95447911535974731a931b1d758f6cfd985c1e59 Mon Sep 17 00:00:00 2001
|
|
|
aa60fb |
From: David Kupka <dkupka@redhat.com>
|
|
|
aa60fb |
Date: Wed, 16 Dec 2015 12:43:13 +0000
|
|
|
aa60fb |
Subject: [PATCH] installer: Propagate option values from components instead of
|
|
|
aa60fb |
copying them.
|
|
|
aa60fb |
|
|
|
aa60fb |
https://fedorahosted.org/freeipa/ticket/5556
|
|
|
aa60fb |
|
|
|
aa60fb |
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
|
|
|
aa60fb |
---
|
|
|
aa60fb |
ipapython/install/core.py | 21 ++++++++++++++++++---
|
|
|
aa60fb |
ipaserver/install/server/install.py | 25 -------------------------
|
|
|
aa60fb |
ipaserver/install/server/replicainstall.py | 12 +-----------
|
|
|
aa60fb |
3 files changed, 19 insertions(+), 39 deletions(-)
|
|
|
aa60fb |
|
|
|
aa60fb |
diff --git a/ipapython/install/core.py b/ipapython/install/core.py
|
|
|
aa60fb |
index 91ae854cdb2a8846e2a2673a5bfe54b4f75f3823..3bb13267326b8cf1f22bb34dcf1e03402479446e 100644
|
|
|
aa60fb |
--- a/ipapython/install/core.py
|
|
|
aa60fb |
+++ b/ipapython/install/core.py
|
|
|
aa60fb |
@@ -484,6 +484,21 @@ class Composite(Configurable):
|
|
|
aa60fb |
for comp_cls in result:
|
|
|
aa60fb |
yield comp_cls.__outer_class__, comp_cls.__outer_name__
|
|
|
aa60fb |
|
|
|
aa60fb |
+ def __getattr__(self, name):
|
|
|
aa60fb |
+ for owner_cls, knob_name in self.knobs():
|
|
|
aa60fb |
+ if knob_name == name:
|
|
|
aa60fb |
+ break
|
|
|
aa60fb |
+ else:
|
|
|
aa60fb |
+ raise AttributeError(name)
|
|
|
aa60fb |
+
|
|
|
aa60fb |
+ for component in self.__components:
|
|
|
aa60fb |
+ if isinstance(component, owner_cls):
|
|
|
aa60fb |
+ break
|
|
|
aa60fb |
+ else:
|
|
|
aa60fb |
+ raise AttributeError(name)
|
|
|
aa60fb |
+
|
|
|
aa60fb |
+ return getattr(component, name)
|
|
|
aa60fb |
+
|
|
|
aa60fb |
def _reset(self):
|
|
|
aa60fb |
self.__components = list(self._get_components())
|
|
|
aa60fb |
|
|
|
aa60fb |
@@ -501,8 +516,7 @@ class Composite(Configurable):
|
|
|
aa60fb |
try:
|
|
|
aa60fb |
validator.next()
|
|
|
aa60fb |
except StopIteration:
|
|
|
aa60fb |
- if child.done():
|
|
|
aa60fb |
- self.__components.remove(child)
|
|
|
aa60fb |
+ pass
|
|
|
aa60fb |
else:
|
|
|
aa60fb |
new_validate.append((child, validator))
|
|
|
aa60fb |
if not new_validate:
|
|
|
aa60fb |
@@ -516,7 +530,8 @@ class Composite(Configurable):
|
|
|
aa60fb |
|
|
|
aa60fb |
yield from_(super(Composite, self)._configure())
|
|
|
aa60fb |
|
|
|
aa60fb |
- execute = [(c, c._executor()) for c in self.__components]
|
|
|
aa60fb |
+ execute = [(c, c._executor()) for c in self.__components
|
|
|
aa60fb |
+ if not c.done()]
|
|
|
aa60fb |
while True:
|
|
|
aa60fb |
new_execute = []
|
|
|
aa60fb |
for child, executor in execute:
|
|
|
aa60fb |
diff --git a/ipaserver/install/server/install.py b/ipaserver/install/server/install.py
|
|
|
aa60fb |
index 9d7036a7786a35e6aa2429254d62c8afb30970db..71992db0d39e1969649587486031a8fb1a03419d 100644
|
|
|
aa60fb |
--- a/ipaserver/install/server/install.py
|
|
|
aa60fb |
+++ b/ipaserver/install/server/install.py
|
|
|
aa60fb |
@@ -1592,35 +1592,10 @@ class Server(common.Installable, common.Interactive, core.Composite):
|
|
|
aa60fb |
|
|
|
aa60fb |
self.setup_ca = False
|
|
|
aa60fb |
self.setup_kra = False
|
|
|
aa60fb |
- self.external_ca = self.ca.external_ca
|
|
|
aa60fb |
- self.external_ca_type = self.ca.external_ca_type
|
|
|
aa60fb |
- self.external_cert_files = self.ca.external_cert_files
|
|
|
aa60fb |
- self.no_pkinit = self.ca.no_pkinit
|
|
|
aa60fb |
- self.dirsrv_cert_files = self.ca.dirsrv_cert_files
|
|
|
aa60fb |
- self.http_cert_files = self.ca.http_cert_files
|
|
|
aa60fb |
- self.pkinit_cert_files = self.ca.pkinit_cert_files
|
|
|
aa60fb |
- self.dirsrv_pin = self.ca.dirsrv_pin
|
|
|
aa60fb |
- self.http_pin = self.ca.http_pin
|
|
|
aa60fb |
- self.pkinit_pin = self.ca.pkinit_pin
|
|
|
aa60fb |
- self.dirsrv_cert_name = self.ca.dirsrv_cert_name
|
|
|
aa60fb |
- self.http_cert_name = self.ca.http_cert_name
|
|
|
aa60fb |
- self.pkinit_cert_name = self.ca.pkinit_cert_name
|
|
|
aa60fb |
- self.ca_cert_files = self.ca.ca_cert_files
|
|
|
aa60fb |
- self.subject = self.ca.subject
|
|
|
aa60fb |
- self.ca_signing_algorithm = self.ca.ca_signing_algorithm
|
|
|
aa60fb |
- self.setup_dns = self.dns.setup_dns
|
|
|
aa60fb |
- self.forwarders = self.dns.forwarders
|
|
|
aa60fb |
- self.no_forwarders = self.dns.no_forwarders
|
|
|
aa60fb |
- self.reverse_zones = self.dns.reverse_zones
|
|
|
aa60fb |
- self.no_reverse = self.dns.no_reverse
|
|
|
aa60fb |
- self.no_dnssec_validation = self.dns.no_dnssec_validation
|
|
|
aa60fb |
self.dnssec_master = False
|
|
|
aa60fb |
self.disable_dnssec_master = False
|
|
|
aa60fb |
self.kasp_db_file = None
|
|
|
aa60fb |
self.force = False
|
|
|
aa60fb |
- self.zonemgr = self.dns.zonemgr
|
|
|
aa60fb |
- self.no_host_dns = self.dns.no_host_dns
|
|
|
aa60fb |
- self.no_dns_sshfp = self.dns.no_dns_sshfp
|
|
|
aa60fb |
|
|
|
aa60fb |
self.unattended = not self.interactive
|
|
|
aa60fb |
|
|
|
aa60fb |
diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py
|
|
|
aa60fb |
index 6e9157cabc49161ba27983cbf1de1428d1b48b7d..a5d4a77f3daa8110ad0be064085b12b20da853cf 100644
|
|
|
aa60fb |
--- a/ipaserver/install/server/replicainstall.py
|
|
|
aa60fb |
+++ b/ipaserver/install/server/replicainstall.py
|
|
|
aa60fb |
@@ -847,22 +847,12 @@ class Replica(common.Installable, common.Interactive, core.Composite):
|
|
|
aa60fb |
|
|
|
aa60fb |
self.external_ca = False
|
|
|
aa60fb |
self.external_cert_files = None
|
|
|
aa60fb |
- self.no_pkinit = self.ca.no_pkinit
|
|
|
aa60fb |
- self.skip_schema_check = self.ca.skip_schema_check
|
|
|
aa60fb |
-
|
|
|
aa60fb |
- self.setup_dns = self.dns.setup_dns
|
|
|
aa60fb |
- self.forwarders = self.dns.forwarders
|
|
|
aa60fb |
- self.no_forwarders = self.dns.no_forwarders
|
|
|
aa60fb |
- self.reverse_zones = self.dns.reverse_zones
|
|
|
aa60fb |
- self.no_reverse = self.dns.no_reverse
|
|
|
aa60fb |
- self.no_dnssec_validation = self.dns.no_dnssec_validation
|
|
|
aa60fb |
+
|
|
|
aa60fb |
self.dnssec_master = False
|
|
|
aa60fb |
self.disable_dnssec_master = False
|
|
|
aa60fb |
self.kasp_db_file = None
|
|
|
aa60fb |
self.force = False
|
|
|
aa60fb |
self.zonemgr = None
|
|
|
aa60fb |
- self.no_host_dns = self.dns.no_host_dns
|
|
|
aa60fb |
- self.no_dns_sshfp = self.dns.no_dns_sshfp
|
|
|
aa60fb |
|
|
|
aa60fb |
self.unattended = not self.interactive
|
|
|
aa60fb |
|
|
|
aa60fb |
--
|
|
|
aa60fb |
2.5.0
|
|
|
aa60fb |
|