Change in vdsm[master]: Advertise aggregator ID in bonding interfaces
sshnaidm at redhat.com
sshnaidm at redhat.com
Sat Feb 13 15:17:20 UTC 2016
Sagi Shnaidman has posted comments on this change.
Change subject: Advertise aggregator ID in bonding interfaces
......................................................................
Patch Set 12:
(12 comments)
https://gerrit.ovirt.org/#/c/53100/12/lib/vdsm/netinfo/bonding.py
File lib/vdsm/netinfo/bonding.py:
Line 43: BONDED_NIC
> I think that
Done
Line 71: "
> let's use single quotes
Done
Line 77: agg_info
> better use the term agg_id, for consistency with the other function.
Done
Line 78: agg_info
> I believe it should be numeric (but please verify in the spec)
Either number or "N/A". Does it make sense to make it int? Does engine get it as int and not as a string..?
And if tomorrow will be some other possible string value (as "N/A")?
Line 82: os.path.join(
> os.path.join has a single arg; no need to call the function.
Done
https://gerrit.ovirt.org/#/c/53100/12/tests/functional/networkTests.py
File tests/functional/networkTests.py:
Line 2824: self.assertEqual(status, SUCCESS, msg)
Line 2825: self.assertBondExists('bond0', nics1)
Line 2826: self.assertBondExists('bond1', nics0)
Line 2827:
Line 2828: @permutations([[{}], [{'options': 'mode=4 lacp_rate=1 miimon=100'}]])
> I was misunderstood.
Done
Line 2829: @cleanupNet
Line 2830: @ValidateRunningAsRoot
Line 2831: def test_bond_mode4_caps_aggregator_id(self, bond_options):
Line 2832: with dummyIf(3) as nics:
Line 2827:
Line 2828: @permutations([[{}], [{'options': 'mode=4 lacp_rate=1 miimon=100'}]])
Line 2829: @cleanupNet
Line 2830: @ValidateRunningAsRoot
Line 2831: def test_bond_mode4_caps_aggregator_id(self, bond_options):
> still, using a double-veth test smells more realistic. if you have tried it
Yes, you're right, I did it incorrectly, now fixed the test
Line 2832: with dummyIf(3) as nics:
Line 2833: bonding = {'nics': nics[:2]}
Line 2834: bonding.update(bond_options)
Line 2835: status, msg = self.setupNetworks(
Line 2836: {},
Line 2837: {BONDING_NAME: bonding},
Line 2838: NOCHK)
Line 2839: self.assertEqual(status, SUCCESS, msg)
Line 2840: self.assertBondExists(BONDING_NAME, nics[:2])
> a newline here can help readability
Done
Line 2841: status, msg, info = self.vdsm_net.getVdsCapabilities()
Line 2842: bond_info = info['bondings'][BONDING_NAME]
Line 2843: bond_ag_id = bond_info.get('ad_aggregator_id')
Line 2844: bond_par_mac = bond_info.get('ad_partner_mac')
Line 2843: bond_ag_id
> used only in one of the branches. no need to assign it here.
changed the test
Line 2849: None
> is the value random?
I saw it as 1 or 2, so yes.
Line 2850: None
> can't you assert that it is all-zero?
changed the test
Line 2852: self.assertNotEqual(ag_id, None)
Line 2853: else:
Line 2854: self.assertNotIn('ad_aggregator_id', bond_info)
Line 2855: self.assertNotIn('ad_partner_mac', bond_info)
Line 2856: for ag_id in bonded_nics_ids:
> for nic in nics[:2]:
Done
Line 2857: self.assertEqual(ag_id, None)
Line 2858: self.assertNotIn('ad_aggregator_id', not_bonded_nic)
Line 2859: status, msg = self.setupNetworks(
Line 2860: {}, {BONDING_NAME: {'remove': True}}, NOCHK)
--
To view, visit https://gerrit.ovirt.org/53100
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I85267967c9cb1b0a626d91cb1953361ed4de727a
Gerrit-PatchSet: 12
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Sagi Shnaidman <sshnaidm at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Sagi Shnaidman <sshnaidm at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list