Change in vdsm[master]: models: Reorder bonding options so the mode is applied first

osvoboda at redhat.com osvoboda at redhat.com
Tue May 13 08:55:25 UTC 2014


Ondřej Svoboda has posted comments on this change.

Change subject: models: Reorder bonding options so the mode is applied first
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.ovirt.org/#/c/27572/1/tests/functional/networkTests.py
File tests/functional/networkTests.py:

Line 394:     @RequireDummyMod
Line 395:     @ValidateRunningAsRoot
Line 396:     def testReorderBondingOptions(self, bridged):
Line 397:         """
Line 398:         To be discussed.
> Add a simple test that passes an out-of-order list of options and see that 
For testing this the initial bonding mode would have to be e.g. 4. This would work now but stop working with my patch resetting options to defaults before applying new options.
Line 399:         """
Line 400:         with MonkeyPatchScope([(Bond, 'reorderOptions', lambda x: x)]):
Line 401:             pass
Line 402: 


http://gerrit.ovirt.org/#/c/27572/1/vdsm/network/models.py
File vdsm/network/models.py:

Line 302: 
Line 303:     @staticmethod
Line 304:     def reorderOptions(options):
Line 305:         'Orders the bonding mode first and the rest of options alphabetically.'
Line 306:         opts = dict((option.split('=', 1) for option in options.split(' ')))
> multiple spaces are acceptable. use empty split().
In a separate patch, I will change areOptionsApplied() to use the same split().
Line 307: 
Line 308:         mode = opts.pop('mode', None)
Line 309:         opts = sorted(opts.iteritems())
Line 310:         if mode:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I61553c05b34f10d8e81c41fbfdbc448d8fe120a9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list