Petr Horáček has posted comments on this change. Change subject: network: api: remove bond objectivization duplicated code ......................................................................
Patch Set 2: (1 comment) http://gerrit.ovirt.org/#/c/37750/2/vdsm/network/api.py File vdsm/network/api.py: Line 596: else: Line 597: addition.append((name, attrs)) Line 598: Line 599: def _getBondObject(): Line 600: bond = Bond.objectivize(name, configurator, attrs.get('options'), > Ido thinks that there is more repeated code to remove. the exact same code Refactoring continues here: http://gerrit.ovirt.org/#/c/37754/, i was too lazy to rebase it, sorry. I agree with you, it would look much cleaner, but there is a reason why it is so crazy, we want to remove all bonding marked with 'remove' from _netinfo and then add and edit the rest. Thing is, we do not know, what configurator does with _netinfo and we do not want to pass it non-existing bondings. However, i tried to do it that way http://gerrit.ovirt.org/#/c/37881/, it passed test, but still, it's not just refactoring. Line 601: attrs.get('nics'), mtu=None, _netinfo=_netinfo, Line 602: destroyOnMasterRemoval='remove' in attrs) Line 603: return bond Line 604: -- To view, visit http://gerrit.ovirt.org/37750 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie0dd75fa37a687dcd9b32519e075cf3efc7aa08e Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Ido Barkan <[email protected]> Gerrit-Reviewer: Ondřej Svoboda <[email protected]> Gerrit-Reviewer: Petr Horáček <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
