Fix creating subnet without gateway
If create_subnet() method is called with gateway=None explicity, subnet should be created without gateway_ip specified. To achieve that "gateway_ip=null" should be passed in json in request's body to neutron server. This was missing, so neutron-server allocated gateway_ip automatically. Now gateway for such network will not be set as is expected. Closes-Bug: #1769609 Change-Id: Ia9f0646a3cf371f82f2aa2dc22837249531d1ff5
This commit is contained in:
parent
cf38b77328
commit
21f5342de8
|
@ -431,6 +431,8 @@ class BaseNetworkTest(test.BaseTestCase):
|
|||
ip_version=ip_version, cidr=cidr, mask_bits=mask_bits):
|
||||
if gateway is not None:
|
||||
kwargs['gateway_ip'] = str(gateway or (subnet_cidr.ip + 1))
|
||||
else:
|
||||
kwargs['gateway_ip'] = None
|
||||
try:
|
||||
body = client.create_subnet(
|
||||
network_id=network['id'],
|
||||
|
|
Loading…
Reference in New Issue