Edward Haas has posted comments on this change. Change subject: ovs: use Setup class directly ......................................................................
Patch Set 2: (1 comment) https://gerrit.ovirt.org/#/c/60405/2/lib/vdsm/network/netswitch.py File lib/vdsm/network/netswitch.py: Line 154: # We should implement editation. Line 155: nets2add.update(nets2edit) Line 156: nets2remove.update(nets2edit) Line 157: Line 158: ovsdb = ovs_driver.create() > Every few patches, this pops up here :) I think I found where you tried to use it. Using a factory in this case will solve the failure you have in the next path. We may even do something like this: (not sure how pythonic it is) Leave setup() as before, just return the instance to be used here. The disadvantage I see with this approach is that the caller must not succeed in calling the context manager again. It is not so bad to call the setup stages from here, just do what seems nicer and cleaner to you. Line 159: Line 160: with Transaction(in_rollback=in_rollback) as config: Line 161: with ovs_switch.Setup(ovsdb, _ovs_info) as s: Line 162: s.remove_nets(nets2remove) -- To view, visit https://gerrit.ovirt.org/60405 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2fa674f479d569356775812931c832ef37f1fe2a Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Edward Haas <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/admin/lists/[email protected]
