]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Treat all negative quota values as -1
authorSudipta Biswas <sbiswas7@in.ibm.com>
Thu, 2 Apr 2015 09:36:35 +0000 (15:06 +0530)
committerSudipta Biswas <sbiswas7@in.ibm.com>
Thu, 2 Apr 2015 11:56:51 +0000 (17:26 +0530)
commit2041ead12d1bf4c2b03fd980fd2a6ce5f653dcfb
tree39ce5612ec8a9420cd9318fb3a618576aefbdbf4
parentef53ce40dfde24dfedf70e1601b8ae8886247a72
Treat all negative quota values as -1

Currently if the quota_port, quota_network, quota_subnet values
in the neutron.conf are set to a negative value not equal to -1,
neutron reports the values as is to consumers like Nova.
Nova treats -1 as the infinite quota indicator and doesn't expect
neutron to return any other non-negative value.

The fix allows the flexibility of having any negative number for the
quota parameters in the neutron.conf file and allows the nova boot
to succeed subsequently. The fix would report any negative value
as -1 for port, subnet and network.

Change-Id: Ib9a7136b0bfd01bdf04a5d0937854590029b1010
Closes-Bug: 1438738
Co-Authored-By: Salvatore Orlando <salv.orlando@gmail.com>
neutron/quota.py
neutron/tests/unit/test_quota_ext.py