Improve gateway_ip updation for subnet

Allow update 'gateway_ip' to null or empty for
neutron subnet, and keep the same behavior as
creation.
Also, this change adds some related functional
tests for neutron subnet resource.

Closes-Bug: #1510800
Change-Id: Ib5511402e1d118457356a8add0042be2b157eb24
This commit is contained in:
huangtianhua
2015-10-31 11:26:55 +08:00
parent 100f9153b7
commit 794a39cf67
3 changed files with 65 additions and 15 deletions

View File

@@ -121,9 +121,10 @@ class NeutronSubnetTest(common.HeatTestCase):
'enable_dhcp': True,
'host_routes': [{'destination': '192.168.1.0/24',
'nexthop': '194.168.1.2'}],
"allocation_pools": [
{"start": "10.0.3.20", "end": "10.0.3.100"},
{"start": "10.0.3.110", "end": "10.0.3.200"}]}}
'gateway_ip': '10.0.3.105',
'allocation_pools': [
{'start': '10.0.3.20', 'end': '10.0.3.100'},
{'start': '10.0.3.110', 'end': '10.0.3.200'}]}}
t = self._test_subnet(u_props=update_props)
neutronV20.find_resourceid_by_name_or_id(