Edward Haas has posted comments on this change.

Change subject: ovs: acquire ifaces
......................................................................


Patch Set 31: Code-Review-1

(4 comments)

https://gerrit.ovirt.org/#/c/60404/31/tests/network/func_static_ip_test.py
File tests/network/func_static_ip_test.py:

PS31, Line 137: test_attach_slave_with_ip_to_ipless_network
test_attach_nic_with_ip_as_a_slave_to_ip_network

The IP from the nic should move to the network, nic/s and bond should have no 
ip, network should get the nic ip.


https://gerrit.ovirt.org/#/c/60404/31/tests/network/ovs_switch_test.py
File tests/network/ovs_switch_test.py:

PS31, Line 31: @mock.patch('vdsm.network.ovs.info.OvsInfo')
You can move it to the class, it's a classic scenario to use it.


PS31, Line 33:         mock_ovs_info.bridges = {}
             :         mock_ovs_info.bridges_by_sb = {}
             :         mock_ovs_info.northbounds_by_sb = {}
Use a helper for this, it repeats 3 times.
Perhaps _ovs_info_init(ovs_info)


Line 76:             mock_ovs_info,
Line 77:             bonds2edit={'bond1': {'nics': ['eth0', 'eth1']}},
Line 78:             nets2add={}, bonds2add={},
Line 79:             expected_ifaces={'eth0', 'eth1'})
Line 80: 
Missing some scenarios:
- Edit bond: Leave one slave unchanged (perhaps just change the edit bond test).
- Edit networks: swapping nics between networks and moving a nic from one 
network to another (original network removed).
Line 81:     def _assert_acquired_ifaces_post_switch_setup(
Line 82:             self, _ovs_info, nets2add, bonds2add, bonds2edit, 
expected_ifaces):
Line 83: 
Line 84:         ovsdb = driver.vsctl.create()


-- 
To view, visit https://gerrit.ovirt.org/60404
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7a08095e03a3167d0be4f7261b9a43c9cf92c67b
Gerrit-PatchSet: 31
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phora...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Edward Haas <edwa...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček <phora...@redhat.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org

Reply via email to