Edward Haas has posted comments on this change. Change subject: net: add rollback_trigger to Config() ......................................................................
Patch Set 3: (1 comment) https://gerrit.ovirt.org/#/c/56149/3/lib/vdsm/netconfpersistence.py File lib/vdsm/netconfpersistence.py: Line 201: self.bondingsPath) Line 202: _clear_dir(self.networksPath) Line 203: _clear_dir(self.bondingsPath) Line 204: Line 205: @contextmanager > That looks good, but i think we need to keep config.save() outside. I would prefer to keep things packed to avoid surprises. Here we say that a transaction applies a batch of changes, if it fails it reverts to the initial state of the transaction, if it succeeds it either persist or does not persist the changes. If we take the persist part out of the transaction, there will be an option to add changes that are outside of a transaction, and I would prefer to avoid such a backdoor. Line 206: def rollback_trigger(self, in_rollback): Line 207: self._backup = deepcopy(self) Line 208: try: Line 209: yield -- To view, visit https://gerrit.ovirt.org/56149 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iab1dcf346a5d5de15f01148a58abc4ae6e0ab97d Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Edward Haas <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
