Change in vdsm[master]: test: Add tests for _validateInterNetworkCompatibility()

wudxw at linux.vnet.ibm.com wudxw at linux.vnet.ibm.com
Thu Aug 16 04:56:54 UTC 2012


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 at 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 at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list