Change in vdsm[master]: Extract bonding options building into a separate function.

asegurap at redhat.com asegurap at redhat.com
Tue Oct 30 10:48:06 UTC 2012


Antoni Segura Puimedon has posted comments on this change.

Change subject: Extract bonding options building into a separate function.
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(2 inline comments)

I still have to run some tests on this. But some small things I was able to see without delving to deep into it.

....................................................
File vdsm/configNetwork.py
Line 1267:         existingBond = _ni.bondings[bondName]
Line 1268:         bond['nics'] = existingBond['slaves']
Line 1269:         bond['bondingOptions'] = existingBond['cfg'].get('BONDING_OPTS', None)
Line 1270:     else:
Line 1271:         raise ConfigNetworkError(ne.ERR_BAD_PARAMS, "No given bonding option, \
I'll have to review the implications of adding this new exceptional error. In any case, the line should read:

raise ConfigNetworkError(ne.ERR_BAD_PARAMS, "No given bonding option, "
                                              "nor existing bond %s found." % bondName)

Note that trailing backslash is not necessary ;-).
Line 1272:                                  nor existing bond %s found." % bondName)
Line 1273:     return bond
Line 1274: 
Line 1275: 


Line 1365:                     for network in networksAdded:
Line 1366:                         # If the new added network was created on top of
Line 1367:                         # existing bond, we need to keep the bond on rollback
Line 1368:                         # flow, else we will break the new created bond.
Line 1369:                         isNew = networkAttrs['bonding'] in bondings
The isNew variable is only used once, I would rather have
delNetwork(network, force=True,
           implicitBonding=networkAttrs['bonding'] in bondings)
Line 1370:                         delNetwork(network, force=True, implicitBonding=isNew)
Line 1371:                     raise ConfigNetworkError(ne.ERR_LOST_CONNECTION,
Line 1372:                                              'connectivity check failed')
Line 1373:         except:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I77fefefcefa05f5bd0d7fa2755357d88b7aa615e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky at redhat.com>


More information about the vdsm-patches mailing list