Dan Kenigsberg has posted comments on this change.
Change subject: netinfo: Retrieve bonding options differing from defaults ......................................................................
Patch Set 10:
(1 comment)
http://gerrit.ovirt.org/#/c/24456/10/tests/functional/networkTests.py File tests/functional/networkTests.py:
Line 1162: self.assertBondExists(BONDING_NAME, bondDict['nics']) Line 1163: Line 1164: # See if live options (read from sysfs) match those requested Line 1165: cfg = self.vdsm_net.netinfo.bondings[BONDING_NAME]['cfg'] Line 1166: self.assertEqual(cfg['BONDING_OPTS'], bondDict['options'])
It assures that the new function returns options sorted, maybe this deserve
As you said,
' '.join(sorted(bondDict['options'].split()))
is ugly. That's why I suggested
self.assertEqual(set(cfg['BONDING_OPTS'].split()), set(bondDict['options']).split())
This way, you do not force future test writers to remember that they have to sort their option. Options may be unsorted in real life, so this should be possible also in the test framework. Line 1167: Line 1168: with dummyIf(3) as nics: Line 1169: with self.vdsm_net.pinger(): Line 1170: # Add initial vlanned net over bond