Comment 4 for bug 1109140

Revision history for this message
Akihiro Motoki (amotoki) wrote :

jpich, thanks for diving into this.

In neutron quotas is an extension and it means whether quotas API is available or not depends on its backend plugin. (Most open source plugins and a couple of vendor plugins support quota extensions now.)

> 1. To update Neutron-related quotas, we'll need to check both that Neutron is enabled and the "quotas" extension exists

The situation is a little more complicated. Whether we can update quotas depends on the quota driver used and the driver is configured in the config file.

Neutron quota extension has two mode: (a) config-based system-wide quota and (b) per-tenant quota. (a) is the default value.
In (a) quota configurations are defined in the config file and quota values are exposed through the API. It means we cannot update quota through the API.
In (b) quota can be configured through the API and we can set different quotas per tenant. If quota for a specific tenant is customized, quota-show returns these values. Otherwise, the system default is returned.

> 2. It doesn't seem possible to get the system-wide default quotas at the moment, I think they are still defined in the
> configuration file? If there's no way to access it via an API we may need to remove the Neutron-related quotas from the
> system info panel when Neutron is enabled, to avoid confusion.

The default system-wide quotas is defined in the configuration file. The detail behavior of quota API is explained above. At now there is no way to retrieve the system default quotas explicitly.
It may be better to consider a similar API to "nova quota-defaults".
A dirty workaround is to retrieve quota value for "service" tenant or similar one. It is less likely Quotas for such tenant are configured.

What we need to consider are:
- How to determine neutron quota API is avaialable or not? -> it can be determined through ext-list.
- How to know quota update is supported or not? -> horizon local_settings?
- How to get the system default quotas?
- What should we do if neutron quota API is not available? Just ignore? Disable quota menu?