Sandro Bonazzola has uploaded a new change for review. Change subject: packaging: setup: allow reverting ssl config ......................................................................
packaging: setup: allow reverting ssl config Allow reverting the ssl config using engine-cleanup-2 Change-Id: I204c6ffa92a0e3507b27e9779e1534048625b6b9 Signed-off-by: Sandro Bonazzola <[email protected]> --- M packaging/setup/plugins/ovirt-engine-setup/apache/ssl.py 1 file changed, 22 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/69/16769/1 diff --git a/packaging/setup/plugins/ovirt-engine-setup/apache/ssl.py b/packaging/setup/plugins/ovirt-engine-setup/apache/ssl.py index 7fd7527..d283271 100644 --- a/packaging/setup/plugins/ovirt-engine-setup/apache/ssl.py +++ b/packaging/setup/plugins/ovirt-engine-setup/apache/ssl.py @@ -57,11 +57,20 @@ for line in content.splitlines(): f = self._RE_PARAM.match(line) if f is not None and f.group('param') in params: - line = '{spaces}{param} {value}'.format( + newline = '{spaces}{param} {value}'.format( spaces=f.group('spaces'), param=f.group('param'), value=params[f.group('param')], ) + self._changed_lines.append( + self.environment[ + osetupcons.CoreEnv.REGISTER_UNINSTALL_GROUPS + ].encodeline( + added=newline, + removed=line, + ) + ) + line = newline newcontent.append(line) return '\n'.join(newcontent) + '\n' @@ -92,6 +101,7 @@ osetupcons.FileLocations.OVIRT_ENGINE_PKI_APACHE_CA_CERT ), } + self._changed_lines = [] @plugin.event( stage=plugin.Stages.STAGE_INIT, @@ -216,12 +226,20 @@ self._params, self._sslData ), - modifiedList=self.environment[ - otopicons.CoreEnv.MODIFIED_FILES - ], ) ) self.environment[ + osetupcons.CoreEnv.REGISTER_UNINSTALL_GROUPS + ].createGroup( + group='ssl', + description='Apache SSL configuration', + optional=True + ).addLines( + 'ssl', + self.environment[osetupcons.ApacheEnv.HTTPD_CONF_SSL], + self._changed_lines, + ) + self.environment[ osetupcons.CoreEnv.UNINSTALL_UNREMOVABLE_FILES ].append( self.environment[ -- To view, visit http://gerrit.ovirt.org/16769 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I204c6ffa92a0e3507b27e9779e1534048625b6b9 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
