Sandro Bonazzola has uploaded a new change for review. Change subject: packaging: setup: db backup in summary ......................................................................
packaging: setup: db backup in summary Added a note in engine-cleanup-2 summary section about the location of the database backup file. Change-Id: I7808754208c9d63dba88d025558bf97c8bd7dbe9 Signed-off-by: Sandro Bonazzola <[email protected]> --- M packaging/setup/plugins/ovirt-engine-remove/db/clear.py 1 file changed, 20 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/20/16220/1 diff --git a/packaging/setup/plugins/ovirt-engine-remove/db/clear.py b/packaging/setup/plugins/ovirt-engine-remove/db/clear.py index c7464d2..6df8a85 100644 --- a/packaging/setup/plugins/ovirt-engine-remove/db/clear.py +++ b/packaging/setup/plugins/ovirt-engine-remove/db/clear.py @@ -47,6 +47,7 @@ osetupcons.DBEnv.REMOVE_EMPTY_DATABASE, None ) + self._bkpfile = None @plugin.event( stage=plugin.Stages.STAGE_CUSTOMIZATION, @@ -85,7 +86,7 @@ try: dbovirtutils = database.OvirtUtils(plugin=self) dbovirtutils.tryDatabaseConnect() - dbovirtutils.backup() + self._bkpfile = dbovirtutils.backup() self.logger.info( _("Clearing database '{database}'").format( database=self.environment[ @@ -105,5 +106,23 @@ ) ) + @plugin.event( + stage=plugin.Stages.STAGE_CLOSEUP, + condition=lambda self: self._bkpfile is not None, + before=[ + osetupcons.Stages.DIALOG_TITLES_E_SUMMARY, + ], + after=[ + osetupcons.Stages.DIALOG_TITLES_S_SUMMARY, + ], + ) + def _closeup(self): + self.dialog.note( + text=_( + 'A backup of the database is available at {path}' + ).format( + path=self._bkpfile + ), + ) # vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit http://gerrit.ovirt.org/16220 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7808754208c9d63dba88d025558bf97c8bd7dbe9 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sandro Bonazzola <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
