Sandro Bonazzola has uploaded a new change for review. Change subject: packaging: setup: always generate answer file ......................................................................
packaging: setup: always generate answer file Always generate an answer file after customization. If a path is not specified by command line the answer file is generated at /etc/ovirt-hosted-engine/answers.conf Change-Id: I94006bd5950d37b69f1b39dda9a5a55388962ab9 Signed-off-by: Sandro Bonazzola <[email protected]> --- M src/ovirt_hosted_engine_setup/constants.py M src/plugins/ovirt-hosted-engine-setup/core/answerfile.py 2 files changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-setup refs/changes/28/17328/1 diff --git a/src/ovirt_hosted_engine_setup/constants.py b/src/ovirt_hosted_engine_setup/constants.py index 4293425..11b8b1a 100644 --- a/src/ovirt_hosted_engine_setup/constants.py +++ b/src/ovirt_hosted_engine_setup/constants.py @@ -88,6 +88,11 @@ OVIRT_HOSTED_ENGINE, 'hosted-engine.conf' ) + OVIRT_HOSTED_ENGINE_ANSWERS = os.path.join( + SYSCONFDIR, + OVIRT_HOSTED_ENGINE, + 'answers.conf' + ) HOSTED_ENGINE_IPTABLES_TEMPLATE = os.path.join( DATADIR, OVIRT_HOSTED_ENGINE_SETUP, diff --git a/src/plugins/ovirt-hosted-engine-setup/core/answerfile.py b/src/plugins/ovirt-hosted-engine-setup/core/answerfile.py index 45fd75d..96cd94d 100644 --- a/src/plugins/ovirt-hosted-engine-setup/core/answerfile.py +++ b/src/plugins/ovirt-hosted-engine-setup/core/answerfile.py @@ -48,17 +48,17 @@ def _init(self): self.environment.setdefault( ohostedcons.CoreEnv.ANSWER_FILE, - None + ohostedcons.FileLocations.OVIRT_HOSTED_ENGINE_ANSWERS ) @plugin.event( - stage=plugin.Stages.STAGE_CLOSEUP, + stage=plugin.Stages.STAGE_VALIDATION, priority=plugin.Stages.PRIORITY_LAST, condition=lambda self: self.environment[ ohostedcons.CoreEnv.ANSWER_FILE ] is not None ) - def _closeup(self): + def _save_answers(self): self.logger.info( _("Generating answer file '{name}'").format( name=self.environment[ohostedcons.CoreEnv.ANSWER_FILE], -- To view, visit http://gerrit.ovirt.org/17328 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94006bd5950d37b69f1b39dda9a5a55388962ab9 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-hosted-engine-setup Gerrit-Branch: master Gerrit-Owner: Sandro Bonazzola <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
