Assaf Muller has posted comments on this change. Change subject: netconfpersistence: overload the subtraction operator ......................................................................
Patch Set 1: I think that I suggested to use the sub operator in the first place, but now that I understand the actual requirements I think that you should rename __sub__ to 'changeTo'. The reason is that Configs are basically sets. I'd expect the __sub__ operator to behave like set difference. So A - B would result in the actual set difference, or the Config that is needed to bring A into the state where it would be equal to A - B. Neither of those results interest us. What we need is: If I'm in config A and I want to be at config B, what config do I need to apply. I think that 'changeTo' would be a pretty good name, and I'd reverse the logic in the current __sub__ implementation. The end result would be: If A is the Config at the start of the current setupNetworks, B is the state at the end, and now we want to rollback, then we call: change = B.changeTo(A) Then call setupNetworks(change). At the end, these are all semantics, so I'm not going to -1 or +1. -- To view, visit http://gerrit.ovirt.org/21728 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I70a3be5610492fd3cb27d49703e04a84cfad57d1 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon <asegu...@redhat.com> Gerrit-Reviewer: Antoni Segura Puimedon <asegu...@redhat.com> Gerrit-Reviewer: Assaf Muller <amul...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches