Change in vdsm[master]: netconf: define rollback contract at internal API

asegurap at redhat.com asegurap at redhat.com
Tue Dec 3 09:38:18 UTC 2013


Antoni Segura Puimedon has posted comments on this change.

Change subject: netconf: define rollback contract at internal API
......................................................................


Patch Set 10:

(1 comment)

....................................................
Commit Message
Line 12: 1. Rollback what they deem necessary by themselves.
Line 13: 2. Return whatever networks and bonds they did not roll back (a diff
Line 14:    between the current state and the last known runningconfig) as
Line 15:    a netconfpersistence.Config object. If they rolled back everything
Line 16:    return None.
The possibility of returning None makes it possible for non-unified configurators, i.e., ifcfg, to keep their rollback methods unmodified. If they do not return anythin, Python implicitly returns None, which will mean that the unified memory rollback does not need to take place.

If we were to force those non-unified configurators to return the empty Config object (which is not the cheapest to create), that would mean that the old configurators would have to have knowledge about unified persistence entities (Config itself). In my opinion, that is not necessary and it doesn't give any significant advantage besides explicitness of return.
Line 17: 
Line 18: The configurator context manager will raise a RollbackIncomplete
Line 19: exception if there are nets and/or bonds remaining to be rolled
Line 20: back. That will be bubbled up to the API module that will invoke


-- 
To view, visit http://gerrit.ovirt.org/21702
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I29c9411ce3f1ede6557c529bb4d984f74ed8f8ad
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list