Fix creation of vlan network with segmentation_id set to 0
In case when vlan network was created with segmentation_id=0 and without
physical_network given, it was passing validation of provider segment
and first available segmentation_id was choosen for network.
Problem was that in such case all available segmentation ids where
allocated and no other vlan network could be created later.
This patch fixes validation of segmentation_id when it is set to value 0.
Change-Id: Ic768deb84d544db832367f9a4b84a92729eee620
Closes-bug: #1840895
(cherry picked from commit f01f3ae5dd0dd7dd9aa513a1b50e04e20a08b97b)
Reviewed: https:/ /review. opendev. org/682557 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=7156ebfc285 3ceeeeb94b7a4f9 046eeb256051c1
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit 7156ebfc2853cee eeb94b7a4f9046e eb256051c1
Author: Slawek Kaplonski <email address hidden>
Date: Fri Aug 30 22:32:19 2019 +0200
Fix creation of vlan network with segmentation_id set to 0
In case when vlan network was created with segmentation_id=0 and without network given, it was passing validation of provider segment
physical_
and first available segmentation_id was choosen for network.
Problem was that in such case all available segmentation ids where
allocated and no other vlan network could be created later.
This patch fixes validation of segmentation_id when it is set to value 0.
Change-Id: Ic768deb84d544d b832367f9a4b84a 92729eee620 d9aa513a1b50e04 e20a08b97b)
Closes-bug: #1840895
(cherry picked from commit f01f3ae5dd0dd7d