add test for create subnet with default gateway and conflict allocation pool
Create subnet with default gateway and conflict allocation pool should return
status code 409:
$ quantum subnet-create net1 --allocation-pool start=10.0.0.1,end=10.0.0.5 \
10.0.0.0/24
Found overlapping allocation pools:{u'start': u'10.0.0.1',
u'end': u'10.0.0.5'} 10.0.0.1 for subnet 10.0.0.0/24.
Change-Id: I8608314ad7899a752eea239dbe224e25c00a375b
This commit is contained in:
@@ -2037,6 +2037,16 @@ class TestSubnetsV2(QuantumDbPluginV2TestCase):
|
||||
enable_dhcp = False
|
||||
self._test_create_subnet(enable_dhcp=enable_dhcp)
|
||||
|
||||
def test_create_subnet_default_gw_conflict_allocation_pool_returns_409(
|
||||
self):
|
||||
cidr = '10.0.0.0/24'
|
||||
allocation_pools = [{'start': '10.0.0.1',
|
||||
'end': '10.0.0.5'}]
|
||||
with self.assertRaises(webob.exc.HTTPClientError) as ctx_manager:
|
||||
self._test_create_subnet(cidr=cidr,
|
||||
allocation_pools=allocation_pools)
|
||||
self.assertEquals(ctx_manager.exception.code, 409)
|
||||
|
||||
def test_create_subnet_gateway_in_allocation_pool_returns_409(self):
|
||||
gateway_ip = '10.0.0.50'
|
||||
cidr = '10.0.0.0/24'
|
||||
|
||||
Reference in New Issue
Block a user