yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #35333
[Bug 1474895] [NEW] subnet REST API with empty list allocation_pools incorrectly allowed
Public bug reported:
This REST API body for creating network:
{"network": {"provider:physical_network": "default", "name":
"my_network_name", "provider:segmentation_id": 1234,
"provider:network_type": "vlan"}}
Followed by this REST API body for creating a subnet:
{"subnet": {"dns_nameservers": ["10.0.0.1", "10.0.0.2"], "enable_dhcp":
false, "name": "my_subnet_name", "allocation_pools": [], "ip_version":
4, "gateway_ip": "10.0.0.3", "network_id":
"d1215f13-8eb8-43f6-a594-875a49cefdbc", "cidr": "10.0.0.0/21"}}
Note the allocation_pools set to [] on the subnet body. The subnet is created successfully, but I don't believe the subnet should be created. I think an error should be returned by the REST API. There is a lot of code in /neutron/api/v2/attributes.py to validate the allocation_pools attribute, but it appears a blank list is not validated.
** Affects: neutron
Importance: Undecided
Assignee: Eric Larese (erlarese)
Status: New
** Changed in: neutron
Assignee: (unassigned) => Eric Larese (erlarese)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1474895
Title:
subnet REST API with empty list allocation_pools incorrectly allowed
Status in neutron:
New
Bug description:
This REST API body for creating network:
{"network": {"provider:physical_network": "default", "name":
"my_network_name", "provider:segmentation_id": 1234,
"provider:network_type": "vlan"}}
Followed by this REST API body for creating a subnet:
{"subnet": {"dns_nameservers": ["10.0.0.1", "10.0.0.2"],
"enable_dhcp": false, "name": "my_subnet_name", "allocation_pools":
[], "ip_version": 4, "gateway_ip": "10.0.0.3", "network_id":
"d1215f13-8eb8-43f6-a594-875a49cefdbc", "cidr": "10.0.0.0/21"}}
Note the allocation_pools set to [] on the subnet body. The subnet is created successfully, but I don't believe the subnet should be created. I think an error should be returned by the REST API. There is a lot of code in /neutron/api/v2/attributes.py to validate the allocation_pools attribute, but it appears a blank list is not validated.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1474895/+subscriptions
Follow ups