Mark Wu has uploaded a new change for review.
Change subject: test: Add tests for _validateInterNetworkCompatibility() ......................................................................
test: Add tests for _validateInterNetworkCompatibility()
Signed-off-by: Mark Wu wudxw@linux.vnet.ibm.com Change-Id: I732c8c9f1983261391835e1e3687cf120e9def34 --- M tests/configNetworkTests.py 1 file changed, 37 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/41/7241/1
diff --git a/tests/configNetworkTests.py b/tests/configNetworkTests.py index f393514..bebe58c 100644 --- a/tests/configNetworkTests.py +++ b/tests/configNetworkTests.py @@ -195,13 +195,22 @@ 'fakebrnet': {'iface': 'fakebr', 'bridged': True, 'ports': ['eth0', 'eth1']}, 'fakebrnet1': {'iface': 'fakebr1', 'bridged': True, - 'ports': ['bond00']} + 'ports': ['bond00']}, + 'fakebrnet2': {'iface': 'fakebr2', 'bridged': True, + 'ports': ['eth7.1']}, + 'fakebrnet3': {'iface': 'eth8', 'bridged': False} }, 'vlans': { - 'fakevlan': { + 'eth3.2': { 'iface': 'eth3', 'addr': '10.10.10.10', 'netmask': '255.255.0.0', + 'mtu': 1500 + }, + 'eth7.1': { + 'iface': 'eth7', + 'addr': None, + 'netmask': None, 'mtu': 1500 } }, @@ -273,6 +282,32 @@ ipaddr, netmask, gw, bondingOptions), configNetwork.ne.ERR_USED_NIC)
+ # Test for adding a new VLANed bridged network + # when a non-VLANed bridged network exists + self._addNetworkWithExc((netinfoIns, 'test', '2', 'bond00', nics, + ipaddr, netmask, gw, bondingOptions), + configNetwork.ne.ERR_BAD_PARAMS) + + # Test for adding a new VLANed bridgeless network + # when a non-VLANed bridged network exists + self._addNetworkWithExc((netinfoIns, 'test', '2', 'bond00', nics, + ipaddr, netmask, gw, bondingOptions, + False), + configNetwork.ne.ERR_BAD_PARAMS) + + # Test for adding a new VLANed bridged network + # when the interface is in used for any type of networks + self._addNetworkWithExc((netinfoIns, 'test', vlan, bonding, ['eth7'], + ipaddr, netmask, gw, bondingOptions), + configNetwork.ne.ERR_BAD_PARAMS) + + # Test for adding a new non-VLANed bridgeless network + # when a non-VLANed bridgeless network exists + self._addNetworkWithExc((netinfoIns, 'test', vlan, bonding, ['eth8'], + ipaddr, netmask, gw, bondingOptions, + False), + configNetwork.ne.ERR_BAD_PARAMS) +
class ConfigWriterTests(TestCaseBase): INITIAL_CONTENT = '123-testing'
-- To view, visit http://gerrit.ovirt.org/7241 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I732c8c9f1983261391835e1e3687cf120e9def34 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: test: Add tests for _validateInterNetworkCompatibility() ......................................................................
Patch Set 1:
Build Failed
http://jenkins.ovirt.info/job/patch_vdsm_unit_tests/472/ : ABORTED
-- To view, visit http://gerrit.ovirt.org/7241 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I732c8c9f1983261391835e1e3687cf120e9def34 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: test: Add tests for _validateInterNetworkCompatibility() ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(3 inline comments)
Thanks for extending the unit tests! This is very important in my opinion.
.................................................... File tests/configNetworkTests.py Line 208: 'mtu': 1500 Line 209: }, Line 210: 'eth7.1': { Line 211: 'iface': 'eth7', Line 212: 'addr': None, I don't think we ever have Nones here - it tends to confuse xmlrpc. Line 213: 'netmask': None, Line 214: 'mtu': 1500 Line 215: } Line 216: },
Line 283: configNetwork.ne.ERR_USED_NIC) Line 284: Line 285: # Test for adding a new VLANed bridged network Line 286: # when a non-VLANed bridged network exists Line 287: self._addNetworkWithExc((netinfoIns, 'test', '2', 'bond00', nics, is this intentionally a different bond device? Line 288: ipaddr, netmask, gw, bondingOptions), Line 289: configNetwork.ne.ERR_BAD_PARAMS) Line 290: Line 291: # Test for adding a new VLANed bridgeless network
Line 295: False), Line 296: configNetwork.ne.ERR_BAD_PARAMS) Line 297: Line 298: # Test for adding a new VLANed bridged network Line 299: # when the interface is in used for any type of networks i think English would say "interface is in use by" Line 300: self._addNetworkWithExc((netinfoIns, 'test', vlan, bonding, ['eth7'], Line 301: ipaddr, netmask, gw, bondingOptions), Line 302: configNetwork.ne.ERR_BAD_PARAMS) Line 303:
-- To view, visit http://gerrit.ovirt.org/7241 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I732c8c9f1983261391835e1e3687cf120e9def34 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: test: Add tests for _validateInterNetworkCompatibility() ......................................................................
Patch Set 1: (2 inline comments)
.................................................... File tests/configNetworkTests.py Line 283: configNetwork.ne.ERR_USED_NIC) Line 284: Line 285: # Test for adding a new VLANed bridged network Line 286: # when a non-VLANed bridged network exists Line 287: self._addNetworkWithExc((netinfoIns, 'test', '2', 'bond00', nics, Sorry, I can't follow your question. The existing bond device 'bond00' is used by a non-VLANed bridged network 'fakebrnet1', so I choose 'bond00' to add a new VLANed bridged or bridgeless network. It should cause conflict. I think 'bond00' is fine for the test. Line 288: ipaddr, netmask, gw, bondingOptions), Line 289: configNetwork.ne.ERR_BAD_PARAMS) Line 290: Line 291: # Test for adding a new VLANed bridgeless network
Line 295: False), Line 296: configNetwork.ne.ERR_BAD_PARAMS) Line 297: Line 298: # Test for adding a new VLANed bridged network Line 299: # when the interface is in used for any type of networks thanks for the fix. Line 300: self._addNetworkWithExc((netinfoIns, 'test', vlan, bonding, ['eth7'], Line 301: ipaddr, netmask, gw, bondingOptions), Line 302: configNetwork.ne.ERR_BAD_PARAMS) Line 303:
-- To view, visit http://gerrit.ovirt.org/7241 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I732c8c9f1983261391835e1e3687cf120e9def34 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: test: Add tests for _validateInterNetworkCompatibility() ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.info/job/patch_vdsm_unit_tests/581/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/7241 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I732c8c9f1983261391835e1e3687cf120e9def34 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: test: Add tests for _validateInterNetworkCompatibility() ......................................................................
Patch Set 2: (2 inline comments)
I like the tests a lot, now it looks much more complete this unit test. Looking very much forward to +1 this patch once the tiny formatting issues are addressed.
.................................................... File tests/configNetworkTests.py Line 286: # Test for adding a new VLANed bridged network Line 287: # when a non-VLANed bridged network exists Line 288: self._addNetworkWithExc((netinfoIns, 'test', '2', 'bond00', nics, Line 289: ipaddr, netmask, gw, bondingOptions), Line 290: configNetwork.ne.ERR_BAD_PARAMS) The indentation is off by one space (see line 284). Idem for lines 297, 303 and 310. Line 291: Line 292: # Test for adding a new VLANed bridgeless network Line 293: # when a non-VLANed bridged network exists Line 294: self._addNetworkWithExc((netinfoIns, 'test', '2', 'bond00', nics,
Line 292: # Test for adding a new VLANed bridgeless network Line 293: # when a non-VLANed bridged network exists Line 294: self._addNetworkWithExc((netinfoIns, 'test', '2', 'bond00', nics, Line 295: ipaddr, netmask, gw, bondingOptions, Line 296: False), I think we can safely fit the False), in the previous line without reaching the max character number. (The same in the other test). Line 297: configNetwork.ne.ERR_BAD_PARAMS) Line 298: Line 299: # Test for adding a new VLANed bridged network Line 300: # when the interface is in use by any type of networks
-- To view, visit http://gerrit.ovirt.org/7241 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I732c8c9f1983261391835e1e3687cf120e9def34 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: test: Add tests for _validateInterNetworkCompatibility() ......................................................................
Patch Set 3:
Build Successful
http://jenkins.ovirt.info/job/patch_vdsm_unit_tests/594/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/7241 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I732c8c9f1983261391835e1e3687cf120e9def34 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has posted comments on this change.
Change subject: test: Add tests for _validateInterNetworkCompatibility() ......................................................................
Patch Set 3:
Antoni, thanks for your review!
-- To view, visit http://gerrit.ovirt.org/7241 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I732c8c9f1983261391835e1e3687cf120e9def34 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: test: Add tests for _validateInterNetworkCompatibility() ......................................................................
Patch Set 3: Verified; Looks good to me, but someone else must approve
Building up the amount of unit tests for networking is great. Thanks.
-- To view, visit http://gerrit.ovirt.org/7241 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I732c8c9f1983261391835e1e3687cf120e9def34 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: test: Add tests for _validateInterNetworkCompatibility() ......................................................................
Patch Set 3: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/7241 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I732c8c9f1983261391835e1e3687cf120e9def34 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has submitted this change and it was merged.
Change subject: test: Add tests for _validateInterNetworkCompatibility() ......................................................................
test: Add tests for _validateInterNetworkCompatibility()
Signed-off-by: Mark Wu wudxw@linux.vnet.ibm.com Change-Id: I732c8c9f1983261391835e1e3687cf120e9def34 --- M tests/configNetworkTests.py 1 file changed, 35 insertions(+), 2 deletions(-)
Approvals: Antoni Segura Puimedon: Verified; Looks good to me, but someone else must approve Dan Kenigsberg: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/7241 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I732c8c9f1983261391835e1e3687cf120e9def34 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Igor Lvovsky ilvovsky@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org