标签:
Neutron API中大多的resource都需要quota limits。
Neutron API暴露出一个extension 来管理quota,Quota limits are enforced at the API layer,
Plugin and ML2 drivers唯一例外是subnet_allocation[1] extension。
不支持per user and 多租户嵌套。
主要组件:
quota driver:
- neutron.db.quota.driver.DbQuotaDriver
- neutron.quota.ConfDriver
The latter driver is however deprecated.
和其他Neutron extensions不同,它 有自己的own controller class [3].
其中_update_attributes只被调用一次,它会动态的更新Neutron’s resource attribute map [4]
driver operations包括:
@resource_registry.tracked_resources(network=models_v2.Network,
port=models_v2.Port, subnet=models_v2.Subnet, subnetpool=models_v2.SubnetPool)
[1] | Subnet allocation extension:http://git.openstack.org/cgit/openstack/neutron/tree/neutron/extensions/subnetallocation.py |
[2] | DB Quota driver class:http://git.openstack.org/cgit/openstack/neutron/tree/neutron/db/quota_db.py#n33 |
[3] | Quota API extension controller:http://git.openstack.org/cgit/openstack/neutron/tree/neutron/extensions/quotasv2.py#n40 |
[4] | Neutron resource attribute map:http://git.openstack.org/cgit/openstack/neutron/tree/neutron/api/v2/attributes.py#n639 |
[5] | Base controller class:http://git.openstack.org/cgit/openstack/neutron/tree/neutron/api/v2/base.py#n50 |
[6] | http://lists.openstack.org/pipermail/openstack-dev/2015-February/057534.html |
Quota Management and Enforcement
标签:
原文地址:http://www.cnblogs.com/allcloud/p/5490246.html