Change in vdsm[master]: Unified network persistence [1/3] - Save running config

asegurap at redhat.com asegurap at redhat.com
Fri Aug 30 12:23:28 UTC 2013


Antoni Segura Puimedon has posted comments on this change.

Change subject: Unified network persistence [1/3] - Save running config
......................................................................


Patch Set 20:

(3 comments)

....................................................
File vdsm/configNetwork.py
Line 150:             raise ConfigNetworkError(ne.ERR_BAD_PARAMS, 'interface %r already '
Line 151:                                      'has networks' % (iface))
Line 152: 
Line 153: 
Line 154: def _alterRunningConfig(func):
Done
Line 155:     spec = inspect.getargspec(func)
Line 156: 
Line 157:     @wraps(func)
Line 158:     def wrapped(*args, **kwargs):


Line 164:         attrs.update(dict(zip(spec.args, args)))
Line 165: 
Line 166:         isolatedCommand = 'configurator' not in attrs
Line 167:         configurator = attrs.get('configurator', None)
Line 168:         # If we are running an isolated command (not part of setupNetworks or
Done
Line 169:         # editNetwork we set up a transaction without rollback but with commit.
Line 170:         if isolatedCommand or configurator is None:
Line 171:             attrs['configurator'] = configurator = Ifcfg()
Line 172:             configurator.begin()


Line 166:         isolatedCommand = 'configurator' not in attrs
Line 167:         configurator = attrs.get('configurator', None)
Line 168:         # If we are running an isolated command (not part of setupNetworks or
Line 169:         # editNetwork we set up a transaction without rollback but with commit.
Line 170:         if isolatedCommand or configurator is None:
Well, I put this check for the case that something would call addNetworks passing it None explicitly.
Line 171:             attrs['configurator'] = configurator = Ifcfg()
Line 172:             configurator.begin()
Line 173: 
Line 174:         ret = func(**attrs)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7137a96f84abd2c5e532c6c37737e36ef17567a9
Gerrit-PatchSet: 20
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: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: Livnat Peer <lpeer at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Petr Ĺ ebek <psebek at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list